CN115102657B - Clock frequency synchronization method and device of metering device and storage medium - Google Patents

Clock frequency synchronization method and device of metering device and storage medium Download PDF

Info

Publication number
CN115102657B
CN115102657B CN202210750508.8A CN202210750508A CN115102657B CN 115102657 B CN115102657 B CN 115102657B CN 202210750508 A CN202210750508 A CN 202210750508A CN 115102657 B CN115102657 B CN 115102657B
Authority
CN
China
Prior art keywords
frequency
metering device
frequency control
time
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210750508.8A
Other languages
Chinese (zh)
Other versions
CN115102657A (en
Inventor
陈昊
孟静
张密
蒋依芹
宋晓卉
白静芬
杨玉博
徐熙彤
李宗嵘
岑炜
段永贤
张丽
耿爱玲
葛亚男
贾福泉
李华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
China Electric Power Research Institute Co Ltd CEPRI
Original Assignee
State Grid Corp of China SGCC
China Electric Power Research Institute Co Ltd CEPRI
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by State Grid Corp of China SGCC, China Electric Power Research Institute Co Ltd CEPRI filed Critical State Grid Corp of China SGCC
Priority to CN202210750508.8A priority Critical patent/CN115102657B/en
Publication of CN115102657A publication Critical patent/CN115102657A/en
Application granted granted Critical
Publication of CN115102657B publication Critical patent/CN115102657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0682Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The invention discloses a clock frequency synchronization method and device of a metering device and a storage medium. The clock frequency synchronization method of the metering device is applied between metering devices of the metering device in a platform area level and comprises the following steps: detecting a network condition of the metering device, and determining a network state of the metering device, wherein the network state comprises an online state and an offline state; determining a frequency control mode of the metering device according to the network state, wherein the frequency control mode is realized through a preset frequency control module; calculating time delay and time offset between metering devices of the metering device, wherein each metering device is respectively provided with a frequency control module; and according to the time delay, the time offset and the control mode, the clock frequency of each metering device of the metering device is synchronized. The technical problem that metering devices with a plurality of platform layers in the prior art lack effective time synchronization means and cannot meet the requirements of a smart grid is solved.

Description

Clock frequency synchronization method and device of metering device and storage medium
Technical Field
The present invention relates to the field of power metering technologies, and in particular, to a method and an apparatus for synchronizing clock frequency of a metering device, and a storage medium.
Background
With the development of informatization and digitalization of a power grid, a large number of devices are accessed, the topology structure of a power distribution network is increasingly complex, and the requirement for realizing synchronous acquisition at each metering device in the power distribution network is increasingly urgent. Nodes serving different functions in the whole power distribution network also correspond to the level requirements of different time synchronization precision. For example, the time synchronization accuracy required by power consumption management, load monitoring, electric quantity collection and the like is 1 second; the time synchronization accuracy of SCADA monitoring is 10ms; the time synchronization accuracy of the time sequential recording (SOE) is 1ms; and the time synchronization accuracy of the synchrophasor measurement (PMU) is 1 μs.
At present, a large number of metering devices in a national network in a platform area layer lack effective time synchronization means, and the requirements of a smart grid cannot be met. Therefore, the research of the economic and reliable time-frequency value transmission and time synchronization system in the intelligent power distribution network has a key effect on effectively solving a series of problems introduced in the intelligent power distribution network.
Aiming at the technical problems that the metering devices with a plurality of platform layers in the prior art lack an effective time synchronization means and cannot meet the requirements of the intelligent power grid, an effective solution is not proposed at present.
Disclosure of Invention
The embodiment of the disclosure provides a clock frequency synchronization method and device of a metering device and a storage medium, which are used for at least solving the technical problem that a metering device with a plurality of platform layers in the prior art lacks an effective time synchronization means and cannot meet the requirements of a smart grid.
According to an aspect of the embodiments of the present disclosure, there is provided a clock frequency synchronization method of a metering device, applied between metering apparatuses of a metering device in a platform area level, including:
detecting a network condition of the metering device, and determining a network state of the metering device, wherein the network state comprises an online state and an offline state;
determining a frequency control mode of the metering device according to the network state, wherein the frequency control mode is realized through a preset frequency control module;
calculating time delay and time offset between metering devices of the metering device, wherein each metering device is respectively provided with a frequency control module;
and according to the time delay, the time offset and the control mode, the clock frequency of each metering device of the metering device is synchronized.
According to another aspect of the embodiments of the present disclosure, there is also provided a storage medium including a stored program, wherein the method of any one of the above is performed by a processor when the program is run.
According to another aspect of the embodiments of the present disclosure, there is also provided a clock frequency synchronization apparatus of a metering apparatus, applied between metering devices of the metering apparatus in a platform area level, including:
the first determining module is used for detecting the network condition of the metering device and determining the network state of the metering device, wherein the network state comprises an online state and an offline state;
the second determining module is used for determining a frequency control mode of the metering device according to the network state, wherein the frequency control mode is realized through a preset frequency control module;
the calculating module is used for calculating time delay and time offset among metering devices of the metering device, wherein each metering device is respectively provided with a frequency control module;
and the synchronization module is used for synchronizing the clock frequency of each metering device of the metering device according to the time delay, the time offset and the control mode.
According to another aspect of the embodiments of the present disclosure, there is also provided a clock frequency synchronization apparatus of a metering apparatus, applied between metering devices of the metering apparatus in a platform area level, including:
a processor; and
a memory, coupled to the processor, for providing instructions to the processor for processing the steps of:
Detecting a network condition of the metering device, and determining a network state of the metering device, wherein the network state comprises an online state and an offline state;
determining a frequency control mode of the metering device according to the network state, wherein the frequency control mode is realized through a preset frequency control module;
calculating time delay and time offset between metering devices of the metering device, wherein each metering device is respectively provided with a frequency control module;
and according to the time delay, the time offset and the control mode, the clock frequency of each metering device of the metering device is synchronized.
In the embodiment of the disclosure, by setting different frequency control strategies for different network states, the problem of tracing the local frequency source of the metering device is solved, and the frequency accuracy of the metering device under the online condition and the short-term frequency accuracy under the offline condition are ensured. And the tracing problem of absolute time is realized by calculating the time delay and time offset measuring and calculating method among the measuring devices of the measuring device, so that the performance requirement on time synchronization in power informatization is met. The technical effect of accurate time synchronization among metering devices of the platform layer metering device is achieved. And further, the technical problem that a plurality of metering devices in a platform area layer in the prior art lack an effective time synchronization means and cannot meet the requirements of the intelligent power grid is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure, illustrate and explain the present disclosure, and together with the description serve to explain the present disclosure. In the drawings:
FIG. 1 is a block diagram of a hardware architecture of a computing device for implementing a method according to embodiment 1 of the present disclosure;
fig. 2A is a schematic diagram of a power time code value transmission system for power line carrier communication according to embodiment 1 of the present disclosure;
fig. 2B is a schematic diagram of establishing a time topology relationship between terminal nodes based on a power carrier network according to the first aspect of embodiment 1 of the present disclosure;
FIG. 3 is a flow chart of a method of clock frequency synchronization of a metering device according to a first aspect of embodiment 1 of the present disclosure;
fig. 4 is a schematic diagram of a frequency control module according to a first aspect of embodiment 1 of the present disclosure;
FIG. 5 is a schematic diagram of a clock frequency magnitude transfer evaluation process according to a first aspect of embodiment 1 of the present disclosure;
FIG. 6 is a schematic diagram of a time delay and time offset measurement process according to a first aspect of embodiment 1 of the present disclosure;
FIG. 7 is a schematic diagram of a clock frequency synchronization device of a metering device according to embodiment 2 of the present disclosure;
fig. 8 is a schematic diagram of a clock frequency synchronization device of a metering device according to embodiment 3 of the present disclosure.
Detailed Description
In order to better understand the technical solutions of the present disclosure, the following description will clearly and completely describe the technical solutions of the embodiments of the present disclosure with reference to the drawings in the embodiments of the present disclosure. It will be apparent that the described embodiments are merely embodiments of a portion, but not all, of the present disclosure. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure, shall fall within the scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
T-GM: t GrandMaster, master clock
T-TC: t Transparent Clock transparent clock
T-SC: t Slave Clock
PPS: pulse Per Second, pulse Per Second Pulse
And (3) ToD: time of Day, current Time
Example 1
According to the present embodiment, there is also provided a clock frequency synchronization method embodiment of a metering device, it being noted that the steps shown in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowchart, in some cases the steps shown or described may be performed in an order different from that shown or described herein.
The method embodiments provided by the present embodiments may be performed in a mobile terminal, a computer terminal, a server, or similar computing device. Fig. 1 shows a block diagram of the hardware architecture of a computing device for implementing a method of clock frequency synchronization of a metering device. As shown in fig. 1, the computing device may include one or more processors (which may include, but are not limited to, a microprocessor MCU, a programmable logic device FPGA, etc., processing means), memory for storing data, and transmission means for communication functions. In addition, the method may further include: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power supply, and/or a camera. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the computing device may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors and/or other data processing circuits described above may be referred to herein generally as "data processing circuits. The data processing circuit may be embodied in whole or in part in software, hardware, firmware, or any other combination. Furthermore, the data processing circuitry may be a single stand-alone processing module, or incorporated in whole or in part into any of the other elements in the computing device. As referred to in the embodiments of the present disclosure, the data processing circuit acts as a processor control (e.g., selection of the variable resistance termination path to interface with).
The memory may be used to store software programs and modules of application software, such as a program instruction/data storage device corresponding to the clock frequency synchronization method of the metering device in the embodiments of the disclosure, and the processor executes the software programs and modules stored in the memory, thereby executing various functional applications and data processing, that is, implementing the clock frequency synchronization method of the metering device of the application program. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory may further include memory remotely located with respect to the processor, which may be connected to the computing device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communications provider of the computing device. In one example, the transmission means comprises a network adapter (Network Interface Controller, NIC) connectable to other network devices via the base station to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the computing device.
It should be noted herein that in some alternative embodiments, the computing device shown in FIG. 1 described above may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that fig. 1 is only one example of a particular specific example and is intended to illustrate the types of components that may be present in the computing devices described above.
Fig. 2A is a schematic diagram of a system for transmitting power time code values using power carrier communication according to the present embodiment. Referring to fig. 2A, the system includes: three-stage time nodes, a master clock T-GM, a boundary clock T-BC and a slave clock T-SC. According to the time synchronization volume transmission process shown in fig. 2A, a standard time node is synchronized with an upper time node through a satellite sharing mode, and is synchronized with a master clock through a 1PPS and a ToD interface, and then the time synchronization is performed by the T-GM and the T-SC/T-BC nodes through the scheme of the present invention, so that the time volume transmission of each metering device in the whole network is completed. Wherein,
(1) Three-stage time node: the GNSS satellite navigation signals are captured and tracked by the common view unit, the navigation satellite system time is recovered, the time difference of the two-level nodes is obtained by applying the GNSS common view principle, and 1PPS pulse signals and ToD (Time of Day) time code signals are output.
(2) T-GM (T-GrandMaster master clock): the master node and the master clock in the time topological relation receive the 1PPS signal and the ToD output by the three-stage time node through the clock node to perform clock synchronization; the module performs frequency phase locking operation by utilizing the self-contained TCXO crystal oscillator and 1PPS to obtain a high-precision frequency signal and absolute time which are transmitted by the magnitude.
(3) T-BC (T-Boundary Clock): the intermediate node which may exist in the time topological relation is usually a relay node which is constructed by carrying out communication due to line signal attenuation, and the intermediate node can also complete frequency and time synchronization between the main node and the relay node based on a software protocol of carrier communication.
(4) T-SC (T-Slaver Clock slave Clock): the slave nodes, typically terminal equipment slave clocks, in the time topology perform frequency and time synchronization between the master node or relay node and the slave nodes through a software protocol based on carrier communication.
In addition, fig. 2B is a schematic diagram of establishing a time topology relationship between terminal nodes based on a power carrier network, and establishes a time topology as shown in fig. 2B in combination with a carrier communication link layer networking process, where: the T-GM is positioned at the three-level node and is a master clock; T-BC is a relay node that is both a slave clock and a master clock of the next stage; T-SC is the end node, the slave clock. And then a synchronization system is established in the whole network.
In the above-described operating environment, according to a first aspect of the present embodiment, there is provided a clock frequency synchronization method of a metering device. Fig. 3 shows a schematic flow chart of the method, and referring to fig. 3, the method includes:
s301: detecting a network condition of the metering device, and determining a network state of the metering device, wherein the network state comprises an online state and an offline state;
s302: determining a frequency control mode of the metering device according to the network state, wherein the frequency control mode is realized through a preset frequency control module;
s303: calculating time delay and time offset between metering devices of the metering device, wherein each metering device is respectively provided with a frequency control module;
s304: and according to the time delay, the time offset and the control mode, the clock frequency of each metering device of the metering device is synchronized.
As described in the background art, the current metering devices of the national network, which are numerous in the area level, lack effective time synchronization means, and cannot meet the requirements of the smart grid. Therefore, the research of the economic and reliable time-frequency value transmission and time synchronization system in the intelligent power distribution network has a key effect on effectively solving a series of problems introduced in the intelligent power distribution network.
In view of this, the invention provides a clock frequency synchronization method for a metering device on a platform layer by combining with a power time synchronization volume transmission requirement and a power time frequency value transmission time synchronization system of a power carrier, which aims at the defects of the prior art and the actual condition that a power grid adopts carrier communication, and firstly detects the network condition of the metering device and determines the network state of the metering device, wherein the network state comprises an on-line state and an off-line state, so that different control strategies are set according to different network states of the metering device.
Further, according to the network state, determining a frequency control mode of the metering device, wherein the frequency control mode is realized through a preset frequency control module. By setting different frequency control strategies for different network states, the problem of tracing the local frequency source of the metering device is solved, and the frequency accuracy of the metering device under the on-line condition and the short-term frequency accuracy of the metering device under the off-line condition are ensured.
Further, the time delay and the time offset between metering devices of the metering device are calculated, wherein each metering device is respectively provided with a frequency control module, so that the problem of tracing absolute time is realized by calculating the time delay and the time offset measuring and calculating method between the metering devices of the metering device, and the performance requirement of time synchronization in power informatization is met.
Further, each metering device of the metering device is clocked according to the time delay, the time offset and the control mode.
Therefore, by setting different frequency control strategies for different network states, the problem of tracing the local frequency source of the metering device is solved, and the frequency accuracy of the metering device under the online condition and the short-term frequency accuracy of the metering device under the offline condition are ensured. And the tracing problem of absolute time is realized by calculating the time delay and time offset measuring and calculating method among the measuring devices of the measuring device, so that the performance requirement on time synchronization in power informatization is met. The technical effect of accurate time synchronization among metering devices of the platform layer metering device is achieved. And further, the technical problem that a plurality of metering devices in a platform area layer in the prior art lack an effective time synchronization means and cannot meet the requirements of the intelligent power grid is solved.
Optionally, determining the operation of the frequency control mode of the metering device according to the network state includes:
under the condition that the network state is an on-line state, the frequency control mode adopts closed-loop control;
in the case that the network state is an offline state, the frequency control mode adopts open loop control.
Specifically, referring to fig. 4, the slave clock performs closed-loop control (the control selection switch is located at 1 in fig. 1) through a built-in frequency control module in a standard frequency synchronization manner obtained by decoding the carrier signal when the network is on-line, so as to complete frequency magnitude transmission, and when the system is perceived to be off-line, the frequency digital adjusting device is converted into open-loop control so as to ensure local time maintenance (the control selection switch is located at 2).
Optionally, the frequency control module includes: decoding unit, time-to-digital conversion unit, temperature compensation data unit, temperature compensation control unit, digital low-pass filter unit, voltage-controlled crystal oscillator, and temperature sensor disposed on the voltage-controlled crystal oscillator, wherein
The decoding unit is used for decoding the carrier signal and determining the standard frequency;
the time-to-digital conversion unit receives the standard frequency from the decoding unit, adjusts the standard frequency according to the local frequency adjustment voltage parameter, and determines a first digital control amount;
The temperature compensation data unit is used for storing digital control quantities of the voltage-controlled crystal oscillator at different temperatures;
the temperature compensation control unit receives temperature data of the voltage-controlled crystal oscillator from the temperature sensor, receives the first digital control quantity from the time-to-digital conversion unit, acquires the digital control quantity of the voltage-controlled crystal oscillator corresponding to the temperature data from the temperature compensation data unit, adjusts the first digital control quantity according to the digital control quantity of the voltage-controlled crystal oscillator, and determines the second digital control quantity;
the digital low-pass filtering unit receives a second digital control quantity from the temperature compensation control unit, and carries out filtering conversion on the second digital control quantity to determine a control voltage signal;
the voltage controlled crystal oscillator receives the control voltage signal from the digital low pass filter unit.
Specifically, referring to fig. 3, the decoding unit performs a function of obtaining a standard frequency from a carrier signal, the time-to-digital conversion unit performs a comparison between the standard frequency and a current frequency difference and converts the digital control quantity into a control voltage signal, the digital low-pass filtering filters the digital control quantity and converts the digital control quantity into a control voltage signal, the temperature compensation data unit stores digital control quantities of the voltage controlled crystal oscillator at different temperatures, and the temperature compensation control reads data from the temperature compensation data unit according to the different temperatures and outputs the digital control quantities of the voltage controlled crystal oscillator. By utilizing the online temperature scale data of the module during the running period of the network, a module offline condition frequency control module temperature compensation mechanism is provided, and a low-cost and high-precision maintenance mechanism of the off-line clock module frequency is provided.
Optionally, the time-to-digital conversion unit receives the standard frequency from the decoding unit, adjusts the standard frequency according to the local frequency adjustment voltage parameter, and determines the first digital control amount, including:
the slave clock of each metering device in the metering device receives twice time synchronization beacons from the master clock, comprises a first time stamp and a second time stamp for transmitting the twice time synchronization beacons, and records a third time stamp and a fourth time stamp for receiving the twice time synchronization beacons;
the time digital conversion unit of the slave clock determines a local frequency adjustment voltage parameter according to the first time stamp, the second time stamp, the third time stamp and the fourth time stamp;
the digital conversion unit adjusts the standard frequency according to the local frequency adjusting voltage parameter to determine a first digital control quantity.
Specifically, referring to fig. 5, in the clock frequency evaluation process, as shown in fig. 5, a time synchronization beacon is periodically transmitted through a carrier wave at a T-GM master clock end, the transmission time and the receiving time of the synchronization beacon are generated through a communication physical layer by using a timestamp, meanwhile, a relay node is required to directly forward the synchronization beacon frame at the physical layer, so as to ensure the stability of the forwarding time delay, the transmission interval of the synchronization beacon is accurate, and meanwhile, the time delay is totally stable, the slave clock receiving time interval and the master clock are kept consistent, and the slave clock frequency and the master clock frequency are synchronized by using the relationship, wherein the frequency difference is as follows:
Wherein, referring to FIG. 5, T Mi May be a second timestamp T M1 ,T M0 For the first time stamp, T Si May be a fourth timestamp T S1 ,T S0 Is a third timestamp.
The slave clock periodically carries out the evaluation process through the time-digital conversion unit in fig. 1, obtains a local frequency adjustment voltage parameter, outputs the parameter to the voltage-controlled crystal oscillator, completes the closed-loop feedback adjustment process of the slave clock frequency in fig. 1, achieves frequency locking, and completes the real-time magnitude transmission of the frequency.
Optionally, the frequency control module further comprises: control selection unit and double control switch, wherein
The control selection unit is arranged between the time digital conversion unit and the digital low-pass filtering unit and is used for generating a frequency control temperature compensation coefficient according to the frequency locking control quantity at different temperatures stored in advance;
the first contact of the double-control switch is arranged between the temperature compensation control unit and the digital low-pass filtering unit, and the second contact is arranged between the control selection unit and the digital low-pass filtering unit.
Specifically, the slave clock performs closed-loop control (the control selection switch is positioned at 1 in fig. 1) through a built-in frequency control module in a standard frequency synchronization mode obtained by decoding a carrier signal when the network is on-line, frequency magnitude transmission is completed, and when the system is perceived to be off-line, the frequency digital adjusting device is converted into open-loop control to ensure local time maintenance (the control selection switch is positioned at 2). Thus, by setting the double control switch at the position 2, the open loop control in the off-line state is realized by controlling the selection unit.
The slave clock performs closed-loop control through a built-in frequency control module in an online frequency synchronization mode when the network is online, completes frequency magnitude transmission, records different frequency locking control amounts at different temperatures and serves as a frequency control temperature compensation coefficient for offline open-loop control. When the system is perceived to be offline, the frequency digital regulating device is converted into open-loop control, the temperature compensation control is carried out by utilizing the frequency control temperature compensation coefficient obtained by online operation, and the short-time high-precision time self-maintenance of the offline node is realized at lower cost.
Optionally, in the case that the network state is an on-line state, the frequency control mode adopts a closed-loop control operation, and further includes: a double control switch is disposed at the first contact.
Optionally, in the case that the network state is an offline state, the frequency control mode adopts an operation of open loop control, and further includes: the double control switch is arranged at the second contact.
Therefore, the network on-line closed-loop control and the network off-line open-loop control of the metering device at the area level are realized through the double-control switch.
Optionally, the method further comprises: the master clock encrypts and transmits the output frequency of the voltage-controlled crystal oscillator to the slave clock through a national network encryption algorithm.
Specifically, a digital encryption mechanism is introduced, so that the integrity, the safety and the usability of synchronous time information externally provided by the module are ensured. And aiming at the ToD signal output to the end user, encryption and authentication interaction is carried out through a national encryption algorithm, so that the integrity, the safety and the usability of the output time information are ensured.
Optionally, the operation of calculating a time delay and a time offset between metering devices of the metering apparatus includes:
the master clock sends a synchronous message to the slave clock and packages a fifth timestamp sent by the synchronous message;
receiving synchronous messages from a slave clock of each metering device in the metering device, and recording a sixth timestamp of the synchronous messages;
the slave clock sends a delay request message to the master clock and records a seventh timestamp for sending the delay request message;
the master clock receives the delay request message, records an eighth time stamp of the delay request message, and packages and sends the eighth time stamp and the delay response message to the slave clock;
the slave clock determines the time delay and the time offset of the uplink and the downlink according to the fifth time stamp, the sixth time stamp, the seventh time stamp and the eighth time stamp.
Specifically, referring to fig. 6, in order to guarantee the uplink and downlink symmetry of the time delay, the time delay and the time offset of the nodes in the whole network synchronization are synchronized in steps, the synchronization starts from the T-GM to the down, each time the synchronization only involves adjacent levels, and the boundary clock node after the synchronization is completed is used as the master clock of the node of the next level to continue the next level synchronization until all the nodes in the network node are synchronized. The measurement and calculation process in a specific synchronization is as follows: (wherein the fifth timestamp T 1 Sixth timestamp T 2 Seventh timestamp T 3 And an eighth timestamp T 4 )
1) The master clock sends Synco synchronous message, and when the message is sent, the master node physical layer marks accurate sending time stamp T on the sending packet 1 Giving access at the physical layer upon receiving the message from the nodeThe received message is marked with an accurate receiving time stamp T 2 At this time, the slave clock has a timestamp T 1 And T 2
2) Then the slave clock sends Delay request message delay_req to the master clock end, and when the message is sent out, the slave node physical layer marks accurate sending time stamp T on the sending packet 3 Record T from clock end 3 At this time, the slave clock terminal has a time stamp T 1 、T 2 And T 3
3) Finally, when the main clock end receives the Delay request message delay_req, the physical layer marks the accurate receiving time stamp T on the receiving message 4 And transmitting T to the slave clock through delay_Resp 4 Timestamp information and time recorded by the slave clock, the slave clock having a timestamp T 1 、T 2 、T 3 And T 4
Wherein T is 1 And T 4 The time of day is measured by the time information of the master clock, and T 2 And T 3 The time is measured by taking the time information of the slave clock as a measurement standard and uniformly adopting the standard of the master clock, and the time length of the master clock and the slave clock is assumed to be T offset Is a time offset of T, and the uplink and downlink transmission delays of the path are T delay1 And T delay2 The following equation can be obtained:
T 2 -T offset -T delay1 =T 1 (2)
T 3 -T offset +T delay2 =T 4 (3)
if T delay =T delay1 =T delay2 (4)
because the transmission delay is performed in the transmission physical layer and is only related to the distance between two points of carrier communication, the uplink and downlink transmission delay T delay1 And T delay2 Equal, time delay and time offset can be calculated:
T delay =[(T 2 -T 1 )+(T 4 -T 3 )]/2 (5)
T offset =[(T 2 -T 1 )-(T 4 -T 3 )]/2 (6)
according to T from clock offset And carrying out absolute time correction of the slave clock to finish transmission of the absolute time value of the slave clock. By the method, the problems of uncertain delay and accumulated error caused by equipment application layer delay in carrier communication transmission are solved, time synchronization accuracy is guaranteed, and magnitude transmission of absolute time is realized.
Further, referring to fig. 1, according to a second aspect of the present embodiment, there is provided a storage medium. The storage medium includes a stored program, wherein the method of any one of the above is performed by a processor when the program is run.
According to the embodiment, the problem of tracing the local frequency source of the metering device is solved by setting different frequency control strategies for different network states, and the frequency accuracy of the metering device under the online condition and the short-term frequency accuracy under the offline condition are ensured. And the tracing problem of absolute time is realized by calculating the time delay and time offset measuring and calculating method among the measuring devices of the measuring device, so that the performance requirement on time synchronization in power informatization is met. The technical effect of accurate time synchronization among metering devices of the platform layer metering device is achieved. And further, the technical problem that a plurality of metering devices in a platform area layer in the prior art lack an effective time synchronization means and cannot meet the requirements of the intelligent power grid is solved.
In addition, the invention provides a high-reliability and high-precision time synchronization quantitative transmission system based on carrier communication, which solves the high-precision time synchronization requirement needed by digital informatization of a power grid, can meet the application requirements of various power scenes and has strong applicability; the method for synchronizing the clock frequency ensures the magnitude transmission of the clock frequency between the master clock and the slave clock; the method for measuring and calculating the time delay and the time offset solves the problems of uncertainty in delay and accumulated error caused by delay of an equipment application layer in carrier communication transmission, ensures time synchronization precision and realizes magnitude transmission of absolute time; by utilizing the online temperature scale data of the module in the network operation period, a module offline condition frequency control module temperature compensation mechanism is provided, and a low-cost and high-precision maintenance mechanism of the module frequency in offline time is provided; the digital encryption mechanism is introduced, and the integrity, the safety and the usability of the synchronous time information externally provided by the module are ensured.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 2
Fig. 7 shows a clock frequency synchronization device 700 of a metering device according to the present embodiment, which device 700 corresponds to the method according to the first aspect of embodiment 1. Referring to fig. 7, the apparatus 700 includes: a first determining module 710 for detecting a network condition of the metering device, determining a network state of the metering device, wherein the network state includes an online state and an offline state; a second determining module 720, configured to determine a frequency control mode of the metering device according to the network state, where the frequency control mode is implemented by a preset frequency control module; a calculating module 730, configured to calculate a time delay and a time offset between each metering device of the metering apparatus, where each metering device is respectively provided with a frequency control module; the synchronization module 740 is configured to synchronize clock frequencies of the metering devices of the metering device according to the time delay, the time offset, and the control manner.
Optionally, the second determining module 720 includes: the first sub-module is used for adopting closed-loop control in a frequency control mode under the condition that the network state is an on-line state; and the second sub-module is used for adopting open loop control in a frequency control mode under the condition that the network state is an offline state.
Optionally, the network state includes an online state and an offline state, and the second determining module includes: the first sub-module is used for adopting closed-loop control in the frequency control mode under the condition that the network state is the online state; and the second sub-module is used for adopting open loop control in the frequency control mode under the condition that the network state is the offline state.
Optionally, the second determining module includes: and the first determining submodule is used for determining the frequency control mode of the metering device according to the network state through a preset frequency control module.
Optionally, the first employing sub-module includes: the first determining unit is used for decoding the carrier signal by utilizing the frequency control module to determine the standard frequency; the second determining unit is used for adjusting the standard frequency according to the local frequency adjustment voltage parameter by utilizing the frequency control module to determine a first digital control quantity; a fourth determining unit, configured to perform filtering conversion on the second digital control amount by using the frequency control module, and determine a control voltage signal; and the fifth determining unit is used for adjusting the voltage-controlled crystal oscillator through the control voltage signal to determine the output clock frequency.
Optionally, the second employing sub-module includes: a sixth determining unit, configured to decode a carrier signal by using the frequency control module, and determine a standard frequency; a seventh determining unit, configured to adjust the standard frequency according to a local frequency adjustment voltage parameter by using the frequency control module, to determine a first digital control amount; an eighth determining unit, configured to generate a frequency control temperature compensation coefficient according to frequency locking control amounts at different temperatures stored in advance by using the frequency control module, and adjust the first digital control amount to generate a third digital control amount; a ninth determining unit, configured to perform filtering conversion on the third digital control amount by using the frequency control module, and determine a control voltage signal; and the tenth determining unit is used for adjusting the voltage-controlled crystal oscillator through the control voltage signal to determine the output clock frequency.
Optionally, the first determining submodule includes: a first recording unit, configured to receive, from a master clock, a twice time synchronization beacon by a slave clock of each metering device in the metering apparatus, including a first time stamp and a second time stamp that send the twice time synchronization beacon, and record a third time stamp and a fourth time stamp that receive the twice time synchronization beacon; an eleventh determining unit, configured to determine a local frequency adjustment voltage parameter by using the time-to-digital conversion unit of the slave clock according to the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp; and the twelfth determining unit is used for adjusting the standard frequency according to the local frequency adjusting voltage parameter by the digital conversion unit and determining the first digital control quantity.
Optionally, the second determining module further includes: and the implementation submodule is used for realizing the frequency control mode through a double-control switch preset in the frequency control module.
Optionally, the apparatus 700 further comprises: the encryption module is used for encrypting and transmitting the output frequency of the voltage-controlled crystal oscillator to the slave clock by the master clock through a national network encryption algorithm.
Optionally, the computing module 730 includes: the first sending submodule is used for sending the synchronous message to the slave clock by the master clock and packaging a fifth timestamp sent by the synchronous message; the first receiving submodule is used for receiving the synchronous message from the slave clock of each metering device in the metering device and recording a sixth timestamp for receiving the synchronous message; the second sending submodule is used for sending a delay request message from the clock to the master clock and recording a seventh timestamp for sending the delay request message; the second receiving submodule is used for receiving the delay request message by the master clock, recording an eighth time stamp of the delay request message, and packaging and sending the eighth time stamp and the delay response message to the slave clock; and the second determining submodule is used for determining the time delay and the time offset of the uplink and the downlink according to the fifth time stamp, the sixth time stamp, the seventh time stamp and the eighth time stamp from the clock.
According to the embodiment, the problem of tracing the local frequency source of the metering device is solved by setting different frequency control strategies for different network states, and the frequency accuracy of the metering device under the online condition and the short-term frequency accuracy under the offline condition are ensured. And the tracing problem of absolute time is realized by calculating the time delay and time offset measuring and calculating method among the measuring devices of the measuring device, so that the performance requirement on time synchronization in power informatization is met. The technical effect of accurate time synchronization among metering devices of the platform layer metering device is achieved. And further, the technical problem that a plurality of metering devices in a platform area layer in the prior art lack an effective time synchronization means and cannot meet the requirements of the intelligent power grid is solved.
Example 3
Fig. 8 shows a clock frequency synchronization device 800 of a metering device according to the present embodiment, which device 800 corresponds to the method according to the first aspect of embodiment 1. Referring to fig. 8, the apparatus 800 includes: a processor 810; and a memory 820 coupled to the processor 810 for providing instructions to the processor 810 for processing the following processing steps: detecting a network condition of the metering device, and determining a network state of the metering device, wherein the network state comprises an online state and an offline state; determining a frequency control mode of the metering device according to the network state, wherein the frequency control mode is realized through a preset frequency control module; calculating time delay and time offset between metering devices of the metering device, wherein each metering device is respectively provided with a frequency control module; and according to the time delay, the time offset and the control mode, the clock frequency of each metering device of the metering device is synchronized.
Optionally, determining the operation of the frequency control mode of the metering device according to the network state includes: under the condition that the network state is an on-line state, the frequency control mode adopts closed-loop control; in the case that the network state is an offline state, the frequency control mode adopts open loop control.
Optionally, the frequency control module includes: the device comprises a decoding unit, a time-to-digital conversion unit, a temperature compensation data unit, a temperature compensation control unit, a digital low-pass filtering unit, a voltage-controlled crystal oscillator and a temperature sensor arranged on the voltage-controlled crystal oscillator, wherein the decoding unit is used for decoding a carrier signal and determining a standard frequency; the time-to-digital conversion unit receives the standard frequency from the decoding unit, adjusts the standard frequency according to the local frequency adjustment voltage parameter, and determines a first digital control amount; the temperature compensation data unit is used for storing digital control quantities of the voltage-controlled crystal oscillator at different temperatures; the temperature compensation control unit receives temperature data of the voltage-controlled crystal oscillator from the temperature sensor, receives the first digital control quantity from the time-to-digital conversion unit, acquires the digital control quantity of the voltage-controlled crystal oscillator corresponding to the temperature data from the temperature compensation data unit, adjusts the first digital control quantity according to the digital control quantity of the voltage-controlled crystal oscillator, and determines the second digital control quantity; the digital low-pass filtering unit receives a second digital control quantity from the temperature compensation control unit, and carries out filtering conversion on the second digital control quantity to determine a control voltage signal; the voltage controlled crystal oscillator receives the control voltage signal from the digital low pass filter unit.
Optionally, the time-to-digital conversion unit receives the standard frequency from the decoding unit, adjusts the standard frequency according to the local frequency adjustment voltage parameter, and determines the first digital control amount, including: the slave clock of each metering device in the metering device receives twice time synchronization beacons from the master clock, comprises a first time stamp and a second time stamp for transmitting the twice time synchronization beacons, and records a third time stamp and a fourth time stamp for receiving the twice time synchronization beacons; the time digital conversion unit of the slave clock determines a local frequency adjustment voltage parameter according to the first time stamp, the second time stamp, the third time stamp and the fourth time stamp; the digital conversion unit adjusts the standard frequency according to the local frequency adjusting voltage parameter to determine a first digital control quantity.
Optionally, the frequency control module further comprises: the control selection unit is arranged between the time-digital conversion unit and the digital low-pass filtering unit and is used for generating a frequency control temperature compensation coefficient according to pre-stored frequency locking control amounts at different temperatures; the first contact of the double-control switch is arranged between the temperature compensation control unit and the digital low-pass filtering unit, and the second contact is arranged between the control selection unit and the digital low-pass filtering unit.
Optionally, in the case that the network state is an on-line state, the frequency control mode adopts a closed-loop control operation, and further includes: a double control switch is disposed at the first contact.
Optionally, in the case that the network state is an offline state, the frequency control mode adopts an operation of open loop control, and further includes: the double control switch is arranged at the second contact.
Optionally, the memory 820 is also used to provide instructions for the processor 810 to process the following processing steps: the master clock encrypts and transmits the output frequency of the voltage-controlled crystal oscillator to the slave clock through a national network encryption algorithm.
Optionally, the operation of calculating a time delay and a time offset between metering devices of the metering apparatus includes: the master clock sends a synchronous message to the slave clock and packages a fifth timestamp sent by the synchronous message; receiving synchronous messages from a slave clock of each metering device in the metering device, and recording a sixth timestamp of the synchronous messages; the slave clock sends a delay request message to the master clock and records a seventh timestamp for sending the delay request message; the master clock receives the delay request message, records an eighth time stamp of the delay request message, and packages and sends the eighth time stamp and the delay response message to the slave clock; the slave clock determines the time delay and the time offset of the uplink and the downlink according to the fifth time stamp, the sixth time stamp, the seventh time stamp and the eighth time stamp.
According to the embodiment, the problem of tracing the local frequency source of the metering device is solved by setting different frequency control strategies for different network states, and the frequency accuracy of the metering device under the online condition and the short-term frequency accuracy under the offline condition are ensured. And the tracing problem of absolute time is realized by calculating the time delay and time offset measuring and calculating method among the measuring devices of the measuring device, so that the performance requirement on time synchronization in power informatization is met. The technical effect of accurate time synchronization among metering devices of the platform layer metering device is achieved. And further, the technical problem that a plurality of metering devices in a platform area layer in the prior art lack an effective time synchronization means and cannot meet the requirements of the intelligent power grid is solved.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present invention, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (12)

