Method for automatically adjusting voltage and current sampling phase sequence of ammeter

CN122992826APending Publication Date: 2026-10-27JIAXING EASTRON ELECTRONICS INSTR
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611272662.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

针对现有技术的不足,本发明提供了一种电表自动调节电压电流采样相序的方法,解决了户用光伏电网用逆变系统配套智能电表在DIY安装时易出现电压、电流相序接错,且设备仅能报警、无法自主校正,需专业电工二次上门断电改线整改的弊端,解决了人工运维成本高、故障处置流程烦琐、设备运行中断、现场作业存在安全隐患,以及普通用户无法自行纠错、设备接线容错能力不足等技术问题,实现相序在线自适应识别与自动切换校正,无需改动物理接线、无需断电即可保障电表计量与逆变系统正常工作,适配民用自助安装场景,降低使用与运维成本,提升设备运行安全性与实用性

Benefits of technology

1、本发明通过现有的智能电表和逆变器硬件,采用方波识别结合无功扰动的检测方式,可准确地识别确定户用光伏电网的接入电压电流采样相序,有效抵御电网谐波、电磁干扰,相序与电流流向识别准确率远优于传统检测方案;工况容错能力强,集成度高,产品通用适配率接近 100%,完美适配民用光伏电网DIY 安装场景;同时可保证逆变系统始终处于最优工作状态,减少电能损耗,兼具实用性、经济性与节能效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122992826A_ABST
    Figure CN122992826A_ABST
Patent Text Reader

Abstract

The application provides a kind of electric meter automatic regulation voltage current sampling phase sequence method, it is related to photovoltaic power grid supporting measurement and detection technical field.The electric meter automatic regulation voltage current sampling phase sequence method includes inverter and smart meter, overall steps are divided into determining current phase sequence, determining voltage phase sequence and determining current direction, through inverter in ABC three-phase, respectively, the power grid reactive value of customer site is periodically disturbed, forms reactive power square wave, after determining current phase sequence by square wave disturbance, rely on output stable reactive value to determine voltage phase sequence, then according to the positive and negative of reactive value change to determine current direction.Through existing smart meter and inverter hardware, using square wave identification combined with reactive disturbance detection method, the access voltage current sampling phase sequence of power grid can be accurately identified and determined, effectively resist power grid harmonic, electromagnetic interference, phase sequence and current direction identification accuracy is far superior to traditional detection scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of metering and testing technology for photovoltaic power grids, specifically a method for automatically adjusting the voltage and current sampling phase sequence of an electricity meter. Background Technology

[0002] Smart meters are now widely used in inverter systems for residential photovoltaic grids. These systems often employ a simple plug-and-play installation method, and are frequently assembled by users themselves. During installation, incorrect voltage and current phase sequence connections are common. Existing smart meters and their associated monitoring equipment mostly only have phase sequence detection and fault alarm functions. Inverters can only adapt to the grid phase sequence and cannot correct wiring errors on the meter side. When a phase sequence error occurs, a professional electrician must be dispatched to disconnect the power and rewire, resulting in additional labor and travel costs, interrupting normal equipment operation, and a cumbersome and time-consuming rectification process. Furthermore, there are safety hazards such as electric shock, loose wiring, and short circuits. Ordinary users lack the ability to self-correct errors, and current technology has poor fault tolerance, making it difficult to adapt to residential DIY installation scenarios.

[0003] Existing phase sequence detection technologies mostly employ methods such as zero-crossing detection, phase sampling, symmetrical component analysis, and coordinate transformation. These methods are not only susceptible to interference from grid harmonics and electromagnetic noise, resulting in a high misjudgment rate of phase sequence, but are also particularly problematic for photovoltaic grids with bidirectional power flow, where output fluctuates drastically with sunlight, and where inverters introduce harmonics and a small amount of DC component. Furthermore, under conditions where multiple inverters and branches coexist in a photovoltaic grid, some complex algorithms place stringent requirements on the sampling circuit and main control performance, leading to high overall costs and significant implementation difficulties. In addition, traditional solutions have limited functionality, cannot synchronously identify current flow direction, and are mostly independent detection modules with low integration with the inverter, complex wiring, long computation time, and slow response speed, making it difficult to achieve real-time online correction. Summary of the Invention

