Hybrid system time synchronization method and device based on communication and pulse signals, and medium

By using multi-source clock fusion and millisecond-level zeroing technology for second pulses, the heterogeneity and adaptability issues of time synchronization in hybrid systems are solved, achieving high-precision, low-resource-consumption time synchronization, adapting to the complex environment of smart grids, and ensuring system stability and data consistency.

CN121333467APending Publication Date: 2026-01-13SHANDONG ELECTRICAL & ELECTRICAL GROUP SCIENCE & TECHNOLOGY RESEARCH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511541243.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing hybrid systems suffer from heterogeneity constraints, limitations of single time synchronization, and poor system adaptability in time synchronization, making it difficult to meet the requirements of smart grids for high precision, low resource consumption, and adaptability to complex environments.

Method used

By employing multi-source clock fusion technology, combined with millisecond-level zeroing of second pulses, and through dynamic weight fusion of SNTP, GPS, and RTC, and using Kalman filters to estimate errors, dual-system collaborative synchronization is achieved, the optimal time source is dynamically selected, the communication process is simplified, and resource consumption is reduced.

Benefits of technology

It achieves high-precision, reliable, and low-resource-consumption time synchronization, adapts to different environmental changes, ensures system time consistency and stability, and reduces system load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121333467A_ABST
    Figure CN121333467A_ABST
Patent Text Reader

Abstract

The invention relates to the field of middle and low voltage power distribution terminal time synchronization, in particular to a hybrid system time synchronization method and device based on communication and pulse signals and a medium. A multi-source clock is firstly accessed, a non-real-time system is connected with an SNTP, a GPS and an RTC, and a real-time system is connected with the GPS and the RTC; then non-real-time system fusion time synchronization is carried out, the signal quality of each clock source is evaluated in real time, and an optimal time synchronization source is automatically selected through Kalman filtering to complete time fusion; the non-real-time system sends a frame of second-level time to the real-time system every set time, the GPS and the RTC send second pulses to the dual systems, and the dual systems selectively receive the second pulses according to the signal condition of the current pulse source and execute millisecond zero clearing. Single time synchronization limitation is solved through multi-source clock dynamic fusion, pulse per second millisecond level zero clearing is combined, the system time error is only pulse processing time, and the time keeping precision is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of time synchronization for medium and low voltage power distribution terminals, specifically to a hybrid system adaptive time synchronization method, device, and medium that combines port communication and pulse signals. It is applicable to power distribution terminals in new smart grids that adopt a hybrid design of non-real-time and real-time, and can ensure the time consistency and system stability of power distribution terminals in scenarios such as urban power grids, industrial parks, and rural power grids. Background Technology

[0002] As the new smart grid evolves towards digitalization and intelligence, distribution terminals need to integrate technologies such as edge computing and the Internet of Things, and often adopt a hybrid system design combining real-time and non-real-time approaches—ensuring deterministic responses to real-time tasks through physical isolation and resource allocation, while also considering the flexibility of non-real-time systems. Time synchronization is a core prerequisite for ensuring data consistency, system stability, and meeting the real-time requirements of terminals. Currently, there are three main problems with time synchronization in hybrid systems: 1. Heterogeneity constraints: Different systems use different clock sources and synchronization protocols, resulting in high resource consumption, cumbersome operation, and difficulty in guaranteeing accuracy during time synchronization.

[0003] 2. Limitations of single time synchronization: GPS time synchronization has high accuracy but is limited by the environment (such as weak signal in indoor or urban canyon scenarios); SNTP time synchronization relies on the network and has high availability but low accuracy. Relying on either method alone cannot adapt to complex scenarios.

[0004] 3. Poor system adaptability: Existing time synchronization methods are complex and require complex communication protocols and interactions, which not only increases the system load but also imposes stringent requirements on the processing speed of real-time systems, making it difficult to meet the smart grid's demand for "low resource consumption and high synchronization accuracy". Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a time synchronization method, device, and medium for a hybrid system based on communication and pulse signals. By dynamically fusing multiple sources, it overcomes the limitations of single-time synchronization. Combined with millisecond-level zeroing of second pulses, the system time error is only the pulse processing time, significantly improving timekeeping accuracy.