1. A clock frequency synchronization method of a metering device, applied between metering devices of the metering device in a platform area level, comprising the following steps:
detecting a network condition of the metering device, and determining the network condition of the metering device;
determining a frequency control mode of the metering device according to the network state;
calculating a time delay and a time offset between the metering devices of the metering device;
according to the time delay, the time offset and the control mode, clock frequency synchronization is carried out on each metering device of the metering device;
the network state includes an online state and an offline state, and
determining the operation of the frequency control mode of the metering device according to the network state, comprising:
in the case that the network state is the online state, the frequency control mode adopts closed-loop control;
When the network state is the offline state, the frequency control mode adopts open loop control;
determining the operation of the frequency control mode of the metering device according to the network state, comprising:
determining the frequency control mode of the metering device according to the network state through a preset frequency control module;
and in the case that the network state is the on-line state, the frequency control mode adopts closed-loop control operation, which comprises the following steps:
decoding the carrier signal by utilizing the frequency control module to determine a standard frequency;
the frequency control module is utilized to adjust the standard frequency according to the local frequency adjustment voltage parameter, and a first digital control quantity is determined;
the first digital control quantity is adjusted through the collected temperature data of the voltage-controlled crystal oscillator by utilizing the frequency control module, and a second digital control quantity is determined;
using the frequency control module to carry out filtering conversion on the second digital control quantity and determining a control voltage signal;
adjusting the voltage-controlled crystal oscillator through the control voltage signal to determine the output clock frequency;
And in the case that the network state is the offline state, the frequency control mode adopts open loop control, which comprises the following steps:
decoding the carrier signal by utilizing the frequency control module to determine a standard frequency;
the frequency control module is utilized to adjust the standard frequency according to the local frequency adjustment voltage parameter, and a first digital control quantity is determined;
generating a frequency control temperature compensation coefficient according to pre-stored frequency locking control amounts at different temperatures by using the frequency control module, and adjusting the first digital control amount to generate a third digital control amount;
using the frequency control module to carry out filtering conversion on the third digital control quantity and determining a control voltage signal;
and adjusting the voltage-controlled crystal oscillator through the control voltage signal to determine the output clock frequency.
2. The method of claim 1, wherein the operation of adjusting the standard frequency to determine the first digital control quantity based on the local frequency adjustment voltage parameter using the frequency control module comprises:
the slave clocks of the metering devices in the metering device receive twice time synchronization beacons from a master clock, the twice time synchronization beacons are transmitted to form a first time stamp and a second time stamp, and a third time stamp and a fourth time stamp for receiving the twice time synchronization beacons are recorded;
The time digital conversion unit of the slave clock determines a local frequency adjustment voltage parameter according to the first time stamp, the second time stamp, the third time stamp and the fourth time stamp;
and the digital conversion unit adjusts the standard frequency according to the local frequency adjustment voltage parameter to determine the first digital control quantity.
3. The method of claim 1, wherein determining the operation of the frequency control scheme of the metering device based on the network status further comprises:
the frequency control mode is realized through a double-control switch preset in the frequency control module.
4. The method as recited in claim 2, further comprising:
and the master clock encrypts and transmits the output frequency of the voltage-controlled crystal oscillator to the slave clock through a national network encryption algorithm.
5. The method of claim 2, wherein the operation of calculating a time delay and a time offset between metering devices of the metering apparatus comprises:
the master clock sends a synchronous message to the slave clock and packages a fifth timestamp sent by the synchronous message;
The slave clocks of the metering devices in the metering device receive the synchronous message and record a sixth timestamp for receiving the synchronous message;
the slave clock sends a delay request message to the master clock and records a seventh timestamp for sending the delay request message;
the master clock receives the delay request message, records an eighth time stamp of the delay request message, and packages and sends the eighth time stamp and the delay response message to the slave clock;
the slave clock determines the time delay and the time offset of the uplink and the downlink according to the fifth time stamp, the sixth time stamp, the seventh time stamp and the eighth time stamp.
6. A computer readable storage medium, characterized in that the storage medium comprises a stored program, wherein the method of any one of claims 1 to 5 is executed by a processor when the program is run.
7. A clock frequency synchronization device of a metering device, applied between metering devices of a metering device in a platform area level, comprising:
a first determining module, configured to detect a network condition of the metering device, and determine a network condition of the metering device;
The second determining module is used for determining a frequency control mode of the metering device according to the network state, wherein the frequency control mode is realized through a preset frequency control module;
a calculation module for calculating a time delay and a time offset between the metering devices of the metering device, wherein the metering devices are respectively provided with the frequency control module;
the synchronization module is used for synchronizing clock frequencies of the metering devices of the metering device according to the time delay, the time offset and the control mode;
the network state includes an online state and an offline state, and a second determination module includes:
the first sub-module is used for adopting closed-loop control in the frequency control mode under the condition that the network state is the online state;
the second sub-module is used for adopting open loop control in the frequency control mode when the network state is the offline state;
a second determination module comprising:
the first determining submodule is used for determining the frequency control mode of the metering device according to the network state through a preset frequency control module;
The first sub-module comprises:
the first determining unit is used for decoding the carrier signal by utilizing the frequency control module to determine the standard frequency;
the second determining unit is used for adjusting the standard frequency according to the local frequency adjustment voltage parameter by utilizing the frequency control module to determine a first digital control quantity;
the third determining unit is used for adjusting the first digital control quantity by utilizing the frequency control module through the acquired temperature data of the voltage-controlled crystal oscillator and determining a second digital control quantity;
a fourth determining unit, configured to perform filtering conversion on the second digital control amount by using the frequency control module, and determine a control voltage signal;
a fifth determining unit, configured to adjust the voltage-controlled crystal oscillator by using the control voltage signal, and determine an output clock frequency;
the second adopts a sub-module, comprising:
a sixth determining unit, configured to decode a carrier signal by using the frequency control module, and determine a standard frequency;
a seventh determining unit, configured to adjust the standard frequency according to a local frequency adjustment voltage parameter by using the frequency control module, to determine a first digital control amount;
An eighth determining unit, configured to generate a frequency control temperature compensation coefficient according to frequency locking control amounts at different temperatures stored in advance by using the frequency control module, and adjust the first digital control amount to generate a third digital control amount;
a ninth determining unit, configured to perform filtering conversion on the third digital control amount by using the frequency control module, and determine a control voltage signal;
and the tenth determining unit is used for adjusting the voltage-controlled crystal oscillator through the control voltage signal to determine the output clock frequency.
8. The apparatus of claim 7, wherein the first determination submodule comprises:
a first recording unit, configured to receive, from a master clock, a twice time synchronization beacon by a slave clock of each metering device in the metering apparatus, including a first time stamp and a second time stamp that send the twice time synchronization beacon, and record a third time stamp and a fourth time stamp that receive the twice time synchronization beacon;
an eleventh determining unit, configured to determine, by using a time-to-digital conversion unit of a slave clock, a local frequency adjustment voltage parameter according to the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp;
And the twelfth determining unit is used for adjusting the standard frequency according to the local frequency adjusting voltage parameter by the digital conversion unit and determining the first digital control quantity.
9. The apparatus of claim 7, wherein the second determining module further comprises:
and the implementation submodule is used for realizing the frequency control mode through a double-control switch preset in the frequency control module.
10. The apparatus as recited in claim 8, further comprising:
and the encryption module is used for encrypting the output frequency of the voltage-controlled crystal oscillator by the master clock through a national network encryption algorithm and transmitting the encrypted output frequency to the slave clock.
11. The apparatus of claim 8, wherein the computing module comprises:
the first sending submodule is used for sending a synchronous message to the slave clock by the master clock and packaging a fifth timestamp sent by the synchronous message;
the first receiving submodule is used for receiving the synchronous message from the slave clock of each metering device in the metering device and recording a sixth timestamp for receiving the synchronous message;
the second sending submodule is used for sending a delay request message to the master clock by the slave clock and recording a seventh timestamp for sending the delay request message;
The second receiving sub-module is used for receiving the delay request message by the master clock, recording an eighth time stamp for receiving the delay request message, and packaging and sending the eighth time stamp and the delay response message to the slave clock;
and the second determining submodule is used for determining the time delay and the time offset of the uplink and the downlink according to the fifth time stamp, the sixth time stamp, the seventh time stamp and the eighth time stamp by the slave clock.
12. A clock frequency synchronization device of a metering device, applied between metering devices of a metering device in a platform area level, comprising:
a processor; and
a memory, coupled to the processor, for providing instructions to the processor to process the following processing steps:
detecting a network condition of the metering device, and determining the network condition of the metering device;
determining a frequency control mode of the metering device according to the network state, wherein the frequency control mode is realized through a preset frequency control module;
calculating time delay and time offset between the metering devices of the metering device, wherein the metering devices are respectively provided with the frequency control module;
According to the time delay, the time offset and the control mode, clock frequency synchronization is carried out on each metering device of the metering device;
the network state includes an online state and an offline state, and
determining the operation of the frequency control mode of the metering device according to the network state, comprising:
in the case that the network state is the online state, the frequency control mode adopts closed-loop control;
when the network state is the offline state, the frequency control mode adopts open loop control;
determining the operation of the frequency control mode of the metering device according to the network state, comprising:
determining the frequency control mode of the metering device according to the network state through a preset frequency control module;
and in the case that the network state is the on-line state, the frequency control mode adopts closed-loop control operation, which comprises the following steps:
decoding the carrier signal by utilizing the frequency control module to determine a standard frequency;
the frequency control module is utilized to adjust the standard frequency according to the local frequency adjustment voltage parameter, and a first digital control quantity is determined;
The first digital control quantity is adjusted through the collected temperature data of the voltage-controlled crystal oscillator by utilizing the frequency control module, and a second digital control quantity is determined;
using the frequency control module to carry out filtering conversion on the second digital control quantity and determining a control voltage signal;
adjusting the voltage-controlled crystal oscillator through the control voltage signal to determine the output clock frequency;
and in the case that the network state is the offline state, the frequency control mode adopts open loop control, which comprises the following steps:
decoding the carrier signal by utilizing the frequency control module to determine a standard frequency;
the frequency control module is utilized to adjust the standard frequency according to the local frequency adjustment voltage parameter, and a first digital control quantity is determined;
generating a frequency control temperature compensation coefficient according to pre-stored frequency locking control amounts at different temperatures by using the frequency control module, and adjusting the first digital control amount to generate a third digital control amount;
using the frequency control module to carry out filtering conversion on the third digital control quantity and determining a control voltage signal;
And adjusting the voltage-controlled crystal oscillator through the control voltage signal to determine the output clock frequency.
CN202210750508.8A 2022-06-29 2022-06-29 Clock frequency synchronization method and device of metering device and storage medium Active CN115102657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210750508.8A CN115102657B (en) 2022-06-29 2022-06-29 Clock frequency synchronization method and device of metering device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210750508.8A CN115102657B (en) 2022-06-29 2022-06-29 Clock frequency synchronization method and device of metering device and storage medium

