Clock synchronization method and system based on HPLC communication network delay correction

文档序号:1819631 发布日期:2021-11-09 浏览:6次 中文

阅读说明:本技术 基于hplc通信网络延时修正的时钟同步方法及系统 (Clock synchronization method and system based on HPLC communication network delay correction ) 是由 王韬 刘丽娜 申杰 周一飞 李方硕 屈鸣 王姝 吴勇 冯军 于 2021-08-06 设计创作,主要内容包括:本发明公开了基于HPLC通信网络延时修正的时钟同步方法及系统,该方法包括:CCO向集中器请求时钟;CCO模块向STA模块的时钟精确同步;STA模块向各类基表获取本地时钟;STA根据自身时钟与基表时钟比对做出相应校时策略。本发明的基于HPLC载波通信网络的采集系统时钟同步方法及系统,可以将集中器的时钟精准同步到分支箱监测单元、表箱监测单元与电能表等各级采集设备,实现低压台区所有采集设备时钟的微秒级同步,各级采集设备根据自身时钟采集并冻结电网参数,由此采集各时间点的曲线数据时间偏差远小于原采集系统的曲线数据时间偏差。(The invention discloses a clock synchronization method and a system based on HPLC communication network delay correction, wherein the method comprises the following steps: the CCO requests the clock from the concentrator; the CCO module accurately synchronizes the clock of the STA module; the STA module acquires a local clock from various base tables; and the STA makes a corresponding timing strategy according to the comparison of the clock of the STA and the clock of the base table. The clock synchronization method and system of the acquisition system based on the HPLC carrier communication network can accurately synchronize the clock of the concentrator to all levels of acquisition equipment such as a branch box monitoring unit, a meter box monitoring unit, an electric energy meter and the like, realize microsecond synchronization of clocks of all the acquisition equipment in a low-voltage distribution room, and the acquisition equipment at all levels acquire and freeze power grid parameters according to the clocks, so that the time deviation of acquiring curve data at all time points is far smaller than that of the original acquisition system.)

1. The clock synchronization method based on the HPLC communication network delay correction is characterized by comprising the following steps:

step 1, according to a clock accurate synchronization request initiated by a CCO module to a concentrator, the concentrator performs clock accurate synchronization to the CCO module: the concentrator sends a clock synchronization instruction to the CCO module through the serial port, a hardware second pulse signal is output to the CCO module, serial port communication delay is calculated according to the serial port baud rate, clock delay correction is carried out, and microsecond-level clock synchronization is achieved;

step 2, the CCO module performs clock accurate synchronization to the STA module: based on network reference time NTB in an HPLC carrier communication network, according to a beacon timestamp in a beacon, each STA module and a CCO module are enabled to realize microsecond synchronization of time, the CCO module binds a current perpetual calendar and the beacon and sends a time setting instruction to each STA module through HPLC communication, and the STA module realizes automatic compensation and updating of a perpetual calendar unit based on the network reference time NTB;

and 3, performing clock accurate synchronization on various base tables by the STA module: the STA module sends an instruction for reading the clock of the electric energy meter to the electric energy meter module through the serial port, calculates the serial port communication delay according to the serial port baud rate by outputting a hardware second pulse signal to the base meter, and performs clock delay correction to realize microsecond-level clock synchronization.

2. The clock synchronization method based on HPLC communication network delay correction of claim 1, further comprising the steps of:

step 4, comparing the base meter clock with the concentrator clock by the STA module, and calculating to obtain a clock difference value of the base meter clock and the concentrator clock;

and step 5, selecting different timing strategies by the STA module and the master station for timing according to the clock difference value.

3. An HPLC communication network delay correction based clock synchronization method according to claim 2, wherein step 5 comprises the following sub-steps:

step 51: the STA module performs different timing processing according to the clock difference value: judging according to the clock difference, and if the absolute value of the clock difference is less than or equal to a first set threshold, timing according to a broadcast timing command initiated by the concentrator; if the absolute value of the clock difference value is larger than a first set threshold, the STA module generates a clock out-of-tolerance event and reports out-of-tolerance time;