[0006] To solve the aforementioned technical problem, the technical solution adopted by the present invention is: a time synchronization method for a hybrid system based on communication and pulse signals, comprising the following steps: S01. Multi-source clock access, including SNTP, GPS and RTC. Non-real-time systems connect to SNTP, GPS and RTC, and real-time systems connect to GPS and RTC. S02. When merging non-real-time systems, before the non-real-time system is powered on and before SNTP and GPS are connected, the non-real-time system receives the clock signal from the RTC. After SNTP and GPS are connected to the non-real-time system, they are merged and timed. Let the GPS weight be a and the clock signal be T1, and the SNTP weight be b and the clock signal be T2. Then the merged clock signal T = aT1 + bT2. The weights a and b are adjusted in real time according to the signal quality of SNTP and GPS, and a + b = 1. S03. Dual-system coordination and synchronization: The non-real-time system sends a second-level time frame to the real-time system every set interval. GPS and RTC send a second pulse to both the non-real-time and real-time systems at 000ms per second. The non-real-time and real-time systems select which second pulse to receive based on the current pulse source signal condition, and then perform millisecond clearing. The millisecond clearing process is as follows: 1. When a second pulse signal is detected, obtain the current system time value in milliseconds, Tms; 2. If Tms > preset maximum time threshold Tmax, the system seconds count is incremented by 1, and the millisecond count is reset to zero. 3. If Tms < preset minimum time threshold Tmin, directly reset the millisecond count to zero; 4. If Tmin≤Tms≤Tmax, a time synchronization error is detected, and the error counter Errocont is incremented by 1.

[0007] Furthermore, a Kalman filter is used to process the GPS signal to estimate the error value of its own clock. When the GPS signal weight drops to 0, the non-real-time system adds its own clock signal to the error value estimated by the Kalman filter and compares the addition result with the clock signal of SNTP. If the difference between the addition result and the clock signal of SNTP is greater than a set threshold, the non-real-time system uses its own clock signal; otherwise, the non-real-time system uses the clock signal of SNTP.

[0008] Furthermore, in step S02, when the signal-to-noise ratio of the GPS signal is higher than the set threshold and the number of locked satellites is >6, a≥0.8, b≤0.2. When the signal-to-noise ratio of the GPS signal decreases, a decreases and b increases. When the GPS antenna is damaged by human intervention, a=0, b=1, and the non-real-time system fully enters SNTP timekeeping mode.

[0009] Furthermore, the non-real-time system sends a frame of time (in seconds) to the real-time system via the RS485 port.

[0010] Furthermore, the non-real-time system sends a frame of time (in seconds) to the real-time system every 20 seconds.

[0011] Furthermore, the non-real-time system and the real-time system select the receiving second pulse based on the signal condition of the current pulse source: when there is a second pulse sent by GPS, the second pulse sent by GPS is selected; if there is no second pulse sent by GPS, the second pulse sent by RTC is selected.

[0012] Furthermore, when Errocont reaches the preset maximum value CntSet, an alarm or resynchronization is triggered.

[0013] Furthermore, Tmax = 990ms, Tmin = 10ms.

[0014] The present invention also discloses a hybrid system time synchronization device based on communication and pulse signals, including a processor and a memory storing program instructions. The processor is configured to execute the hybrid system time synchronization method based on communication and pulse signals as described above when running the program instructions.

[0015] The present invention also discloses a storage medium storing program instructions, which, when executed, perform the hybrid system time synchronization method based on communication and pulse signals as described above.

[0016] The beneficial effects of this invention are: 1. High precision and high reliability: The limitations of single time synchronization are solved by multi-source dynamic fusion. Combined with millisecond-level zeroing of the second pulse, the system time error is only the pulse processing time, and the timekeeping accuracy is significantly improved. The RTC saves the time after power failure and does not need to be recalibrated after restart.