[0004] (a) Technical problems to be solved To address the shortcomings of existing technologies, this invention provides a method for automatically adjusting the voltage and current sampling phase sequence of electricity meters. This method solves the problems of incorrect voltage and current phase sequence connections during DIY installation of smart meters for household photovoltaic grid inverter systems. Furthermore, the devices can only alarm but cannot self-correct, requiring a professional electrician to make a second on-site power outage and rewiring. This invention also resolves technical issues such as high manual maintenance costs, cumbersome fault handling procedures, equipment operation interruptions, safety hazards during on-site work, and the inability of ordinary users to correct errors themselves, as well as insufficient fault tolerance in equipment wiring. It achieves online adaptive phase sequence identification and automatic switching correction, ensuring normal operation of the meter and inverter system without modifying physical wiring or disconnecting power. It is suitable for residential self-installation scenarios, reducing usage and maintenance costs, and improving equipment safety and practicality.

[0005] (II) Technical Solution To achieve the above objectives, the present invention provides the following technical solution: a method for automatically adjusting the voltage and current sampling phase sequence of an electricity meter, comprising an inverter and a smart meter, the overall steps of which are divided into determining the current phase sequence, determining the voltage phase sequence, and determining the current direction, wherein the steps of determining the current phase sequence are as follows: S1. Divide the current phase sequence into three phases A, B, and C. Before determining the phase sequence, the smart meter restores the voltage phase sequence and current phase sequence to the default ABC sorting and restores the current direction to positive. S2. By using the inverter to periodically disturb the reactive power value of the power grid at the customer's site in one of the three phases ABC, a square wave of reactive power is generated. S3. Once the inverter controls the disturbance of this phase, the smart meter samples the reactive power square wave signal and reads the reactive power and current data of the three phases A, B, and C in the two control cycles respectively. S4. The smart meter detects the disturbance phase of the inverter sequentially according to the default phase sequence state, and determines which phase of the three-phase reactive power has the same periodic change as the inverter. S5. After a successful judgment, the inverter stops disturbing that phase and instead controls another phase to periodically disturb it, and then proceeds to judge the next phase. S6. Sequentially determine the correspondence between the periodic disturbances of the two actual phase sequences and the default phase sequence, and automatically derive the correspondence of the third phase; S7. After completing the three-phase judgment, repeat the above steps for the last phase to confirm that the current phase sequence judgment is correct. The smart meter will write the obtained current phase sequence into the current configuration parameters to realize the current phase sequence correction. The steps of the method for determining the voltage phase sequence and current direction are as follows: Q1. After determining the current phase sequence, control the inverter to disturb one phase and output a fixed reactive power value; Q2. Calculate the change in reactive power measured by the smart meter in this phase before and after inverter control, and determine whether the change in reactive power is the same as or half of the output reactive power value of the inverter. Q3. When it is determined that the change in the phase is only half of the reactive power output of the inverter, it is determined that the phase sequence is different from the actual phase sequence. The inverter is restored to not output reactive power, the smart meter switches the meter voltage phase sequence, and then controls the inverter output. The meter reading is determined to be consistent with the inverter output until the determination is successful. Q4. When it is determined that the change in the phase is equal to the reactive power output of the inverter, it is confirmed that the phase is the same as the actual phase sequence. After the phase voltage phase sequence of the phase is successfully determined, the current direction is determined by increasing or decreasing the reactive power value of the set value. Q5. After the inverter outputs a set value of reactive power, the smart meter should increase the value by the same amount when measuring the reactive power of that phase. If the value of that phase actually increases, it means that the current is connected in the correct forward and reverse directions. If the value of that phase actually decreases, it means that the current is connected in the wrong forward and reverse directions. Q6. After determining the current direction, repeat the above steps to proceed to the voltage phase sequence and current direction adjustment of the next phase; Q7. After adjusting the next phase, repeat the above steps for the last phase to ensure the phase sequence is correct.