step 52: and the master station selects different timing strategies to perform timing processing according to the out-of-tolerance time: judging according to the out-of-tolerance time, and if the absolute value of the clock difference is less than or equal to a first set threshold, selecting and configuring a periodic broadcast timing command performed by the concentrator every day by the master station; if the absolute value of the clock difference is larger than a first set threshold and smaller than or equal to a second set threshold, the main station selects STA to automatically correct the base table every day; if the absolute value of the clock difference is larger than a second set threshold, the master station selects a single-meter ESAM module to modify time; and if the clock of the base table is disordered and cannot be recovered to be normal, the main station selects the STA module to assist in freezing data.

4. The clock synchronization method based on HPLC communication network delay correction according to claim 3, wherein in step 51, if the absolute value of the clock difference is smaller than or equal to the first set threshold, the clock is corrected according to a broadcast timing command initiated by the concentrator, and the HPLC network delay is corrected while the clock is corrected to achieve accurate timing.

5. The method for clock synchronization based on HPLC communication network delay correction of claim 3, wherein the first set threshold in step 51 is 5 minutes.

6. A method for clock synchronization based on HPLC communication network delay correction according to claim 3, wherein the second set threshold in step 52 is 20 minutes.

7. The clock synchronization method based on HPLC communication network delay correction of claim 1, wherein in step 1 and step 3, the serial port communication delay is calculated according to the serial port baud rate, and the clock delay correction is performed; the serial port communication delay calculation formula is as follows:

wherein T is time, microsecond; alpha is a communication baud rate, namely a communication rate; and S is the length of the message byte, namely the byte number.

8. The clock synchronization method based on HPLC communication network delay correction of claim 1, wherein in step 1, when the concentrator millisecond and microsecond units are both 0, a hardware second signal is output, and the CCO module corrects the delay compensation according to the serial port baud rate.

9. Clock synchronization system based on HPLC communication network delay correction, characterized in that the system supports a clock synchronization method based on HPLC communication network delay correction according to any of claims 1 to 8, the system comprising:

the CCO module is used for sending a clock synchronization instruction to the CCO module through the serial port, outputting a hardware second pulse signal to the CCO module, calculating serial port communication delay according to the serial port baud rate, and performing clock delay correction to realize microsecond-level clock synchronization;

the CCO module is used for synchronizing the STA module with the CCO module, and is used for performing clock accurate synchronization to the STA module by the CCO module: based on network reference time NTB in an HPLC carrier communication network, according to a beacon timestamp in a beacon, each STA module and a CCO module are enabled to realize microsecond synchronization of time, the CCO module binds a current perpetual calendar and the beacon and sends a time setting instruction to each STA module through HPLC communication, and the STA module realizes automatic compensation and updating of a perpetual calendar unit based on the network reference time NTB;

the STA module is used for carrying out clock accurate synchronization to various base tables by the STA module: the STA module sends an instruction for reading the clock of the electric energy meter to the electric energy meter module through the serial port, calculates the serial port communication delay according to the serial port baud rate by outputting a hardware second pulse signal to the base meter, and performs clock delay correction to realize microsecond-level clock synchronization.

10. The clock synchronization system based on HPLC communication network delay correction of claim 9, further comprising a clock timing strategy selection module, said clock timing strategy selection module comprising a comparison unit, a STA module timing unit and a master station timing unit;

the comparison unit is used for comparing the base meter clock with the concentrator clock by the STA module and calculating to obtain a clock difference value of the base meter clock and the concentrator clock;

the STA module timing unit is used for the STA module to perform timing judgment and processing according to the clock difference value, and if the absolute value of the clock difference value is less than or equal to a first set threshold value, timing is performed according to a broadcast timing command initiated by the concentrator; if the absolute value of the clock difference value is larger than a first set threshold, the STA module generates a clock out-of-tolerance event and reports out-of-tolerance time;

