WO2019205498A1 - 电能表的时钟同步方法、装置、计算机设备和存储介质 - Google Patents
电能表的时钟同步方法、装置、计算机设备和存储介质 Download PDFInfo
- Publication number
- WO2019205498A1 WO2019205498A1 PCT/CN2018/109166 CN2018109166W WO2019205498A1 WO 2019205498 A1 WO2019205498 A1 WO 2019205498A1 CN 2018109166 W CN2018109166 W CN 2018109166W WO 2019205498 A1 WO2019205498 A1 WO 2019205498A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- time
- message
- electric energy
- energy meter
- calibration
- Prior art date
Links
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/0682—Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging
-
- 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/0644—External master-clock
Definitions
- the present application relates to the field of power system technologies, and in particular, to a clock synchronization method, device, computer device, and storage medium for an electric energy meter.
- the current power billing mode of the power system is mainly based on monthly non-real-time payment.
- the energy meter uses its own time as a standard to count the power consumption for a long period of time (usually in days and months), and then periodically reads the meter's metering data.
- the time error of the energy meter is not sensitive.
- the timing command can be issued from the electric meter data collecting main station to perform the point-to-point timing.
- the timing mechanism is that the power generation time of the main station is given to the concentrator or the negative control terminal, and then the concentrator and the negative control terminal send the time-bearing message to the electric energy meter, and the electric meter executes the timing. In this way, after multiple levels of transit, and there are delays, retransmissions, and the like in the message in the complex network, the time of the energy meter cannot be effectively synchronized.
- the technical solution adopts a scheme in which the primary station performs time synchronization of the timing instructions through the negative control terminal or the concentrator through the transmission meter.
- a master station usually needs to manage tens of thousands to millions of meters, perform a time error interpretation on all meters, and it takes a long time to issue a calibration, and the time error management of the meter is poor in real-time.
- a clock synchronization method for an electric energy meter comprising:
- time calibration message includes the calibration time to synchronize the local clock of the electric energy meter.
- the clock synchronization method of the above electric energy meter obtains an accurate absolute time and pairs the internal clock counter to realize accurate subsequent timing, and then sends the first time-time message at the first time through a preset communication protocol, and the electric energy meter is After receiving the first pair of time packets, the second time packet is fed back, and the second time of receiving the second message is recorded, thereby combining the transmission delay of the message to calculate the processing delay of the energy meter to the packet, and then The calibration time of the local clock of the electric energy meter is calculated, thereby realizing the local clock synchronization of the electric energy meter by transmitting a time calibration message to the electric energy meter.
- the local clock of the electric energy meter can meet the requirement of the second level by using an accurate clock source and considering the delay of message transmission and processing.
- the method further includes: decompressing the second time-to-time message to obtain a third time of the local clock of the power meter; and obtaining the power according to the second time, the third time, and the transmission delay The time error of the local clock of the table; determining whether the time error is within a preset time range, thereby determining whether the local clock of the energy meter is synchronized.
- the method further includes: calculating a time error of the local clock of the electric energy meter:
- dt0 represents the time error of the local clock of the electric energy meter
- T2 represents the second time
- T3 represents the third time
- dt2 represents the transmission delay
- the method further includes: transmitting, by the power meter communication protocol of the physical link, the first time-to-time message conforming to the power meter communication protocol to the power meter at the first time and the matching of the power meter feedback received at the second time The second pair of time messages of the energy meter communication protocol.
- the method further includes: acquiring a first packet length of the first time-out packet and a baud rate of the physical link interface, according to the first packet length and the physical link interface a baud rate, a transmission delay of the first time-to-time packet, a second packet length of the second-time packet, and a baud rate of the second packet according to the length of the second packet and the physical link interface.
- dt1 represents the transmission delay of the first pair of time packets
- dt2 represents the transmission delay of the second pair of time packets
- T1 represents the first time
- T2 represents the second time
- dt3 represents the processing delay of the first pair of time packets.
- the method further includes: pre-acquiring the packet assembly time and the packet length of the time calibration message, and adjusting the packet length of the packet, the baud rate of the physical link, and The code length of the time calibration message in the communication link is obtained, and the transmission delay of the time calibration message is obtained; the calculation formula of the calibration time in the time calibration message is:
- T5 T4+dt3+dt4+dt5
- T5 represents a calibration time in the time calibration message
- T4 is a time when the internal clock records the time calibration message
- the dt4 represents a transmission delay of the time calibration message
- dt5 represents a predetermined time.
- the method further includes: acquiring an absolute time from a base station; or acquiring time of the multiple base stations, selecting one of the times of the multiple base stations as the absolute time; or, by using an internal GPS module or a Beidou module Get absolute time.
- a clock synchronization device for an electric energy meter comprising:
- An internal timing module configured to acquire an absolute time, and time to the internal clock according to the absolute time
- a packet sending and receiving module configured to send a first time-to-time message to the power meter at a first time and a second time-to-time message that is received by the power meter at a second time by using a preset communication protocol;
- the second time is the time of the internal clock;
- a delay calculation module configured to obtain, according to the first time, the second time, and the transmission delay, a processing delay of the first time-to-time packet; according to the processing delay, a transmission delay, and a predetermined The message assembly time and the time of the internal clock are obtained, and the calibration time is obtained;
- a clock synchronization module configured to send a time calibration message to the power meter, wherein the time calibration message includes the calibration time to synchronize a local clock of the power meter.
- a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the computer program to implement the following steps:
- time calibration message includes the calibration time to synchronize the local clock of the electric energy meter.
- a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the following steps:
- time calibration message includes the calibration time to synchronize the local clock of the electric energy meter.
- the clock synchronization method, device, computer device and storage medium of the above electric energy meter enable the electric energy meter to meet the requirement of the second level through an accurate clock source and considering the delay of message transmission and processing.
- FIG. 1 is an application environment diagram of a clock synchronization method of an electric energy meter in an embodiment
- FIG. 2 is a schematic flow chart of a clock synchronization method of an electric energy meter in an embodiment
- FIG. 3 is a schematic flow chart of a clock synchronization method of an electric energy meter in another embodiment
- FIG. 4 is a schematic structural diagram of obtaining an absolute time in an embodiment
- FIG. 5 is a schematic structural diagram of obtaining a second absolute time in an embodiment
- FIG. 6 is a schematic structural diagram of obtaining a third absolute time in an embodiment
- FIG. 7 is a timing diagram of a clock synchronization method of an electric energy meter in an embodiment
- Figure 8 is a block diagram showing the structure of a clock synchronizing apparatus of an electric energy meter in an embodiment
- Figure 9 is a diagram showing the internal structure of a computer device in an embodiment.
- the clock synchronization method of the electric energy meter provided by the present application can be applied to an application environment as shown in FIG. 1.
- the electric energy meter 102 communicates with the timing terminal 104 by setting a communication protocol interface in advance.
- the electric energy meter 102 can be an electronic electric energy meter, a prepaid electric energy meter, or the like.
- the timing terminal 104 can have a smart phone, a notebook computer or the like with a communication protocol interface preset.
- the local clock is integrated in the electric energy meter 102 for recording its own time, and the time requirement of the electric energy meter service is provided by the local clock.
- the timing terminal 104 includes a GPS module or a Beidou module for obtaining an absolute time from the Beidou or the GPS.
- the terminal 104 can also pass through the communication module from a nearby base station or multiple. The base stations obtain absolute time.
- a clock synchronization method for an electric energy meter is provided.
- the method is applied to the timing terminal in FIG. 1 as an example, and includes the following steps:
- step 202 an absolute time is obtained, and the internal clock is timed according to the absolute time.
- absolute time can be considered as accurate time.
- absolute time is stored in the GPS system and the Beidou system.
- the absolute time is used as the internal clock, thereby ensuring the accuracy of the internal time of the terminal.
- Step 204 Send a first time-to-time message to the power meter at a first time by using a preset communication protocol, and receive a second time-time message fed back by the power meter at a second time; the first time and the second time are internal The time of the clock.
- the communication protocol may be determined by the connection relationship between the power meter and the timed terminal.
- the power meter and the timed terminal are connected through the RS485 communication interface, then the communication protocol may be the DL/T645 communication protocol, and the embodiment is not limited to the connection. the way.
- Step 206 Obtain a processing delay of the first time-to-time packet according to the first time, the second time, and a transmission delay; according to the processing delay, a transmission delay, and a predetermined packet assembly.
- the time and the time of the internal clock get the calibration time.
- the transmission delay is the transmission time of the message in the communication line. After determining the connection mode of the energy meter and the time-to-end terminal, the calculation can be performed according to the baud rate of the data transmission and the length of the message. In addition, the processing delay is the time required for the power meter or the timing terminal to decompress the message.
- Step 208 Send a time calibration message to the electric energy meter, where the calibration time includes the calibration time to synchronize the local clock of the electric energy meter.
- the internal constant counter is paired to realize the subsequent accurate timing, and then the first time-time message is sent at the first time through a preset communication protocol, and the electric energy meter
- the second time message is fed back, and the second time of receiving the second message is recorded, and the processing delay of the message is calculated according to the transmission delay of the message, and then the processing delay of the energy table is calculated.
- the calibration time of the local clock of the electric energy meter can be calculated, thereby realizing the timing of the electric energy meter by sending a time calibration message to the electric energy meter.
- the electric energy meter can meet the requirement of the second level by using an accurate clock source and considering the transmission of the message and the delay of the processing.
- FIG. 3 another method for clock synchronization of an electric energy meter is provided, and the method is specifically:
- the time-of-time terminal can obtain an absolute time from a base station.
- the base station has a GPS module or a Beidou module. Therefore, the time-station terminal can acquire the base station by communicating with one base station. Absolute time.
- the time-of-time terminal can acquire an absolute time from a plurality of base stations, and then select one of the times of the plurality of base stations as an absolute time, so that a single base station failure can be avoided. Inaccurate time, specifically, by comparing whether the time of multiple base stations is consistent, the time of the most accurate base station is determined as the absolute time.
- the GPS terminal or the Beidou module is included in the timing terminal, and the absolute time can be obtained through the local GPS module or the Beidou module.
- the internal clock may be a clock counter, and the reference of the clock counter is the internal clock of the terminal CPU of the timing, thereby ensuring the accuracy of the clock counter timing, and achieving accurate time by the absolute time versus the clock counter. recording.
- the first time and the second time are all recorded by an internal clock
- the third time is the time of the local clock of the electric energy meter.
- the third time and the transmission delay can be used to obtain the actual time of the local clock of the electric energy meter at the second time, so that the actual time error of the local clock of the electric energy meter can be calculated, and the corresponding timing strategy is set. For example, if the actual time error is greater than 1 s, the time alignment operation is performed, and other time ranges may be selected according to the actual and no requirements.
- the time error of the local clock of the electric energy meter is calculated as:
- dt0 represents the time error of the local clock of the electric energy meter
- T3 represents the third time
- T2 represents the second time
- dt2 represents the transmission delay
- S304 Obtain a processing delay of the first time-to-time packet according to the first time, the second time, and a transmission delay; according to the processing delay, a transmission delay, and a predetermined packet assembly time. And the time of the internal clock, the calibration time is obtained.
- the processing delay of the energy meter processing message is first calculated, and then the packet assembly time of the energy meter assembly message is determined, and the transmission delay of the message is determined, so that the calibration in the time calibration message can be determined. time.
- a time calibration message can be constructed, and the time terminal sends a time calibration message to the energy meter, which can realize the timing of the energy meter.
- the timing terminal and the power meter are connected by a physical link, and the message sent and received between the terminal and the power meter needs to satisfy the power meter communication protocol.
- a clock synchronization method for an electric energy meter is provided, and the method is as follows:
- S401 Obtain an absolute time on the terminal side of the timing, and time the internal clock according to the absolute time.
- the time-of-time terminal can obtain the absolute time from a base station.
- the base station has a GPS module or a Beidou module. Therefore, the time-to-end terminal can acquire the absolute time of the base station by communicating with one base station.
- the time-of-sale terminal can obtain an absolute time from a plurality of base stations, and then select one of the times of the plurality of base stations as an absolute time, so that the problem of inaccurate timing can be avoided when a single base station fails. Specifically, by comparing whether the time of multiple base stations is consistent, the time of the most accurate base station is determined as the absolute time.
- the GPS module or the Beidou module is included in the timing terminal, and the absolute time can be obtained through the local GPS module or the Beidou module.
- the internal clock may be a clock counter, and the reference of the clock counter is the internal clock of the terminal CPU of the timing, thereby ensuring the accuracy of the clock counter timing, and achieving accurate time by the absolute time versus the clock counter. recording.
- S403 on the side of the power meter, receives the first time-to-time message, processes the first-time time message, and feeds the second-time time message conforming to the power meter communication protocol to the time-station terminal through the physical link, where the second time-time message is The third time including the local clock of the energy meter.
- S404 Receive a second pair of time packets on the terminal side of the time-cored terminal, and record the current time as the second time; and process the second message to obtain a third time in the second pair of time messages that includes the local clock of the power meter.
- the baud rate of the physical link is S
- the second packet length L2 of the second pair of time packets is obtained
- the code length of the second pair of time packets in the communication link is m, therefore, the calculation is performed.
- S405 Obtain a processing delay of the first time-to-time packet according to the first time, the second time, and the transmission delay on the terminal side of the time-to-phase.
- the first packet length L1 of the first pair of time packets, the baud rate S of the physical link, and the code length m of the first pair of time packets in the communication link are obtained, according to the first A packet length L1, a baud rate S of the RS485 interface, and a code length m of the first pair of time packets in the communication link, obtain a transmission delay dt1 of the first pair of time packets.
- the transmission delay dt1 of the first pair of time messages can be expressed by the following formula:
- the transmission delay dt2 of the second pair of time messages can be expressed by the following formula:
- processing delay dt3 of the first message can be expressed by the following formula:
- the physical link can be an RS485 interface link, an RS232 interface link, an Ethernet interface link, etc.
- the power meter communication protocol can be a DL/T645 communication protocol.
- the communication wave The special rate can be set to 2400 bps
- the calibration time is obtained according to the processing delay, the transmission delay, the predetermined message assembly time, and the time of the internal clock.
- the time delay of the message is the delay of the message transmission. Then, after calculating each time delay, the time of the message can be calibrated according to the time of the transmission, and the calibration time is obtained.
- the calibration time T5 can be expressed by the following formula:
- T5 T4+dt3+dt4+dt5
- T5 represents the calibration time in the time calibration message
- the T4 internal clock records the time of transmitting the time calibration message
- the dt4 represents the transmission delay of the time calibration message
- dt5 represents the predetermined report. Assembly time.
- the calibration time actually included in the time calibration message is T5, so that the accurate timing of the electric energy meter can be realized.
- the time calibration message includes the calibration time to synchronize the local clock of the power meter.
- S408 Receive a time calibration message on the side of the energy meter to calibrate the local clock.
- S409 Waiting for a preset duration on the terminal side of the timing, and sending a third time-out message requesting the local clock time of the energy meter to the power meter again.
- S410 Receive a third pair of time packets on the side of the power meter, generate a fourth pair of time packets including the local clock time of the power meter, and send the message to the timed terminal.
- S411 Receive and process the fourth pair of time messages on the terminal side of the time, calculate whether the time of the local clock of the power meter is accurate, and if accurate, stop the time operation.
- a clock synchronization apparatus for an electric energy meter including: an internal timing module 502, a message transceiving module 504, a delay calculation module 506, and a clock synchronization module 508, wherein:
- the internal timing module 502 is configured to acquire an absolute time, and time to the internal clock according to the absolute time.
- the message transceiver module 504 is configured to send a first time-to-time message to the power meter at a first time and a second time-to-time message that is received by the power meter at a second time by using a preset communication protocol;
- the second time is the time of the internal clock.
- a delay calculation module 506 configured to obtain, according to the first time, the second time, and the transmission delay, a processing delay of the first time-to-time packet; according to the processing delay, a transmission delay, and an advance The determined message assembly time and the time of the internal clock are obtained.
- the clock synchronization module 508 is configured to send a time calibration message to the power meter, where the calibration time includes the calibration time to synchronize the local clock of the power meter.
- the method further includes: a calibration judging module, configured to decompress the second time telegram to obtain a third time of the local clock of the electric energy meter; according to the second time, the third time, and the transmission time Extending, obtaining a time error of the local clock of the electric energy meter; determining whether the time error is within a preset time range, thereby determining whether the local clock of the electric energy meter is synchronized.
- a calibration judging module configured to decompress the second time telegram to obtain a third time of the local clock of the electric energy meter; according to the second time, the third time, and the transmission time Extending, obtaining a time error of the local clock of the electric energy meter; determining whether the time error is within a preset time range, thereby determining whether the local clock of the electric energy meter is synchronized.
- the calibration judgment module is further configured to calculate a time error of the local clock of the electric energy meter as:
- dt0 represents the time error of the local clock of the electric energy meter
- T2 represents the second time
- T3 represents the third time
- dt2 represents the transmission delay
- the message transceiver module 504 is further configured to send the first time-to-time message conforming to the power meter communication protocol to the power meter and receive the second time at the first time through the power meter communication protocol of the physical link.
- the energy meter feedback conforms to the second pair of time messages of the energy meter communication protocol.
- the delay calculation module 506 is further configured to obtain a first packet length of the first time-out packet, a baud rate of the physical link, and a code of the first time-time packet in the communication link.
- the length according to the first packet length, the baud rate of the physical link, and the code length of the first time-time packet in the communication link, obtain the transmission delay of the first-time packet;
- the second packet length of the second-time packet is obtained according to the length of the second packet, the baud rate of the physical link, and the code length of the second-time packet in the communication link.
- the transmission delay; the calculation formula of the processing delay of the first time-time packet is as follows:
- dt1 represents the transmission delay of the first pair of time packets
- dt2 represents the transmission delay of the second pair of time packets
- T1 represents the first time
- T2 represents the second time
- dt3 represents the processing delay of the first pair of time packets.
- the delay calculation module 506 is further configured to pre-acquire the message assembly time and the message length of the time calibration message, according to the message length of the time calibration message, and the RS485 interface.
- the baud rate and the code length of the time alignment message in the communication link are obtained, and the transmission delay of the time calibration message is obtained; the calculation formula of the calibration time in the time calibration message is:
- T5 T4+dt3+dt4+dt5
- T5 represents the calibration time in the time calibration message
- T4 represents the time when the internal clock records the time calibration message
- the dt4 represents the transmission delay of the time calibration message
- dt5 represents the predetermined time.
- obtaining an absolute time from a base station or acquiring a time of a plurality of base stations, selecting one of the times of the plurality of base stations as the absolute time; or obtaining an absolute time by using an internal GPS module or a Beidou module .
- the various modules in the clock synchronization device of the above energy meter can be implemented in whole or in part by software, hardware, and combinations thereof.
- Each of the above modules may be embedded in or independent of the processor in the computer device, or may be stored in a memory in the computer device in a software form, so that the processor invokes the operations corresponding to the above modules.
- a computer device which may be a server, and its internal structure diagram may be as shown in FIG.
- the computer device includes a processor, memory, network interface, and database connected by a system bus.
- the processor of the computer device is used to provide computing and control capabilities.
- the memory of the computer device includes a non-volatile storage medium, an internal memory.
- the non-volatile storage medium stores an operating system, a computer program, and a database.
- the internal memory provides an environment for operation of an operating system and computer programs in a non-volatile storage medium.
- the database of the computer device is used to store clock synchronized data of the energy meter.
- the network interface of the computer device is used to communicate with an external terminal via a network connection.
- the computer program is executed by the processor to implement a clock synchronization method of the energy meter.
- FIG. 9 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device to which the solution of the present application is applied.
- the specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
- a computer apparatus comprising a memory and a processor having a computer program stored therein, the processor implementing the computer program to:
- time calibration message includes the calibration time to synchronize the local clock of the electric energy meter.
- the processor further executes the following steps: decompressing the second time-to-day message to obtain a third time of the local clock of the power meter; according to the second time, the third time, and the transmission The time delay obtains a time error of the local clock of the electric energy meter; determines whether the time error is within a preset time range, thereby determining whether the local clock of the electric energy meter is synchronized.
- the processor further implements the following steps when the processor executes the computer program: the time error of the local clock of the energy meter is calculated as:
- dt0 represents the time error of the electric energy meter
- T2 represents the second time
- T3 represents the third time
- dt2 represents the transmission delay
- the processor when executing the computer program, further implements the step of: transmitting, by the energy meter communication protocol of the physical link, the first time-to-time message conforming to the power meter communication protocol to the power meter at the first time and in the second The time is received by the energy meter to comply with the second time of the energy meter communication protocol.
- the processor when executing the computer program, further implements the steps of: obtaining a first message length of the first time-out message, a baud rate of the physical link, and the first time-to-time message in the communication link
- the length of the code according to the first packet length, the baud rate of the physical link, and the code length of the first time-time packet in the communication link, the transmission delay of the first-time packet is obtained;
- the transmission delay of the time packet; the calculation formula of the processing delay of the first time-time packet is as follows:
- dt1 represents the transmission delay of the first pair of time packets
- dt2 represents the transmission delay of the second pair of time packets
- T1 represents the first time
- T2 represents the second time
- dt3 represents the processing delay of the first pair of time packets.
- the following steps are further performed: pre-acquiring the message assembly time and the message length of the time calibration message, and adjusting the message length of the message according to the time, the physical The baud rate of the link and the code length of the time alignment message in the communication link are obtained, and the transmission delay of the time calibration message is obtained; the calculation formula of the calibration time in the time calibration message is:
- T5 T4+dt3+dt4+dt5
- T5 represents the calibration time in the time calibration message
- T4 represents the time when the internal clock records the time calibration message
- the dt4 represents the transmission delay of the time calibration message
- dt5 represents the predetermined time.
- the processor further implements the steps of: obtaining an absolute time from a base station when executing the computer program; or acquiring time of the plurality of base stations, selecting one of the times of the plurality of base stations as the absolute time; or Obtain absolute time via the internal GPS module or the Beidou module.
- a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the following steps:
- time calibration message includes the calibration time to synchronize the local clock of the electric energy meter.
- the computer program when executed by the processor, further implements the step of decompressing the second time-of-day message to obtain a third time of the local clock of the power meter; according to the second time, the third time, and The transmission delay is obtained, and the time error of the local clock of the electric energy meter is obtained; whether the time error is within a preset time range is determined, thereby determining whether the local clock of the electric energy meter is synchronized.
- the time error of the local clock of the electric energy meter is calculated as:
- dt0 represents the time error of the local clock of the electric energy meter
- T2 represents the second time
- T3 represents the third time
- dt2 represents the transmission delay
- the computer program when executed by the processor, further implements the step of: transmitting, by the energy meter communication protocol of the physical link, the first time-to-time message conforming to the power meter communication protocol to the power meter at the first time and The second time time receiving the energy meter feedback is in accordance with the second time of the energy meter communication protocol.
- the computer program is further executed by the processor to: obtain a first message length of the first time-out message, a baud rate of the physical link, and a first time-to-time message on the communication link
- the transmission length of the first time-to-time packet is obtained according to the length of the first packet, the baud rate of the physical link, and the coding length of the first-time packet in the communication link.
- the transmission delay of the time-of-day message; the calculation formula of the processing delay of the first-time message is as follows:
- the following steps are further performed: pre-acquiring the packet assembly time and the message length of the time calibration message, and according to the packet length of the time calibration message, The baud rate of the physical link and the code length of the time alignment message in the communication link obtain the transmission delay of the time calibration message; the calculation formula of the calibration time in the time calibration message is:
- T5 represents the calibration time in the time calibration message
- T4 represents the time when the internal clock records the time calibration message
- the dt4 represents the transmission delay of the time calibration message
- dt5 represents the predetermined time.
- the computer program is further executed by the processor to: obtain an absolute time from a base station; or acquire a time of the plurality of base stations, select one of the times of the plurality of base stations as the absolute time; or Obtain absolute time via the internal GPS module or the Beidou module.
- Non-volatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory can include random access memory (RAM) or external cache memory.
- RAM is available in a variety of formats, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronization chain.
- SRAM static RAM
- DRAM dynamic RAM
- SDRAM synchronous DRAM
- DDRSDRAM double data rate SDRAM
- ESDRAM enhanced SDRAM
- Synchlink DRAM SLDRAM
- Memory Bus Radbus
- RDRAM Direct RAM
- DRAM Direct Memory Bus Dynamic RAM
- RDRAM Memory Bus Dynamic RAM
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
- Electric Clocks (AREA)
Abstract
Description
Claims (10)
- 一种电能表的时钟同步方法,其特征在于,所述方法包括:获取绝对时间,根据所述绝对时间对内部时钟对时;通过预先设置的通信协议在第一时间向电能表发送第一对时报文,以及在第二时间接收电能表反馈的第二对时报文;所述第一时间、第二时间为内部时钟的时间;根据所述第一时间、所述第二时间以及传输时延,得到所述第一对时报文的处理时延;根据所述处理时延、传输时延、预先确定的报文组装时间以及所述内部时钟的时间,得到校准时间;向所述电能表发送时间校准报文,所述时间校准报文中包含所述校准时间,以对所述电能表的本地时钟同步。
- 根据权利要求1所述的电能表的时钟同步方法,其特征在于,还包括:解压所述第二对时报文得到所述电能表的本地时钟的第三时间;根据所述第二时间、第三时间以及传输时延,得到所述电能表本地时钟的时间误差;判断所述时间误差是否在预先设置的时间范围内,以此判断是否对电能表的本地时钟同步。
- 根据权利要求2所述的电能表的时钟同步方法,其特征在于,所述根据所述第二时间、第三时间以及传输时延,得到所述电能表本地时钟的时间误差,包括:所述电能表本地时钟的时间误差的计算公式为:dt0=T3+dt2-T2其中,dt0表示所述电能表本地时钟的时间误差,T2表示第二时间,T3表示第三时间,dt2表示传输时延。
- 根据权利要求1所述电能表的时钟同步方法,其特征在于,所述预先设置的通信协议在第一时间向电能表发送第一对时报文,以及在第二时间接收电能表反馈的第二对时报文,包括:通过物理链路的电能表通信协议,在第一时间向电能表发送符合电能表通讯协议的第一对时报文以及在第二时间接收电能表反馈的符合电能表通讯协议第二对时报文。
- 根据权利要求4所述的电能表的时钟同步方法,其特征在于,所述根据所述第一时间、所述第二时间以及传输时延,得到所述第一对时报文的处理时延,包括:获取第一对时报文的第一报文长度、所述物理链路的波特率以及第一对时报文在通信链路中的编码长度,根据所述第一报文长度、所述物理链路的波特率以及第一对时报文在通信链路中的编码长度,得到所述第一对时报文的传输时延;获取第二对时报文的第二报文长度,根据所述第二报文长度以及所述物理链路的波特率以及第二对时报文在通信链路中的编码长度,得到第二对时报文的传输时延;所述第一对时报文的处理时延的计算公式如下:dt3=T2-T1-dt1-dt2其中,dt1表示第一对时报文的传输时延,dt2表示第二对时报文的传输时延,T1表示第一时间,T2表示第二时间,dt3表示第一对时报文的处理时延。
- 根据权利要求5所述的电能表的时钟同步方法,其特征在于,所述根据所述处理时延、传输时延、预先确定的报文组装时间以及所述内部时钟的时间,得到校准时间,包括:预先获取所述报文组装时间以及时间校准报文的报文长度,根据所述时间校准报文的报文长度、所述物理链路的波特率以及时间校准报文在通信链路中的编码长度,得到所述时间校准报文的传输时延;所述时间校准报文中校准时间的计算公式为:T5=T4+dt3+dt4+dt5其中,T5表示所述时间校准报文中的校准时间,T4表示内部时钟记录发送所述时间校准报文的时间,所述dt4表示所述时间校准报文的传输时延,dt5表示预先确定的报文组装时间。
- 根据权利要求1至6任一项所述的电能表的时钟同步方法,其特征在于,所述获取绝对时间,包括:从一个基站获取绝对时间;或,获取多个基站的时间,从多个基站的时间中选择一个作为所述绝对时间;或,通过内部GPS模块或北斗模块获取绝对时间。
- 一种电能表的时钟同步装置,其特征在于,所述装置包括:内部对时模块,用于获取绝对时间,根据所述绝对时间对内部时钟对时;报文收发模块,用于通过预先设置的通信协议在第一时间向电能表发送第一对时报文,以及在第二时间接收电能表反馈的第二对时报文;所述第一时间、第二时间为内部时钟的时间;时延计算模块,用于根据所述第一时间、所述第二时间以及传输时延,得到所述第一对时报文的处理时延;根据所述处理时延、传输时延、预先确定的报文组装时间以及所述内部时钟的时间,得到校准时间;时钟同步模块,用于向所述电能表发送时间校准报文,所述时间校准报文中包含所述校准时间,以对所述电能表的本地时钟同步。
- 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述的方法的步骤。
- 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020207015343A KR102331631B1 (ko) | 2018-04-28 | 2018-09-30 | 전력량계의 클록 동기화 방법, 장치, 컴퓨터 설비 및 저장 매체 |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810404586.6 | 2018-04-28 | ||
CN201810404586.6A CN108616321B (zh) | 2018-04-28 | 2018-04-28 | 电能表的时钟同步方法、装置、计算机设备和存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019205498A1 true WO2019205498A1 (zh) | 2019-10-31 |
Family
ID=63661719
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/109166 WO2019205498A1 (zh) | 2018-04-28 | 2018-09-30 | 电能表的时钟同步方法、装置、计算机设备和存储介质 |
Country Status (3)
Country | Link |
---|---|
KR (1) | KR102331631B1 (zh) |
CN (1) | CN108616321B (zh) |
WO (1) | WO2019205498A1 (zh) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113489599A (zh) * | 2021-05-27 | 2021-10-08 | 国网浙江省电力有限公司湖州供电公司 | 一种变电站对时校验系统及对时消缺方法 |
CN113825039A (zh) * | 2021-08-24 | 2021-12-21 | 青岛鼎信通讯股份有限公司 | 一种基于变电站电能量采集终端的多回路供电需量叠加方法 |
CN114142960A (zh) * | 2021-12-21 | 2022-03-04 | 青岛鼎信通讯股份有限公司 | 一种利用移动5g基站对低压台区采集终端校时的方法 |
CN114269012A (zh) * | 2021-12-03 | 2022-04-01 | 武汉慧联无限科技有限公司 | 时间同步方法、装置及存储介质 |
CN115225244A (zh) * | 2022-07-14 | 2022-10-21 | 广东电网有限责任公司 | 低压集抄电能表时钟对时方法、装置、主设备及介质 |
CN115348660A (zh) * | 2022-10-20 | 2022-11-15 | 石家庄科林电气股份有限公司 | 电能表对时方法、电能表及存储介质 |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109407040A (zh) * | 2018-12-07 | 2019-03-01 | 广东电网有限责任公司 | 一种智能电能表校准方法、装置、设备及存储介质 |
CN110320791B (zh) * | 2019-06-20 | 2021-08-20 | 国网湖南省电力有限公司 | 一种用电信息采集系统时钟管理方法及装置 |
CN111025223B (zh) * | 2019-12-24 | 2022-09-20 | 宁波三星医疗电气股份有限公司 | 电能表的时钟修正方法、装置、设备及存储介质 |
CN111142359B (zh) * | 2020-01-20 | 2023-10-20 | 许昌中科森尼瑞技术有限公司 | 一种通过通讯实现电力二次设备对时的方法 |
CN111289943A (zh) * | 2020-02-28 | 2020-06-16 | 深圳市科陆精密仪器有限公司 | 一种电能表的检定方法和系统 |
CN111580379B (zh) * | 2020-05-11 | 2021-10-08 | 威胜集团有限公司 | 时间校正方法、装置及计算机可读存储介质 |
CN111988105B (zh) * | 2020-08-25 | 2022-11-01 | 烟台东方威思顿电气有限公司 | 一种基于rs485的高精度对时方法 |
CN112462591B (zh) * | 2020-12-07 | 2022-04-12 | 武汉中原电子信息有限公司 | 一种基于面向对象通信协议的用电采集终端对时方法 |
CN113783650A (zh) * | 2021-08-25 | 2021-12-10 | 浙江万胜智能科技股份有限公司 | 基于特征电流实现智能电表与智能终端精准对时的方法 |
CN115225429A (zh) * | 2022-05-30 | 2022-10-21 | 云南电网有限责任公司 | 一种基于服务隧道的电能表实时数据采集方法 |
CN116054987B (zh) * | 2022-10-12 | 2023-12-15 | 哈尔滨市科佳通用机电股份有限公司 | 一种车载设备的校时方法及存储介质 |
CN115914040A (zh) * | 2022-12-06 | 2023-04-04 | 国网山东省电力公司电力科学研究院 | 基于时间反向推演的电表数据发送时间判断方法和装置 |
CN116582772B (zh) * | 2023-03-29 | 2024-01-16 | 四川辰鳗科技有限公司 | 一种电能数据采集方法、系统、电子设备及介质 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103516507A (zh) * | 2013-09-24 | 2014-01-15 | 国家电网公司 | 基于dlptp时钟同步的用电信息采集系统对时方法 |
WO2015049478A1 (en) * | 2013-10-01 | 2015-04-09 | Khalifa University of Science, Technology, and Research | Method and devices for synchronization |
CN107425882A (zh) * | 2017-04-20 | 2017-12-01 | 北京智芯微电子科技有限公司 | 一种宽带电力线通信网络的校时方法及装置 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201812153U (zh) * | 2010-09-09 | 2011-04-27 | 河北旭辉电气股份有限公司 | 数字化变电站精确对时装置 |
CN102436172A (zh) * | 2011-12-02 | 2012-05-02 | 河南省电力公司南阳供电公司 | 多功能电能表与gps对时系统 |
CN105866576A (zh) * | 2016-04-01 | 2016-08-17 | 国家电网公司 | 智能变电站二次侧电能计量误差影响的模拟检测系统及其检测分析方法 |
-
2018
- 2018-04-28 CN CN201810404586.6A patent/CN108616321B/zh active Active
- 2018-09-30 WO PCT/CN2018/109166 patent/WO2019205498A1/zh active Application Filing
- 2018-09-30 KR KR1020207015343A patent/KR102331631B1/ko active IP Right Grant
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103516507A (zh) * | 2013-09-24 | 2014-01-15 | 国家电网公司 | 基于dlptp时钟同步的用电信息采集系统对时方法 |
WO2015049478A1 (en) * | 2013-10-01 | 2015-04-09 | Khalifa University of Science, Technology, and Research | Method and devices for synchronization |
CN107425882A (zh) * | 2017-04-20 | 2017-12-01 | 北京智芯微电子科技有限公司 | 一种宽带电力线通信网络的校时方法及装置 |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113489599A (zh) * | 2021-05-27 | 2021-10-08 | 国网浙江省电力有限公司湖州供电公司 | 一种变电站对时校验系统及对时消缺方法 |
CN113825039A (zh) * | 2021-08-24 | 2021-12-21 | 青岛鼎信通讯股份有限公司 | 一种基于变电站电能量采集终端的多回路供电需量叠加方法 |
CN114269012A (zh) * | 2021-12-03 | 2022-04-01 | 武汉慧联无限科技有限公司 | 时间同步方法、装置及存储介质 |
CN114142960A (zh) * | 2021-12-21 | 2022-03-04 | 青岛鼎信通讯股份有限公司 | 一种利用移动5g基站对低压台区采集终端校时的方法 |
CN115225244A (zh) * | 2022-07-14 | 2022-10-21 | 广东电网有限责任公司 | 低压集抄电能表时钟对时方法、装置、主设备及介质 |
CN115225244B (zh) * | 2022-07-14 | 2023-08-18 | 广东电网有限责任公司 | 低压集抄电能表时钟对时方法、装置、主设备及介质 |
CN115348660A (zh) * | 2022-10-20 | 2022-11-15 | 石家庄科林电气股份有限公司 | 电能表对时方法、电能表及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN108616321A (zh) | 2018-10-02 |
CN108616321B (zh) | 2019-08-09 |
KR20200083533A (ko) | 2020-07-08 |
KR102331631B1 (ko) | 2021-12-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019205498A1 (zh) | 电能表的时钟同步方法、装置、计算机设备和存储介质 | |
CN101855868B (zh) | 用于在异步无线通信网络中发送信息分组的方法及实现该方法的网络节点 | |
CN107276711B (zh) | EtherCAT主站装置 | |
US20090135677A1 (en) | System and method for application layer time synchronization without creating a time discrepancy or gap in time | |
US8248268B2 (en) | Requested time adjustment for accurate data exchange | |
CN103248471B (zh) | 基于ptp协议与反射内存网的时钟同步方法 | |
US9042411B1 (en) | System and method for accurate time sampling in presence of output delay | |
CN105450384A (zh) | 通信系统同步时钟对时装置 | |
CN102752843B (zh) | 一种时间同步方法 | |
US11411848B2 (en) | Flexible ethernet latency measurement method and related device | |
CN104144088A (zh) | 一种提高时延测量精度的网络时延测量方法 | |
CN104363069A (zh) | 一种基于北斗卫星定位的网络授时系统及方法 | |
KR20180025613A (ko) | LoRa 네트워크 단말에서의 시간 보정 방법 및 그 방법을 수행하는 단말 | |
CN202353572U (zh) | 电子式互感器合并单元的ieee1588时间同步系统 | |
CN112187557A (zh) | 一种测量上报的方法、网络节点 | |
US11516561B2 (en) | Method for reading fluid meters | |
CN106462146A (zh) | 现场设备、用于使现场设备运行的方法以及云服务 | |
CN106656395A (zh) | 基于自学习改进的电网时间同步测量系统和方法 | |
CN117241366A (zh) | 一种网关间时间同步方法、服务器、网关及计算机可读介质 | |
Kosanovic et al. | Delay compensation method for time synchronization in wireless sensor networks | |
CN102571252B (zh) | 高精度ntp授时系统的授时方法 | |
CN103813382A (zh) | 时钟同步方法、设备及系统 | |
CN115623435A (zh) | 一种基于uwb和tdoa的无线时钟同步方法及装置 | |
CN116054987B (zh) | 一种车载设备的校时方法及存储介质 | |
WO2022252231A1 (zh) | 用于时间同步的方法、终端设备和网络设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18916863 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 20207015343 Country of ref document: KR Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.03.2021) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18916863 Country of ref document: EP Kind code of ref document: A1 |