Electric energy meter and fusion terminal wide temperature range high precision clock synchronization method and module
Patent Information
- Application Number
- CN202610677058.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-18
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]为了解决现有技术中宽温环境下晶振频率漂移导致时钟同步精度不足的问题,本申请提供一种电能表与融合终端宽温域高精度时钟同步方法及模组
本申请通过时钟同步模组的各单元协同工作,授时接收单元获取外部时间源并解析标准时间信号,时间处理单元结合标准时间信号与晶振实时频率信号计算频率修正值,晶振根据修正值补偿频率,最终时间处理单元生成本地时间基准并同步至外部电能表与融合终端,实现了宽温域场景下电力终端的时间同步,保障了电能计量、数据采集的时间一致性,提升了电力系统数据处理的准确性和可靠性。
Smart Images

Figure CN122592772A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of time synchronization technology, and in particular to a method and module for wide-temperature-range high-precision clock synchronization between an energy meter and a fusion terminal. Background Technology
[0002] During the operation of the power system, electricity meters and fusion terminals are the core equipment for power data acquisition, metering and transmission. Their time synchronization accuracy directly affects the accuracy of power data, the fairness of metering and the reliability of system dispatch. Therefore, it is urgent to provide high-precision clock synchronization support for these power terminals.
[0003] In existing technologies, a common crystal oscillator is typically used in conjunction with a single timing signal to achieve clock synchronization for power terminals. After the timing receiving unit acquires the external single timing signal, it parses out the standard time. The time processing unit then performs a simple correction on the output frequency of the common crystal oscillator based on this standard time, and finally synchronizes the generated local time reference to the energy meter and the fusion terminal. However, power terminals often operate in complex environments such as outdoor and underground distribution rooms, where the ambient temperature fluctuates greatly. The frequency stability of the common crystal oscillator is easily affected by temperature, resulting in significant drift. Existing technologies do not have an effective crystal oscillator frequency temperature compensation mechanism designed for wide-temperature operating conditions, which leads to a significant decrease in clock synchronization accuracy and fails to meet the high-precision clock synchronization requirements of energy meter metering and power system dispatching. Summary of the Invention
[0004] To address the problem of insufficient clock synchronization accuracy caused by crystal oscillator frequency drift in the existing technology under wide temperature range, this application provides a method and module for wide temperature range high-precision clock synchronization between an energy meter and a fusion terminal.
[0005] In the first aspect, this application provides a method for synchronizing a wide-temperature-range, high-precision clock between an energy meter and a fusion terminal, employing the following technical solution: A method for synchronizing a wide-temperature-range high-precision clock between an energy meter and a fusion terminal, executed by a wide-temperature-range high-precision clock synchronization module of the energy meter and fusion terminal, the module including a time receiving unit, a wide-temperature-range temperature-compensated crystal oscillator, a time processing unit, and a time output interface, the method comprising: The time receiving unit acquires an external time source and parses it to obtain a standard time signal; The time processing unit receives the real-time frequency signal output by the wide-temperature-range temperature-compensated crystal oscillator and the standard time signal, calculates the frequency correction value using a high-precision time synchronization algorithm, and feeds it back to the wide-temperature-range temperature-compensated crystal oscillator. The wide-temperature-range temperature-compensated crystal oscillator compensates the real-time output frequency according to the frequency correction value to obtain the compensated real-time frequency signal. The time processing unit generates a local time reference based on the compensated real-time frequency signal, and outputs the local time reference synchronously to the external energy meter and the fusion terminal through the time output interface, so as to synchronize the time of the energy meter and the fusion terminal.
[0006] By adopting the above technical solution, through the collaborative work of each unit of the clock synchronization module, the time receiving unit acquires the external time source and parses the standard time signal, the time processing unit calculates the frequency correction value by combining the standard time signal with the real-time frequency signal of the crystal oscillator, the crystal oscillator compensates the frequency according to the correction value, and finally the time processing unit generates a local time reference and synchronizes it to the external energy meter and the fusion terminal, realizing the time synchronization of power terminals in a wide temperature range scenario, ensuring the time consistency of energy metering and data acquisition, and improving the accuracy and reliability of power system data processing.
[0007] In a preferred embodiment, this application can be further configured such that the process of the time synchronization receiving unit acquiring an external time source and parsing it to obtain a standard time signal includes: The timing receiving unit simultaneously receives at least two different types of timing signals, including satellite timing signals and ground timing signals. The time processing unit performs consistency verification on each time signal based on the current local time reference and calculates the instantaneous deviation between each time signal and the current local time reference. A timing signal whose instantaneous deviation exceeds a preset deviation threshold and whose instantaneous deviation shows a unidirectional drift trend within a preset verification period is judged as an abnormal signal; otherwise, it is judged as a valid timing signal. The time synchronization receiving unit parses the standard time signal from the valid time synchronization signal.
[0008] By adopting the above technical solution, the timing receiving unit simultaneously receives two different types of timing signals, satellite and ground. The time processing unit verifies each signal based on the current local time reference and calculates the instantaneous deviation, filters out the valid timing signal and analyzes the standard time signal, realizing redundant backup of the timing signal. This effectively avoids the problem of timing failure or accuracy reduction caused by interference with a single timing signal, and improves the reliability of external time source acquisition and the accuracy of the standard time signal.
[0009] In a preferred embodiment, this application can be further configured such that the process by which the time synchronization receiving unit parses the standard time signal from the valid time synchronization signal includes: When there are multiple valid time synchronization signals, the time processing unit evaluates the signal quality parameters of each valid time synchronization signal. The signal quality parameters include at least one of signal-to-noise ratio, transmission delay jitter amplitude, and historical consistency score. The time processing unit assigns a fusion weight to each valid time signal according to the signal quality parameters, and performs a weighted average of each valid time signal based on the fusion weight to obtain a fusion time reference. The time receiving unit parses the standard time signal from the fused time reference.
[0010] By adopting the above technical solution, when there are multiple valid time signals, the fusion time reference is obtained by evaluating the quality parameters such as the signal-to-noise ratio and transmission delay jitter of each signal, assigning fusion weights and performing a weighted average, and then analyzing the standard time signal. This solves the problem of insufficient accuracy caused by the quality difference of multiple valid signals, integrates the advantages of each signal, and further improves the stability and accuracy of the standard time signal.
[0011] In a preferred embodiment, this application can be further configured such that: the calculation of the frequency correction value using a high-precision time synchronization algorithm includes: Determine the phase difference between the standard time signal and the real-time frequency signal, and calculate the basic correction value based on the phase difference; The real-time ambient temperature is collected, and the temperature compensation value corresponding to the real-time ambient temperature is calculated according to the frequency temperature compensation lookup table. The frequency correction value is obtained by nonlinearly fitting and superimposing the basic correction value and the temperature compensation value.
[0012] By adopting the above technical solution and using a high-precision time synchronization algorithm, the basic correction value is first calculated based on the phase difference between the standard time signal and the real-time frequency signal. Then, the temperature compensation value is calculated by combining the real-time ambient temperature and the frequency temperature compensation lookup table. The two are then nonlinearly fitted and superimposed to obtain the frequency correction value. This effectively offsets the inherent frequency deviation of the crystal oscillator and the frequency drift caused by temperature, improves the stability of the crystal oscillator frequency in a wide temperature range, and provides accurate support for the subsequent generation of time reference.
[0013] In a preferred embodiment, this application can be further configured such that the process of the time processing unit feeding back the frequency correction value to the wide-temperature-range temperature-compensated crystal oscillator includes: The time processing unit collects the current ambient temperature in real time and calculates the current temperature change rate of the current ambient temperature; When the current temperature change rate exceeds the preset change rate threshold, the feedforward correction amount is calculated based on the current temperature change rate and the slope of the frequency temperature compensation lookup table. The feedforward correction and the frequency correction value are superimposed to form the updated frequency correction value, which is then fed back to the wide-temperature-range temperature-compensated crystal oscillator.
[0014] By adopting the above technical solution, when feeding back the frequency correction value, the current ambient temperature is collected in real time and the temperature change rate is calculated. When the change rate exceeds the standard, the feedforward correction amount is calculated and superimposed with the frequency correction value before being fed back. This makes up for the lag of crystal oscillator frequency drift when the temperature changes rapidly, avoids the decrease in accuracy caused by calibration lag, and further improves the timeliness and accuracy of crystal oscillator frequency calibration in wide temperature range scenarios.
[0015] In a preferred embodiment, this application can be further configured such that the method also includes: When the time receiving unit is unable to obtain the external time source, the time processing unit stops calculating the new frequency correction value and switches to timekeeping mode; In the timekeeping mode, the time processing unit records the historical temperature change trajectory within the last preset time period before entering the timekeeping mode, and predicts the predicted frequency drift trend within the future preset time window based on the historical temperature change trajectory and the frequency temperature compensation lookup table. The time processing unit generates a predicted frequency correction value sequence based on the predicted frequency drift trend, and feeds back the predicted frequency correction value sequence to the wide-temperature-range temperature-compensated crystal oscillator in chronological order.
[0016] By adopting the above technical solution, when the time receiving unit cannot obtain an external time source, it switches to timekeeping mode. By recording the historical temperature change trajectory, it predicts the future frequency drift trend, generates a sequence of predicted frequency correction values, and feeds them back to the crystal oscillator in sequence. This achieves stable compensation of the crystal oscillator frequency in the absence of external time synchronization, maintains the accuracy of the local time reference, avoids excessive time deviation of the power terminal caused by time synchronization anomalies, and ensures the continuity of time synchronization of the power system.
[0017] Secondly, this application provides a wide-temperature-range high-precision clock synchronization module for electricity meters and integrated terminals, employing the following technical solution: A wide-temperature-range high-precision clock synchronization module for an energy meter and a fusion terminal includes: a time receiving unit, a wide-temperature-range temperature-compensated crystal oscillator, a time processing unit, and a time output interface; The time synchronization receiving unit is used to acquire an external time source and parse it to obtain a standard time signal; The wide-temperature-range temperature-compensated crystal oscillator is used to output a real-time frequency signal and receive a frequency correction value to compensate the real-time output frequency, thereby obtaining a compensated real-time frequency signal. The time processing unit is connected to the time receiving unit and the wide-temperature-range temperature-compensated crystal oscillator respectively. It is used to receive the real-time frequency signal and the standard time signal, calculate the frequency correction value using a high-precision time synchronization algorithm and feed it back to the wide-temperature-range temperature-compensated crystal oscillator; and generate a local time reference based on the compensated real-time frequency signal. The time output interface is connected to the time processing unit and is used to synchronously output the local time reference to the external energy meter and the fusion terminal so that the time of the energy meter and the fusion terminal is synchronized.
[0018] In a preferred embodiment, the module can be further configured as follows: the module is packaged as an independent pluggable module, or directly integrated into the main circuit board of the energy meter or converged terminal in the form of a system-on-a-chip. The operating temperature range of the wide-temperature-range temperature-compensated crystal oscillator is -40℃ to +85℃.
[0019] In a preferred embodiment, this application can be further configured such that: the time processing unit integrates a temperature sensing module and a frequency temperature compensation lookup table; the frequency temperature compensation lookup table stores the frequency deviation compensation coefficients corresponding to each temperature point of the wide-temperature-range temperature-compensated crystal oscillator within the range of -40℃ to +85℃.
[0020] In a preferred embodiment, this application may be further configured such that the time output interface includes at least two electrically isolated output channels, respectively used to connect the energy meter and the fusion terminal.
[0021] In summary, this application includes the following beneficial technical effects: This application achieves time synchronization of power terminals in a wide temperature range scenario by having each unit of the clock synchronization module work collaboratively. The time receiving unit acquires an external time source and parses the standard time signal. The time processing unit combines the standard time signal with the real-time frequency signal of the crystal oscillator to calculate the frequency correction value. The crystal oscillator compensates for the frequency according to the correction value. Finally, the time processing unit generates a local time reference and synchronizes it to the external energy meter and the fusion terminal. This ensures the time consistency of energy metering and data acquisition, and improves the accuracy and reliability of power system data processing. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating a method for synchronizing a power meter with a fusion terminal over a wide temperature range and with high precision, according to an embodiment of this application. Figure 2 This is a schematic diagram of the structure of a wide-temperature-range high-precision clock synchronization module for an energy meter and a fusion terminal provided in an embodiment of this application. Detailed Implementation
[0023] The following is in conjunction with the appendix Figure 1 To be continued Figure 2 This application will be described in further detail.
[0024] This specific embodiment is merely an explanation of this application and is not intended to limit it. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they fall within the scope of the claims of this application.
[0025] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.
[0027] It should be noted that all data interaction processes involved in this application have corresponding transmission protocols, including authorized data collection and use, and both parties involved in the data interaction have completed data authorization through the execution of the protocol.
[0028] This application provides a method for synchronizing a wide-temperature-range, high-precision clock between an energy meter and a fusion terminal, such as... Figure 1 As shown, the method provided in this embodiment is executed by a wide-temperature-range high-precision clock synchronization module between the energy meter and the fusion terminal. The module includes a time receiving unit, a wide-temperature-range temperature-compensated crystal oscillator, a time processing unit, and a time output interface. The method includes steps S101-S104, wherein: S101, The time receiving unit acquires an external time source and parses it to obtain a standard time signal.
[0029] The timing receiving unit integrates a satellite timing module (such as a BeiDou / GPS dual-mode receiving module) and a ground timing receiving module, simultaneously enabling the reception of both types of timing signals to ensure the reliability of the external time source. After receiving the external timing signal, the timing receiving unit filters and decodes the signal, extracting key information such as timestamps and synchronization pulses, and converts it into a standard time signal conforming to the communication protocol of the time processing unit (such as I2C or SPI protocol). This standard time signal is then transmitted to the time processing unit.
[0030] S102 The time processing unit receives the real-time frequency signal and standard time signal output by the wide-temperature-range temperature-compensated crystal oscillator, calculates the frequency correction value using a high-precision time synchronization algorithm, and feeds it back to the wide-temperature-range temperature-compensated crystal oscillator.
[0031] The time processing unit employs a high-performance embedded microprocessor, pre-integrating a high-precision time synchronization algorithm. It receives the real-time frequency signal from a wide-temperature-range temperature-compensated crystal oscillator via a dedicated signal interface, while simultaneously receiving the standard time signal transmitted from the time synchronization receiving unit. During algorithm execution, it first calculates the phase difference between the standard time signal and the real-time frequency signal, obtaining a basic correction value based on this phase difference. Then, it uses the temperature sensing module integrated within the time processing unit to acquire the current ambient temperature and calculates the temperature compensation value using a pre-defined frequency-temperature compensation lookup table. Finally, it performs a nonlinear fitting and superposition of the basic correction value and the temperature compensation value to obtain the final frequency correction value, which is then fed back to the wide-temperature-range temperature-compensated crystal oscillator via a control interface.
[0032] The output frequency of a wide-temperature-range temperature-compensated crystal oscillator can drift due to factors such as ambient temperature and its own aging, causing a deviation between the local time and the standard time. The time processing unit compares the standard time signal with the real-time frequency signal output by the crystal oscillator, calculates the deviation between the two, and then converts the deviation into a frequency correction value through a high-precision time synchronization algorithm, feeding it back to the crystal oscillator to achieve frequency calibration.
[0033] S103, the wide-temperature-range temperature-compensated crystal oscillator compensates the real-time output frequency according to the frequency correction value, and obtains the compensated real-time frequency signal.
[0034] A wide-temperature-range temperature-compensated crystal oscillator (TTC) is a crystal oscillator with temperature compensation functionality. It maintains frequency stability over a wide temperature range (typically -40℃ to +85℃). Its core consists of a crystal resonator and a temperature compensation circuit. After receiving the frequency correction value from the time processing unit via a control interface, the compensation circuit decodes the correction value and adjusts the capacitance parameters of the internal resonant circuit accordingly, thereby calibrating the crystal oscillator's output frequency and offsetting deviations caused by temperature drift. Once calibration is complete, the crystal oscillator continuously outputs the compensated real-time frequency signal to the time processing unit, ensuring frequency output stability.
[0035] S104. The time processing unit generates a local time reference based on the compensated real-time frequency signal, and outputs the local time reference synchronously to the external energy meter and fusion terminal through the time output interface, so as to synchronize the time of the energy meter and the fusion terminal.
[0036] The time processing unit, based on the compensated real-time frequency signal, counts using its internal timing module and combines this with the initial timestamp of the standard time signal to generate a local time, forming a stable local time reference. The time output interface employs at least two electrically isolated output channels (such as an RS485 interface), respectively connected to the energy meter and the converged terminal, to avoid signal interference between different terminals. The time processing unit transmits the local time reference as a digital signal to the energy meter and the converged terminal at a fixed frequency (e.g., once per second) through the output interface. After receiving the signal, the terminal devices calibrate their own clocks with the local time reference, achieving time synchronization across all terminals.
[0037] In this embodiment, the various units of the clock synchronization module work together. The time receiving unit acquires an external time source and parses the standard time signal. The time processing unit combines the standard time signal with the real-time frequency signal of the crystal oscillator to calculate the frequency correction value. The crystal oscillator compensates for the frequency according to the correction value. Finally, the time processing unit generates a local time reference and synchronizes it to the external energy meter and the fusion terminal. This realizes the time synchronization of power terminals in a wide temperature range scenario, ensures the time consistency of energy metering and data acquisition, and improves the accuracy and reliability of power system data processing.
[0038] One possible implementation of this application embodiment includes the process by which the time receiving unit acquires an external time source and parses it to obtain a standard time signal, comprising: The timing receiving unit simultaneously receives at least two different types of timing signals, including satellite timing signals and ground timing signals; The time processing unit performs consistency checks on each time signal based on the current local time reference and calculates the instantaneous deviation between each time signal and the current local time reference. A timing signal whose instantaneous deviation exceeds a preset deviation threshold and whose instantaneous deviation shows a unidirectional drift trend within a preset verification period is judged as an abnormal signal; otherwise, it is judged as a valid timing signal. The time synchronization receiving unit parses the standard time signal from the valid time synchronization signal.
[0039] In this embodiment, a single type of time synchronization signal is susceptible to external interference (such as satellite signal blockage or ground network interruption), which may lead to time synchronization failure or decreased accuracy. Simultaneously receiving at least two different types of time synchronization signals can achieve redundant backup of the time synchronization signals, improve the reliability of external time source acquisition, and provide a guarantee for the accurate analysis of subsequent standard time signals.
[0040] Different time synchronization signals may exhibit anomalies due to transmission interference, equipment malfunctions, etc. Consistency checks can filter out abnormal time synchronization signals. The time processing unit pre-reads the real-time frequency signal currently output by the wide-temperature-range temperature-compensated crystal oscillator to generate a local temporary time reference (accurate to the millisecond level); simultaneously, it receives each time synchronization signal transmitted by the time synchronization receiving unit and extracts the timestamp information of each signal. An embedded algorithm calculates the difference between the timestamp of each time synchronization signal and the current local time reference to obtain the instantaneous deviation of each time synchronization signal.
[0041] The preset deviation threshold refers to the maximum acceptable instantaneous deviation of the time synchronization signal (usually ±1 millisecond) set in advance according to the time synchronization accuracy requirements of the power terminal. The preset verification period refers to the fixed time period used to judge the instantaneous deviation trend (usually set to 10 seconds). The unidirectional drift trend refers to the trend of a certain time synchronization signal continuously increasing or decreasing within the preset verification period, without reverse fluctuation.
[0042] The time processing unit is pre-configured with a preset deviation threshold and a preset verification period. Within each verification period, it continuously collects instantaneous deviation data for each time synchronization signal and uses a trend analysis algorithm to determine the deviation trend. If the instantaneous deviation of a time synchronization signal exceeds the preset deviation threshold and continues to increase or decrease within the preset verification period, the signal is determined to be an abnormal signal, marked, and removed. If the instantaneous deviation is within the threshold range, or if it occasionally exceeds the threshold but shows no unidirectional drift trend, it is determined to be a valid time synchronization signal and retained for subsequent standard time signal analysis.
[0043] In this embodiment, the timing receiving unit simultaneously receives two different types of timing signals: satellite and ground. The time processing unit verifies each signal based on the current local time reference and calculates the instantaneous deviation, filters out the valid timing signal, and parses the standard time signal. This achieves redundant backup of the timing signal, effectively avoiding the problem of timing failure or accuracy reduction caused by interference with a single timing signal, and improving the reliability of external time source acquisition and the accuracy of the standard time signal.
[0044] One possible implementation of this application embodiment includes the process by which the time synchronization receiving unit parses the standard time signal from the valid time synchronization signal, comprising: When there are multiple valid time signals, the time processing unit evaluates the signal quality parameters of each valid time signal. The signal quality parameters include at least one of the following: signal-to-noise ratio, transmission delay jitter amplitude, and historical consistency score. The time processing unit assigns a fusion weight to each valid time signal based on the signal quality parameters, and performs a weighted average of each valid time signal based on the fusion weight to obtain the fusion time reference. The time receiving unit parses the standard time signal from the fused time reference.
[0045] The time processing unit pre-configures evaluation standards for signal quality parameters. For each valid time signal, it synchronously collects three signal quality parameters: signal-to-noise ratio (SNR), transmission delay jitter amplitude, and historical consistency score. The transmission delay jitter amplitude can be obtained by continuously collecting delay data multiple times (e.g., 10 times) and calculating the fluctuation range of the delay data. Instantaneous deviation data of the time signal within a recent period (e.g., 1 minute) is retrieved, and the variance of the instantaneous deviation data is calculated. A historical consistency score is given based on the variance: Historical consistency score = 10 × (maximum variance - current path variance) / (maximum variance - minimum variance). The historical consistency score ranges from 0 to 10, where the maximum variance is the variance of the time signal with the largest variance, the minimum variance is the variance of the time signal with the smallest variance, and the current path variance is the variance of the time signal currently being calculated for historical consistency. The specific values of the three parameters are normalized, and the normalized three parameters are weighted and summed based on a preset weighting rule. The result is used as the signal quality score for the corresponding valid time signal.
[0046] Furthermore, the fusion weight of each valid time signal is calculated. For any valid time signal, its fusion weight is the ratio of the preferred signal quality score of that valid time signal to the sum of the signal quality scores of all valid time signals. The sum of the fusion weights of all valid time signals is 1. The timestamp information after parsing each valid time signal is extracted, and the timestamp is multiplied by its corresponding fusion weight. The sum of all weighted timestamps is calculated to obtain the fused time reference. This reference integrates the advantages of multiple valid signals and has higher accuracy than a single signal.
[0047] The time synchronization receiving unit receives the fused time reference transmitted by the time processing unit and performs secondary filtering on it. A low-pass filtering algorithm is used to remove any residual interference or noise that may remain during the fusion process, ensuring the stability of the time reference. A dedicated decoding module extracts key information from the fused time reference, such as the UTC timestamp, synchronization pulse, and time synchronization identifier, and converts it into a digital signal conforming to the time processing unit's communication protocol (such as I2C or SPI), ensuring that the time processing unit can directly recognize and process it. After decoding, the time synchronization receiving unit verifies the signal. Once it confirms that the signal is complete and without deviation, it transmits it to the time processing unit as the final standard time signal.
[0048] In this embodiment, when multiple valid time signals exist, the quality parameters such as signal-to-noise ratio and transmission delay jitter of each signal are evaluated, fusion weights are assigned, and a weighted average is performed to obtain a fused time reference. Then, the standard time signal is analyzed, which solves the problem of insufficient accuracy caused by the quality difference of multiple valid signals, integrates the advantages of each signal, and further improves the stability and accuracy of the standard time signal.
[0049] One possible implementation of this application embodiment involves calculating the frequency correction value using a high-precision time synchronization algorithm, including: Determine the phase difference between the standard time signal and the real-time frequency signal, and calculate the basic correction value based on the phase difference; The real-time ambient temperature is collected, and the temperature compensation value corresponding to the real-time ambient temperature is calculated according to the frequency temperature compensation lookup table. The frequency correction value is obtained by nonlinearly fitting and superimposing the basic correction value and the temperature compensation value.
[0050] In this embodiment, the time processing unit synchronously receives a standard time signal and a real-time frequency signal output from a wide-temperature-range temperature-compensated crystal oscillator via a dedicated signal acquisition interface, converting the two signals into digital signals with a unified sampling frequency. A phase detection algorithm, such as a cross-correlation algorithm, is used to compare the phases of the two digital signals and calculate their instantaneous phase difference. Based on a preset mapping relationship between phase difference and frequency deviation, the calculated phase difference is converted into a frequency deviation value, which is then adjusted using a proportional-integral algorithm to obtain a basic correction value.
[0051] While wide-temperature-range temperature-compensated crystal oscillators possess basic temperature compensation capabilities, frequency drift can still occur in extreme temperature or rapidly changing temperature scenarios. Basic correction values alone cannot completely offset the effects of temperature. The time processing unit uses an integrated high-precision temperature sensor module to collect the current ambient temperature of the clock synchronization module in real time. The temperature sensor module converts the collected analog temperature signal into a digital signal and transmits it to the time processing unit. The time processing unit calls an internally stored frequency-temperature compensation lookup table, which is pre-calibrated experimentally and covers the frequency deviation compensation coefficient for every 1°C within the range of -40°C to +85°C. If the collected real-time ambient temperature happens to be the calibration temperature in the lookup table, the corresponding compensation coefficient is directly extracted; if it is not the calibration temperature, a linear interpolation algorithm is used to calculate the corresponding compensation coefficient, which is then multiplied by the current crystal oscillator output frequency to obtain the temperature compensation value.
[0052] Nonlinear fitting and superposition refers to the process of fusing and superimposing the two correction values, taking into account the nonlinear correlation between the basic correction value (phase difference dominant) and the temperature compensation value (temperature dominant), using a nonlinear fitting algorithm (such as the least squares method). This avoids the correction deviation caused by simple linear superposition. The time processing unit pre-integrates a nonlinear fitting algorithm, such as the least squares method, and uses the basic correction value and the temperature compensation value. A fitting function is constructed with the basic correction value on the horizontal axis and the temperature compensation value on the vertical axis. The algorithm calculates the optimal fusion coefficient between the two, eliminating nonlinear interference. The basic correction value and the temperature compensation value are then substituted into the fitting function for nonlinear superposition calculation to obtain the final frequency correction value. The frequency correction value is fed back to the wide-temperature-range temperature-compensated crystal oscillator via a control interface (such as an I2C interface), completing the calculation and feedback of the frequency correction value.
[0053] This embodiment uses a high-precision time synchronization algorithm to first calculate the basic correction value based on the phase difference between the standard time signal and the real-time frequency signal. Then, it combines the real-time ambient temperature and the frequency temperature compensation lookup table to calculate the temperature compensation value. The two are then nonlinearly fitted and superimposed to obtain the frequency correction value. This effectively offsets the inherent frequency deviation of the crystal oscillator and the frequency drift caused by temperature, improves the stability of the crystal oscillator frequency in a wide temperature range, and provides accurate support for the subsequent generation of the time base.
[0054] One possible implementation of this application embodiment includes the process by which the time processing unit feeds back the frequency correction value to the wide-temperature-range temperature-compensated crystal oscillator, comprising: The time processing unit collects the current ambient temperature in real time and calculates the current rate of change of the current ambient temperature; When the current temperature change rate exceeds the preset change rate threshold, the feedforward correction amount is calculated based on the current temperature change rate and the slope of the frequency temperature compensation lookup table. The feedforward correction and the frequency correction value are superimposed and used as the updated frequency correction value to feed back to the wide-temperature-range temperature-compensated crystal oscillator.
[0055] In this embodiment, when the ambient temperature changes rapidly, the frequency drift of the wide-temperature-range temperature-compensated crystal oscillator exhibits lag. Relying solely on the calculated frequency correction value cannot promptly offset the drift caused by the rapid temperature change, resulting in frequency calibration lag. By collecting the current ambient temperature in real time and calculating the rate of temperature change, the impact of temperature changes on the crystal oscillator frequency can be predicted, providing data support for subsequent feedforward correction and avoiding calibration lag problems.
[0056] The time processing unit, through its integrated high-precision temperature sensing module, immediately acquires the current ambient temperature after calculating the frequency correction value, and simultaneously retrieves the previously acquired ambient temperature data. It then calculates the temperature change—the difference between the current and previous ambient temperatures—using a difference algorithm, and divides this difference by the acquisition interval to obtain the current temperature change rate. The calculated current temperature change rate is compared with a preset change rate threshold to determine whether feedforward correction needs to be triggered.
[0057] When the absolute value of the current temperature change rate exceeds a preset threshold, the time processing unit immediately invokes the frequency temperature compensation lookup table, extracts temperature compensation coefficient data near the current ambient temperature, and calculates the slope of the lookup table within that temperature range using a linear fitting algorithm. The feedforward correction is then calculated according to a preset formula: Δf = k × T, where Δf is the feedforward correction, k is the slope of the frequency temperature compensation lookup table, and T is the current temperature change rate. The slope of the frequency temperature compensation lookup table quantifies the correlation between temperature change and crystal oscillator frequency drift. When the temperature change rate exceeds the threshold, based on this slope and the current temperature change rate, the amount of crystal oscillator frequency drift in the near future can be predicted, and the feedforward correction can be calculated to compensate for the crystal oscillator frequency in advance, offsetting the drift caused by rapid temperature changes and improving calibration timeliness and accuracy.
[0058] The time processing unit linearly superimposes the calculated frequency correction value with the feedforward correction amount to obtain the updated frequency correction value. If the current temperature change rate does not exceed the threshold, the feedforward correction amount is 0, and the updated frequency correction value is the frequency correction value obtained in the aforementioned embodiment. The updated frequency correction value is fed back to the wide-temperature-range temperature-compensated crystal oscillator in real time to ensure that the crystal oscillator adjusts the output frequency in a timely manner according to the correction value, thus completing the entire frequency correction value feedback process.
[0059] In this embodiment, when feeding back the frequency correction value, the current ambient temperature is collected in real time and the temperature change rate is calculated. When the change rate exceeds the standard, the feedforward correction amount is calculated and superimposed with the frequency correction value before being fed back. This compensates for the lag in crystal oscillator frequency drift when the temperature changes rapidly, avoids the decrease in accuracy caused by calibration lag, and further improves the timeliness and accuracy of crystal oscillator frequency calibration in a wide temperature range scenario.
[0060] One possible implementation of this application embodiment includes: When the time receiving unit cannot obtain an external time source, the time processing unit stops calculating new frequency correction values and switches to timekeeping mode. In timekeeping mode, the time processing unit records the historical temperature change trajectory within the last preset time period before entering timekeeping mode, and predicts the predicted frequency drift trend within the preset time window based on the historical temperature change trajectory and the frequency temperature compensation lookup table. The time processing unit generates a sequence of predicted frequency correction values based on the predicted frequency drift trend, and feeds the sequence of predicted frequency correction values back to the wide-temperature-range temperature-compensated crystal oscillator in chronological order.
[0061] In this embodiment, the time synchronization receiving unit may be unable to obtain an external time source due to external interference, communication interruptions, or other factors. If it continues to calculate a new frequency correction value at this time, the lack of a standard time reference will lead to correction deviations, affecting the accuracy of the local time. The time processing unit monitors the signal reception status of the time synchronization receiving unit in real time. If it detects that the time synchronization receiving unit has not received any valid time synchronization signal within a preset monitoring period (both satellite and ground time synchronization signals have failed or been determined to be abnormal), it is determined to be a time synchronization anomaly. At this time, the time processing unit immediately stops calculating new frequency correction values, shuts down the signal processing flow related to external time synchronization, switches to the preset timekeeping mode, and records the time point of entering the timekeeping mode to provide a basis for subsequent historical data retrieval.
[0062] After the time processing unit switches to timekeeping mode, it immediately retrieves the real-time ambient temperature data stored in the internal cache for the last preset duration (e.g., 5 minutes) before entering timekeeping mode, organizes it into a continuous historical temperature change trajectory, and marks the temperature value corresponding to each time point. It then calls the frequency temperature compensation lookup table and, combined with the historical temperature change trajectory, analyzes the temperature change pattern (e.g., uniform temperature increase, uniform temperature decrease, or fluctuating change). Using a trend prediction algorithm (e.g., linear regression), based on the historical temperature change pattern, it predicts the temperature change trend within the preset time window in the future. Combining this with the slope of the frequency temperature compensation lookup table, it converts the predicted temperature change into a predicted frequency drift trend, clarifying the frequency drift amplitude and direction for each future time point.
[0063] The time processing unit calculates the frequency drift for each time point within a preset time window based on the predicted frequency drift trend. Combining this with a frequency temperature compensation lookup table, it generates a predicted frequency correction value for each time point, arranging these values chronologically to form a sequence that ensures a precise match between the correction value and the predicted drift. Following the chronological order, the time processing unit sends a predicted frequency correction value to the wide-temperature-range temperature-compensated crystal oscillator feedback sequence corresponding to the timestamp. Upon receiving this value, the crystal oscillator adjusts its output frequency promptly to offset the predicted frequency drift. The predicted frequency drift trend clearly defines the crystal oscillator frequency drift at each future time point, generating a corresponding sequence of predicted frequency correction values to compensate for future frequency drift in advance. The chronological feedback ensures real-time tracking of crystal oscillator frequency changes, guaranteeing stable output frequency in timekeeping mode, maintaining the accuracy of the local time reference, and preventing excessive time deviations due to the lack of external time synchronization.
[0064] In this embodiment, when the time receiving unit cannot obtain an external time source, it switches to timekeeping mode. By recording historical temperature change trajectories, it predicts future frequency drift trends, generates a sequence of predicted frequency correction values, and feeds them back to the crystal oscillator in sequence. This achieves stable compensation of the crystal oscillator frequency in the absence of external time synchronization, maintains the accuracy of the local time reference, avoids excessive time deviation of power terminals caused by time synchronization anomalies, and ensures the continuity of power system time synchronization.
[0065] This application provides a wide-temperature-range, high-precision clock synchronization module for electricity meters and integrated terminals, such as... Figure 2 As shown, module 200 includes: a time receiving unit 201, a wide temperature range temperature-compensated crystal oscillator 202, a time processing unit 203, and a time output interface 204.
[0066] Specifically, the time receiving unit 201 is used to acquire an external time source and parse it to obtain a standard time signal. The wide-temperature-range temperature-compensated crystal oscillator 202 is used to output a real-time frequency signal and receive a frequency correction value to compensate the real-time output frequency, obtaining a compensated real-time frequency signal. The time processing unit 203 is connected to both the time receiving unit and the wide-temperature-range temperature-compensated crystal oscillator, and is used to receive the real-time frequency signal and the standard time signal, calculate the frequency correction value using a high-precision time synchronization algorithm and feed it back to the wide-temperature-range temperature-compensated crystal oscillator; and generate a local time reference based on the compensated real-time frequency signal. The time output interface 204 is connected to the time processing unit and is used to synchronously output the local time reference to external energy meters and converged terminals to synchronize the time of the energy meters and converged terminals.
[0067] One possible implementation of this application embodiment is that the module is packaged as an independent pluggable module, or directly integrated into the main circuit board of the energy meter or converged terminal in the form of a system-on-a-chip. The operating temperature range of the wide-temperature-compensated crystal oscillator is -40℃ to +85℃.
[0068] Specifically, all components of the module (time receiving unit, time processing unit, wide-temperature-range temperature-compensated crystal oscillator, etc.) are integrated and packaged into an independent, pluggable, standardized module. The module is equipped with a unified interface (such as card slots and pins) that can be directly inserted into the corresponding interface of the energy meter or converged terminal. Installation and disassembly are convenient, facilitating later maintenance, replacement, or upgrades. The module is relatively independent from the terminal's main circuit board and can be flexibly selected according to actual needs, adapting to different models of energy meters and converged terminals, demonstrating strong versatility.
[0069] The core functions of the module (time synchronization, frequency correction, time synchronization, etc.) can also be integrated into a system-on-a-chip (SoC), which can then be directly soldered onto the main circuit board of the energy meter or converged terminal, eliminating the need for a separate module package. This results in a compact size, saving internal space in the terminal; high integration with the main terminal circuitry; short signal transmission distance; stronger anti-interference capabilities; and lower power consumption, making it suitable for terminal devices with strict requirements on size and power consumption.
[0070] In one possible implementation of this application, the time processing unit integrates a temperature sensing module and a frequency temperature compensation lookup table; the frequency temperature compensation lookup table stores the frequency deviation compensation coefficients corresponding to each temperature point in the range of -40℃ to +85℃ for a wide-temperature-range temperature-compensated crystal oscillator.
[0071] In one possible implementation of this application, the time output interface includes at least two electrically isolated output channels, which are respectively used to connect the energy meter and the fusion terminal.
[0072] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0073] The above are only some embodiments of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for synchronizing a wide-temperature-range, high-precision clock between an energy meter and a fusion terminal, characterized in that, The method is executed by a wide-temperature-range high-precision clock synchronization module between the energy meter and the fusion terminal. The module includes a time receiving unit, a wide-temperature-range temperature-compensated crystal oscillator, a time processing unit, and a time output interface. The time receiving unit acquires an external time source and parses it to obtain a standard time signal; The time processing unit receives the real-time frequency signal output by the wide-temperature-range temperature-compensated crystal oscillator and the standard time signal, calculates the frequency correction value using a high-precision time synchronization algorithm, and feeds it back to the wide-temperature-range temperature-compensated crystal oscillator. The wide-temperature-range temperature-compensated crystal oscillator compensates the real-time output frequency according to the frequency correction value to obtain the compensated real-time frequency signal. The time processing unit generates a local time reference based on the compensated real-time frequency signal, and outputs the local time reference synchronously to the external energy meter and the fusion terminal through the time output interface, so as to synchronize the time of the energy meter and the fusion terminal.
2. The method for synchronizing a wide-temperature-range high-precision clock between an energy meter and a fusion terminal according to claim 1, characterized in that, The process by which the time synchronization receiving unit acquires an external time source and parses it to obtain a standard time signal includes: The timing receiving unit simultaneously receives at least two different types of timing signals, including satellite timing signals and ground timing signals. The time processing unit performs consistency verification on each time signal based on the current local time reference and calculates the instantaneous deviation between each time signal and the current local time reference. A timing signal whose instantaneous deviation exceeds a preset deviation threshold and whose instantaneous deviation shows a unidirectional drift trend within a preset verification period is judged as an abnormal signal; otherwise, it is judged as a valid timing signal. The time synchronization receiving unit parses the standard time signal from the valid time synchronization signal.
3. The method for synchronizing a wide-temperature-range high-precision clock between an energy meter and a fusion terminal according to claim 2, characterized in that, The process by which the time synchronization receiving unit parses the standard time signal from the valid time synchronization signal includes: When there are multiple valid time synchronization signals, the time processing unit evaluates the signal quality parameters of each valid time synchronization signal. The signal quality parameters include at least one of signal-to-noise ratio, transmission delay jitter amplitude, and historical consistency score. The time processing unit assigns a fusion weight to each valid time signal according to the signal quality parameters, and performs a weighted average of each valid time signal based on the fusion weight to obtain a fusion time reference. The time receiving unit parses the standard time signal from the fused time reference.
4. The method for synchronizing a wide-temperature-range high-precision clock between an energy meter and a fusion terminal according to claim 1, characterized in that, The frequency correction value calculated using a high-precision time synchronization algorithm includes: Determine the phase difference between the standard time signal and the real-time frequency signal, and calculate the basic correction value based on the phase difference; The real-time ambient temperature is collected, and the temperature compensation value corresponding to the real-time ambient temperature is calculated according to the frequency temperature compensation lookup table. The frequency correction value is obtained by nonlinearly fitting and superimposing the basic correction value and the temperature compensation value.
5. The method for synchronizing a wide-temperature-range high-precision clock between an energy meter and a fusion terminal according to claim 1, characterized in that, The process by which the time processing unit feeds back the frequency correction value to the wide-temperature-range temperature-compensated crystal oscillator includes: The time processing unit collects the current ambient temperature in real time and calculates the current temperature change rate of the current ambient temperature; When the current temperature change rate exceeds the preset change rate threshold, the feedforward correction amount is calculated based on the current temperature change rate and the slope of the frequency temperature compensation lookup table. The feedforward correction and the frequency correction value are superimposed to form the updated frequency correction value, which is then fed back to the wide-temperature-range temperature-compensated crystal oscillator.
6. The method for synchronizing a wide-temperature-range high-precision clock between an energy meter and a fusion terminal according to claim 1, characterized in that, The method further includes: When the time receiving unit is unable to obtain the external time source, the time processing unit stops calculating the new frequency correction value and switches to timekeeping mode; In the timekeeping mode, the time processing unit records the historical temperature change trajectory within the last preset time period before entering the timekeeping mode, and predicts the predicted frequency drift trend within the future preset time window based on the historical temperature change trajectory and the frequency temperature compensation lookup table. The time processing unit generates a predicted frequency correction value sequence based on the predicted frequency drift trend, and feeds back the predicted frequency correction value sequence to the wide-temperature-range temperature-compensated crystal oscillator in chronological order.
7. A wide-temperature-range high-precision clock synchronization module for an energy meter and a fusion terminal, characterized in that, include: The system includes a time receiving unit, a wide-temperature-range temperature-compensated crystal oscillator, a time processing unit, and a time output interface. The time synchronization receiving unit is used to acquire an external time source and parse it to obtain a standard time signal; The wide-temperature-range temperature-compensated crystal oscillator is used to output a real-time frequency signal and receive a frequency correction value to compensate the real-time output frequency, thereby obtaining a compensated real-time frequency signal. The time processing unit is connected to the time receiving unit and the wide-temperature-range temperature-compensated crystal oscillator respectively, and is used to receive the real-time frequency signal and the standard time signal, calculate the frequency correction value using a high-precision time synchronization algorithm and feed it back to the wide-temperature-range temperature-compensated crystal oscillator. And generate a local time reference based on the compensated real-time frequency signal; The time output interface is connected to the time processing unit and is used to synchronously output the local time reference to the external energy meter and the fusion terminal so that the time of the energy meter and the fusion terminal is synchronized.
8. The wide-temperature-range high-precision clock synchronization module for electricity meters and integrated terminals according to claim 7, characterized in that, The module is packaged as an independent pluggable module, or directly integrated into the main circuit board of the energy meter or converged terminal in the form of a system-on-a-chip. The operating temperature range of the wide-temperature-range temperature-compensated crystal oscillator is -40℃ to +85℃.
9. The wide-temperature-range high-precision clock synchronization module for electricity meters and integrated terminals according to claim 7, characterized in that, The time processing unit integrates a temperature sensing module and a frequency temperature compensation lookup table; the frequency temperature compensation lookup table stores the frequency deviation compensation coefficients corresponding to each temperature point of the wide-temperature-range temperature-compensated crystal oscillator within the range of -40℃ to +85℃.
10. The wide-temperature-range high-precision clock synchronization module for energy meters and fusion terminals according to claim 7, characterized in that, The time output interface includes at least two electrically isolated output channels, which are used to connect the energy meter and the fusion terminal, respectively.