and the master station timing unit is used for selecting different timing strategies for timing processing by the master station according to the clock difference value: judging according to the out-of-tolerance time, and if the absolute value of the clock difference is less than or equal to a first set threshold, selecting and configuring a periodic broadcast timing command performed by the concentrator every day by the master station; if the absolute value of the clock difference is larger than a first set threshold and smaller than or equal to a second set threshold, the main station selects STA to automatically correct the base table every day; if the absolute value of the clock difference is larger than a second set threshold, the master station selects a single-meter ESAM module to modify time; and if the clock of the base table is disordered and cannot be recovered to be normal, the main station selects the STA module to assist in freezing data.

Technical Field

The invention relates to the technical field of communication, in particular to a clock synchronization method and a clock synchronization system based on HPLC communication network delay correction.

Background

The acquisition system of the low-voltage distribution room mainly comprises equipment such as a concentrator, a branch box monitoring terminal, a meter box monitoring terminal and an electric energy meter, and data interaction is realized among the equipment through HPLC carrier communication. At present, clock synchronization and accurate management between a concentrator and an electric energy meter in a low-voltage distribution room are based on an HPLC low-delay characteristic and a broadcast timing mechanism, an accurate broadcast timing service is designed, and generally, the broadcast delay of the HPLC can be ignored.

The clock accurate management scheme can synchronize the equipment clock of the low-voltage distribution area to within ten seconds of error control based on HPLC carrier communication, and can meet the technical requirements of the current time-of-use electricity price and step electricity price policies.

The prior art has the following defects: at present, functions of line loss segmented calculation, loop impedance calculation and early warning, big data calculation variable line user topological relation and the like which are being popularized vigorously are different in calculation result due to the fact that clocks in all levels of equipment cannot be synchronized, functions of platform area variable line user relation topological big data calculation, line loss segmented refinement, effective judgment of loop impedance and the like are achieved, and the requirement for clock accuracy is higher.

Disclosure of Invention

The invention aims to provide a clock synchronization method and a system based on time delay correction of an HPLC communication network, which can accurately synchronize a concentrator clock to each level of acquisition equipment in a station area, the synchronization error can reach microsecond level, and the requirements of functions such as topology large data calculation, line loss segmentation fine calculation, effective loop impedance judgment and the like of a variable subscriber relationship in the station area on the data acquisition synchronization clock are met.

All devices in an HPLC carrier communication Network must be synchronized to a common clock, the local carrier communication module CCO must maintain a 32-bit timer called Network Time Base (NTB), NTB is sent by CCO in the central beacon "beacon timestamp", and each station STA device in the HPLC carrier communication Network must be synchronized to this NTB.

The beacon timestamp is a network reference time marked by the device sending the beacon when sending the beacon, the network reference time is maintained by the CCO, and the whole network station needs to be kept synchronous with the network reference time of the CCO. In the central beacon, the beacon timestamp is a network reference time, in the proxy beacon, the beacon timestamp is a network reference time estimated by a proxy node (PCO), and in the discovery beacon, the beacon timestamp is a network reference time estimated by the STA.

The invention is realized by the following technical scheme:

in a first aspect, the invention provides a clock synchronization method based on HPLC communication network delay correction, wherein an acquisition system comprises a concentrator, a branch box monitoring terminal, a meter box monitoring terminal and an electric energy meter, and the acquisition system is applied to a low-voltage distribution room; the method comprises the following steps:

step 1, according to a clock accurate synchronization request initiated by a CCO module to a concentrator, the concentrator performs clock accurate synchronization to the CCO module: the concentrator sends a clock synchronization instruction to the CCO module through the serial port, and calculates serial port communication delay according to the serial port baud rate by outputting a hardware second pulse signal to the CCO module to perform clock delay correction, so that microsecond-level clock synchronization is realized;

step 2, the CCO module performs clock accurate synchronization to the STA module: based on network reference time NTB in an HPLC carrier communication network, according to a beacon timestamp in a beacon, each STA module and a CCO module are enabled to realize microsecond synchronization of time, the CCO module binds a current perpetual calendar and the beacon and sends a time setting instruction to each STA module through HPLC communication, and the STA module realizes automatic compensation and updating of a perpetual calendar unit based on the network reference time NTB;