[0006] Preferably, to read the three-phase reactive power and current data for two control cycles, it is first necessary to determine which phase of the three-phase reactive power meter exhibits the same periodicity as the inverter. The detailed determination logic is as follows: Z1. The candidate signal is subjected to reference value removal processing. This is achieved by calculating the average value of the sampled sequence and subtracting this average value from each sample point to obtain the signal after removing the reference offset. ; Z2. Since the starting phase of the square wave signal cannot be determined in advance during the actual sampling process, a multi-phase reference template generation mechanism is adopted to match the square wave signal under different phase states. Z3. After the reference template is generated, the sampled signal after removing the reference value is subjected to nonlinear transformation symbol enhancement processing; Z4. Through the nonlinear transformation in the previous step, the input amplitude can be compressed to a limited range while maintaining the positive and negative polarity of the signal. When the input signal amplitude is large, the output result gradually approaches the positive and negative unit value, thus highlighting the sign change characteristics between the high and low levels of the square wave. When the input signal amplitude is small, the output result approaches zero, which can effectively reduce the impact of low-amplitude noise on the matching result. Therefore, this processing method has better continuity and anti-interference ability compared with the traditional binarization judgment method. On this basis, in order to further improve the contribution of the effective signal region in the matching process, dynamic weight coefficients can be generated according to the sampling amplitude. This weight can automatically adjust the importance of different sampling points according to the signal amplitude. For the effective region of the square wave, due to the larger amplitude, the corresponding weight is higher, and it has a greater contribution in the correlation calculation; for the random noise region, due to the lower amplitude, the corresponding weight is smaller, thus reducing the impact of noise on the final judgment result. Z5. After completing signal enhancement and weight calculation, the enhanced signal, dynamic weights, and square wave reference templates under different phases are subjected to weighted correlation calculation and scoring. When the input signal and the reference template have the same period, the same polarity, and the correct phase relationship, the product of the enhanced signal and the reference template is positive, and the cumulative correlation value increases continuously. When the input signal and the reference template do not match, the positive and negative values ​​of the product change randomly, and the cumulative result decreases. Therefore, the correlation scoring can effectively reflect the consistency between the input signal and the target square wave structure. Z6. For all possible phase positions, calculate the corresponding correlation score and search for the maximum correlation result. The phase position corresponding to the maximum correlation value is the best matching phase of the current input signal. Z7. When the maximum correlation score meets the set conditions, the input signal is determined to be the target square wave signal.

[0007] Preferably, in step Z1, let the sampled signal after removing the reference value be Y(i), any sampling point i, and the phase p to be searched, then the formula for removing the reference value is:

[0008] The processed signal no longer contains the reference value, but retains only the periodic characteristics and polarity change information in the square wave process, which is beneficial to improving the stability of subsequent correlation matching.

[0009] Preferably, in step Z2, the multi-phase reference template generation mechanism is as follows: based on the preset square wave period length, a standard square wave reference sequence with period T is constructed, and for any sampling point i and the phase p to be searched, corresponding k points are generated.

[0010] And generate a reference template based on the position of this point in the period:

[0011] By changing the phase parameter p, multiple square wave reference templates with different starting positions covering the entire period can be generated. There is no need to pre-synchronize the phase of the input signal. It can automatically find the period position that best matches the input signal, thus improving the adaptability to asynchronous sampling signals.

[0012] Preferably, in step Z3, the nonlinear transformation sign enhancement processing of Y(i) adopts the following mapping relationship:

[0013] in, To adjust the parameters.

[0014] Preferably, in step Z4, the dynamic weighting coefficient is set to... The formula for generating the formula is:

[0015] in, To prevent tiny constants with zero weight.

[0016] Preferably, in step Z5, the relevant scoring calculation formula is as follows:

[0017] in, This indicates the degree of matching between the input signal and the reference square wave template at phase p.

[0018] Preferably, in step Z6, for all possible phase positions, the corresponding correlation score is calculated, and the maximum correlation result is searched:

[0019] If the Scoremax of one or more phases or phase 0 exceeds the set threshold, the judgment fails. The system then checks the three-phase current for the presence of the periodic change. If the judgment fails to be made, two more cycles are sampled until a successful judgment is achieved, at which point the system proceeds to the next phase. Before proceeding to the next phase, the reactive power periodic disturbance of the current phase is terminated.