[0017] 2. Low resource consumption and simple process: Port communication only transmits simple time frames, without the need for complex protocols and interactions, reducing system load; real-time systems only need to process second-level time frames within 1 second, reducing the requirements for processing speed.

[0018] 3. Strong adaptability: It automatically adapts to environmental changes (such as GPS signal blockage and SNTP network fluctuations), dynamically selects the optimal time source, is compatible with hybrid power distribution terminals of different architectures, and adapts to the needs of multiple smart grid scenarios.

[0019] 4. Data and system stability: Achieve absolute time synchronization between the two systems, ensuring the consistency of data acquisition and command execution in the distribution network, and avoiding system failures or data errors caused by time deviations. Attached Figure Description

[0020] Figure 1 This is a diagram of the time synchronization system architecture of the present invention; Figure 2 This is a flowchart of the time synchronization pulse clearing process of the present invention; Figure 3 This is a schematic block diagram of the device described in Example 2; In the diagram, Tms represents the current millisecond time, Tmax represents the maximum threshold for milliseconds, Tmin represents the minimum threshold for milliseconds, Ts represents the current second value, Errocnnt represents the error count, and CntSet represents the maximum error count. Detailed Implementation

[0021] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0022] Example 1 This embodiment discloses a time synchronization method for a hybrid system based on communication and pulse signals. This method is applied to a 10kV medium-voltage distribution terminal in an industrial park. The distribution terminal adopts a hybrid architecture of "non-real-time system (responsible for data storage and remote communication) + real-time system (responsible for relay protection and real-time control)," and needs to meet a time synchronization accuracy requirement of ±1ms. The method includes the following steps: S01, Multi-source clock access, such as Figure 1 As shown, the multi-source clock includes SNTP, GPS, and RTC. The non-real-time system connects to SNTP, GPS, and RTC, while the real-time system connects to GPS and RTC. The non-real-time system is connected to the real-time system and is used to send second-level time to the real-time system. Before using the multi-source clock, the external clock source must be initialized: the GPS module receives satellite signals, the SNTP connects to the dedicated power distribution network and is used to send clock signals to the non-real-time system, and the RTC module stores the initial time.

[0023] S02. For non-real-time system fusion and time synchronization, before the non-real-time system is powered on and before SNTP and GPS are connected, the non-real-time system receives the clock signal from the RTC. After SNTP and GPS are connected to the non-real-time system, fusion and time synchronization are performed. Let the GPS weight be a and the clock signal be T1, and the SNTP weight be b and the clock signal be T2. Then the fused clock signal T = aT1 + bT2. The weights a and b are adjusted in real time according to the signal quality of SNTP and GPS, and a + b = 1.

[0024] In this embodiment, when the signal-to-noise ratio of the GPS signal is higher than the set threshold and the number of locked satellites is >6, a≥0.8, b≤0.2. When the signal-to-noise ratio of the GPS signal decreases, a decreases and b increases. When the GPS antenna is damaged by human intervention, a=0, b=1, and the non-real-time system fully enters SNTP timekeeping mode.

[0025] The Kalman filter is used to process the GPS signal to estimate its own clock error value. When the GPS signal weight drops to 0, the non-real-time system adds its own clock signal to the error value estimated by the Kalman filter and compares the addition result with the SNTP clock signal. If the difference between the addition result and the SNTP clock signal is greater than a set threshold, the non-real-time system uses its own clock signal; otherwise, the non-real-time system uses the SNTP clock signal.