and 3, performing clock accurate synchronization on various base tables by the STA module: the STA module sends an instruction for reading the clock of the electric energy meter to the electric energy meter module through the serial port, calculates the serial port communication delay according to the serial port baud rate by outputting a hardware second pulse signal to the base meter, and performs clock delay correction to realize microsecond-level clock synchronization.

The invention utilizes the concentrator to carry out accurate clock synchronization to the CCO module and the STA module to carry out accurate clock synchronization to various base tables, calculates the serial port communication delay according to the serial port baud rate and carries out clock delay correction, thereby realizing microsecond-level clock synchronization; meanwhile, in the process that the CCO module accurately synchronizes the clock to the STA module, the STA module realizes automatic compensation and updating of the perpetual calendar microsecond unit based on the network reference time NTB. The invention can accurately synchronize the concentrator clock to the acquisition equipment of each stage of the transformer area, the synchronization error can reach microsecond level, and the requirements of functions of topological big data calculation, line loss segmentation and fine calculation, effective loop impedance judgment and the like of variable line user relationship of the transformer area on the data acquisition synchronization clock are met.

Further, on the basis of the clock synchronization based on the acquisition system in the steps 1 to 3, different clock timing strategies are selected according to the magnitude of the clock deviation value of the electric meter; the method further comprises the following steps:

step 4, comparing the base meter clock with the concentrator clock by the STA module, and calculating to obtain a clock difference value of the base meter clock and the concentrator clock;

and step 5, selecting different timing strategies by the STA module and the master station for timing according to the clock difference value.

Further, step 5 comprises the following substeps:

step 51: the STA module performs different timing processing according to the clock difference value: judging according to the clock difference, and if the absolute value of the clock difference is less than or equal to a first set threshold, timing according to a broadcast timing command initiated by the concentrator; if the absolute value of the clock difference value is larger than a first set threshold, the STA module generates a clock out-of-tolerance event and reports out-of-tolerance time;

step 52: and the master station selects different timing strategies to perform timing processing according to the out-of-tolerance time: judging according to the out-of-tolerance time, and if the absolute value of the clock difference is less than or equal to a first set threshold, selecting and configuring a periodic broadcast timing command performed by the concentrator every day by the master station; if the absolute value of the clock difference value is greater than a first set threshold and less than or equal to a second set threshold, the main station selects the STA to automatically correct the base table every day, the STA can effectively reduce the defects caused by broadcasting time correction every day, reduce the occupation of a carrier channel and enhance the development of other services; if the absolute value of the clock difference is larger than a second set threshold, the master station selects a single-meter ESAM module to modify time; if the clock of the base table is disordered and cannot be recovered to normal, the main station selects the STA module to assist in freezing the data, and in the system, the STA clock and the concentrator are kept absolutely accurate, so that the STA assist in freezing the data can improve the data reliability and the data quality of the equipment which cannot be corrected.

Further, in step 51, if the absolute value of the clock difference is smaller than or equal to the first set threshold, performing timing according to a broadcast timing command initiated by the concentrator, and correcting the HPLC network delay while performing timing so as to achieve accurate timing.

Further, the first set threshold in step 51 is 5 minutes, which takes into account that the broadcast timing command cannot be greater than 5 minutes, otherwise only STA auto timing or single-meter timing can be taken.

Further, the second threshold setting in step 52 is 20 minutes, and the second threshold setting is set according to the acceptable range of the customer.

Further, calculating serial port communication delay according to the serial port baud rate in the step 1 and the step 3, and correcting clock delay; the serial port communication delay calculation formula is as follows:

wherein T is time, microsecond; α is a communication baud rate (bps), i.e., a communication rate; and S is the length of the message byte, namely the byte number.

Further, when the millisecond and microsecond units of the concentrator in the step 1 are both 0, a hardware second signal is output, and the CCO module corrects the delay compensation according to the serial port baud rate.

In a second aspect, the present invention further provides a clock synchronization system based on the HPLC communication network delay correction, where the system supports the clock synchronization method based on the HPLC communication network delay correction, and the system includes:

the CCO module is used for sending a clock synchronization instruction to the CCO module through the serial port, outputting a hardware second pulse signal to the CCO module, calculating serial port communication delay according to the serial port baud rate, and performing clock delay correction to realize microsecond-level clock synchronization;

the CCO module is used for synchronizing the STA module with the CCO module, and is used for performing clock accurate synchronization to the STA module by the CCO module: based on network reference time NTB in an HPLC carrier communication network, according to a beacon timestamp in a beacon, each STA module and a CCO module are enabled to realize microsecond synchronization of time, the CCO module binds a current perpetual calendar and the beacon and sends a time setting instruction to each STA module through HPLC communication, and the STA module realizes automatic compensation and updating of a perpetual calendar unit based on the network reference time NTB;

the STA module is used for carrying out clock accurate synchronization to various base tables by the STA module: the STA module sends an instruction for reading the clock of the electric energy meter to the electric energy meter module through the serial port, calculates the serial port communication delay according to the serial port baud rate by outputting a hardware second pulse signal to the base meter, and performs clock delay correction to realize microsecond-level clock synchronization.

Furthermore, the system also comprises a clock timing strategy selection module, wherein the clock timing strategy selection module comprises a comparison unit, an STA module timing unit and a master station timing unit;

the comparison unit is used for comparing the base meter clock with the concentrator clock by the STA module and calculating to obtain a clock difference value of the base meter clock and the concentrator clock;

the STA module timing unit is used for the STA module to perform timing judgment and processing according to the clock difference value, and if the absolute value of the clock difference value is less than or equal to a first set threshold value, timing is performed according to a broadcast timing command initiated by the concentrator; if the absolute value of the clock difference value is larger than a first set threshold, the STA module generates a clock out-of-tolerance event and reports out-of-tolerance time;

and the master station timing unit is used for selecting different timing strategies for timing processing by the master station according to the clock difference value: judging according to the out-of-tolerance time, and if the absolute value of the clock difference is less than or equal to a first set threshold, selecting and configuring a periodic broadcast timing command performed by the concentrator every day by the master station; if the absolute value of the clock difference value is greater than a first set threshold and less than or equal to a second set threshold, the main station selects the STA to automatically correct the base table every day, the STA can effectively reduce the defects caused by broadcasting time correction every day, reduce the occupation of a carrier channel and enhance the development of other services; if the absolute value of the clock difference is larger than a second set threshold, the master station selects a single-meter ESAM module to modify time; if the clock of the base table is disordered and cannot be recovered to normal, the main station selects the STA module to assist in freezing the data, and in the system, the STA clock and the concentrator are kept absolutely accurate, so that the STA assist in freezing the data can improve the data reliability and the data quality of the equipment which cannot be corrected.

Compared with the prior art, the invention has the following advantages and beneficial effects:

1. the clock synchronization method based on the HPLC communication network delay correction can accurately synchronize the clock of the concentrator to all levels of acquisition equipment such as a branch box monitoring unit, a meter box monitoring unit, an electric energy meter and the like, and realize microsecond synchronization of clocks of all the acquisition equipment in a low-voltage transformer area;

2. according to the invention, each stage of acquisition equipment acquires and freezes the power grid parameters according to the clock of the acquisition equipment, so that the time deviation of acquiring the curve data of each time point is far smaller than that of the original acquisition system;

3. the curve data acquired by the method can be more reliable in calculating the result data of the variable line user topological relation, the segmented line loss, the loop impedance and the like.

4. The invention can effectively solve the problem of data acquisition of various clock abnormal scenes.

Drawings

The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention. In the drawings:

fig. 1 is a flow chart of a clock synchronization method based on HPLC communication network delay correction according to the present invention.

FIG. 2 is a flow chart of the system operation of the acquisition system of the present invention.

Fig. 3 is a flowchart of STA clock maintenance according to the present invention.

Fig. 4 is a flow chart of reporting clock out-of-tolerance according to the present invention.

FIG. 5 is a flowchart of the precise timing method according to the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples and accompanying drawings, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not meant to limit the present invention.

Example 1

