Zero-crossing calibration method, device, equipment, system and storage medium
By calibrating the zero-crossing NTB of the zero-crossing circuit to be calibrated by using the information of the fixed delay zero-crossing circuit and the zero-crossing circuit to be calibrated, the inaccuracy caused by delay is solved, and the accuracy and reliability of power line carrier communication is improved.
Patent Information
- Application Number
- CN202210843240.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-07-18
AI Technical Summary
In the power line carrier communication network, the zero crossing detection circuit with delay causes the detected zero crossing NTB inaccurate, affecting the subsequent phase recognition and load balancing effects.
By setting a fixed delay-stable and known fixed delay zero-crossing circuit, the zero-crossing NTB information with the same edge type is acquired during the same power cycle, and the known fixed delay amount is used to determine the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated.
Accurate calibration of the zero-crossing NTB of the hardware zero-crossing circuit with delay is achieved, the detection accuracy is improved, and the stability of subsequent application effects is ensured.
Smart Images

Figure CN115236387B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of broadband power line carrier communication and zero-crossing detection technology, and in particular to a zero-crossing NTB calibration method, device, equipment, system and storage medium. Background Art
[0002] With the development of electronic technology, zero-crossing detection technology has been widely used in various fields. The voltage change process of AC is tracked by the zero-crossing detection circuit, and the zero-crossing signal is output when the AC voltage is "zero". We can use this signal to make many engineering applications. For example, in smart switch products, zero-point voltage detection technology is used to achieve zero-voltage conduction, thereby suppressing the startup surge current and protecting relay contacts and other devices; in dimming switches / dimmers and motor speed control products, the zero-point voltage detection technology can be used to control the size of the AC conduction angle from zero point to achieve the adjustment of dimming lamp brightness and motor speed; in addition, zero-crossing detection technology is also widely used in the field of power line carrier communication. Since the power line impedance within a period of time before and after the power line zero point is relatively high and constant, it is more suitable for communication. Therefore, the zero-crossing detection circuit can be used to detect the zero point, and then communication is carried out for a period of time near the power line zero point, and no communication is carried out at other times, thereby effectively improving the success rate and reliability of power line carrier communication.
[0003] In the power consumption information collection system based on the power line broadband carrier communication network, the network nodes CCO and STA are both provided with zero-crossing detection circuits. After the CCO compares and calculates the zero-crossing NTB information collected locally with the zero-crossing NTB information collected and reported by the STA site, the phase to which the STA site belongs can be obtained, and then the distribution of each user's electric meter on each phase can be known to achieve load balancing of each phase. Based on this, it is very important to accurately detect the zero-crossing point using the zero-crossing detection circuit. The zero-crossing detection circuit, which has the characteristics of high reliability and good working performance, can certainly accurately detect the zero-crossing point, but in actual applications, the zero-crossing detection circuit design on some power line communication network equipment is not perfect, and the rising and falling edges are not consistent with the real power cycle zero-crossing point, and there is a certain time delay. Then the zero-crossing point detected based on this circuit is inaccurate, affecting the subsequent application effect. For example: due to the delay problem of the local zero-crossing detection circuit of the CCO or STA device, the collected zero-crossing NTB is inconsistent with the real power zero-crossing NTB, then misjudgment will occur in the subsequent phase recognition process, thereby affecting the recognition effect. How power line communication network equipment can calibrate its zero-crossing NTB based on a zero-crossing detection circuit with time delay, and then apply the calibrated zero-crossing NTB to perform related operations to compensate for the imperfections caused by the hardware zero-crossing circuit with time delay has become an important issue before us.
[0004] Based on the above content, it is urgent to propose a zero-crossing NTB calibration method, device, equipment, system and storage medium that can accurately calibrate the zero-crossing NTB generated by a zero-crossing detection circuit with a time delay and implement a simple process, so as to compensate for the imperfection of the hardware zero-crossing circuit with a time delay, thereby ensuring the subsequent application effect. Summary of the invention
[0005] In view of this, the embodiments of the present invention provide a zero-crossing NTB calibration method, device, equipment, system and storage medium. By setting a fixed delay zero-crossing circuit with a stable and known delay, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated can be determined according to the zero-crossing NTB information with the same acquisition edge type and the known fixed delay obtained from the fixed delay zero-crossing circuit and the zero-crossing circuit to be calibrated in the same power cycle. The calculation is accurate and the implementation process is simple, which makes up for the imperfection of the hardware zero-crossing circuit with a delay, thereby ensuring the subsequent application effect.
[0006] In a first aspect, an embodiment of the present invention provides a zero-crossing NTB calibration method, which at least includes:
[0007] Receive a first zero-crossing interrupt signal sent by a zero-crossing circuit to be calibrated, receive a second zero-crossing interrupt signal sent by a fixed-delay zero-crossing circuit, and obtain the first zero-crossing network reference time NTB information of the zero-crossing circuit to be calibrated and the second zero-crossing network reference time NTB information of the fixed-delay zero-crossing circuit when an interrupt occurs; wherein the difference between the second zero-crossing network reference time NTB and the real power zero-crossing network reference time NTB is a fixed delay amount;
[0008] When the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information meet a preset condition, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is determined according to the first zero-crossing network reference time NTB information, the second zero-crossing network reference time NTB information and the fixed delay amount; wherein the preset condition is: the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information are in the same power cycle and have the same acquisition edge type.
[0009] Preferably, the determining the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated according to the first zero-crossing network reference time NTB information, the second zero-crossing network reference time NTB information and the fixed delay is specifically:
[0010] A difference between the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information is calculated, and a zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is determined according to the difference and the fixed time delay.
[0011] Preferably, the determining the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated according to the difference and the fixed time delay is specifically:
[0012] When the number of the difference values of the same acquisition edge is one, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is the sum of the difference value and the fixed time delay;
[0013] When the number of the difference values of the same acquisition edge is multiple, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is the sum of the average value of the difference values and the fixed time delay.
[0014] Preferably, the determining the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated according to the first zero-crossing network reference time NTB information, the second zero-crossing network reference time NTB information and the fixed delay is specifically:
[0015] The real power zero-crossing network reference time NTB is calculated by subtracting the fixed time delay from the second zero-crossing network reference time NTB information, and then the difference between the real power zero-crossing network reference time NTB information and the first zero-crossing network reference time NTB information is calculated;
[0016] When the number of the difference values of the same acquisition edge is one, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is the difference;
[0017] When the number of the difference values of the same acquisition edge is multiple, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is the average value of the difference values.
[0018] Preferably, the method further comprises:
[0019] The zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is recorded and stored for calibrating the zero-crossing network reference time NTB of the zero-crossing circuit to be calibrated.
[0020] Preferably, the method further comprises:
[0021] Obtain zero-crossing network reference time NTB calibration values of multiple identical acquisition edges of the zero-crossing circuit to be calibrated, perform variance calculation on the zero-crossing network reference time NTB calibration values of the multiple identical acquisition edges of the zero-crossing circuit to be calibrated, and if the obtained calculation result is greater than a preset maximum delay threshold, it is determined that the delay characteristic of the zero-crossing circuit to be calibrated is unstable.
[0022] Preferably, when the difference between the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information is less than the network reference time corresponding to one power cycle, the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information are in the same power cycle.
[0023] In a second aspect, an embodiment of the present invention provides a zero-crossing NTB calibration device, comprising at least:
[0024] A zero-crossing NTB information acquisition module is configured to receive a first zero-crossing interrupt signal sent by a zero-crossing circuit to be calibrated, receive a second zero-crossing interrupt signal sent by a fixed-delay zero-crossing circuit, and acquire the first zero-crossing network reference time NTB information of the zero-crossing circuit to be calibrated and the second zero-crossing network reference time NTB information of the fixed-delay zero-crossing circuit when an interrupt occurs; wherein the difference between the second zero-crossing network reference time NTB and the real power zero-crossing network reference time NTB is a fixed delay amount;
[0025] A zero-crossing NTB calibration value determination module is configured to determine the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated according to the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information and the fixed time delay when the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information meet a preset condition; wherein the preset condition is: the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information are in the same power cycle and have the same acquisition edge type.
[0026] In a third aspect, an embodiment of the present invention provides a zero-crossing NTB calibration device, including a memory and a processor, wherein the processor executes program instructions in the memory to implement the method described in the first aspect.
[0027] In a fourth aspect, an embodiment of the present invention provides a zero-crossing NTB calibration device, comprising at least: a zero-crossing circuit to be calibrated and the zero-crossing NTB calibration device described in the third aspect, wherein:
[0028] The zero-crossing circuit to be calibrated is configured to be connected to the processor in the zero-crossing NTB calibration device through a first interface having a characteristic of triggering a processor pin interrupt, output a first zero-crossing interrupt signal, and transmit it to the processor in the zero-crossing NTB calibration device through the first interface.
[0029] In a fifth aspect, an embodiment of the present invention provides a zero-crossing NTB calibration system, comprising at least: a fixed delay zero-crossing circuit and the zero-crossing NTB calibration device described in the fourth aspect, wherein:
[0030] The fixed-delay zero-crossing circuit is configured to be connected to the processor in the zero-crossing NTB calibration device in the zero-crossing NTB calibration equipment through a second interface having a trigger processor pin interrupt characteristic, output a second zero-crossing interrupt signal, and transmit it to the processor in the zero-crossing calibration device in the zero-crossing NTB calibration equipment through the second interface; the fixed-delay zero-crossing circuit is also configured to be connected to an AC power supply of the same phase as the zero-crossing circuit to be calibrated in the zero-crossing NTB calibration equipment.
[0031] In a sixth aspect, an embodiment of the present invention provides a storage medium, wherein the storage medium is used to store a computer program, and the computer program is used to implement the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0033] Figure 1 is a flow chart of a zero-crossing NTB calibration method according to an embodiment of the present invention;
[0034] Figure 2 2 is a schematic diagram of the structure of a zero-crossing NTB calibration device according to an embodiment of the present invention;
[0035] Figure 3 is a schematic diagram of the hardware structure of a zero-crossing NTB calibration device according to an embodiment of the present invention;
[0036] Figure 4 is a schematic diagram of the hardware structure of a zero-crossing NTB calibration device according to an embodiment of the present invention;
[0037] Figure 5 Schematic diagram of the hardware structure of the zero-crossing NTB calibration system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The present invention is described below based on embodiments, but the present invention is not limited to these embodiments. In the detailed description of the present invention below, some specific details are described in detail. It is possible for a person skilled in the art to fully understand the present invention without the description of these details. In order to avoid confusing the essence of the present invention, known methods, processes, flows, components and circuits are not described in detail.
[0039] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.
[0040] At the same time, it should be understood that in the following description, "circuit" refers to a conductive loop composed of at least one element or subcircuit through electrical connection or electromagnetic connection. When an element or circuit is said to be "connected to" another element or an element / circuit is said to be "connected between" two nodes, it can be directly coupled or connected to another element or there can be an intermediate element, and the connection between the elements can be physical, logical, or a combination thereof. On the contrary, when an element is said to be "directly coupled to" or "directly connected to" another element, it means that there is no intermediate element between the two.
[0041] Unless the context clearly requires otherwise, words such as “include”, “including” and the like in the specification should be interpreted as including rather than being exclusive or exhaustive; that is, as meaning “including but not limited to”.
[0042] In the description of the present invention, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, "plurality" means two or more.
[0043] The inventor of the present invention discovered in the project application that: if all the hardware in the zero-crossing detection circuit on the network node device has a fixed delay and the consistency between different hardware is good, or, although the consistency between the same type of hardware is not good, but the delay consistency of a single hardware itself in different power cycles is good, then the delay offset between the zero-crossing point of the zero-crossing detection circuit and the zero-crossing point of the actual power cycle can be determined by a certain measurement method, and the delay offset can be recorded in the memory as a zero-crossing NTB calibration value. In a specific application scenario (such as phase identification), the zero-crossing NTB calibration value is used to calibrate the actual zero-crossing NTB collected, and the real zero-crossing NTB can be restored. After such calibration, the zero-crossing detection circuit can still continue to be used.
[0044] Based on the above, the purpose of "zero-crossing NTB calibration" in the present invention is: to calculate and use the zero-crossing NTB calibration value in the program to compensate for the imperfection of the hardware zero-crossing circuit with time delay, and specifically calculate the time delay offset between the zero-crossing NTB of the zero-crossing circuit to be calibrated and the zero-crossing NTB of the real power cycle through the calibration step, that is: the zero-crossing NTB calibration value, and then record this calibration value into the memory for use by the network node device (such as: CCO or STA) that sets the zero-crossing circuit to be calibrated when using the zero-crossing NTB calibration value to calibrate its zero-crossing NTB in a specific application.
[0045] It should be noted that: "NTB" is the abbreviation of "Network Time Base", which means "network reference time". The zero-crossing NTB calibration value includes the rising edge zero-crossing NTB calibration value and the falling edge zero-crossing NTB calibration value. When specifically calculating the zero-crossing NTB calibration value, it is possible to select to calibrate the rising edge zero-crossing NTB alone and only determine the rising edge zero-crossing NTB calibration value, or to calibrate the falling edge zero-crossing NTB alone and only determine the falling edge zero-crossing NTB calibration value, or it is possible to select to calibrate both and simultaneously determine the rising edge zero-crossing NTB calibration value and the falling edge zero-crossing NTB calibration value.
[0046] Figure 1 : is a flow chart of a zero-crossing NTB calibration method according to an embodiment of the present invention, which at least includes the following steps:
[0047] Step S110: receiving a first zero-crossing interrupt signal sent by the zero-crossing circuit to be calibrated, receiving a second zero-crossing interrupt signal sent by the fixed-delay zero-crossing circuit, and acquiring the first zero-crossing network reference time NTB information of the zero-crossing circuit to be calibrated and the second zero-crossing network reference time NTB information of the fixed-delay zero-crossing circuit when the interruption occurs; wherein the difference between the second zero-crossing network reference time NTB and the real power zero-crossing network reference time NTB is a fixed delay amount; the fixed-delay zero-crossing circuit and the zero-crossing circuit to be calibrated are connected to an AC power supply of the same phase.
[0048] This step involves a zero-crossing circuit to be calibrated and a fixed-delay zero-crossing circuit. The zero-crossing circuit to be calibrated is a zero-crossing circuit with a certain delay that needs to use a zero-crossing NTB calibration value to calibrate its zero-crossing NTB, which is generally set in a network node device (such as: CCO or STA); the fixed-delay zero-crossing circuit is independent of the network node device in which the zero-crossing circuit to be calibrated is set, and the zero-crossing NTB detected by it has a fixed delay amount more than the real power zero-crossing NTB, which can be explained as: the zero-crossing NTB detected by the fixed-delay zero-crossing circuit is required to have a stable delay time with the real power zero-crossing NTB, and the delay with the real power zero-crossing NTB is a fixed value, and this delay value is known, and the precise delay value can be tested by a test instrument. The level signal output by the fixed-delay zero-crossing circuit is not a standard square wave, but the zero-crossing NTB of the real power signal can be inferred through the fixed delay amount.
[0049] In addition, the fixed delay zero-crossing circuit is connected to the processor in the network node device through an interface with a trigger processor pin interrupt characteristic, and transmits the zero-crossing interrupt signal to the processor through the interface; at the same time, the zero-crossing circuit to be calibrated is also connected to the processor through an interface with a trigger processor pin interrupt characteristic, and transmits the zero-crossing interrupt signal to the processor through this interface. In addition, the fixed delay zero-crossing circuit and the zero-crossing circuit to be calibrated are connected to the same phase of the AC power supply to ensure that the input power supply voltage and phase are the same.
[0050] At the beginning of the zero-crossing calibration process, a zero-crossing NTB acquisition timeout timer can be started to limit the maximum time for collecting zero-crossing NTB. Generally, zero-crossing NTB information collected within 1 second can meet the needs of subsequent calibration. In addition to setting the acquisition time, you can also set the number of acquisitions, which can be selected according to actual needs.
[0051] After the zero-crossing calibration process starts, the pin interrupt connecting the zero-crossing circuit to be calibrated and the fixed-delay zero-crossing circuit is turned on. If the rising edge zero-crossing NTB and the falling edge zero-crossing NTB need to be calibrated at the same time, the pin interrupt needs to be configured as a double-edge trigger. At this time, the processor will receive the first zero-crossing interrupt signal sent from the zero-crossing circuit to be calibrated and the second zero-crossing interrupt signal sent from the fixed-delay zero-crossing circuit. At this time, the processor will obtain the first zero-crossing NTB information of the zero-crossing circuit to be calibrated and the second zero-crossing NTB information of the fixed-delay zero-crossing circuit when the interrupt occurs. Due to the characteristics of the fixed-delay zero-crossing circuit, the second zero-crossing NTB information differs from the real power zero-crossing NTB by a fixed delay. The fixed time delay is defined as the difference between the second zero-crossing NTB and the real power zero-crossing NTB. When the actually obtained second zero-crossing NTB is smaller than the real power zero-crossing NTB, that is, the actual zero-crossing point is ahead of the real power zero-crossing point, the fixed time delay is a negative number; when the actually obtained zero-crossing NTB is larger than the real power zero-crossing NTB, that is, the actual zero-crossing point is delayed from the real power zero-crossing point, the fixed time delay is a positive number.
[0052] After obtaining the zero-crossing NTB, close the pin interrupts connecting the zero-crossing circuit to be calibrated and the fixed-delay zero-crossing circuit, and proceed to the subsequent steps.
[0053] Step S120: When the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information meet a preset condition, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is determined according to the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information and the fixed delay amount; wherein the preset condition is: the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information are in the same power cycle and have the same acquisition edge type.
[0054] This step is to pre-judge and screen the first zero-crossing NTB information and the second zero-crossing NTB information acquired in step S110, and select the zero-crossing NTB that meets the preset conditions to determine the subsequent zero-crossing NTB calibration value.
[0055] Here, the selected zero-crossing NTB needs to meet two conditions:
[0056] Condition 1: The first zero-crossing NTB information and the second zero-crossing NTB information are in the same power cycle. Whether this condition is met can be determined by determining whether the difference between the first zero-crossing NTB information and the second zero-crossing NTB information is less than the NTB corresponding to one power cycle. If so, the first zero-crossing NTB information and the second zero-crossing NTB information are in the same power cycle, otherwise they are not in the same power cycle.
[0057] Condition 2: The acquisition edge type of the first zero-crossing NTB information and the second zero-crossing NTB information is the same, that is, they are both acquired on the rising edge or the falling edge, but one cannot be acquired on the rising edge and the other on the falling edge.
[0058] If it is determined that the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information obtained meet the above-mentioned preset conditions, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is determined according to the first zero-crossing network reference time NTB information, the second zero-crossing network reference time NTB information and the fixed delay amount.
[0059] When determining the calibration value of the zero-crossing circuit to be calibrated according to the three parameters of the first zero-crossing NTB information, the second zero-crossing NTB information and the fixed delay amount, the following two methods can be used:
[0060] Method 1: firstly calculate the difference between the first zero-crossing NTB information and the second zero-crossing NTB information, and then determine the calibration value of the zero-crossing circuit to be calibrated according to the difference and the fixed time delay.
[0061] When determining the calibration value of the zero-crossing circuit to be calibrated according to the difference and the fixed time delay, different calculation methods may be adopted according to different situations, specifically:
[0062] When the number of differences of the same acquisition edge is one, that is, if the first zero-crossing NTB information acquired on the rising edge and the second zero-crossing NTB information also acquired on the rising edge are in the same power cycle and the number is one, then the difference between them is also one. In this case, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is the sum of the difference and the fixed time delay. The calibration value at this time is the calibration value of the zero-crossing NTB acquired on the rising edge of the zero-crossing circuit to be calibrated. Similarly, the same is true for the falling edge acquisition type.
[0063] When the number of differences of the same acquisition edge is multiple, that is: if the first zero-crossing NTB information acquired on the rising edge and the second zero-crossing NTB information acquired on the rising edge are in the same power cycle and the number is multiple, then the difference between them is also multiple. In this case, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is the sum of the average value of all the differences and the fixed time delay. At this time, the zero-crossing NTB calibration value is the calibration value of the zero-crossing NTB acquired on the rising edge of the zero-crossing circuit to be calibrated; similarly, the same is true for the falling edge acquisition type.
[0064] Method 2: First, the real power zero-crossing NTB is calculated by subtracting the fixed delay from the second zero-crossing NTB information, and then the difference between the first zero-crossing NTB information and the real power zero-crossing NTB information is calculated.
[0065] When the number of differences of the same acquisition edge is one, that is, if the first zero-crossing NTB information acquired on the rising edge and the second zero-crossing NTB information acquired on the rising edge are in the same power cycle and the number is one, then the difference between them is also one, and the calibration value of the zero-crossing circuit to be calibrated is the difference. At this time, the calibration value is the calibration value of the zero-crossing NTB acquired on the rising edge of the zero-crossing circuit to be calibrated; similarly, the same is true for the falling edge acquisition type.
[0066] When the number of the differences of the same acquisition edge is multiple, that is, if the first zero-crossing NTB information acquired on the rising edge and the second zero-crossing NTB information acquired on the rising edge are in the same power cycle and the number is multiple, then the difference between them is also multiple, then the calibration value of the zero-crossing circuit to be calibrated is the average value of all the differences, and the calibration value at this time is the calibration value of the zero-crossing NTB acquired on the rising edge of the zero-crossing circuit to be calibrated; similarly, the same is true for the falling edge acquisition type.
[0067] In practical applications, generally speaking, the final rising edge zero-crossing NTB calibration value and the falling edge zero-crossing NTB calibration value are different, and need to be recorded and stored separately for use in calibrating the rising edge zero-crossing NTB and the falling edge zero-crossing NTB of the zero-crossing circuit to be calibrated. It should be noted that: when calibrating the zero-crossing NTB of the zero-crossing circuit to be calibrated, it is necessary to subtract the zero-crossing NTB calibration value from the zero-crossing NTB of the zero-crossing circuit to be calibrated to obtain the calibrated real power zero-crossing NTB.
[0068] After using the above steps S110 to S120 to determine the zero-crossing NTB calibration values of multiple identical acquisition edges of the zero-crossing circuit to be calibrated, the delay characteristics of the zero-crossing circuit to be calibrated can be determined by analyzing the zero-crossing NTB calibration values of multiple identical acquisition edges. Specifically: variance calculation is performed on the zero-crossing NTB calibration values of multiple identical acquisition edges of the zero-crossing circuit to be calibrated. If the obtained calculation result is greater than the preset maximum delay threshold, it is determined that the delay characteristics of the zero-crossing circuit to be calibrated are unstable. The maximum delay threshold here can be set according to actual needs or development experience. This method of judging whether the delay characteristics of each zero-crossing circuit to be calibrated are stable can be used in the hardware test of the zero-crossing circuit produced in batches. If a zero-crossing circuit with unstable delay characteristics appears, it means that the zero-crossing circuit design is flawed or this zero-crossing hardware circuit does not meet product requirements, and it is classified as a substandard product.
[0069] It can be seen from the above steps that the embodiment of the present invention sets a fixed delay zero-crossing circuit with a stable and known delay. According to the zero-crossing NTB information obtained from the fixed delay zero-crossing circuit and the zero-crossing circuit to be calibrated in the same power cycle and with the same acquisition edge type and the known fixed delay, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated can be determined. The calculation is accurate and the implementation process is simple, which makes up for the imperfection of the hardware zero-crossing circuit with a delay, thereby ensuring the subsequent application effect.
[0070] Figure 2 : is a schematic diagram of the composition structure of the zero-crossing NTB calibration device according to an embodiment of the present invention, which at least includes the following modules:
[0071] The zero-crossing NTB information acquisition module 210 is configured to receive a first zero-crossing interrupt signal sent by a zero-crossing circuit to be calibrated, receive a second zero-crossing interrupt signal sent by a fixed-delay zero-crossing circuit, and acquire the first zero-crossing network reference time NTB information of the zero-crossing circuit to be calibrated and the second zero-crossing network reference time NTB information of the fixed-delay zero-crossing circuit when an interrupt occurs; wherein the difference between the second zero-crossing network reference time NTB and the real power zero-crossing network reference time NTB is a fixed delay amount; the fixed-delay zero-crossing circuit and the zero-crossing circuit to be calibrated are connected to an AC power supply of the same phase;
[0072] The zero-crossing NTB calibration value determination module 220 is configured to determine the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated according to the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information and the fixed delay when the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information meet a preset condition; wherein the preset condition is: the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information are in the same power cycle and have the same acquisition edge type.
[0073] Figure 3 FIG. 1 is a schematic diagram of the hardware structure of the zero-crossing NTB calibration device according to an embodiment of the present invention. Figure 3 As shown, the communication device includes: a memory 310 and a processor 320, wherein the memory 310 and the processor 320 communicate with each other; exemplarily, the memory 310 and the processor 320 communicate with each other via a communication bus 330, the memory 310 is used to store a computer program, and the processor 320 executes the computer program to implement the method shown in the above embodiment.
[0074] Optionally, the zero-crossing NTB calibration device may further include a transmitter and / or a receiver.
[0075] Optionally, the processor may be a central processing unit (CPU), or other general-purpose processors, PLC (Programmable Logic Controller), FPGA (Field-Programmable Gate Array), DSP (Digital Signal Processor) or ASIC (Application Specific Integrated Circuit). A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0076] Figure 4 FIG. 1 is a schematic diagram of the hardware structure of a zero-crossing NTB calibration device according to an embodiment of the present invention. Figure 4 As shown, the zero-crossing NTB calibration device at least includes: a zero-crossing circuit to be calibrated 410 and Figure 3The zero-crossing NTB calibration device 420 in the above embodiment is shown. The zero-crossing circuit 410 to be calibrated is configured to be connected to the processor in the zero-crossing NTB calibration device 420 through a first interface 430 having a trigger processor pin interrupt characteristic, output a first zero-crossing interrupt signal, and transmit it to the processor in the zero-crossing NTB calibration device 420 through the first interface 430.
[0077] The above-mentioned zero-crossing NTB calibration device may be a power line communication network node device, such as a CCO or a STA.
[0078] Figure 5 FIG. 1 is a schematic diagram of the hardware structure of the zero-crossing NTB calibration system according to an embodiment of the present invention. Figure 5 As shown, the zero-crossing NTB calibration system at least includes: a fixed time delay zero-crossing circuit 510 and the zero-crossing NTB calibration device 520 described in the above embodiment. The fixed time delay zero-crossing circuit 510 is configured to be connected to the processor in the zero-crossing NTB calibration device in the zero-crossing NTB calibration device 520 through a second interface 530 having a trigger processor pin interrupt characteristic, output a second zero-crossing interrupt signal, and transmit it to the processor in the zero-crossing NTB calibration device in the zero-crossing NTB calibration device 520 through the second interface; the fixed time delay zero-crossing circuit 510 is also configured to be connected to an AC power supply of the same phase as the zero-crossing circuit to be calibrated in the zero-crossing NTB calibration device 520.
[0079] An embodiment of the present invention provides a storage medium, wherein the storage medium is used to store a computer program, and the computer program is used to implement the zero-crossing NTB calibration method described in any of the above method embodiments.
[0080] An embodiment of the present invention provides a chip, which is used to support a receiving device (such as a terminal device, a network device, etc.) to implement the functions shown in the embodiment of the present invention. The chip is specifically used for a chip system, which can be composed of a chip, or can include a chip and other discrete devices. When the chip in the receiving device implements the above method, the chip includes a processing unit. Further, the chip can also include a communication unit. The processing unit can be, for example, a processor. When the chip includes a communication unit, the communication unit can be, for example, an input / output interface, a pin or a circuit. The processing unit performs all or part of the actions performed by each processing module in the embodiment of the present invention, and the communication unit can perform corresponding receiving or sending actions. In another specific embodiment, the processing module of the receiving device in the embodiment of the present invention can be a processing unit of the chip, and the receiving module or the sending module of the control device is a communication unit of the chip.
[0081] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices (equipment) or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may adopt a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0082] The present application is described with reference to flowcharts of methods, apparatuses (devices) and computer program products according to embodiments of the present application. It should be understood that each process in the flowchart can be implemented by computer program instructions.
[0083] These computer program instructions may be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device that implements the process Figure 1 A function specified in a process or multiple processes.
[0084] These computer program instructions may also be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce the instructions for implementing the process Figure 1 A device that specifies functions in a process or multiple processes.
[0085] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program, wherein the computer-readable program is used for a computer to execute part or all of the above method embodiments.
[0086] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by specifying relevant hardware through a program, and the program is stored in a storage medium, including several instructions for a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0087] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A zero-crossing NTB calibration method, characterized in that: At least: Receive a first zero-crossing interrupt signal sent by a zero-crossing circuit to be calibrated, receive a second zero-crossing interrupt signal sent by a fixed-delay zero-crossing circuit, and obtain the first zero-crossing network reference time NTB information of the zero-crossing circuit to be calibrated and the second zero-crossing network reference time NTB information of the fixed-delay zero-crossing circuit when an interrupt occurs; wherein the difference between the second zero-crossing network reference time NTB and the real power zero-crossing network reference time NTB is a fixed delay amount; the fixed-delay zero-crossing circuit and the zero-crossing circuit to be calibrated are connected to an AC power supply of the same phase; When the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information meet a preset condition, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is determined according to the first zero-crossing network reference time NTB information, the second zero-crossing network reference time NTB information and the fixed delay amount; wherein the preset condition is: the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information are in the same power cycle and have the same acquisition edge type.
2. The method according to claim 1, characterized in that The step of determining the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated according to the first zero-crossing network reference time NTB information, the second zero-crossing network reference time NTB information and the fixed delay is specifically as follows: A difference between the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information is calculated, and a zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is determined according to the difference and the fixed time delay.
3. The method according to claim 2, characterized in that The determining of the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated according to the difference and the fixed time delay is specifically: When the number of the difference values of the same acquisition edge is one, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is the sum of the difference value and the fixed time delay; When the number of the difference values of the same acquisition edge is multiple, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is the sum of the average value of the difference values and the fixed time delay.
4. The method according to claim 1, characterized in that: The step of determining the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated according to the first zero-crossing network reference time NTB information, the second zero-crossing network reference time NTB information and the fixed delay is specifically as follows: The real power zero-crossing network reference time NTB is calculated by subtracting the fixed time delay from the second zero-crossing network reference time NTB information, and then the difference between the real power zero-crossing network reference time NTB information and the first zero-crossing network reference time NTB information is calculated; When the number of the difference values of the same acquisition edge is one, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is the difference; When the number of the difference values of the same acquisition edge is multiple, the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is the average value of the difference values.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: The zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated is recorded and stored for calibrating the zero-crossing network reference time NTB of the zero-crossing circuit to be calibrated.
6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Obtain zero-crossing network reference time NTB calibration values of multiple identical acquisition edges of the zero-crossing circuit to be calibrated, perform variance calculation on the zero-crossing network reference time NTB calibration values of the multiple identical acquisition edges of the zero-crossing circuit to be calibrated, and if the obtained calculation result is greater than a preset maximum delay threshold, it is determined that the delay characteristic of the zero-crossing circuit to be calibrated is unstable.
7. The method according to any one of claims 1 to 4, characterized in that: in, When the difference between the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information is less than the network reference time corresponding to one power cycle, the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information are in the same power cycle.
8. A zero-crossing NTB calibration device, characterized in that: At least: A zero-crossing NTB information acquisition module is configured to receive a first zero-crossing interrupt signal sent by a zero-crossing circuit to be calibrated, receive a second zero-crossing interrupt signal sent by a fixed-delay zero-crossing circuit, and acquire the first zero-crossing network reference time NTB information of the zero-crossing circuit to be calibrated and the second zero-crossing network reference time NTB information of the fixed-delay zero-crossing circuit when an interrupt occurs; wherein the difference between the second zero-crossing network reference time NTB and the real power zero-crossing network reference time NTB is a fixed delay amount; the fixed-delay zero-crossing circuit and the zero-crossing circuit to be calibrated are connected to an AC power supply of the same phase; A zero-crossing NTB calibration value determination module is configured to determine the zero-crossing NTB calibration value of the zero-crossing circuit to be calibrated according to the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information and the fixed time delay when the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information meet a preset condition; wherein the preset condition is: the first zero-crossing network reference time NTB information and the second zero-crossing network reference time NTB information are in the same power cycle and have the same acquisition edge type.
9. A zero-crossing NTB calibration device, characterized in that: The method comprises a memory and a processor, wherein the processor executes program instructions in the memory to implement the method according to any one of claims 1 to 7.
10. A zero-crossing NTB calibration device, characterized in that: At least: The zero-crossing circuit to be calibrated and the zero-crossing NTB calibration device as claimed in claim 9, wherein: The zero-crossing circuit to be calibrated is configured to be connected to the processor in the zero-crossing NTB calibration device through a first interface having a characteristic of triggering a processor pin interrupt, output a first zero-crossing interrupt signal, and transmit it to the processor in the zero-crossing NTB calibration device through the first interface.
11. A zero-crossing NTB calibration system, characterized in that: At least: A fixed delay zero-crossing circuit and a zero-crossing NTB calibration device as claimed in claim 10, wherein: The fixed-delay zero-crossing circuit is configured to be connected to the processor in the zero-crossing NTB calibration device in the zero-crossing NTB calibration equipment through a second interface having a trigger processor pin interrupt characteristic, output a second zero-crossing interrupt signal, and transmit it to the processor in the zero-crossing calibration device in the zero-crossing NTB calibration equipment through the second interface; the fixed-delay zero-crossing circuit is also configured to be connected to an AC power supply of the same phase as the zero-crossing circuit to be calibrated in the zero-crossing NTB calibration equipment.
12. A storage medium, characterized in that: The storage medium is used to store a computer program, and the computer program is used to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Power supply conversion module and broadband carrier communication module
CN111162820A
Zero calibration circuit, apparatus, system, method and device and storage medium
CN112305416A