[0026] S03. Dual-system coordination and synchronization: The non-real-time system sends a second-level time frame to the real-time system every set interval. GPS and RTC send a second pulse to both the non-real-time and real-time systems at 000ms per second. The non-real-time and real-time systems select which second pulse to receive based on the current signal condition of the pulse source, and then perform millisecond clearing. Figure 2 As shown, the millisecond clearing process is as follows: 1. When a second pulse signal is detected, obtain the current system time value in milliseconds, Tms; 2. If Tms > preset maximum time threshold Tmax, the system seconds count is incremented by 1, and the millisecond count is reset to zero. 3. If Tms < preset minimum time threshold Tmin, directly reset the millisecond count to zero; 4. If Tmin ≤ Tms ≤ Tmax, a time synchronization anomaly is determined, and the error counter Errocnnt is incremented by 1. When Errocnnt reaches the preset maximum value CntSet, an alarm is triggered or resynchronization is initiated. In this embodiment, Tmax = 990ms, Tmin = 10ms, and Errocnnt = 5, meaning that if Tms is between 10 and 990ms for 5 consecutive times, an alarm is triggered and the system switches to GPS single-source time synchronization.

[0027] In this embodiment, the non-real-time system sends a frame of second-level time, such as 2025-9-01 12:00:00, to the real-time system every 20 seconds via the RS485 port. The non-real-time and real-time systems select which second pulse to receive based on the current pulse source signal condition: if a second pulse transmitted by GPS is available, the GPS-transmitted second pulse is selected; otherwise, the RTC-transmitted second pulse is selected.

[0028] The above describes the method from a step-by-step perspective. From the perspectives of non-real-time and real-time systems, the operations performed by each system are as follows: Non-real-time system time calibration: 1. Multi-source clock access: Integrates GPS and RTC (real-time clock) modules and connects to the SNTP network clock source to form a multi-dimensional time synchronization data source.

[0029] 2. Dynamic weighted fusion: Real-time evaluation of the signal quality of each clock source (GPS: signal strength, number of satellites; SNTP: network latency, jitter), and automatic selection of the optimal time source through Kalman filtering to complete time fusion, ensuring the basic time accuracy and reliability of non-real-time systems.

[0030] 3. Secondary calibration of second pulse: After receiving the second pulse signal sent by GPS and RTC, the pulse signal source is selected according to the current signal source quality. Combined with the processing time of the current system operation status, the error is further eliminated and the time synchronization accuracy of the non-real-time system is improved.

[0031] Synchronization between real-time and non-real-time systems 1. Port-based one-way second-level synchronization: Non-real-time systems transmit "second-level absolute time frames" to real-time systems via ports. Figure 1 The UTC time sent from the China-Africa real-time system to the real-time system contains only core time information, without the need for complex communication protocols, achieving second-level time alignment between the two systems and reducing communication interaction and resource consumption.

[0032] 2. Millisecond-level pulse calibration: GPS and RTC simultaneously send second pulse signals to the non-real-time and real-time systems at the second edge; after receiving the pulse, the two systems trigger a millisecond time zeroing operation (the error is only the pulse processing time), achieving millisecond-level precision synchronization, and calibrating once per second to improve the system's timekeeping accuracy.

[0033] Example 2 This disclosure provides a hybrid system time synchronization device 300 based on communication and pulse signals, such as... Figure 3 As shown, the device includes a processor 304 and a memory 301. Optionally, the device may further include a communication interface 302 and a bus 303. The processor 304, communication interface 302, and memory 301 can communicate with each other via the bus 303. The communication interface 302 can be used for information transmission. The processor 304 can call logical instructions in the memory 301 to execute the hybrid system time synchronization method based on communication and pulse signals described in the above embodiment.

[0034] Furthermore, the logic instructions in the aforementioned memory 301 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0035] The memory 301, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 304 executes functional applications and data processing by running the program instructions / modules stored in the memory 301, thereby realizing the hybrid system time synchronization method based on communication and pulse signals in the above embodiments.

[0036] The memory 301 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 301 may include high-speed random access memory and may also include non-volatile memory.

[0037] Example 3 This disclosure provides a computer-readable storage medium storing computer-executable instructions configured to execute the above-described hybrid system time synchronization method based on communication and pulse signals.

[0038] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0039] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code; it can also be a transient storage medium.

[0040] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for descriptive purposes only and is not intended to limit the scope of protection. As used in the description herein, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used herein means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.