Publications (2)

Publication Number Publication Date
CN115102657A CN115102657A (en) 2022-09-23
CN115102657B true CN115102657B (en) 2024-01-26

Family

ID=83295780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210750508.8A Active CN115102657B (en) 2022-06-29 2022-06-29 Clock frequency synchronization method and device of metering device and storage medium

Country Status (1)

Country Link
CN (1) CN115102657B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116471211B (en) * 2023-06-19 2023-10-13 威胜信息技术股份有限公司 Accurate time setting method for electric power Internet of things

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104475A (en) * 2011-01-31 2011-06-22 上海交通大学 IEEE 1588-based synchronization system and synchronization method thereof
CN106100781A (en) * 2016-05-20 2016-11-09 中国南方电网有限责任公司电网技术研究中心 Clock tracking method and system based on E1 channel
CN111585683A (en) * 2020-05-11 2020-08-25 上海交通大学 High-reliability clock synchronization system and method for time-sensitive network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9136711B2 (en) * 2007-08-21 2015-09-15 Electro Industries/Gauge Tech System and method for synchronizing multiple generators with an electrical power distribution system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102104475A (en) * 2011-01-31 2011-06-22 上海交通大学 IEEE 1588-based synchronization system and synchronization method thereof
CN106100781A (en) * 2016-05-20 2016-11-09 中国南方电网有限责任公司电网技术研究中心 Clock tracking method and system based on E1 channel
CN111585683A (en) * 2020-05-11 2020-08-25 上海交通大学 High-reliability clock synchronization system and method for time-sensitive network