As shown in fig. 1, in the clock synchronization method based on the HPLC communication network delay correction of the present invention, the acquisition system includes a concentrator, a branch box monitoring terminal, a meter box monitoring terminal, and an electric energy meter, and the acquisition system is an acquisition system applied to a low-voltage distribution room; the method comprises the following steps:

step 1, according to a clock accurate synchronization request initiated by a CCO module to a concentrator, the concentrator performs clock accurate synchronization to the CCO module: the concentrator sends a clock synchronization instruction to the CCO module through the serial port, and calculates serial port communication delay according to the serial port baud rate by outputting a hardware second pulse signal to the CCO module to perform clock delay correction, so that microsecond-level clock synchronization is realized;

step 2, the CCO module performs clock accurate synchronization to the STA module: based on network reference time NTB in an HPLC carrier communication network, according to a beacon timestamp in a beacon, each STA module and a CCO module are enabled to realize microsecond synchronization of time, the CCO module binds a current perpetual calendar and the beacon and sends a time setting instruction to each STA module through HPLC communication, and the STA module realizes automatic compensation and updating of a perpetual calendar unit based on the network reference time NTB;

and 3, performing clock accurate synchronization on various base tables by the STA module: the STA module sends an instruction for reading the clock of the electric energy meter to the electric energy meter module through the serial port, calculates the serial port communication delay according to the serial port baud rate by outputting a hardware second pulse signal to the base meter, and performs clock delay correction to realize microsecond-level clock synchronization.

For further explanation of this embodiment, the serial port communication delay is calculated according to the serial port baud rate in steps 1 and 3, and clock delay correction is performed; the serial port communication delay calculation formula is as follows:

in the formula, T is delay time, microsecond; α is a communication baud rate (bps), i.e., a communication rate; and S is the length of the message byte, namely the byte number.

Specifically, the process of the concentrator performing clock accurate synchronization to the CCO module is as follows:

the CCO module initiates a clock synchronization request to the concentrator, the concentrator sends a clock synchronization instruction to the CCO module, the length of the message of the sent instruction is 21 bytes, 68150003000028000012140200460017190521 EF 16, the communication baud rate is 9600bps, and according to the above calculation formula, the calculation method is as follows: (1/9600) × 11 × 21 ═ 0.024063 sec ═ 24063 microseconds. Therefore, according to the communication delay calculation, the CCO module performs clock delay correction by adding the delay time T to the whole second.

The process of the STA module for carrying out the accurate clock synchronization to various base tables is as follows:

the STA module acquires a clock of the base table, the base table replies a clock message, the communication Baud rate is (1200bps, 2400bps, 9600bps, the STA self-adaptive ammeter communication Baud rate is different according to the ammeter type) 9600bps, the message length is 18 bytes, 6899999999999968080647863C 363A 544116, and the calculation method is the same as the above. And setting a base table, and sending a timing command in advance to perform clock delay correction according to communication delay calculation (because the timing message is only accurate to the second level, the STA sends the timing message and needs to send a whole second level timing command in advance according to the communication delay calculation).

To further explain the embodiment, in step 1, when the millisecond and microsecond units of the concentrator are both 0, a hardware second signal is output, and the CCO module corrects the delay compensation according to the serial port baud rate.

The invention utilizes the concentrator to carry out accurate clock synchronization to the CCO module and the STA module to carry out accurate clock synchronization to various base tables, calculates the serial port communication delay according to the serial port baud rate and carries out clock delay correction, thereby realizing microsecond-level clock synchronization; meanwhile, in the process that the CCO module accurately synchronizes the clock to the STA module, the STA module realizes automatic compensation and updating of the perpetual calendar microsecond unit based on the network reference time NTB. The invention can accurately synchronize the concentrator clock to the acquisition equipment of each stage of the transformer area, the synchronization error can reach microsecond level, and the requirements of functions of topological big data calculation, line loss segmentation and fine calculation, effective loop impedance judgment and the like of variable line user relationship of the transformer area on the data acquisition synchronization clock are met.

Example 2

As shown in fig. 2, the present embodiment is different from embodiment 1 in that, on the basis of the acquisition system clock synchronization in steps 1 to 3, different clock timing strategies are selected according to the magnitude of the electric meter clock deviation value;