[0020] (III) Beneficial Effects This invention provides a method for automatically adjusting the voltage and current sampling phase sequence of an electricity meter. It has the following beneficial effects: 1. This invention utilizes existing smart meter and inverter hardware, employing a square wave recognition combined with reactive power disturbance detection, to accurately identify and determine the sampling phase sequence of the access voltage and current of a residential photovoltaic power grid. It effectively resists grid harmonics and electromagnetic interference, and the accuracy of phase sequence and current flow identification is far superior to traditional detection schemes. It boasts strong fault tolerance, high integration, and nearly 100% product compatibility, perfectly suited for DIY installations of residential photovoltaic power grids. Simultaneously, it ensures the inverter system is always in optimal operating condition, reducing power loss and combining practicality, economy, and energy-saving effects.

[0021] 2. This invention achieves rapid extraction of square wave periodic transition features through half-cycle delay differential, solves the sampling asynchrony problem through multi-phase template search, preserves signal polarity while reducing noise impact through nonlinear symbol enhancement, and increases the contribution of the effective signal region by combining amplitude adaptive weighting. Finally, it completes square wave identification using weighted correlation matching. Compared with traditional fixed threshold detection methods, this scheme does not rely on a single amplitude judgment, but comprehensively utilizes periodic structure, phase relationship, polarity features, and amplitude information for joint decision-making. Therefore, it has stronger anti-interference ability and environmental adaptability, and is fully applicable to photovoltaic grid systems with harsh conditions. Attached Figure Description

[0022] Figure 1 This is an example diagram illustrating the correct voltage and current phase sequence connection method according to the present invention; Figure 2 This is an example diagram of an incorrect voltage and current phase sequence connection according to the present invention; Figure 3 This is a flowchart of the current phase sequence adjustment process of the present invention; Figure 4 This is a flowchart of the voltage phase sequence adjustment process of the present invention; Figure 5 This is a schematic diagram of the inverter output of the present invention; Figure 6 This is a schematic diagram of the current waveform corresponding to the inverter disturbance in the actual test of the present invention; Figure 7 This is a schematic diagram of the reactive power waveform corresponding to the inverter disturbance in the actual test of the present invention; Figure 8 This is the register bit definition table for the smart meter in this embodiment of the invention; Figure 9 This is a detailed description table of the register functions in an embodiment of the present invention; Figure 10 This is an overall flowchart of an embodiment of the present invention; Figure 11 This is a schematic diagram of the communication process between the inverter and the smart meter of the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Example 1: like Figure 1-11 As shown, this invention provides a method for automatically adjusting the voltage and current sampling phase sequence of an electricity meter, including an inverter and a smart meter. In a photovoltaic grid-connected scenario, the correct wiring method for an inductor-type electricity meter is to connect phase A of the meter to the voltage and current of phase A of the user's power grid, and similarly connect phases B and C in the same order. Figure 1 As shown. However, in actual user scenarios where photovoltaic grid connection is implemented, there are instances of incorrect wiring sequence when connecting the meter, with incorrect voltage and current connections as shown below. Figure 2 As shown, the voltage is connected in phase sequence BCA, and the current is connected in phase sequence CAB. The incorrect sequence causes the multi-functional parameters measured by the electricity meter to be inconsistent with the actual situation. Therefore, it is necessary to adaptively switch the voltage and current phase sequences to meet the actual wiring requirements. The overall steps are divided into determining the current phase sequence, determining the voltage phase sequence, and determining the current direction. The steps for determining the current phase sequence are as follows: S1. Divide the current phase sequence into three phases A, B, and C. Before determining the phase sequence, the smart meter restores the voltage phase sequence and current phase sequence to the default ABC order and restores the current direction to positive. S2. By periodically disturbing the reactive power of the power grid at the customer's site through one phase of the three-phase inverter (A, B, C), the inverter outputs a reactive power square wave with a period of 4 seconds, a duty cycle of 50%, and an amplitude of 1000var. Figure 5 As shown; S3. Starting from phase A, the inverter controls the disturbance of this phase and completes the process. The smart meter samples the reactive power square wave signal and reads the reactive power and current data of the three phases A, B, and C in two control cycles of 8 seconds. S4. The smart meter detects the disturbance phase of the inverter sequentially according to the default phase sequence state, and determines which phase of the three-phase reactive power has the same periodic change as the inverter. S5. After a successful judgment, the inverter stops disturbing phase A and instead controls the inverter to periodically disturb phase B, proceeding to the judgment of the next phase; S6. Sequentially determine the correspondence between the periodic disturbances of the two actual phase sequences and the default phase sequence, and automatically derive the correspondence of phase C; S7. After completing the three-phase judgment, repeat the above judgment steps for phase C to confirm that the current phase sequence judgment is correct. The smart meter writes the obtained current phase sequence CAB into the current configuration parameters of the meter's current phase sequence register to realize the current phase sequence correction. The process of judging the case is as follows:

[0025] First, after the inverter periodically disturbs the reactive power of phase A, the data of phase B of the meter will have periodic disturbances, which determines the current connected to phase B of the meter to phase A.

[0026]

[0027] After the reactive power of phase B is periodically disturbed, the data of phase C of the meter will have periodic disturbances, which determines the current connected to phase B of phase C of the meter.

[0028]

[0029] After the reactive power of phase C is periodically disturbed, the data of phase A of the meter will have periodic disturbances, which determines the current connected to phase A of phase C of the meter.

[0030] After determining phase C, the obtained current phase sequence CAB is written into the current configuration parameters to perform current phase sequence correction. The corresponding flowchart is as follows: Figure 3 As shown.

[0031] After determining the current phase sequence, the voltage phase sequence is determined. Simultaneously, after determining the voltage phase sequence for each item, the current direction is directly determined. The specific steps for determining the voltage phase sequence and current direction are as follows: Q1. After determining the current phase sequence, control the inverter to disturb the A phase output to a fixed reactive power value of 1000var; Q2. Calculate the change in reactive power measured by the smart meter in this phase before and after inverter control, and determine whether the change in reactive power is the same as or half of the output reactive power value of the inverter. Q3. When it is determined that the change in the phase is only 500var, which is half of the reactive power output of the inverter, it is determined that the phase sequence is different from the actual phase sequence. The inverter is restored to not output reactive power, the smart meter switches the meter voltage phase sequence, and then controls the inverter output to determine whether the meter reading matches the inverter output until the determination is successful. Q4. When the phase change is equal to the inverter's output reactive power value of 1000var, confirm that the phase sequence is the same as the actual phase sequence. After successfully determining the phase voltage sequence, determine the current direction by increasing or decreasing the reactive power value by this set value. Specifically: after the inverter outputs a reactive power set value of 1000var, the smart meter should increase the reactive power of that phase by the same set value of 1000var. If the phase actually increases by 1000var, it indicates that the current is connected correctly in both forward and reverse directions; if it actually decreases by 1000var, it indicates that the current is connected in the reverse direction. Q5. After determining the current direction, repeat the above steps to adjust the voltage phase sequence and current direction of phase B; Q6. After adjusting phase B, repeat the above steps for phase C, measure the current direction, and confirm that the phase sequence is correct to complete the judgment.

[0032] The following is a case study on voltage phase sequence adjustment.

[0033]

[0034] The meter's default voltage phase sequence is ABC. First, the inverter disturbs the reactive power of phase A by a default 1000var. However, the actual change in reactive power of phase A is only half the disturbed value (500var), indicating an incorrect phase sequence. At this point, the voltage phase sequence is switched to BAC. The reactive power of phase A is then disturbed again to meet the requirements. Simultaneously, the current direction is determined by whether the reactive power increases or decreases by 1000var before and after the disturbance; an increase of 1000var indicates a positive current (CT).

[0035]

[0036] The default reactive power perturbation value for phase B is 1000var. If the actual reactive power change in phase B is only half the perturbation value (500var), it indicates a phase sequence error. In this case, the voltage phase sequence should be switched to BCA. Re-perturb the reactive power of phase B to meet the requirements. Simultaneously, determine the current direction based on whether the reactive power increases or decreases by 1000var before and after the perturbation; an increase of 1000var indicates a positive current (CT).

[0037]

[0038] The default reactive power per unit of disturbance (C-phase) is 1000 var. An actual change of 1000 var in the reactive power of C-phase indicates that the phase sequence judgment is correct and the process is complete. The corresponding flowchart is as follows: Figure 4 As shown.

[0039] After completion, the voltage phase sequence determination process is run again for self-testing.