Also Published As

Publication number Publication date
CN115102657A (en) 2022-09-23

Similar Documents

Publication Publication Date Title
CN104836630B (en) IEEE1588 clock synchronization system and implementation method therefor
US9671761B2 (en) Method, time consumer system, and computer program product for maintaining accurate time on an ideal clock
US8873589B2 (en) Methods and devices for clock synchronization
CN105549379B (en) A kind of synchronous measuring apparatus triggered based on split-second precision benchmark and method
CN101083523B (en) Method and device for realizing integrated time stamp clock synchronous phase-locked loop
CN102013970B (en) Clock synchronization method and device thereof as well as base station clock device
CN101895385B (en) Time-setting clock system of merging unit for realizing clock switching
WO2012062207A9 (en) Standard frequency and time adjusting method based on rubidium oscillator
CN106603183B (en) A kind of timestamp filter method and device
EP3531610B1 (en) Frequency synchronization method and slave clock
CN103763055A (en) Method for precise time synchronization
CN102104475A (en) IEEE 1588-based synchronization system and synchronization method thereof
KR20120036374A (en) High-precision synchronisation method and system
CN102480350A (en) Method and device for time synchronization and maintaining based on frequency deviation estimation
CN115102657B (en) Clock frequency synchronization method and device of metering device and storage medium
Cena et al. Synchronize your watches: Part I: General-purpose solutions for distributed real-time control
CN109495203A (en) A kind of recovery system of PTP from clock
CN110278049B (en) Time synchronization method and system
CN109150352A (en) It is a kind of to compare the split-second precision reproducing method for controlling crystal oscillator based on satellite common vision
CN108400861A (en) Crystal oscillator original frequency method of adjustment and device and clock system
CN111917503A (en) Method and apparatus for providing a clock signal
CN106612150A (en) Network device, time synchronization method and network system thereof
CN115549838A (en) Time service equipment, system and method
CN113259037B (en) Time synchronization method, medium, and apparatus based on sensor time synchronization system
TWI375416B (en) Remote monitoring and calibration of system reference clock using network timing reference

Legal Events

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