[0041] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0042] The methods and products (including but not limited to devices and equipment) disclosed in the embodiments herein can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed between each other may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to implement this embodiment according to actual needs. In addition, the functional units in the embodiments of this disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

Claims

1. A time synchronization method for a hybrid system based on communication and pulse signals, characterized by comprising the following steps: S01. Multi-source clock access, including SNTP, GPS and RTC. Non-real-time systems connect to SNTP, GPS and RTC, and real-time systems connect to GPS and RTC. S02. When merging non-real-time systems, the non-real-time system receives the clock signal from the RTC before SNTP and GPS are connected. After SNTP and GPS are connected to the non-real-time system, they are merged and timed. Let the GPS weight be a and the clock signal be T1, and the SNTP weight be b and the clock signal be T2. Then the merged clock signal T = aT1 + bT2. The weights a and b are adjusted in real time according to the signal quality of SNTP and GPS, and a + b = 1. S03. Dual-system coordination and synchronization: The non-real-time system sends a second-level time frame to the real-time system every set interval. GPS and RTC send a second pulse to both the non-real-time and real-time systems at 000ms per second. The non-real-time and real-time systems select which second pulse to receive based on the current pulse source signal condition, and then perform millisecond clearing. The millisecond clearing process is as follows:

1. When a second pulse signal is detected, obtain the current system time value in milliseconds, Tms; 2. If Tms > preset maximum time threshold Tmax, the system seconds count is incremented by 1, and the millisecond count is reset to zero.

3. If Tms < preset minimum time threshold Tmin, directly reset the millisecond count to zero; 4. If Tmin≤Tms≤Tmax, a time synchronization error is detected, and the error counter Errocont is incremented by 1.

2. The time synchronization method for a hybrid system based on communication and pulse signals according to claim 1, characterized in that: The Kalman filter is used to process the GPS signal to estimate its own clock error value. When the GPS signal weight drops to 0, the non-real-time system adds its own clock signal to the error value estimated by the Kalman filter and compares the addition result with the SNTP clock signal. If the difference between the addition result and the SNTP clock signal is greater than a set threshold, the non-real-time system uses its own clock signal; otherwise, the non-real-time system uses the SNTP clock signal.

3. The time synchronization method for a hybrid system based on communication and pulse signals according to claim 1, characterized in that: In step S02, when the signal-to-noise ratio of the GPS signal is higher than the set threshold and the number of locked satellites is >6, a≥0.8, b≤0.

2. When the signal-to-noise ratio of the GPS signal decreases, a decreases and b increases. When the GPS antenna is damaged by human intervention, a=0, b=1, and the non-real-time system fully enters SNTP timekeeping mode.

4. The time synchronization method for a hybrid system based on communication and pulse signals according to claim 1, characterized in that: The non-real-time system sends a frame of time (in seconds) to the real-time system via the RS485 port.

5. The time synchronization method for a hybrid system based on communication and pulse signals according to claim 1, characterized in that: The non-real-time system sends a frame of time (in seconds) to the real-time system every 20 seconds.

6. The time synchronization method for a hybrid system based on communication and pulse signals according to claim 1, characterized in that: The non-real-time system and the real-time system select the receiving second pulse based on the signal condition of the current pulse source: when there is a second pulse sent by GPS, the second pulse sent by GPS is selected; if there is no second pulse sent by GPS, the second pulse sent by RTC is selected.

7. The time synchronization method for a hybrid system based on communication and pulse signals according to claim 1, characterized in that: When Errocont reaches the preset maximum value CntSet, an alarm or resynchronization is triggered.

8. The time synchronization method for a hybrid system based on communication and pulse signals according to claim 1, characterized in that: Tmax=990ms, Tmin=10ms.

9. A time synchronization device for a hybrid system based on communication and pulse signals, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute, when running the program instructions, the hybrid system time synchronization method based on communication and pulse signals as described in any one of claims 1 to 8.

10. A storage medium storing program instructions, characterized in that: When the program instructions are executed, they perform the hybrid system time synchronization method based on communication and pulse signals as described in any one of claims 1 to 8.