[0040] In the above process, the square wave signal sampling method of the smart meter is as follows: Z1. To reduce the impact of sampling bias on the detection results, this invention performs reference value removal processing on the candidate signal. By calculating the average value of the sampling sequence and subtracting this average value from each sampling point, the signal after eliminating the reference bias is obtained.

[0041] The processed signal no longer contains the reference value, but retains only the periodic characteristics and polarity change information in the square wave process, which is beneficial to improving the stability of subsequent correlation matching.

[0042] Z2. Since the starting phase of the square wave signal cannot be predetermined during actual sampling, a multi-phase reference template generation mechanism is adopted to match square wave signals under different phase states. A standard square wave reference sequence with a period of T is constructed based on the preset square wave period length. For any sampling point i and the phase p to be searched...

[0043] And generate a reference template based on the position of this point in the period:

[0044] By changing the phase parameter p, multiple square wave reference templates with different starting positions covering the entire period can be generated. This method does not require pre-synchronization of the input signal phase and can automatically find the period position that best matches the input signal, improving its adaptability to asynchronously sampled signals.

[0045] Z3. After the reference template is generated, the sampled signal after removing the reference value is processed. Nonlinear symbol enhancement processing is performed. This processing uses the following mapping relationship:

[0046] in, To adjust parameters Z4. Through this nonlinear transformation, the input amplitude can be compressed to a finite range while maintaining the positive and negative polarity of the signal. When the input signal amplitude is large, the output gradually approaches the positive and negative unit values, thus highlighting the sign change characteristics between the high and low levels of the square wave; when the input signal amplitude is small, the output approaches zero, effectively reducing the impact of low-amplitude noise on the matching result. Therefore, this processing method has better continuity and anti-interference ability compared to the traditional binarization judgment method. To further improve the contribution of the effective signal region in the matching process, this method generates dynamic weighting coefficients based on the sampled amplitude:

[0047] in, To prevent tiny constants with zero weight.

[0048] This weighting can automatically adjust the importance of different sampling points based on the signal amplitude. For the effective region of a square wave, the corresponding weight is higher due to the larger amplitude, and it contributes more to the correlation calculation; for the random noise region, the corresponding weight is smaller due to the lower amplitude, thereby reducing the impact of noise on the final judgment result.

[0049] Z5. After completing signal enhancement and weight calculation, perform weighted correlation calculation on the enhanced signal, dynamic weights, and square wave reference templates under different phases. The correlation score calculation formula is as follows:

[0050] in, This indicates the degree of matching between the input signal and the reference square wave template at phase p.

[0051] When the input signal and the reference template have the same period, polarity, and correct phase relationship, the product of the enhanced signal and the reference template is positive, and the accumulated correlation value continuously increases. When the input signal and the reference template do not match, the sign of the product changes randomly, and the accumulated value decreases. Therefore, the correlation score can effectively reflect the consistency between the input signal and the target square wave structure. For all possible phase positions, the corresponding correlation score is calculated, and the maximum correlation result is searched.

[0052] The phase position corresponding to the maximum correlation value is the optimal matching phase of the current input signal. When the maximum correlation score meets the set conditions, the input signal is determined to be the target square wave signal.

[0053] Using the above method to determine reactive power, only one phase... If the value is greater than the set threshold of 0.8, the judgment is successful; if there are 1 or more phases or 0 phases... If the current exceeds the set threshold, the judgment fails, and the three-phase current is then checked to see if the periodic change exists. If the judgment fails to be made, two cycles are resampled until a judgment is successful, and the next phase judgment is initiated. Before proceeding to the next phase judgment, the reactive power periodic disturbance of the current phase is terminated.

[0054] This method achieves rapid extraction of square wave periodic transition features through half-cycle delay differential, solves the sampling asynchrony problem through multi-phase template search, preserves signal polarity while reducing noise impact through nonlinear symbol enhancement, and increases the contribution of the effective signal region by combining amplitude adaptive weighting. Finally, it completes square wave identification using weighted correlation matching. Compared with traditional fixed threshold detection methods, this method does not rely on a single amplitude judgment, but comprehensively utilizes periodic structure, phase relationship, polarity features, and amplitude information for joint decision-making, thus exhibiting stronger anti-interference ability and environmental adaptability. Without reactive power disturbances, the current waveform lacks effective dynamic characteristics, the reactive power remains constant, and the waveform is essentially a straight line. Phase sequence and current direction can only be determined by static sampling, making it susceptible to grid interference and resulting in a high misjudgment rate. However, due to… Figure 6 and Figure 7 As can be seen, after introducing active reactive power disturbance of the inverter, the current waveform of the present invention exhibits stable square wave characteristics, which can be used for current phase sequence identification. At the same time, the regular change of reactive power can reflect the voltage phase sequence and current direction, realizing dual feature verification, greatly improving detection accuracy and anti-interference ability, and solving the technical defects of unstable phase sequence identification in the prior art.