as shown in the working flow chart of the system in fig. 2, the master station selects different timing modes according to different clock out-of-tolerance scenarios, issues a command to the terminal, synchronizes its clock to all the lower-level acquisition devices through the CCO module and the terminal synchronization clock, and synchronizes the clock of the whole low-voltage distribution room to the concentrator.

The implementation steps of this example are as follows:

step 1: as shown in the clock maintenance flow of the STA module in fig. 3, the concentrator performs clock fine synchronization to the CCO module: the concentrator sends a clock synchronization instruction to the CCO module through the serial port, and calculates serial port communication delay according to the serial port baud rate by outputting a hardware second pulse signal to the CCO module to perform clock delay correction, so that microsecond-level clock synchronization is realized;

step 2, as shown in the accurate timing flow of fig. 5, the CCO module performs accurate clock synchronization to the STA module: based on network reference time NTB in an HPLC carrier communication network, according to a beacon timestamp in a beacon, each STA module and a CCO module are enabled to realize microsecond synchronization of time, the CCO module binds a current perpetual calendar and the beacon and sends a time setting instruction to each STA module through HPLC communication, and the STA module realizes automatic compensation and updating of a perpetual calendar unit based on the network reference time NTB;

and 3, performing clock accurate synchronization on various base tables by the STA module: the STA module sends an instruction for reading the clock of the electric energy meter to the electric energy meter module through the serial port, calculates the serial port communication delay according to the serial port baud rate by outputting a hardware second pulse signal to the base meter, and performs clock delay correction to realize microsecond-level clock synchronization.

Step 4, comparing the base meter clock with the concentrator clock by the STA module, and calculating to obtain a clock difference value of the base meter clock and the concentrator clock;

and step 5, selecting different timing strategies by the STA module and the master station for timing according to the clock difference value. The method specifically comprises the following steps:

step 51: the STA module performs different timing processing according to the clock difference value: judging according to the clock difference, and if the absolute value of the clock difference is less than or equal to 5 minutes, timing according to a broadcast timing command initiated by the concentrator; if the absolute value of the clock difference is greater than 5 minutes, as shown in a clock out-of-tolerance reporting flow of fig. 4, the STA module generates a clock out-of-tolerance event and reports the clock out-of-tolerance event to the master station, and reports out-of-tolerance time;

to further explain this embodiment, in step 51, if the absolute value of the clock difference is smaller than or equal to the first set threshold, the time is calibrated according to a broadcast timing command initiated by the concentrator, and the HPLC network delay is corrected while the time is calibrated so as to achieve accurate time calibration.

Step 52: and the master station selects different timing strategies to perform timing processing according to the out-of-tolerance time: judging according to the out-of-tolerance time, and if the absolute value of the clock difference is less than or equal to 5 minutes, selecting and configuring a periodic broadcast timing command performed by the concentrator every day by the master station; if the absolute value of the clock difference is more than 5 minutes and less than or equal to 20 minutes, the main station selects the STA to automatically correct the base table every day, the STA can effectively reduce the defects caused by broadcasting time correction every day, reduce the occupation of a carrier channel and enhance the development of other services; if the absolute value of the clock difference is greater than 20 minutes, the master station selects a single-meter ESAM module to modify the time; if the clock of the base table is disordered and cannot be recovered to normal, the main station selects the STA module to assist in freezing the data, and in the system, the STA clock and the concentrator are kept absolutely accurate, so that the STA assist in freezing the data can improve the data reliability and the data quality of the equipment which cannot be corrected.

The clock synchronization method can realize the synchronization of the clock of the concentrator to sampling equipment at all levels and the synchronization of the data acquisition clocks of all the sampling equipment in the low-voltage transformer area.

Compared with the prior art, the invention has the following beneficial characteristics:

(1) the clock synchronization method based on the HPLC communication network delay correction can accurately synchronize the clock of the concentrator to all levels of acquisition equipment such as a branch box monitoring unit, a meter box monitoring unit, an electric energy meter and the like, and realize microsecond synchronization of clocks of all the acquisition equipment in a low-voltage transformer area;

