CN115102657A - 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 PDFInfo
- Publication number
- CN115102657A CN115102657A CN202210750508.8A CN202210750508A CN115102657A CN 115102657 A CN115102657 A CN 115102657A CN 202210750508 A CN202210750508 A CN 202210750508A CN 115102657 A CN115102657 A CN 115102657A
- Authority
- CN
- China
- Prior art keywords
- frequency
- metering device
- time
- determining
- clock
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 57
- 239000013078 crystal Substances 0.000 claims description 30
- 230000001360 synchronised effect Effects 0.000 claims description 30
- 238000006243 chemical reaction Methods 0.000 claims description 29
- 238000001914 filtration Methods 0.000 claims description 17
- 238000012545 processing Methods 0.000 claims description 15
- 230000010355 oscillation Effects 0.000 claims description 7
- 230000004044 response Effects 0.000 claims description 5
- 238000004364 calculation method Methods 0.000 claims description 2
- 238000004806 packaging method and process Methods 0.000 claims description 2
- 238000012856 packing Methods 0.000 claims description 2
- 230000001934 delay Effects 0.000 claims 2
- 230000005540 biological transmission Effects 0.000 description 24
- 238000004891 communication Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 12
- 230000000694 effects Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 238000011217 control strategy Methods 0.000 description 6
- 230000007246 mechanism Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 238000005259 measurement Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 3
- 238000012854 evaluation process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 239000000969 carrier Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000008531 maintenance mechanism Effects 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- BULVZWIRKLYCBC-UHFFFAOYSA-N phorate Chemical compound CCOP(=S)(OCC)SCSCC BULVZWIRKLYCBC-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0682—Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02E—REDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
- Y02E60/00—Enabling 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 among the metering devices of the metering device in the platform area layer, and comprises the following steps: 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; 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 among metering devices of the metering device, wherein each metering device is provided with a frequency control module; and according to the time delay, the time offset and the control mode, carrying out clock frequency synchronization on each metering device of the metering device. The problem of the numerous metering device of platform district aspect quantity that exists lacks effectual time synchronization means among the prior art, can not satisfy smart power grids's demand is solved.
Description
Technical Field
The present invention relates to the field of power metering technologies, and in particular, to a clock frequency synchronization method and apparatus for a metering device, and a storage medium.
Background
With the development of power grid informatization and digitization and access of a large number of devices, the topological structure of the power distribution network is increasingly complex, and the requirement for realizing synchronous acquisition at each metering device in the power distribution network is more urgent. The nodes with different functions in the whole power distribution network also correspond to the grade requirements of different time synchronization precisions. For example, the required time synchronization precision of power consumption management, load monitoring, electric quantity acquisition and the like is 1 second; the time synchronization precision of SCADA monitoring is 10 ms; the time synchronization precision of the time sequence recording (SOE) is 1 ms; while the time synchronization accuracy of the synchronized Phasor Measurement (PMU) is 1 μ s.
At present, a large number of metering devices of a national grid in a transformer area floor lack an effective time synchronization means, and the requirements of a smart grid cannot be met. Therefore, the research on the time-frequency value transmission and the time synchronization system which are economical and reliable in the intelligent power distribution network has a key effect on effectively solving a series of problems caused by the intelligentization of the power distribution network.
Aiming at the technical problems that the metering devices with a large number of platform areas in the prior art lack an effective time synchronization means and cannot meet the requirements of the smart power grid, an effective solution is not provided at present.
The embodiment of the disclosure provides a clock frequency synchronization method and device of a metering device and a storage medium, so as to at least solve the technical problem that the metering devices with a large number of platform areas lack an effective time synchronization means and cannot meet the requirements of a smart power grid in the prior art.
According to an aspect of the embodiments of the present disclosure, there is provided a clock frequency synchronization method for a metering device, applied between metering devices of the metering device in a platform floor, including:
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;
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 among metering devices of the metering device, wherein each metering device is provided with a frequency control module;
and according to the time delay, the time offset and the control mode, carrying out clock frequency synchronization on each metering device of the metering device.
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 executed.
According to another aspect of the embodiments of the present disclosure, there is provided a clock frequency synchronization apparatus for a metering apparatus, applied between metering devices of the metering apparatus in a platform floor, including:
the system comprises a first determination module, a second determination module and a third determination module, wherein the first determination module is used for detecting the network condition of the metering device and determining the network state of the metering device, and 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 provided with a frequency control module;
and the synchronization module is used for carrying out clock frequency synchronization on 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 provided a clock frequency synchronization apparatus for a metering apparatus, applied between metering devices of the metering apparatus in a platform floor, including:
a processor; and
a memory coupled to the processor for providing instructions to the processor for processing the following processing steps:
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;
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 among metering devices of the metering device, wherein each metering device is provided with a frequency control module;
and according to the time delay, the time offset and the control mode, carrying out clock frequency synchronization on each metering device of the metering device.
In the embodiment of the disclosure, different frequency control strategies are set for different network states, so that 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 by calculating the time delay and time offset measuring and calculating method among the measuring devices of the measuring device, the problem of tracing to the source of absolute time is realized, and 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 then solve the numerous metering device of platform district aspect quantity that exists among the prior art and lack the effectual time synchronization means, can not satisfy the technical problem of smart power grids's demand.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the disclosure and together with the description serve to explain the disclosure and not to limit the disclosure. In the drawings:
fig. 1 is a hardware block diagram of a computing device for implementing the method according to embodiment 1 of the present disclosure;
fig. 2A is a schematic diagram of a system for transmitting a time code value of power using power 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 schematic flow chart of a clock frequency synchronization method 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 magnitude transfer evaluation procedure of a clock frequency 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 make those skilled in the art better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure. It is to be understood that the described embodiments are merely exemplary of some, and not all, of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection 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 drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. Moreover, 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 Transparentcock, transparent clock
T-SC: TSlavClock, Slave clock
PPS: pulsepressecond, pulse per second
ToD: timeofday, current time
Example 1
According to the present embodiment, there is also provided an embodiment of a method for clock frequency synchronization of a metering device, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system, such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that presented herein.
The method embodiments provided by the present embodiment may be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Fig. 1 shows a hardware block diagram of a computing device for implementing a clock frequency synchronization method of a metering apparatus. As shown in fig. 1, the computing device may include one or more processors (which may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory for storing data, and a transmission device for communication functions. Besides, the method can also comprise the following steps: 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 source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. 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 circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, 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 disclosed embodiments, the data processing circuit acts as a processor control (e.g., selection of variable resistance termination paths connected to the interface).
The memory may be configured to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the clock frequency synchronization method of the metering device in the embodiments of the present disclosure, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, 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 instances, the memory may further include memory located remotely from the processor, which may be connected to the computing device over 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 device is used for receiving or transmitting data via a network. Specific examples of such networks may include wireless networks provided by communication providers of the computing devices. In one example, the transmission device includes a Network adapter (NIC) that can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
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 here 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 a computing device as described above.
Fig. 2A is a schematic diagram of a system architecture for transmitting a time code value of power by using power carrier communication according to the present embodiment. Referring to fig. 2, the system includes: three-level time nodes, a master clock T-GM, a boundary clock T-BC and a slave clock T-SC. According to the time synchronization and transmission process shown in fig. 2A, a standard time node is synchronized with a superior time node through a satellite co-occurrence mode, and is synchronized with a master clock through a 1PPS and a ToD interface, and then a T-GM node and a T-SC/T-BC node are synchronized in time through the scheme of the invention, so that time transmission of each metering device in the whole network is completed. Wherein,
(1) three-level time node: the GNSS satellite navigation signals are captured and tracked by the common-view unit, the system time of the navigation satellite is recovered, the time difference of the secondary node 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): a master node and a 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 carry out clock synchronization; the module utilizes the self-contained TCXO crystal oscillator and 1PPS to carry out frequency phase locking operation, and obtains high-precision frequency signals and absolute time which are transmitted by a magnitude.
(3) T-BC (T-Boundary Clock): the intermediate node possibly existing in the time topological relation generally refers to a relay node which needs to be constructed for communication due to line signal attenuation, and in addition, the intermediate node can complete frequency and time synchronization between a main node and the relay node based on a software protocol of carrier communication.
(4) T-SC (T-slave Clock): the slave nodes in the time topological relation, usually the slave clocks of the terminal devices, complete the frequency and time synchronization between the master node or the 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 each terminal node based on the power carrier network, and the time topology shown in fig. 2B is established by combining a carrier communication link layer networking process, where: the T-GM is positioned at a three-level node and is a master clock; T-BC is a relay node which is a slave clock and a master clock of the next stage; T-SC is the end node, which is the slave clock. And a synchronization system is established in the whole network.
In the operating environment described above, according to a first aspect of the present embodiment, a clock frequency synchronization method of a metering device is provided. Fig. 3 shows a flow diagram of the method, which, with reference to fig. 3, comprises:
s301: 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;
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 among metering devices of the metering device, wherein each metering device is provided with a frequency control module;
s304: and according to the time delay, the time offset and the control mode, carrying out clock frequency synchronization on each metering device of the metering device.
As described in the background art, the current state network lacks an effective time synchronization means for a large number of metering devices in a platform floor, and cannot meet the requirements of a smart grid. Therefore, the research on the time-frequency value transmission and the time synchronization system which are economical and reliable in the intelligent power distribution network has a key effect on effectively solving a series of problems caused by the intelligentization of the power distribution network.
In view of the above, aiming at the defects existing in the prior art and the actual situation that the power grid adopts carrier communication, and combining with the requirement of power time synchronization quantity transmission, the invention provides a system for transmitting power time-frequency quantity values and synchronizing time by applying power carriers.
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 online condition and the short-term frequency accuracy of the metering device under the offline condition are ensured.
Further, time delay and time offset among metering devices of the metering device are calculated, wherein each metering device is provided with a frequency control module, so that the source tracing problem of absolute time is realized by calculating a time delay and time offset measuring and calculating method among the metering devices of the metering device, and the performance requirement on time synchronization in power informatization is met.
Furthermore, the clock frequency of each metering device of the metering device is synchronized according to the time delay, the time offset and the control mode.
Therefore, by the mode, different frequency control strategies are set 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 by calculating the time delay and time offset measuring and calculating method among the measuring devices of the measuring device, the problem of tracing to the source of absolute time is realized, and the performance requirement on time synchronization in power informatization is met. The technical effect of accurate time synchronization among metering devices of the platform floor metering device is achieved. And then solve the numerous metering device of platform district aspect quantity that exists among the prior art and lack the effectual time synchronization means, can not satisfy the technical problem of smart power grids's demand.
Optionally, determining the operation of the frequency control mode of the metering device according to the network status includes:
under the condition that the network state is an online state, the frequency control mode adopts closed-loop control;
and under the condition that the network state is an offline state, the frequency control mode adopts open-loop control.
Specifically, referring to fig. 4, when the slave clock is on-line through the built-in frequency control module, the slave clock performs closed-loop control (the control selector switch is located at 1 in fig. 1) through a standard frequency synchronization manner obtained by decoding the carrier signal, completes frequency value transmission, and when the slave clock senses that the system is off-line, the frequency digital adjusting device is switched to open-loop control to ensure local time maintenance (the control selector switch is located at 2).
Optionally, the frequency control module comprises: a decoding unit, a time-to-digital conversion unit, a temperature compensation data unit, a temperature compensation control unit, a digital low-pass filter 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 the 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 quantity;
the temperature compensation data unit is used for storing the digital control quantity of the voltage-controlled crystal oscillation unit at different temperatures;
the temperature compensation control unit receives temperature data of the voltage-controlled crystal oscillator from the temperature sensor, receives a first digital control quantity from the time-to-digital conversion unit, acquires a voltage-controlled crystal oscillator digital control quantity corresponding to the temperature data from the temperature compensation data unit, adjusts the first digital control quantity according to the voltage-controlled crystal oscillator digital control quantity, and determines a second digital control quantity;
the digital low-pass filtering unit receives the 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 a 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 and converts the standard frequency into a digital control quantity, the digital low-pass filter filters and converts the digital control quantity into a control voltage signal, the temperature compensation data unit stores the digital control quantity of the voltage-controlled crystal oscillation unit at different temperatures, and the temperature compensation control unit reads data from the temperature compensation data unit according to different temperatures and outputs the digital control quantity of the voltage-controlled crystal oscillator. By utilizing the online temperature scale data of the module during the network operation, a module offline condition frequency control module temperature compensation mechanism is provided, and a low-cost and high-precision maintenance mechanism of the offline clock module frequency is provided.
Optionally, the time-to-digital converting 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 quantity, including:
a slave clock of each metering device in the metering device receives the time synchronization beacon twice from a master clock, wherein the slave clock comprises a first time stamp and a second time stamp for sending the time synchronization beacon twice, and records a third time stamp and a fourth time stamp for receiving the time synchronization beacon twice;
a time-to-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 adjustment voltage parameter and determines a first digital control quantity.
Specifically, referring to fig. 5, in the evaluation process of the clock frequency as shown in fig. 5, a time synchronization beacon is periodically transmitted by a carrier at a T-GM master clock end, the transmission time and the reception time of the synchronization beacon are generated by a communication physical layer, and 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 the time delay is generally stable, the reception time interval of the slave clock is consistent with the master clock, and the slave clock frequency is synchronized with the master clock frequency by using this relationship, where the frequency difference is as follows:
in which, as shown with reference to figure 5,T Mi may be the second time stampT M1 ,T M0 Is a first time stamp of the time stamp,T Si may be the fourth time stampT S1 ,T S0 Is the third timestamp.
The slave clock periodically performs the above evaluation process through the time-to-digital conversion unit in fig. 1, obtains a local frequency adjustment voltage parameter, outputs the local frequency adjustment voltage parameter to the voltage-controlled crystal oscillation unit, 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: a control selection unit and a double-control switch, wherein
The control selection unit is arranged between the time-to-digital conversion unit and the digital low-pass filtering unit and used for generating a frequency control temperature compensation coefficient according to pre-stored frequency locking control quantities 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.
Specifically, the slave clock performs closed-loop control (the control selector switch is located at 1 in fig. 1) through a standard frequency synchronization mode obtained by decoding a carrier signal when the network is on line through a built-in frequency control module, frequency quantity value transmission is completed, and when the system is sensed to be off line, the frequency digital adjusting device is converted into open-loop control to ensure local time maintenance (the control selector switch is located at 2). Therefore, the double-control switch is arranged at the position 2, and the open-loop control in an off-line state is realized by controlling the selection unit.
The slave clock carries out closed-loop control through an internal frequency control module in an online frequency synchronization mode when a network is online, completes frequency quantity value transmission, records different frequency locking control quantities at different temperatures, and uses the frequency locking control quantities as frequency control temperature compensation coefficients for offline open-loop control. When the system is sensed to be offline, the frequency digital adjusting device is converted into open-loop control, temperature compensation control is carried out by using a frequency control temperature compensation coefficient obtained by online operation, and short-time high-precision time self-maintenance of an offline node is realized at lower cost.
Optionally, when the network state is an online state, the frequency control mode adopts a closed-loop control operation, and further includes: the dual-control switch is arranged on the first contact.
Optionally, when the network state is an offline state, the frequency control mode adopts an open-loop control operation, and further includes: the dual-control switch is arranged on the second contact.
Therefore, the network on-line closed-loop control and the network off-line open-loop control of the metering device on the platform 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 security and the availability of the synchronization time information externally provided by the module are ensured. Aiming at the ToD signal output to the end user, encryption and authentication interaction are carried out through a national cryptographic algorithm, and the integrity, the safety and the usability of output time information are ensured.
Optionally, the operation of calculating a time delay and a time offset between the metering devices of the metering apparatus comprises:
the master clock sends a synchronous message to the slave clock and packs a fifth timestamp sent by the synchronous message;
receiving a synchronous message from a slave clock of each metering device in the metering device, and recording 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 timestamp of the received delay request message, and packages and sends the eighth timestamp and the delay response message to the slave clock;
and 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, to ensure the uplink and downlink symmetry of the time delay, the time delay and time offset synchronization of the nodes in the entire network synchronization is performed in steps, the synchronization starts from T-GM down, each synchronization only involves adjacent levels, and the boundary clock nodes after the synchronization are used as the master clock of the next level node to continue the next level synchronization until all the nodes in the network nodes are synchronized. The measurement and calculation process in a specific primary synchronization is as follows: (wherein the fifth time stampT 1 、Sixth time stampT 2 、Seventh time stampT 3 And eighth time stampT 4 )
1) The master clock sends Synco synchronous message, and the master node physical layer marks the accurate sending time stamp on the sending packet when the message is sentT 1 When the message is received from the node, the received message is marked with an accurate receiving time stamp in the physical layerT 2 At this time, the slave clock end has a time stampT 1 AndT 2 ;
2) then, the slave clock sends a Delay request message Delay _ Req to the master clock end, and when the message is sent out, the slave node physical layer stamps a sending packet with an accurate sending time stampT 3 Recording from the clock endT 3 When the slave clock end has a time stampT 1 、T 2 AndT 3 ;
3) finally, when the Delay request message Delay _ Req is received at the master clock end, the accurate receiving timestamp is marked on the received message at the physical layerT 4 And sends the message Delay _ Resp to the slave clockT 4 Time stamp information and recording time by slave clock, the slave clock end having time stampT 1 、T 2 、T 3 AndT 4 。
whereinT 1 AndT 4 the time is measured by the time information of the main clockIs prepared byT 2 AndT 3 the time is measured by using the time information of the slave clock as the 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 one timeT offset Time offset of path uplink and downlink transmission delay ofT delay1 AndT delay2 the following equation can be obtained:
because the transmission delay is carried out in the transmission physical layer and is only related to the distance between two points of carrier communication, the uplink and downlink transmission delayT delay1 AndT delay2 equal, the time delay and time offset can be calculated:
from the clock according toT offset And correcting the absolute time of the slave clock to finish transferring the absolute time value of the slave clock. By the method, the problems of uncertain delay and accumulated errors caused by equipment application layer delay in carrier communication transmission are solved, time synchronization precision 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 comprises a stored program, wherein the method of any of the above is performed by a processor when the program is run.
Therefore, according to the embodiment, different frequency control strategies are set 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 by calculating the time delay and time offset measuring and calculating method among the measuring devices of the measuring device, the problem of tracing to the source of absolute time is realized, and 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 then solve the numerous metering device of platform district aspect quantity that exists and lack the effectual time synchronization means among the prior art, can not satisfy the technical problem of smart power grids's demand.
In addition, the invention provides a high-reliability and high-precision time synchronization volume transmission system based on carrier communication, solves the high-precision time synchronization requirement urgently needed by the digital informatization of a power grid, can meet the application requirements of various power scenes, and has strong applicability; a method for synchronizing clock frequency is provided, which ensures the magnitude transfer of clock frequency between a master clock and a slave clock; the method for measuring and calculating the time delay and the time offset solves the problems of delay uncertainty and accumulated errors caused by equipment application layer delay in carrier communication transmission, guarantees the time synchronization precision and realizes the magnitude transmission of absolute time; by utilizing the online temperature scale data of the module during the network operation, a module offline condition frequency control module temperature compensation mechanism is provided, and a low-cost and high-precision maintaining mechanism of the offline clock module frequency is provided; a digital encryption mechanism is introduced, so that the integrity, the safety and the availability of the synchronous time information externally provided by the module are ensured.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention or portions thereof contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute 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, configured to detect a network condition of a metering device, and determine a network status of the metering device, where the network status includes an online status and an offline status; 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 metering devices of the metering apparatus, where each metering device is provided with a frequency control module; the synchronization module 740 is configured to synchronize clock frequencies of the metering devices of the metering apparatus according to the time delay, the time offset, and the control method.
Optionally, the second determining module 720 includes: the first adoption submodule is used for adopting closed-loop control in a frequency control mode under the condition that the network state is an online state; and the second adoption submodule 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 status includes an online status and an offline status, and the second determining module includes: the first adoption submodule 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 adoption submodule 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 sub-module includes: the first determining unit is used for decoding the carrier signal by utilizing the frequency control module and determining a standard frequency; the second determining unit is used for adjusting the standard frequency according to the local frequency adjusting voltage parameter by using 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 quantity 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 oscillating unit according to the voltage control information and determining the frequency of the output clock.
Optionally, the second adopted sub-module includes: a sixth determining unit, configured to decode the 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, and determine a first digital control quantity; an eighth determining unit, configured to generate a frequency control temperature compensation coefficient according to pre-stored frequency locking control quantities at different temperatures by using the frequency control module, and adjust the first digital control quantity to generate a third digital control quantity; 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 oscillating unit according to the voltage control information to determine the frequency of the output clock.
Optionally, the first determining sub-module includes: a first recording unit, configured to receive a time synchronization beacon twice from a master clock by a slave clock of each metering device in the metering apparatus, where the time synchronization beacon includes a first timestamp and a second timestamp that are used for transmitting the time synchronization beacon twice, and record a third timestamp and a fourth timestamp that are used for receiving the time synchronization beacon twice; an eleventh determining unit, configured to determine 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 by the time-to-digital conversion unit of the slave clock; and the twelfth determining unit is used for adjusting the standard frequency by the digital conversion unit according to the local frequency adjusting voltage parameter and determining the first digital control quantity.
Optionally, the second determining module further includes: and the realization submodule is used for realizing the frequency control mode through a double-control switch which is preset in the frequency control module.
Optionally, the apparatus 700 further comprises: and 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 calculating module 730 includes: the first sending submodule is used for sending the synchronous message to the slave clock by the master clock and packing a fifth timestamp sent by the synchronous message; the first receiving submodule is used for receiving the synchronous messages from the clock of each metering device in the metering device and recording the sixth timestamp for receiving the synchronous messages; the second sending submodule is used for sending the delay request message from the slave 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 timestamp of the received delay request message, and packaging and sending the eighth timestamp 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.
Therefore, according to the embodiment, different frequency control strategies are set for different network states, the problem of tracing of 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 by calculating the time delay and time offset measuring and calculating method among the measuring devices of the measuring device, the problem of tracing to the source of absolute time is realized, and the performance requirement on time synchronization in power informatization is met. The technical effect of accurate time synchronization among metering devices of the platform floor metering device is achieved. And then solve the numerous metering device of platform district aspect quantity that exists and lack the effectual time synchronization means among the prior art, can not satisfy the technical problem of smart power grids's demand.
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 to process the following process steps: 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; 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 among metering devices of the metering device, wherein each metering device is provided with a frequency control module; and according to the time delay, the time offset and the control mode, carrying out clock frequency synchronization on each metering device of the metering device.
Optionally, determining the operation of the frequency control mode of the metering device according to the network status includes: under the condition that the network state is an online state, the frequency control mode adopts closed-loop control; and under the condition that the network state is an offline state, the frequency control mode adopts open-loop control.
Optionally, the frequency control module comprises: 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 quantity; the temperature compensation data unit is used for storing the digital control quantity of the voltage-controlled crystal oscillation unit at different temperatures; the temperature compensation control unit receives temperature data of the voltage-controlled crystal oscillator from the temperature sensor, receives a first digital control quantity from the time-to-digital conversion unit, acquires a voltage-controlled crystal oscillator digital control quantity corresponding to the temperature data from the temperature compensation data unit, adjusts the first digital control quantity according to the voltage-controlled crystal oscillator digital control quantity, and determines a second digital control quantity; the digital low-pass filtering unit receives the 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 a control voltage signal from the digital low pass filter unit.
Optionally, the operation of the time-to-digital conversion unit receiving the standard frequency from the decoding unit, adjusting the standard frequency according to the local frequency adjustment voltage parameter, and determining the first digital control quantity includes: a slave clock of each metering device in the metering device receives a time synchronization beacon twice from a master clock, comprises a first time stamp and a second time stamp for sending the time synchronization beacon twice, and records a third time stamp and a fourth time stamp for receiving the time synchronization beacon twice; a time-to-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 adjustment voltage parameter and determines a first digital control quantity.
Optionally, the frequency control module further comprises: the control selection unit is arranged between the time-to-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 quantities 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, when the network state is an online state, the frequency control mode adopts a closed-loop control operation, and further includes: the dual-control switch is arranged on the first contact.
Optionally, when the network state is an offline state, the frequency control mode adopts an open-loop control operation, and further includes: the on-off switch is disposed at the second contact.
Optionally, the memory 820 is further configured to provide the processor 810 with instructions for processing 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 the metering devices of the metering apparatus comprises: the master clock sends a synchronous message to the slave clock, and a fifth timestamp sent by the synchronous message is packaged; receiving a synchronous message from a slave clock of each metering device in the metering device, and recording 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 timestamp of the received delay request message, and packages and sends the eighth timestamp and the delay response message to the slave clock; and 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.
Therefore, according to the embodiment, different frequency control strategies are set 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 by calculating the time delay and time offset measuring and calculating method among the measuring devices of the measuring device, the problem of tracing to the source of absolute time is realized, and the performance requirement on time synchronization in power informatization is met. The technical effect of accurate time synchronization among metering devices of the platform floor metering device is achieved. And then solve the numerous metering device of platform district aspect quantity that exists among the prior art and lack the effectual time synchronization means, can not satisfy the technical problem of smart power grids's demand.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed technical contents can be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute 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), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and amendments can be made without departing from the principle of the present invention, and these modifications and amendments should also be considered as the protection scope of the present invention.
Claims (20)
1. A clock frequency synchronization method of a metering device is applied among metering devices of the metering device in a platform area layer, and is characterized by comprising the following steps:
detecting the network condition of the metering device and determining the network state of the metering device;
determining a frequency control mode of the metering device according to the network state;
calculating time delays and time offsets between the metering devices of the metering apparatus;
and performing clock frequency synchronization on each metering device of the metering device according to the time delay, the time offset and the control mode.
2. The method of claim 1, wherein the network status comprises an online status and an offline status, and wherein the network status comprises an online status and an offline status
Determining operation of a frequency control mode of the metering device based on the network status, comprising:
under the condition that the network state is the online state, the frequency control mode adopts closed-loop control;
and under the condition that the network state is the off-line state, the frequency control mode adopts open-loop control.
3. The method of claim 2, wherein determining the operation of the metering device in a frequency controlled manner based on the network status comprises:
and determining the frequency control mode of the metering device according to the network state through a preset frequency control module.
4. The method according to claim 3, wherein in the case that the network status is the online status, the frequency control manner adopts a closed-loop control operation, which includes:
decoding the carrier signal by using the frequency control module to determine a standard frequency;
adjusting the standard frequency according to a local frequency adjustment voltage parameter by using the frequency control module to determine a first digital control quantity;
adjusting the first digital control quantity through the acquired temperature data of the voltage-controlled crystal oscillation unit by using the frequency control module to determine a second digital control quantity;
performing filtering conversion on the second digital control quantity by using the frequency control module to determine a control voltage signal;
and adjusting the voltage-controlled crystal oscillation unit according to the voltage control information to determine the frequency of the output clock.
5. The method according to claim 3, wherein in the case that the network status is the offline status, the frequency control manner adopts open-loop control, and includes:
decoding the carrier signal by using the frequency control module to determine a standard frequency;
adjusting the standard frequency according to a local frequency adjustment voltage parameter by using the frequency control module to determine a first digital control quantity;
generating a frequency control temperature compensation coefficient according to pre-stored frequency locking control quantities at different temperatures by using the frequency control module, and adjusting the first digital control quantity to generate a third digital control quantity;
performing filtering conversion on the third digital control quantity by using the frequency control module to determine a control voltage signal;
and adjusting the voltage-controlled crystal oscillation unit according to the voltage control information to determine the frequency of the output clock.
6. The method of any one of claims 4 or 5, wherein the operation of determining a first digitally controlled quantity by adjusting the standard frequency with the frequency control module according to a local frequency adjustment voltage parameter comprises:
a slave clock of each metering device in the metering device receives two time synchronization beacons from a master clock, wherein the slave clock comprises a first time stamp and a second time stamp for sending the two time synchronization beacons, and a third time stamp and a fourth time stamp for receiving the two time synchronization beacons are recorded;
the time-to-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.
7. The method of claim 3, wherein determining the operation of the metering device in a frequency controlled manner based on the network status further comprises:
and the frequency control mode is realized by a double-control switch which is preset in the frequency control module.
8. The method of claim 6, 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.
9. The method of claim 6, wherein the operation of calculating time delays and time offsets between metering devices of the metering apparatus comprises:
the master clock sends a synchronous message to the slave clock and packs a fifth timestamp sent by the synchronous message;
receiving the synchronous message by the slave clock of each metering device in the metering device, and recording 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 timestamp for receiving the delay request message, and packages and sends the eighth timestamp and the delay response message to the slave clock;
and 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.
10. A computer-readable storage medium, characterized in that the storage medium comprises a stored program, wherein the method of any of claims 1 to 9 is performed by a processor when the program is run.
11. A clock frequency synchronization device of a metering device is applied between metering devices of the metering device in a platform floor, and is characterized by comprising the following components:
the first determination module is used for detecting the network condition of the metering device and determining the network state 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 by a preset frequency control module;
a calculation module, configured to calculate a time delay and a time offset between the metering devices of the metering device, where the metering devices are respectively provided with the 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.
12. The apparatus of claim 11, wherein the network status comprises an online status and an offline status, and wherein the second determining module comprises:
the first adoption submodule 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 adoption submodule is used for adopting open loop control in the frequency control mode under the condition that the network state is the offline state.
13. The apparatus of claim 12, wherein the second determining module comprises:
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.
14. The apparatus of claim 13, wherein the first adoption submodule comprises:
the first determining unit is used for decoding the carrier signal by utilizing the frequency control module and determining a standard frequency;
the second determining unit is used for adjusting the standard frequency according to the local frequency adjusting voltage parameter by using the frequency control module to determine a first digital control quantity;
the fourth determining unit is used for performing filtering conversion on the second digital control quantity by using the frequency control module to determine a control voltage signal;
and the fifth determining unit is used for adjusting the voltage-controlled crystal oscillating unit according to the voltage control information and determining the frequency of the output clock.
15. The apparatus of claim 13, wherein the second adoption submodule comprises:
a sixth determining unit, configured to decode the 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, and determine a first digital control quantity;
an eighth determining unit, configured to generate a frequency control temperature compensation coefficient according to pre-stored frequency locking control quantities at different temperatures by using the frequency control module, and adjust the first digital control quantity to generate a third digital control quantity;
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 oscillating unit according to the voltage control information to determine the frequency of the output clock.
16. The apparatus of any one of claims 14 or 15, wherein the first determining sub-module comprises:
a first recording unit, configured to receive a time synchronization beacon twice from a master clock by a slave clock of each metering device in the metering apparatus, where the first recording unit includes a first timestamp and a second timestamp for transmitting the time synchronization beacon twice, and records a third timestamp and a fourth timestamp for receiving the time synchronization beacon twice;
an eleventh determining unit, configured to determine a local frequency adjustment voltage parameter according to the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp by using the time-to-digital conversion unit of the slave clock;
and the twelfth determining unit is used for adjusting the standard frequency by the digital conversion unit according to the local frequency adjusting voltage parameter and determining the first digital control quantity.
17. The apparatus of claim 13, wherein the second determining module further comprises:
and the realization submodule is used for realizing the frequency control mode through a double-control switch which is preset in the frequency control module.
18. The apparatus of claim 16, 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.
19. The apparatus of claim 16, 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 packing a fifth timestamp sent by the synchronous message;
the first receiving submodule is used for receiving the synchronous messages by the slave clocks of the metering devices in the metering device and recording sixth timestamps of the received synchronous messages;
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 submodule is used for receiving the delay request message by the master clock, recording an eighth timestamp for receiving the delay request message, and packaging and sending the eighth timestamp and the delay response message to the slave clock;
a second determining submodule, configured to determine, by the slave clock, the time delay and the time offset of the uplink and the downlink according to the fifth timestamp, the sixth timestamp, the seventh timestamp, and the eighth timestamp.
20. A clock frequency synchronization device of a metering device is applied between metering devices of the metering device in a platform floor, and is characterized by comprising the following components:
a processor; and
a memory coupled to the processor for providing instructions to the processor for processing the following processing steps:
detecting the network condition of the metering device and determining the network state 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;
and performing clock frequency synchronization on each metering device of the metering device according to the time delay, the time offset and the control mode.
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 true CN115102657A (en) | 2022-09-23 |
CN115102657B 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116471211A (en) * | 2023-06-19 | 2023-07-21 | 威胜信息技术股份有限公司 | Accurate time setting method for electric power Internet of things |
Citations (4)
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 |
US20120187770A1 (en) * | 2007-08-21 | 2012-07-26 | Electro Industries/Gauge Tech | System and method for synchronizing multiple generators with an electrical power distribution system |
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 |
-
2022
- 2022-06-29 CN CN202210750508.8A patent/CN115102657B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120187770A1 (en) * | 2007-08-21 | 2012-07-26 | Electro Industries/Gauge Tech | System and method for synchronizing multiple generators with an electrical power distribution system |
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 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116471211A (en) * | 2023-06-19 | 2023-07-21 | 威胜信息技术股份有限公司 | Accurate time setting method for electric power Internet of things |
CN116471211B (en) * | 2023-06-19 | 2023-10-13 | 威胜信息技术股份有限公司 | Accurate time setting method for electric power Internet of things |
Also Published As
Publication number | Publication date |
---|---|
CN115102657B (en) | 2024-01-26 |
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 | |
US8116405B2 (en) | Method and apparatus for time synchronization using GPS information in communication system | |
US8913632B2 (en) | Method and system for frequency synchronization | |
CN101083523B (en) | Method and device for realizing integrated time stamp clock synchronous phase-locked loop | |
WO2012062207A1 (en) | Standard frequency and time adjusting method based on rubidium oscillator | |
CN102013970B (en) | Clock synchronization method and device thereof as well as base station clock device | |
WO2019005531A1 (en) | Time synchronization in resource constrained networks | |
CN203313199U (en) | Intelligent electronic device IEEE C37.238 time synchronization system | |
JP2017513285A (en) | Clock drift compensation in time-synchronized channel hopping networks | |
CN102104475A (en) | IEEE 1588-based synchronization system and synchronization method thereof | |
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 | |
CN103299575A (en) | Transmission device, transmission method and computer program | |
US20160065358A1 (en) | Synchronization method, intermediate node, and slave node of communication network system | |
JP6227888B2 (en) | Communication system, synchronization system, and communication method | |
US6647026B1 (en) | Frame phase synchronous system and a method thereof | |
CN115102657A (en) | Clock frequency synchronization method and device of metering device and storage medium | |
CN107483136A (en) | A kind of clock synchronizing method between fixed communication apparatus | |
TWI375416B (en) | Remote monitoring and calibration of system reference clock using network timing reference | |
KR20100048124A (en) | Time synchronization method in bridged local area network | |
CN116264731A (en) | Method and apparatus for determining clock frequency offset | |
US11824633B1 (en) | Communication device, computer program product, and communication system | |
CN113132041B (en) | Data transmission delay calculation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |