Three-phase alternating current phase angle measuring device and method
By combining the main control chip and the metering chip, and utilizing fundamental zero-crossing interrupt and linear interpolation techniques, synchronous measurement of the three-phase voltage phase angle was achieved. This solved the problem of underutilization of the built-in module of the main control chip, reduced costs, improved measurement accuracy, and avoided harmonic interference.
Patent Information
- Application Number
- CN202511029623.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-14
AI Technical Summary
When existing three-phase metering chips synchronously measure the phase angle of three-phase voltage, the built-in metering module of the main control chip is not fully utilized, resulting in limited room for cost optimization. Furthermore, the different architecture of external single-phase metering chips makes it difficult to achieve synchronous measurement.
The system employs a combination of a main control chip and two metering chips. The main control chip acquires the A phase angle through the fundamental zero-crossing interrupt function and linear interpolation, and sends phase measurement commands via the UART bus. The metering chips acquire the B phase angle and the C phase angle respectively, thereby achieving synchronous measurement of the three-phase voltage phase angles.
It reduces costs, eliminates the need for single-phase chips and related peripheral circuits, improves phase measurement accuracy, and avoids harmonic interference, resulting in significant cost advantages and high precision.
Smart Images

Figure CN120948878A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of phase angle measurement technology, and more specifically, to a three-phase alternating current phase angle measurement device and method. Background Technology
[0002] In existing phase angle measurements, three single-phase metering chips collect data from each phase, which is then centrally processed by the main control chip. However, the built-in metering module of the main control chip is not fully utilized, and there is still room for cost optimization. If the built-in metering module of the main control chip is fully utilized, it is difficult to achieve synchronous measurement of the three-phase voltage phase angle due to the different architecture of external single-phase metering chips. Summary of the Invention
[0003] To address the aforementioned issues, this application provides a three-phase AC phase angle measuring device and method.
[0004] In a first aspect, this application provides a three-phase AC phase angle measuring device, including a main control chip and two metering chips respectively connected to a three-phase sampling circuit. The main control chip is used to acquire phase angle A based on the fundamental zero-crossing interrupt function and linear interpolation, and when phase angle A is acquired, it sends phase measurement commands to the two metering chips respectively. When the two metering chips receive the phase measurement commands, they acquire phase angle B and phase angle C respectively.
[0005] Preferably, the main control chip is an RN8217 chip, and the metering chip is an RN8207C chip.
[0006] Preferably, the main control chip includes a first time acquisition module, a first calculation module, and a first metering module with a fundamental zero-crossing interrupt function; the first time acquisition module is used to acquire the zero-crossing time corresponding to the first zero-crossing point, acquire the first sampling time of a first preset duration before the zero-crossing time, acquire the second sampling time of a second preset duration after the zero-crossing time, and acquire the current sampling time; the first metering module is used to sample at the first sampling time to acquire a first sampling value and to sample at the second sampling time to acquire a second sampling value; the first calculation module is used to calculate the A-phase angle corresponding to the current time based on the first sampling value, the second sampling value, the first sampling time, the second sampling time, and the current sampling time.
[0007] Preferably, the first calculation module calculates the A-phase angle corresponding to the current time based on the first sampled value, the second sampled value, the first sampling time, the second sampling time, and the current time, specifically including: calculating the first difference between the second sampling time and the first sampling time; multiplying the first difference with the second sampled value to obtain a first calculated value; calculating the second difference between the second sampled value and the first sampled value; dividing the first product value by the second difference to obtain a second calculated value; subtracting the current time from the second sampling time and adding it to the second calculated value to obtain a third calculated value; and multiplying the third calculated value sequentially by the first frequency constant and 360 degrees to obtain the A-phase angle.
[0008] Preferably, the system further includes a second time acquisition module, a second calculation module, and a storage module. The second time acquisition module is used to acquire the first reference time corresponding to the phase measurement command received by the metering chip and to acquire the first measurement time corresponding to the phase angle B or phase angle C acquired by the metering chip. The second calculation module is used to calculate the first time difference between the first measurement time and the first reference time. The storage module is used to store the first time difference.
[0009] Preferably, the main control chip sends phase measurement commands to the two metering chips respectively via the UART bus.
[0010] Preferably, it also includes two SPI / UART buses corresponding to the two metering chips and two isolators corresponding to the two SPI / UART buses. The metering chips communicate with the main control chip through the SPI / UART buses and the isolators in sequence.
[0011] Secondly, embodiments of this application provide a method for measuring the phase angle of a three-phase alternating current, comprising the following steps:
[0012] S1: The main control chip acquires the A-phase angle based on the fundamental zero-crossing interrupt function and linear interpolation.
[0013] S2: The main control chip sends phase measurement commands to the two metering chips respectively;
[0014] S3: Two metering chips respectively collect phase angle B and phase angle C.
[0015] Preferably, the main control chip includes a first time acquisition module, a first calculation module, and a first metering module with fundamental frequency zero-crossing interrupt function;
[0016] Step S1 specifically includes:
[0017] S11: The first time acquisition module acquires the zero-crossing time corresponding to the first zero-crossing point, acquires the first sampling time of the first preset duration before the zero-crossing time, and acquires the second sampling time of the second preset duration after the zero-crossing time.
[0018] S12: The first metering module performs sampling at the first sampling time to obtain a first sampled value and at the second sampling time to obtain a second sampled value;
[0019] S13: The first-time acquisition module obtains the current sampling time;
[0020] S14: The first calculation module calculates and obtains the A phase angle corresponding to the current time based on the first sampled value, the second sampled value, the first sampling time, the second sampling time, and the current sampling time.
[0021] Preferably, step S14 specifically includes:
[0022] S141: Calculate the first difference between the second sampling time and the first sampling time;
[0023] S142: Multiply the first difference by the second sampled value to obtain the first calculated value;
[0024] S143: Calculate the second difference between the second sampled value and the first sampled value;
[0025] S144: Divide the first product value by the second difference to obtain the second calculated value;
[0026] S145: Subtract the current time from the second sampling time and add the second calculated value to obtain the third calculated value; S146: Multiply the third calculated value by the first frequency constant and 360 degrees in sequence to obtain the A phase angle.
[0027] The beneficial effects of this invention are as follows: the main control chip has a fundamental zero-crossing function, and the main control chip acquires the A phase angle based on the fundamental zero-crossing interrupt function and linear interpolation. The A phase angle has high accuracy and can effectively avoid harmonic interference. The two metering chips acquire the B phase angle and C phase angle respectively. This application reduces one single-phase chip and related peripheral circuits, resulting in a lower price and obvious cost advantage. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 A structural block diagram of a three-phase AC phase angle measuring device provided in this application embodiment;
[0030] Figure 2 A schematic flowchart illustrating a three-phase alternating current phase angle measurement method provided in this application embodiment;
[0031] Figure 3 A topology diagram of a three-phase AC phase angle measuring device provided in an embodiment of this application;
[0032] Figure 4 This is a schematic diagram of the coordinates corresponding to the acquisition of the first and second sample values in a three-phase AC phase angle measuring device provided in this application embodiment;
[0033] Figure 5 This is a block diagram illustrating the principle of measuring phase angles A, B, and C in a three-phase AC phase angle measuring device provided in an embodiment of this application. Detailed Implementation
[0034] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0035] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The following description provides multiple embodiments of this application, which can be substituted or combined with each other. Therefore, this application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then this application should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.
[0036] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this application. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
[0037] Please see Figure 1 , 3 . Figure 1 This is a structural block diagram of a three-phase AC phase angle measuring device provided in an embodiment of this application. Figure 3This is a topology diagram of a three-phase AC phase angle measuring device provided in an embodiment of this application. In this embodiment, the device includes a main control chip 201 and two metering chips 202 respectively connected to the three-phase sampling circuit. The main control chip 201 is used to acquire phase angle A based on the fundamental zero-crossing interrupt function and linear interpolation, and sends phase measurement commands to the two metering chips 202 respectively when phase angle A is acquired. When the two metering chips 202 receive the phase measurement commands, they acquire phase angle B and phase angle C respectively.
[0038] In this embodiment, two metering chips 202 collect phase angles B and C, and the main control chip 201 collects phase angle A. This fully utilizes the built-in peripheral resources of the main control chip 201, solves the problem of synchronous measurement of voltage phase angle in heterogeneous schemes, and avoids the loss of cost advantage by using hardware circuits.
[0039] In one possible implementation, the main control chip 201 is an RN8217 chip, and the metering chip 202 is an RN8207C chip.
[0040] In this embodiment, the main control chip 201 can be a single MCU, and the metering chip 202 can be a single-phase chip.
[0041] In this embodiment, the RN8217 is a single-phase SOC chip launched by Shenzhen Ruineng Microelectronics Technology Co., Ltd., belonging to Ruineng Microelectronics' RN821x series. This chip is specifically designed for single-phase smart meters and electricity meters, featuring high integration, high precision, and low power consumption. It integrates an ARM Cortex-M0 core, a metering and measurement unit, an LCD controller, a hardware temperature-compensated RTC, and an EEPROM module. Key features: High integration: Utilizes a 32-bit ARM Cortex-M0 core, integrating metering functions with peripheral modules, simplifying design complexity. Reliability: Compliant with RoHS standards, certified by the EU RoHS directive, and free of harmful substances such as lead (Pb) and cadmium (Cd). Packaging: Uses an LQFP-100 package, suitable for high-density circuit layout requirements. This chip is widely used in the smart meter field, providing a highly integrated solution to reduce system costs and improve production efficiency. The RN8217 chip is a metering SOC chip launched by Raytron Technology Co., Ltd. It is designed for single-phase smart meters and electricity meters. It integrates ARM Cortex-M0 core, metering and measurement unit, LCD driver and other components, and is mainly used for single-phase signal power metering and data acquisition.
[0042] In this embodiment, the RN8207C is a single-phase, multi-functional, tamper-proof measurement chip from Ruineng Microelectronics, primarily used for high-precision active energy measurement and supporting the IEC62053 standard. Key features: Metering function: Supports measurement of active power, reactive power, active energy, and reactive energy, providing measurements of parameters such as RMS current, RMS voltage, and line frequency. Dynamic range: Active energy error is less than 0.1% within an 8000:1 dynamic range, and reactive energy error is also less than 0.1%. Interface: Built-in UART interface (fixed baud rate 4800), supporting serial communication. Package: SOP-16 package, operating voltage 3V~5.5V, typical power consumption 15mW (5V power supply). This chip is suitable for the design of energy metering equipment and supports anti-theft schemes and software calibration functions.
[0043] In one possible implementation, the main control chip 201 includes a first time acquisition module, a first calculation module, and a first metering module with a fundamental zero-crossing interrupt function; the first time acquisition module is used to acquire the zero-crossing time corresponding to the first zero-crossing point, acquire the first sampling time of a first preset duration before the zero-crossing time, acquire the second sampling time of a second preset duration after the zero-crossing time, and acquire the current sampling time; the first metering module is used to sample at the first sampling time to acquire a first sampling value and to sample at the second sampling time to acquire a second sampling value; the first calculation module is used to calculate the A-phase angle corresponding to the current time based on the first sampling value, the second sampling value, the first sampling time, the second sampling time, and the current sampling time.
[0044] In this embodiment, the RN8217 chip has a fundamental zero-crossing interrupt function. Based on the fundamental zero-crossing interrupt of the RN8217 chip and the instantaneous fundamental waveform sampling value of the fundamental voltage channel, high-precision phase measurement of phase A is achieved through a linear interpolation algorithm. The first metering module, with its fundamental zero-crossing interrupt function, reduces the amount of data processing. The zero-crossing interrupt occurs at the point where the voltage sign changes from negative to positive, and the program only needs to process a few nearby data points. The first metering module obtains the instantaneous fundamental waveform sampling value by reading the chip register, i.e., obtaining the first and second sampling values. Sampling at 7.2kbps, the sampling point may not necessarily be exactly at the first zero-crossing point, and the slope change near the first zero-crossing point is small, making direct linear interpolation error completely acceptable. Theoretically, without interpolation, 7200 / 50 = 144 points constitute one cycle, with a theoretical maximum error of 2.5°. Phase measurement of phases BC is synchronously started by sending a broadcast command via the UART bus, while simultaneously recording the phase angle of phase A at the time of broadcast transmission. The phases BC are obtained according to the manufacturer's provided scheme. See also... Figure 5Due to communication and measurement delays, there is a fixed delay between the phase angle of phase BC and the phase angle of phase A during broadcast transmission, which can be measured using a standard test bench. The standard test bench is a three-phase energy meter testing device that can provide accurate voltage and current phase outputs under various conditions. In practice, the same voltage can be connected for testing, and the test bench can be used to verify whether various conditions meet preset values. The standard test bench can be set with a voltage angle, for example, 120 degrees, while the chip measures an angle of 150 degrees, resulting in a delay of 30 degrees.
[0045] In one possible implementation, the first calculation module calculates the A-phase angle corresponding to the current time based on the first sampled value, the second sampled value, the first sampling time, the second sampling time, and the current time, specifically including: calculating a first difference between the second sampling time and the first sampling time; multiplying the first difference by the second sampled value to obtain a first calculated value; calculating a second difference between the second sampled value and the first sampled value; dividing the first product by the second difference to obtain a second calculated value; subtracting the current time from the second sampling time and adding it to the second calculated value to obtain a third calculated value; and multiplying the third calculated value sequentially by a first frequency constant and 360 degrees to obtain the A-phase angle.
[0046] In this embodiment, phase angle measurement A: The RN8217 chip provides a fundamental zero-crossing interrupt function. Combining the fundamental waveform sample values before and after the zero-crossing interrupt, linear interpolation is performed to compensate for the phase, improving accuracy. Combined with a timer, the phase angle at any given time can be obtained. The first measurement module, based on the first sample value, the second sample value, the first sampling time, the second sampling time, and the current time, uses the formula... Calculate the phase angle A corresponding to the current time, where t represents the current time, T1 represents the first sampling time, T2 represents the second sampling time, ZX_U1 represents the first sampled value, ZX_U2 represents the second sampled value, and Freq represents the first frequency constant, which can be 50Hz; calculate the first difference using the formula T2-T1; and use the formula... Calculate and obtain the first calculated value; calculate and obtain the second difference using the formula ZX_U2-ZX_U1; use the formula... Calculate and obtain the second calculated value; through the formula Calculate and obtain the third calculated value. See also Figure 4 T1 and T2 are two moments before and after the first zero crossing, respectively. The first sample value ZX_U1 and the second sample value ZX_U2 corresponding to moments T1 and T2 are measured by the RN8217 chip. Then, according to the formula... The phase angle A at any given time can be calculated, and linear interpolation has already been performed in this formula.
[0047] In the embodiments of this application, since the fundamental wave signal is used in the measurement of phase angle A, which is close to an ideal sine wave, the theoretical error approaches 0, which can greatly reduce the influence of higher harmonics on the data near the zero crossing point.
[0048] In one possible implementation, the system further includes a second time acquisition module, a second calculation module, and a storage module. The second time acquisition module is used to acquire the first reference time corresponding to the phase measurement command received by the metering chip 202 and to acquire the first measurement time corresponding to the phase angle B or phase angle C acquired by the metering chip 202. The second calculation module is used to calculate the first time difference between the first measurement time and the first reference time. The storage module is used to store the first time difference.
[0049] In one possible implementation, the main control chip 201 sends phase measurement commands to the two metering chips 202 via the UART bus.
[0050] In this embodiment, when the main control chip 201 needs to measure the phase, it broadcasts a zero-crossing measurement command to two metering chips 202 via the UART bus. Zero-crossing measurement is phase measurement. Upon receiving the command, both metering chips 202 simultaneously start the measurement. The metering chip 202 uses the moment it receives the measurement command as a time reference and measures the time difference between the voltage zero-crossing and this time reference. This time difference is stored in the ZXCNT (0x34H) register. The voltage zero-crossing is the phase angle B or C acquired by the metering chip 202. The storage module can be the ZXCNT (0x34H) register. The time of the voltage zero-crossing is obtained by reading the chip register. After obtaining the time difference between the voltage zero-crossing and the time reference, the corresponding phase angle is calculated. The software can determine the three-phase voltage phase sequence based on the phase angle A at the time of broadcast, combined with the phase angles B and C measured by the two metering chips 202.
[0051] In one possible implementation, it further includes two SPI / UART buses corresponding to the two metering chips 202 and two isolators corresponding to the two SPI / UART buses. The metering chips 202 communicate with the main control chip 201 through the SPI / UART buses and the isolators in sequence.
[0052] In this embodiment, phase angles B and C are measured by two RN8207C chips, which communicate with the RN8217 chip via an isolator after passing through the SPI / UART bus. Phase angle A is measured by the first measurement module built into the RN8217 chip.
[0053] In this embodiment, the main control chip 201 must support fundamental signal zero-crossing interrupt and waveform sampling functions to avoid data processing overhead caused by software bandpass digital filters. The metering chip 202 communication must ensure consistent timing between the transmission of broadcast communication commands and receipt of commands by the single-phase chip, and stable start-up phase measurement time. Waveform sampling: Instantaneous waveform sampling data from the voltage channel can be read and saved using DMA to avoid affecting meter readings; the fundamental signal is used to process the sampling signal, avoiding harmonic interference and improving interpolation compensation accuracy; accurate BC phase delay: This requires actual testing to select an accurate phase delay, which is then directly fixed within the program.
[0054] In the embodiments of this application, this application has the following effects: 1. Lower cost: This application reduces one single-phase chip and related peripheral circuits, resulting in a lower price and obvious cost advantage; 2. Higher phase measurement accuracy: In this application, the measurement of the phase angle of phase A is based on the fundamental wave zero-crossing interrupt function. Combined with the fundamental wave waveform sampling values before and after the zero-crossing interrupt, the accuracy is higher after phase compensation, and harmonic interference is avoided in energy efficiency.
[0055] The following will be combined with the appendix Figure 2 This application provides a detailed description of a signal sampling and detection method for a current transformer 1 according to an embodiment. It should be noted that... Figure 2 The diagram shows a flowchart of a signal sampling and detection method for a current transformer 1.
[0056] like Figure 2 As shown, the method includes the following steps:
[0057] S1: The main control chip acquires the A-phase angle based on the fundamental zero-crossing interrupt function and linear interpolation.
[0058] S2: The main control chip sends phase measurement commands to the two metering chips respectively;
[0059] S3: Two metering chips respectively collect phase angle B and phase angle C.
[0060] In this embodiment, the main control chip and two metering chips are respectively connected to the three-phase sampling circuit. The two metering chips collect phase angles B and C, and the main control chip collects phase angle A. This can make full use of the built-in peripheral resources of the main control chip, solve the problem of synchronous measurement of voltage phase angle in heterogeneous schemes, and avoid losing cost advantage by using hardware circuits.
[0061] In one possible implementation, the main control chip includes a first time acquisition module, a first calculation module, and a first metering module with a fundamental frequency zero-crossing interrupt function;
[0062] Step S1 specifically includes:
[0063] S11: The first time acquisition module acquires the zero-crossing time corresponding to the first zero-crossing point, acquires the first sampling time of the first preset duration before the zero-crossing time, and acquires the second sampling time of the second preset duration after the zero-crossing time.
[0064] S12: The first metering module performs sampling at the first sampling time to obtain a first sampled value and at the second sampling time to obtain a second sampled value;
[0065] S13: The first-time acquisition module obtains the current sampling time;
[0066] S14: The first calculation module calculates and obtains the A phase angle corresponding to the current time based on the first sampled value, the second sampled value, the first sampling time, the second sampling time, and the current sampling time.
[0067] In this embodiment, the RN8217 chip has a fundamental zero-crossing interrupt function. Based on the fundamental zero-crossing interrupt of the RN8217 chip and the instantaneous fundamental waveform sampling value of the fundamental voltage channel, high-precision phase measurement of phase A is achieved through a linear interpolation algorithm. The first metering module, with its fundamental zero-crossing interrupt function, reduces the amount of data processing. The zero-crossing interrupt occurs at the point where the voltage sign changes from negative to positive, and the program only needs to process a few nearby data points. The first metering module obtains the instantaneous fundamental waveform sampling value by reading the chip register, i.e., obtaining the first and second sampling values. Sampling at 7.2kbps, the sampling point may not necessarily be exactly at the first zero-crossing point, and the slope change near the first zero-crossing point is small, making direct linear interpolation error completely acceptable. Theoretically, without interpolation, 7200 / 50 = 144 points constitute one cycle, with a theoretical maximum error of 2.5°. Phase measurement of phases BC is synchronously started by sending a broadcast command via the UART bus, while simultaneously recording the phase angle of phase A at the time of broadcast transmission. The phases BC are obtained according to the manufacturer's provided scheme. See also... Figure 5 Due to communication and measurement delays, there is a fixed delay between the phase angle of phase BC and the phase angle of phase A during broadcast transmission, which can be measured using a standard test bench. The standard test bench is a three-phase energy meter testing device that can provide accurate voltage and current phase outputs under various conditions. In practice, it can be connected to the same voltage side, and the test bench can be used to verify whether various conditions are correct. The standard test bench can be set with a voltage angle, for example, 120 degrees. If the chip measures an angle of 150 degrees, then the delay is 30 degrees.
[0068] In one possible implementation, step S14 specifically includes:
[0069] S141: Calculate the first difference between the second sampling time and the first sampling time;
[0070] S142: Multiply the first difference by the second sampled value to obtain the first calculated value;
[0071] S143: Calculate the second difference between the second sampled value and the first sampled value;
[0072] S144: Divide the first product value by the second difference to obtain the second calculated value;
[0073] S145: Subtract the current time from the second sampling time and add the second calculated value to obtain the third calculated value; S146: Multiply the third calculated value by the first frequency constant and 360 degrees in sequence to obtain the A phase angle.
[0074] In this embodiment, specifically in this application embodiment, phase angle measurement A: The RN8217 chip provides a fundamental wave zero-crossing interrupt function. Combining the fundamental wave waveform sampling values before and after the zero-crossing interrupt, linear interpolation is performed to compensate for the phase, improving accuracy. Combined with a timer, the phase angle at any given time can be obtained. The first measurement module, based on the first sampled value, the second sampled value, the first sampling time, the second sampling time, and the current time, uses the formula... Calculate the phase angle A corresponding to the current time, where t represents the current time, T1 represents the first sampling time, T2 represents the second sampling time, ZX_U1 represents the first sampled value, ZX_U2 represents the second sampled value, and Freq represents the first frequency constant, which can be 50Hz; calculate the first difference using the formula T2-T1; and use the formula... Calculate and obtain the first calculated value; calculate and obtain the second difference using the formula ZX_U2-ZX_U1; use the formula... Calculate and obtain the second calculated value; through the formula Calculate and obtain the third calculated value. See also Figure 4 T1 and T2 are two moments before and after the first zero crossing, respectively. The first sample value ZX_U1 and the second sample value ZX_U2 corresponding to moments T1 and T2 are measured by the RN8217 chip. Then, according to the formula... The phase angle A at any given time can be calculated, and linear interpolation has already been performed in this formula.
[0075] In this embodiment of the application, a second time acquisition module, a second calculation module, and a storage module are also included. Step S3 further includes: the second time acquisition module acquires the first reference time corresponding to the phase measurement command when the metering chip receives the phase measurement command and acquires the first measurement time corresponding to the phase angle B or phase angle C when the metering chip acquires the phase angle B; the second calculation module calculates the first time difference between the first measurement time and the first reference time; and the storage module stores the first time difference.
[0076] In one embodiment of this application, step S2 includes: the main control chip sending phase measurement commands to the two metering chips respectively via the UART bus.
[0077] In this embodiment, when the main control chip needs to measure phase, it broadcasts a zero-crossing measurement command to two metering chips via the UART bus. Zero-crossing measurement is phase measurement. Upon receiving the command, both metering chips simultaneously initiate the measurement. The metering chip uses the moment it receives the measurement command as a time reference and measures the time difference between the voltage zero-crossing and this time reference. This time difference is stored in the ZXCNT (0x34H) register. The voltage zero-crossing is the phase angle B or C acquired by the metering chip. The storage module can be the ZXCNT (0x34H) register. The time of voltage zero-crossing is obtained by reading the chip register. After obtaining the time difference between the voltage zero-crossing and the time reference, the corresponding phase angle is calculated. The software, based on the phase angle A at the time of broadcasting, combined with the phase angles B and C measured by the two metering chips, can determine the three-phase voltage phase sequence. The system also includes two SPI / UART buses corresponding to the two metering chips and two isolators corresponding to the two SPI / UART buses. The metering chips communicate with the main control chip sequentially through the SPI / UART buses and the isolators.
[0078] Those skilled in the art will clearly understand that the technical solutions of the embodiments of this application can be implemented by means of software and / or hardware. In this specification, "unit", "module" and "part" refer to software and / or hardware that can independently complete or cooperate with other components to complete a specific function, wherein the hardware may be, for example, a field-programmable gate array (FPGA), an integrated circuit (IC), etc.
[0079] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0080] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0081] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0082] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0083] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0084] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0085] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0086] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A three-phase alternating current phase angle measuring device, characterized in that: It includes a main control chip and two metering chips connected to the three-phase sampling circuit. The main control chip is used to acquire phase angle A based on the fundamental zero-crossing interrupt function and linear interpolation, and sends phase measurement commands to the two metering chips when phase angle A is acquired. When the two metering chips receive the phase measurement commands, they acquire phase angle B and phase angle C respectively.
2. The three-phase AC phase angle measuring device as described in claim 1, characterized in that: The main control chip is an RN8217 chip, and the metering chip is an RN8207C chip.
3. A three-phase AC phase angle measuring device as described in claim 1 or 2, characterized in that: The main control chip includes a first time acquisition module, a first calculation module, and a first metering module with a fundamental frequency zero-crossing interrupt function; the first time acquisition module is used to acquire the zero-crossing time corresponding to the first zero-crossing point, acquire the first sampling time of a first preset duration before the zero-crossing time, acquire the second sampling time of a second preset duration after the zero-crossing time, and acquire the current sampling time; the first metering module is used to sample at the first sampling time to acquire a first sampling value and to sample at the second sampling time to acquire a second sampling value. The first calculation module is used to calculate and obtain the A phase angle corresponding to the current time based on the first sampled value, the second sampled value, the first sampling time, the second sampling time, and the current sampling time.
4. The three-phase AC phase angle measuring device as described in claim 3, characterized in that: The first calculation module calculates the A-phase angle corresponding to the current time based on the first sampled value, the second sampled value, the first sampling time, the second sampling time, and the current time. Specifically, it includes: calculating the first difference between the second sampling time and the first sampling time; multiplying the first difference with the second sampled value to obtain a first calculated value; calculating the second difference between the second sampled value and the first sampled value; dividing the first product value by the second difference to obtain a second calculated value; subtracting the current time from the second sampling time and adding it to the second calculated value to obtain a third calculated value; and multiplying the third calculated value sequentially by the first frequency constant and 360 degrees to obtain the A-phase angle.
5. A three-phase AC phase angle measuring device as described in claim 1 or 2, characterized in that: It also includes a second time acquisition module, a second calculation module, and a storage module. The second time acquisition module is used to acquire the first reference time corresponding to the phase measurement command when the metering chip receives the command and to acquire the first measurement time corresponding to the phase angle B or phase angle C when the metering chip acquires the measurement time. The second calculation module is used to calculate the first time difference between the first measurement time and the first reference time. The storage module is used to store the first time difference.
6. A three-phase AC phase angle measuring device as claimed in claim 1 or 2, characterized in that: The main control chip sends phase measurement commands to the two metering chips via the UART bus.
7. A three-phase AC phase angle measuring device as described in claim 1 or 2, characterized in that: It also includes two SPI / UART buses corresponding to the two metering chips and two isolators corresponding to the two SPI / UART buses. The metering chips communicate with the main control chip through the SPI / UART buses and isolators in sequence.
8. A measurement method for a three-phase AC phase angle measuring device according to any one of claims 1 to 7, characterized in that, Includes the following steps: S1: The main control chip acquires the A-phase angle based on the fundamental zero-crossing interrupt function and linear interpolation. S2: The main control chip sends phase measurement commands to the two metering chips respectively; S3: Two metering chips collect phase angles B and C respectively.
9. A method for measuring the phase angle of a three-phase alternating current as described in claim 8, characterized in that, The main control chip includes a first time acquisition module, a first calculation module, and a first metering module with fundamental frequency zero-crossing interrupt function; Step S1 specifically includes: S11: The first time acquisition module acquires the zero-crossing time corresponding to the first zero-crossing point, acquires the first sampling time of the first preset duration before the zero-crossing time, and acquires the second sampling time of the second preset duration after the zero-crossing time. S12: The first metering module samples at the first sampling time to obtain a first sampled value and samples at the second sampling time to obtain a second sampled value; S13: The first-time acquisition module obtains the current sampling time; S14: The first calculation module calculates and obtains the A phase angle corresponding to the current time based on the first sampled value, the second sampled value, the first sampling time, the second sampling time, and the current sampling time.
10. A method for measuring the phase angle of a three-phase alternating current as described in claim 9, characterized in that, Step S14 specifically includes: S141: Calculate the first difference between the second sampling time and the first sampling time; S142: Multiply the first difference by the second sampled value to obtain the first calculated value; S143: Calculate the second difference between the second sampled value and the first sampled value; S144: Divide the first product value by the second difference to obtain the second calculated value; S145: Subtract the current time from the second sampling time and add the second calculated value to obtain the third calculated value; S146: Multiply the third calculated value by the first frequency constant and 360 degrees in sequence to obtain the A phase angle.
Citation Information
Cited By
Three-phase electric parameter measuring system and method based on double metering chips
CN121978393A
A three-phase electric parameter measurement system and method based on double metering chips
CN121978393B