[0055] In the above process, the voltage and current phase sequence and current direction control of the smart meter can be controlled through sampling channel interchange and reverse configuration register. Taking the Juquan HT762X chip as an example, refer to... Figure 8 Register bit definition table and Figure 9 The detailed function description table of the registers shows that the current reversal function can be realized by modifying the IxRev register; the voltage and current phase sequence can be switched by modifying IxSel / UxSel. For example, IxSel=0x3E(11 1110) indicates that the current phase sequence is set to CAB.

[0056] Working Principle: This invention is mainly applied to grid-connected photovoltaic power grid scenarios. Before phase sequence judgment, the voltage and current phase sequences of the meter are restored to ABC and the current direction is restored to positive. Then, the inverter applies periodic reactive power disturbances to two of the three phases ABC in sequence to generate a reactive power square wave signal with fixed periodic characteristics. After the smart meter samples the three-phase reactive power data, it accurately identifies the phase sequence with corresponding periodic disturbance characteristics through a process of reference removal processing, multi-phase reference template generation, nonlinear symbol enhancement, dynamic weight calculation, and weighted correlation matching scoring. After determining the correspondence between two phases in sequence, the actual phase sequence of the third phase can be obtained, thus completing the judgment and correction of the current phase sequence. After the current phase sequence is determined, the inverter outputs a fixed reactive power value to each phase. The smart meter calculates the reactive power change of the corresponding phase to determine if the voltage phase sequence matches. If they do not match, the voltage phase sequence parameters are automatically switched until they match. After confirming the voltage phase sequence, the direction of increase or decrease of reactive power output by the inverter is changed, and the direction of change of the smart meter's measurement value is compared to determine if the current direction is correct. If it is reversed, the correction direction is directly switched through parameter switching. After the voltage phase sequence and current direction identification and correction of all phases are completed in sequence, the entire phase sequence adjustment process is completed. No physical wiring changes or power outages are required, and the meter and inverter system can be restored to normal operation. No professional testing knowledge is required for photovoltaic grid connection personnel, making it suitable for residential photovoltaic DIY scenarios.

[0057] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for automatically adjusting the voltage and current sampling phase sequence of an electricity meter, comprising an inverter and a smart meter, characterized in that: The steps of the constant current phase sequence method are as follows: S1. Divide the current phase sequence into three phases A, B, and C. Before determining the phase sequence, the smart meter restores the voltage phase sequence and current phase sequence to the default ABC sorting and restores the current direction to positive. S2. By using the inverter to periodically disturb the reactive power value of the power grid at the customer's site in one of the three phases ABC, a square wave of reactive power is generated. S3. Once the inverter controls the disturbance of this phase, the smart meter samples the reactive power square wave signal and reads the reactive power and current data of the three phases A, B, and C in the two control cycles respectively. S4. The smart meter detects the disturbance phase of the inverter sequentially according to the default phase sequence state, and determines which phase of the three-phase reactive power has the same periodic change as the inverter. S5. After a successful judgment, the inverter stops disturbing that phase and instead controls another phase to periodically disturb it, and then proceeds to judge the next phase. S6. Sequentially determine the correspondence between the periodic disturbances of the two actual phase sequences and the default phase sequence, and automatically derive the correspondence of the third phase; S7. After completing the three-phase judgment, repeat the above steps for the last phase to confirm that the current phase sequence judgment is correct. The smart meter will write the obtained current phase sequence into the current configuration parameters to realize the current phase sequence correction. The steps of the method for determining the voltage phase sequence and current direction are as follows: Q1. After determining the current phase sequence, control the inverter to disturb one phase and output a fixed reactive power value; Q2. Calculate the change in reactive power measured by the smart meter in this phase before and after inverter control, and determine whether the change in reactive power is the same as or half of the output reactive power value of the inverter. Q3. When it is determined that the change in the phase is only half of the reactive power output of the inverter, it is determined that the phase sequence is different from the actual phase sequence. The inverter is restored to not output reactive power, the smart meter switches the meter voltage phase sequence, and then the inverter output is controlled to determine that the meter reading matches the inverter output until the judgment is successful. Q4. When it is determined that the change in the phase is equal to the reactive power output of the inverter, it is confirmed that the phase is the same as the actual phase sequence. After the phase voltage phase sequence is successfully determined, the current direction is determined by increasing or decreasing the reactive power value. Q5. After the inverter outputs a set value of reactive power, the smart meter should increase the value by the same amount when measuring the reactive power of that phase. If the value of that phase actually increases, it means that the current is connected in the correct forward and reverse direction. If the value of that phase actually decreases, it means that the current is connected in the wrong forward and reverse direction. Q6. After determining the current direction, repeat the above steps to proceed to the voltage phase sequence and current direction adjustment of the next phase; Q7. After adjusting the next phase, repeat the above steps for the last phase. Once the phase sequence is confirmed to be correct, the judgment is complete.