(2) each stage of acquisition equipment acquires and freezes power grid parameters according to a clock, so that the time deviation of curve data acquired at each time point is far smaller than that of the curve data of the original acquisition system;

(3) by using the clock synchronization method, the acquired curve data and the result data such as the topological relation, the segmented line loss, the loop impedance and the like of the variable line user can be more reliable.

(4) The invention can effectively solve the problem of data acquisition of various clock abnormal scenes.

Example 3

As shown in fig. 1 to fig. 5, the present embodiment is different from embodiment 1 in that the present embodiment provides a clock synchronization system based on HPLC communication network delay correction, and the system supports the clock synchronization method based on HPLC communication network delay correction described in embodiment 1, and the system includes:

the CCO module is used for sending a clock synchronization instruction to the CCO module through the serial port, outputting a hardware second pulse signal to the CCO module, calculating serial port communication delay according to the serial port baud rate, and performing clock delay correction to realize microsecond-level clock synchronization;

the CCO module is used for synchronizing the STA module with the CCO module, and is used for performing clock accurate synchronization to the STA module by the CCO module: based on network reference time NTB in an HPLC carrier communication network, according to a beacon timestamp in a beacon, each STA module and a CCO module are enabled to realize microsecond synchronization of time, the CCO module binds a current perpetual calendar and the beacon and sends a time setting instruction to each STA module through HPLC communication, and the STA module realizes automatic compensation and updating of a perpetual calendar unit based on the network reference time NTB;

the STA module is used for carrying out clock accurate synchronization to various base tables by the STA module: the STA module sends an instruction for reading the clock of the electric energy meter to the electric energy meter module through the serial port, calculates the serial port communication delay according to the serial port baud rate by outputting a hardware second pulse signal to the base meter, and performs clock delay correction to realize microsecond-level clock synchronization.

For further explanation of the embodiment, the system further includes a clock timing policy selection module, where the clock timing policy selection module includes a comparison unit, an STA module timing unit, and a master station timing unit;

the comparison unit is used for comparing the base meter clock with the concentrator clock by the STA module and calculating to obtain a clock difference value of the base meter clock and the concentrator clock;

the STA module timing unit is used for the STA module to perform timing judgment and processing according to the clock difference value, and if the absolute value of the clock difference value is less than or equal to a first set threshold value, timing is performed according to a broadcast timing command initiated by the concentrator; if the absolute value of the clock difference value is larger than a first set threshold, the STA module generates a clock out-of-tolerance event and reports out-of-tolerance time;

and the master station timing unit is used for selecting different timing strategies for timing processing by the master station according to the clock difference value: judging according to the out-of-tolerance time, and if the absolute value of the clock difference is less than or equal to a first set threshold, selecting and configuring a periodic broadcast timing command performed by the concentrator every day by the master station; if the absolute value of the clock difference value is greater than a first set threshold and less than or equal to a second set threshold, the main station selects the STA to automatically correct the base table every day, the STA can effectively reduce the defects caused by broadcasting time correction every day, reduce the occupation of a carrier channel and enhance the development of other services; if the absolute value of the clock difference is larger than a second set threshold, the master station selects a single-meter ESAM module to modify time; if the clock of the base table is disordered and cannot be recovered to normal, the main station selects the STA module to assist in freezing the data, and in the system, the STA clock and the concentrator are kept absolutely accurate, so that the STA assist in freezing the data can improve the data reliability and the data quality of the equipment which cannot be corrected.

The clock synchronization method and system based on the HPLC communication network delay correction can accurately synchronize the clock of the concentrator to all levels of acquisition equipment such as a branch box monitoring unit, a meter box monitoring unit, an electric energy meter and the like, realize microsecond synchronization of clocks of all the acquisition equipment in a low-voltage distribution room, and acquire and freeze power grid parameters by all levels of acquisition equipment according to the clocks, so that the time deviation of acquiring curve data at each time point is far smaller than that of the original acquisition system.

As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种通过均匀面阵发射多模复用信号的天线选择方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!