2. The method for automatically adjusting the voltage and current sampling phase sequence of an electricity meter according to claim 1, characterized in that: The square wave signal sampling method is as follows: Z1. Perform reference value removal processing on the candidate signal by calculating the average value of the sampling sequence and subtracting the average value from each sampling point to obtain the signal after eliminating the reference offset; Z2. A multi-phase reference template generation mechanism is adopted to match square wave signals under different phase states; Z3. After the reference template is generated, the sampled signal after removing the reference value is subjected to nonlinear symbol enhancement processing; Z4. Through the nonlinear transformation in the previous step, the input amplitude can be compressed to a limited range while maintaining the positive and negative polarity of the signal. On this basis, in order to further improve the contribution of the effective signal region in the matching process, dynamic weighting coefficients can be generated based on the sampling amplitude. Z5. After completing signal enhancement and weight calculation, perform weighted correlation calculation and scoring on the enhanced signal, dynamic weights, and square wave reference templates under different phases; Z6. For all possible phase positions, calculate the corresponding correlation score and search for the maximum correlation result; Z7. When the maximum correlation score meets the set conditions, the input signal is determined to be the target square wave signal.

3. The method for automatically adjusting the voltage and current sampling phase sequence of an electricity meter according to claim 2, characterized in that: In step Z1, let the sampled signal after removing the reference value be Y(i), any sampling point i, and the phase p to be searched, then the formula for removing the reference value is: The processed signal no longer contains the reference value, but retains only the periodic characteristics and polarity change information during the square wave's change process.

4. The method for automatically adjusting the voltage and current sampling phase sequence of an electricity meter according to claim 3, characterized in that: In step Z2, the multi-phase reference template generation mechanism is as follows: based on the preset square wave period length, a standard square wave reference sequence with period T is constructed, and k corresponding points are generated for any sampling point i and the phase p to be searched. And generate a reference template based on the position of this point in the period: By changing the phase parameter p, multiple square wave reference templates covering different starting positions within the entire period can be generated.

5. The method for automatically adjusting the voltage and current sampling phase sequence of an electricity meter according to claim 4, characterized in that: In step Z3, the nonlinear sign enhancement processing of Y(i) adopts the following mapping relationship: in, To adjust the parameters.

6. The method for automatically adjusting the voltage and current sampling phase sequence of an electricity meter according to claim 5, characterized in that: In step Z4, let the dynamic weighting coefficient be... The formula for generating the formula is: in, To prevent tiny constants with zero weight.

7. The method for automatically adjusting the voltage and current sampling phase sequence of an electricity meter according to claim 6, characterized in that: In step Z5, the relevant scoring calculation formula is as follows: in, This indicates the degree of matching between the input signal and the reference square wave template at phase p.

8. The method for automatically adjusting the voltage and current sampling phase sequence of an electricity meter according to claim 7, characterized in that: The maximum correlation result in step Z6: If the scoremax of one or more phases or zero phases exceeds the set threshold, the judgment fails, and the periodic change is then determined from the three-phase current.