Three-phase power grid phase sequence detection method, device, equipment and medium
Through Fourier decomposition and phase difference calculation methods, the problem of time-consuming and intuitional phase sequence detection in the grid-connected inverter in the prior art is solved, and fast and simple phase sequence detection is realized, which is suitable for any system.
Patent Information
- Application Number
- CN202510025222.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-18
AI Technical Summary
The existing grid-connected inverter phase sequence detection methods have problems such as large code volume, long time consuming, not intuitive enough and easy to misjudgment, making it difficult to achieve simple and fast phase sequence detection.
By obtaining the three-phase voltage of the three-phase power grid, Fourier decomposition is performed separately to obtain the real and imaginary parts, calculate the phase angle, and judge the phase sequence of the three-phase power grid by the phase difference between any two phases.
It realizes high adaptability, simple and fast phase sequence detection of grid-connected inverters, reduces judgment time, simple code logic, and avoids code redundancy.
Smart Images

Figure CN119846328A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of phase sequence detection, and in particular to a three-phase power grid phase sequence detection method, electronic equipment and a medium. Background Art
[0002] As a special inverter, the grid-connected inverter is often used in the connection between the DC voltage source and the three-phase power grid, and its output AC power can be directly input into the three-phase power grid. In order to achieve the smooth grid connection of electric energy, the phase sequence of the grid-connected inverter needs to be consistent with the phase sequence of the three-phase power grid. If the phase sequence output by the grid-connected inverter is inconsistent with the phase sequence of the power grid, it will cause a phase-to-phase short circuit at the moment of grid connection, generating a huge short-circuit current. This will not only damage the grid-connected inverter, but may also cause problems such as grid voltage sag and frequency fluctuation, seriously affecting the stability and power supply quality of the power grid, and may even cause partial paralysis of the power grid, affecting the normal power consumption of a large number of users.
[0003] Currently, the phase sequence detection methods for grid-connected inverters include zero-crossing detection method, phase-locked loop detection method and power calculation method. Although the zero-crossing detection method has simple logic and easy code writing, the code volume is large and filtering is required, which is time-consuming overall. The implementation method of the phase-locked loop detection method is simple, but it is only applicable to systems that require phase locking. The power calculation method indirectly reflects the phase sequence based on the positive and negative reactive power by calculating the power of each phase, which is not intuitive and easy to mismeasure.
[0004] Therefore, how to improve the adaptability and realize the phase sequence detection of the grid-connected inverter simply and quickly is an urgent problem to be solved. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a three-phase power grid phase sequence detection method, electronic equipment and medium, which are used to realize grid-connected inverter phase sequence detection with high adaptability, simplicity and rapidity. The specific scheme is as follows:
[0006] In a first aspect, the present application provides a three-phase power grid phase sequence detection method, comprising:
[0007] Respectively obtain three-phase voltages of a three-phase power grid, wherein the three-phase voltages include an A-phase voltage, a B-phase voltage, and a C-phase voltage;
[0008] The A-phase voltage, the B-phase voltage and the C-phase voltage are processed respectively to obtain corresponding A-phase phase angle, B-phase phase angle and C-phase phase angle;
[0009] Determine the phase difference between any two corresponding phase angles of the A phase, the B phase and the C phase;
[0010] The phase sequence of the three-phase power grid is determined according to the phase difference.
[0011] Optionally, the processing and analyzing the A-phase voltage, the B-phase voltage, and the C-phase voltage respectively to obtain the corresponding A-phase phase angle, B-phase phase angle, and C-phase phase angle includes:
[0012] Performing Fourier decomposition on the A-phase voltage, the B-phase voltage and the C-phase voltage to obtain their corresponding real parts and imaginary parts respectively;
[0013] Based on a preset functional relationship, calculating the real part and the imaginary part of any corresponding phase of the three-phase voltage to determine the phase angle of the current phase;
[0014] The A phase angle, the B phase angle and the C phase angle are calculated in sequence.
[0015] Optionally, the calculating, based on a preset functional relationship, the real part and the imaginary part of any corresponding phase of the three-phase voltage to determine the phase angle of the current phase includes:
[0016] Based on the inverse sine function, calculating the real part and the imaginary part of any corresponding phase of the three-phase voltage to determine the phase angle of the current phase;
[0017] or, based on the inverse tangent function, calculating the real part and the imaginary part corresponding to any one of the three-phase voltages to determine the phase angle of the current phase;
[0018] Or, based on the atan2(y, x) function, the real part and the imaginary part of any corresponding pair of the three-phase voltages are calculated to determine the phase angle of the current phase.
[0019] Optionally, the calculating, based on the inverse sine function, the real part and the imaginary part of any corresponding phase of the three-phase voltage to determine the phase angle of the current phase includes:
[0020] Calculate the ratio of any corresponding imaginary part of the three-phase voltage to the effective value of the fundamental voltage; wherein the effective value of the fundamental voltage is the square root of the sum of the squares of the current corresponding real part and imaginary part;
[0021] Determine whether the current corresponding real part is greater than 0;
[0022] If the real part is greater than 0, an inverse sine function of the ratio is determined, and the result is used as the phase angle of the current phase;
[0023] If the real part is less than 0, the difference between π and the arc sine function of the ratio is calculated, and the difference is used as the phase angle of the current phase.
[0024] Optionally, the calculating, based on the inverse tangent function, the real part and the imaginary part of any corresponding phase of the three-phase voltage to determine the phase angle of the current phase includes:
[0025] Calculate the ratio of the imaginary part and the real part corresponding to any one of the three-phase voltages;
[0026] The arc tangent function of the ratio is determined, and the result is used as the phase angle of the current phase.
[0027] Optionally, the calculating the real part and the imaginary part of any corresponding phase of the three-phase voltage based on the atan2(y, x) function to determine the phase angle of the current phase includes:
[0028] Taking any corresponding real part and imaginary part of the three-phase voltage as x and y respectively;
[0029] Calculate the atan2(y, x) function and use the result as the phase angle of the current phase.
[0030] Optionally, determining the phase sequence of the three-phase power grid according to the phase difference includes:
[0031] If the phase difference is 120°±20° or -240°±20°, the three-phase power grid is in positive sequence;
[0032] If the phase difference is -120°±20° or 240°±20°, the three-phase power grid is in negative sequence.
[0033] In a second aspect, the present application provides a three-phase power grid phase sequence detection device, comprising:
[0034] A voltage acquisition module is used to respectively acquire the three-phase voltages of the three-phase power grid, wherein the three-phase voltages include an A-phase voltage, a B-phase voltage, and a C-phase voltage;
[0035] A phase angle acquisition module, used for processing the A-phase voltage, the B-phase voltage and the C-phase voltage respectively to obtain corresponding A-phase phase angle, B-phase phase angle and C-phase phase angle;
[0036] A phase difference calculation module, used to determine the phase difference between any two corresponding phase angles of the A phase, the B phase and the C phase;
[0037] A phase sequence determination module is used to determine the phase sequence of the three-phase power grid according to the phase difference.
[0038] In a third aspect, the present application provides an electronic device, including:
[0039] Memory, used to store computer programs;
[0040] A processor is used to execute the computer program to implement the three-phase power grid phase sequence detection method as described in any one of the above items.
[0041] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the three-phase power grid phase sequence detection method as described in any one of the above items is implemented.
[0042] In this embodiment, after obtaining the three-phase voltage of the three-phase power grid, the phase angle corresponding to each phase voltage is obtained by analyzing the A-phase voltage, the B-phase voltage and the C-phase voltage respectively, including the A-phase phase angle, the B-phase phase angle and the C-phase phase angle, and the phase angle of any two phases is selected to calculate the phase difference, and the phase sequence of the three-phase power grid is determined based on the phase difference. As can be seen from the above, after sampling the three-phase voltage of the three-phase power grid, the present embodiment processes and analyzes each phase voltage respectively, obtains its corresponding phase angle, and then determines the phase sequence of the three-phase power grid by calculating the phase difference of any two phases. It can be applied to any system without considering whether it needs phase locking, and does not need to filter after obtaining the three-phase voltage, which greatly reduces the time for phase sequence judgment. In addition, the code for determining the current phase sequence of the three-phase power grid by calculating the phase angle through the three-phase voltage has simple logic and small code volume, avoiding the problem of excessive redundancy of the overall code. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0044] Figure 1 A flow chart of a three-phase power grid phase sequence detection method provided in this application;
[0045] Figure 2 A flow chart of a specific three-phase power grid phase sequence detection method provided in this application;
[0046] Figure 3 A schematic diagram of the structure of a three-phase power grid phase sequence detection device provided in this application;
[0047] Figure 4 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] The core of this application is to provide a three-phase power grid phase sequence detection method, device, equipment and medium.
[0050] As a special inverter, the grid-connected inverter is often used in the connection between the DC voltage source and the three-phase power grid, and its output AC power can be directly input into the three-phase power grid. In order to achieve the smooth grid connection of electric energy, the phase sequence of the grid-connected inverter needs to be consistent with the phase sequence of the three-phase power grid. If the phase sequence output by the grid-connected inverter is inconsistent with the phase sequence of the power grid, it will cause a phase-to-phase short circuit at the moment of grid connection, generating a huge short-circuit current. This will not only damage the grid-connected inverter, but may also cause problems such as grid voltage sag and frequency fluctuation, seriously affecting the stability and power supply quality of the power grid, and may even cause partial paralysis of the power grid, affecting the normal power consumption of a large number of users.
[0051] Currently, the phase sequence detection methods for grid-connected inverters include zero-crossing detection method, phase-locked loop detection method and power calculation method. Although the zero-crossing detection method has simple logic and easy code writing, the code volume is large and filtering is required, which is time-consuming overall. The implementation method of the phase-locked loop detection method is simple, but it is only applicable to systems that require phase locking. The power calculation method indirectly reflects the phase sequence based on the positive and negative reactive power by calculating the power of each phase, which is not intuitive and easy to mismeasure.
[0052] Therefore, how to improve the adaptability and realize the phase sequence detection of the grid-connected inverter simply and quickly is an urgent problem to be solved.
[0053] To solve the above problems, see Figure 1 As shown, the embodiment of the present invention discloses a three-phase power grid phase sequence measurement method, which may include:
[0054] Step S11, respectively obtain the three-phase voltages of the three-phase power grid, wherein the three-phase voltages include an A-phase voltage, a B-phase voltage, and a C-phase voltage.
[0055] In this embodiment, in order to determine the phase sequence of the three-phase power grid, it is first necessary to sample the voltage of the three-phase power grid. The three-phase voltage is sampled to obtain discrete sampling values, so the three-phase voltage needs to be sampled at equal intervals to convert the continuous three-phase voltage signal into a discrete digital sequence. At the same time, the sampling frequency also needs to satisfy the Nyquist sampling theorem, that is, the sampling frequency should be greater than or equal to twice the highest frequency of the three-phase voltage signal to ensure that the original signal can be accurately restored. For example, for a three-phase voltage signal with an industrial frequency of 50Hz, the sampling frequency is generally selected to be 100Hz or higher.
[0056] It should be noted that when the three-phase power grid to be tested is a high-voltage system, it is necessary to convert the high-voltage signal into a low-voltage signal through a voltage sensor, and then use a sampling device to detect the three-phase voltage of the three-phase power grid. When the three-phase power grid is a low-voltage system, the sampling device can be used directly to sample the three-phase power grid. In addition, when the three-phase power grid is a high-voltage system, it is also necessary to add isolation circuits such as optocoupler isolation and transformer isolation to prevent the high voltage from directly affecting the sampling system.
[0057] In this embodiment, the three-phase voltage can be measured with high precision by using a PMU (phasor measurement unit) in combination with a GPS clock signal. Specifically, a synchronous sampling device is used to obtain the instantaneous value of the three-phase voltage, and the data of multiple measurement points are synchronized by GPS, and the amplitude and phase angle of each phase voltage are obtained by a vector calculation formula.
[0058] It should be noted that the output end of the sampling device is connected to an ADC (analog to digital converter) to convert the three-phase voltage signal measured by it from an analog signal to a digital signal. In addition, a low-pass filter can be added between the sampling device and the ADC to eliminate interference from high-frequency signals.
[0059] In this embodiment, the three-phase voltage and three-phase current of the three-phase power grid can be measured simultaneously by the cooperation of the voltage transformer and the current transformer, and the three-phase voltage and three-phase current are processed and analyzed simultaneously, so that the power of each phase of the three-phase power grid can be calculated while determining the phase sequence.
[0060] Step S12, respectively processing the A-phase voltage, the B-phase voltage and the C-phase voltage to obtain corresponding A-phase phase angle, B-phase phase angle and C-phase phase angle;
[0061] In this embodiment, it is necessary to process and analyze the A-phase voltage, the B-phase voltage, and the C-phase voltage in sequence to obtain their corresponding phase angles. In order to calculate each corresponding phase angle of the three-phase voltage, in a specific implementation, when the three-phase voltage is sampled by the PMU, a synchronous vector detection unit needs to be installed at each key node of the above-mentioned three-phase power grid. Each synchronous vector detection unit detects and calculates the vector of each phase voltage, that is, the amplitude and phase angle, based on the synchronous time, which is suitable for grid-level monitoring. Among them, the synchronous time is obtained by the GPS clock.
[0062] In another specific embodiment, the A-phase voltage, the B-phase voltage, and the C-phase voltage can be Fourier decomposed respectively to obtain their complex expressions, as well as their corresponding real and imaginary parts, which are used to calculate the A-phase phase angle, the B-phase phase angle, and the C-phase phase angle, which is suitable for high-precision analysis under dynamic changes of multiple voltage waveforms. It should be noted that after the Fourier decomposition of each phase voltage, its real part is the projection of the current phase voltage on the real axis, which is proportional to the cosine value of the current phase phase angle, and its imaginary part is the projection of the current phase voltage on the imaginary axis, which is proportional to the sine value of the current phase phase angle.
[0063] In this embodiment, the expressions of the A-phase voltage, the B-phase voltage and the C-phase voltage are respectively:
[0064] ;
[0065] ;
[0066] ;
[0067] in, are the instantaneous values of phase A voltage, phase B voltage and phase C voltage respectively, are the amplitudes of phase A voltage, phase B voltage and phase C voltage respectively, t is the time, is the angular frequency, They are the initial phase angles of phase A voltage, phase B voltage and phase C voltage respectively.
[0068] After Fourier decomposition of phase A voltage, phase B voltage, and phase C voltage, the results are as follows:
[0069] ;
[0070] ;
[0071] ;
[0072] in, They are the frequency domain expressions of phase A voltage, phase B voltage and phase C voltage after Fourier decomposition, They are the effective values of phase A voltage, phase B voltage and phase C voltage respectively.
[0073] Since there is a fixed trigonometric function relationship between the real part and the imaginary part of the complex number and its phase angle, the phase angle corresponding to each phase voltage can be calculated based on the trigonometric function relationship. It should be noted that the above trigonometric function relationship includes the inverse sine function, the inverse tangent function, and the atan2 (y, x) function.
[0074] In a first specific implementation, based on the inverse tangent function, the real part and the imaginary part corresponding to any one of the three-phase voltages are calculated to determine the phase angle of the current phase. Specifically, the ratio of the imaginary part to the real part corresponding to any one of the three-phase voltages is calculated; the inverse tangent function of the ratio is determined, and the result is used as the phase angle of the current phase. For example, the phase angle of the A phase voltage satisfies the following relationship with its real part and imaginary part:
[0075] ;
[0076] is the imaginary part of phase A voltage, is the real part of the A-phase voltage. At this time, the ratio of the imaginary part to the real part of the A-phase voltage is calculated, and the inverse tangent function of the ratio is determined. The result can be used as the phase angle of the A-phase voltage.
[0077] It is understandable that it is relatively simple to calculate the phase angle based on the inverse tangent function, since only the ratio of the real part and the imaginary part is needed to find the phase angle of the current phase. However, when calculating the ratio, the real part is used as the denominator, and there is a possibility that it is zero. At this time, the phase angle depends entirely on the direction of the imaginary part. When the imaginary part is greater than zero, the phase angle is 90°; when the imaginary part is less than zero, the phase angle is -90°; when the imaginary part is equal to zero, the phase angle is uncertain or regarded as zero based on the actual situation.
[0078] It should be noted that because the value range of the inverse tangent function is usually (-π / 2, π / 2), the quadrant of the phase angle cannot be directly determined, so it is necessary to determine the signs of the real part and the imaginary part and perform quadrant compensation.
[0079] In a second specific implementation, based on the inverse sine function, the real part and the imaginary part corresponding to any one of the three-phase voltages are calculated to determine the phase angle of the current phase. Specifically, the ratio of the imaginary part corresponding to any one of the three-phase voltages to the effective value of the fundamental voltage is calculated; wherein the effective value of the fundamental voltage is the square root of the sum of the squares of the current corresponding real part and imaginary part. It can be understood that at this time, the real part does not appear alone as a denominator, so when the real part is zero, it does not affect the calculation of the phase angle.
[0080] It should be noted that, like the inverse tangent function, the range of the inverse sine function is also (-π / 2, π / 2), so the quadrant of the phase angle cannot be determined directly, but the quadrant needs to be compensated according to the signs of the real part and the imaginary part.
[0081] In the third specific implementation, the atan2(y, x) function can also be used directly to judge the phase of each phase. The atan2(y, x) function is a mathematical function that calculates the angle corresponding to the coordinate point (x, y) in a plane rectangular coordinate system. It is essentially an improved version of the inverse tangent function that can automatically distinguish quadrants and return the correct phase angle. It should be noted that the value range of the atan2(y, x) function is [-π, π], which is applicable to the entire circle. Therefore, there is no need for additional sign judgment and quadrant compensation steps. The corresponding real and imaginary parts of any pair are taken as x and y respectively, and the atan2(y, x) function is calculated. The result can be directly used as the phase angle of the current phase.
[0082] It is understandable that if the sources of the real and imaginary parts of the three-phase power grid are more complex and the quadrant of the phase needs to be fully processed, the atan2(y, x) function is preferred. If the hardware is limited and the correctness of the quadrant compensation can be guaranteed, the inverse sine function or inverse tangent function can be selected for phase angle calculation. Among them, the complexity of the sources of the real and imaginary parts of the three-phase power grid is related to the harmonic interference and transformation processing in the three-phase power grid. In addition, if the three-phase power grid is an unbalanced three-phase system, the complexity of the real and imaginary parts of the three-phase voltage will also increase.
[0083] Step S13, determining the phase difference between any two corresponding phase angles of the A phase, the B phase and the C phase;
[0084] In this embodiment, only the phase angles of two phases need to be selected to obtain the corresponding phase difference values. It is understandable that there are several common standards for calculating the phase difference of three-phase voltage. When the phase sequence is uncertain, one of the phases needs to be selected as the reference phase first. When calculating the phase difference between the other phases and the reference phase, the phase of the reference phase is subtracted from the phase of the other phases. For example, select phase A as the reference phase and calculate the phase difference of phase B relative to phase A. , the specific formula is ; Calculate the phase difference between phase C and phase A , the specific formula is This method uses a fixed reference phase as a benchmark in analysis and calculation, making it easier to compare and understand the phase relationship between the phases.
[0085] Step S14: determining the phase sequence of the three-phase power grid according to the phase difference.
[0086] In this embodiment, after the phase difference between any two phases is calculated, the phase sequence of the three-phase power grid is determined based on the phase difference. If the phase difference is 120°±20° or -240°±20°, the three-phase power grid is a positive sequence; if the phase difference is -120°±20° or 240°±20°, the three-phase power grid is a negative sequence. It can be understood that in an ideal symmetrical three-phase power grid, the phase difference of the three-phase voltage should be strictly 120° or equivalently 240°, but due to the influence of power supply, load and transmission line in actual situations, the phase difference of the three-phase power grid has a certain deviation, rather than a strict 120° or 240°, therefore, even if the phase difference actually calculated deviates by about 20° from the standard ±120° or ±240°, the phase sequence of the three-phase power grid can be determined.
[0087] From the above, it can be seen that after obtaining each corresponding phase voltage of the three-phase voltage, this embodiment processes and analyzes the phase voltage of each phase respectively, and after obtaining its corresponding phase angle, the phase sequence of the three-phase power grid is determined by calculating the phase difference of the phase angle. It can be applied to any system without considering whether it needs phase locking. After obtaining the three-phase voltage, no filtering is required, which greatly reduces the time for phase sequence judgment. The logic of the code for calculating the phase angle through the phase voltage is simple, the code amount is small, and the problem of excessive redundancy of the overall code is avoided.
[0088] In order to obtain the phase angle corresponding to each of the three-phase voltages and determine the phase sequence of the three-phase power grid based on the phase angle, refer to Figure 2 As shown, the embodiment of the present application further provides a specific three-phase power grid phase sequence measurement method, which may include:
[0089] Step S21, respectively obtain the three-phase voltages of the three-phase power grid, wherein the three-phase voltages include an A-phase voltage, a B-phase voltage, and a C-phase voltage.
[0090] Step S22, performing Fourier decomposition on the A-phase voltage, the B-phase voltage and the C-phase voltage to obtain their corresponding real parts and imaginary parts respectively.
[0091] In this embodiment, in order to obtain the real and imaginary parts corresponding to the A-phase voltage, the B-phase voltage, and the C-phase voltage, it is first necessary to perform Fourier decomposition on each phase voltage. Fourier decomposition can convert the three-phase voltage waveform in the time domain to the frequency domain to obtain the spectrum corresponding to the three-phase voltage. In the frequency domain, the fundamental and harmonic components of the three-phase voltage are clearly separated, and each frequency component corresponds to a specific amplitude and phase information, so that the present application can focus on the phase of each frequency component separately, avoiding the complexity caused by the superposition of different frequency components in the time domain, thereby more accurately analyzing the phase angle.
[0092] In a specific implementation, DFT (Discrete Fourier Transform) may be used to transform the three-phase voltages respectively. However, the complexity of directly calculating DFT is very high, resulting in low calculation efficiency.
[0093] In order to improve the calculation efficiency, in another specific implementation, FFT (Fast Fourier Transform) can be used to transform the three-phase voltages respectively. Fast Fourier decomposition is an algorithm for efficiently calculating discrete Fourier decomposition. It uses the symmetry and periodicity of discrete Fourier decomposition, reduces the complexity of calculation, and greatly improves the calculation efficiency. There are many ways to implement the FFT algorithm, such as radix 2 FFT, radix 4 FFT, etc. The basic idea is to continuously decompose the sequence into smaller subsequences, and then use butterfly operations to merge and calculate, and finally obtain the frequency domain results. It should be noted that many professional signal processing software, such as MATLAB, LabVIEW, etc., provide rich functions and toolkits for Fourier decomposition and related signal analysis. For example, the sampled three-phase voltage is imported into MATLAB, and the fft function in MATLAB is directly called to perform Fourier decomposition on the three-phase voltage to obtain its corresponding real and imaginary parts.
[0094] Step S23, calculating the ratio of any corresponding imaginary part of the three-phase voltage to the effective value of the fundamental voltage; wherein the effective value of the fundamental voltage is the square root of the sum of the squares of the current corresponding real part and imaginary part.
[0095] In this embodiment, the relationship between the phase angle of the A-phase voltage, the B-phase voltage, and the C-phase voltage and its corresponding real part and imaginary part is the same. For example, the relationship between the phase angle of the A-phase voltage and its corresponding real part and imaginary part is as follows:
[0096] ;
[0097] ;
[0098] ;
[0099] in, It is the effective value of the fundamental voltage of phase A voltage.
[0100] Therefore, after obtaining the corresponding real and imaginary parts of each three-phase voltage, it is necessary to first calculate the effective value of its fundamental voltage, and then determine the ratio of the imaginary part corresponding to the phase voltage to the effective value of the fundamental voltage, which is used for the subsequent calculation of the phase angle of the phase.
[0101] Step S24: determine whether the current corresponding real part is greater than 0.
[0102] It is understandable that the results returned by the inverse sine function are only in the first and fourth quadrants, that is, this method can only determine the phase angle in the range of [-π / 2,π / 2]. Therefore, the above formula cannot directly determine the quadrant in which the phase angle is located. In order to obtain complete phase information, it is also necessary to determine the quadrant in which the phase angle is located by the sign of the current corresponding real part.
[0103] Step S25: If the real part is greater than 0, determine the arc sine function of the ratio and use the result as the phase angle of the current phase.
[0104] In this embodiment, after obtaining the ratio of the imaginary part of the current phase voltage to the effective value of the fundamental voltage, when the real part is greater than 0, it indicates that the phase angle is in the first quadrant or the fourth quadrant. Therefore, the inverse sine function of the above ratio can be directly used as the phase angle of the current phase, and its specific value is .
[0105] Step S26: If the real part is less than 0, calculate the difference between π and the arc sine function of the ratio, and use the difference as the phase angle of the current phase.
[0106] In this example, the sign of its real part is determined. When its sign is negative, the phase angle of the current phase is located in the second quadrant or the third quadrant. It is necessary to perform phase compensation on the inverse sine function of the above ratio to determine the quadrant in which the phase is located. The specific value is π and The difference.
[0107] Step S27, calculating the A phase angle, the B phase angle and the C phase angle in sequence; and determining the phase difference between any two corresponding phase angles of the A phase angle, the B phase angle and the C phase angle.
[0108] Step S28: determining the phase sequence of the three-phase power grid according to the phase difference.
[0109] Among them, the specific processes of the above steps S21, S27 and S28 can refer to the corresponding contents disclosed in the above embodiments, and will not be elaborated here.
[0110] From the above, it can be obtained that the real part and imaginary part corresponding to each phase voltage can be obtained by Fourier decomposition of the three-phase voltage. First, the ratio of the imaginary part of each phase voltage to the effective value of its fundamental voltage and the inverse sine function of the ratio are calculated, and then the sign of the real part is determined. Based on the sign determination result, the inverse sine function of the ratio is quadrant compensated to determine the quadrant where the phase angle is located. According to the above method, the phase angle of the three-phase voltage can be obtained, and the phase difference between any two phases can be selected to determine the phase sequence of the three-phase power grid.
[0111] Accordingly, see Figure 3 As shown, the embodiment of the present application also provides a three-phase power grid phase sequence detection device, which may include:
[0112] A voltage acquisition module 11 is used to respectively acquire three-phase voltages of a three-phase power grid, wherein the three-phase voltages include an A-phase voltage, a B-phase voltage, and a C-phase voltage;
[0113] A phase angle acquisition module 12 is used to process the A-phase voltage, the B-phase voltage and the C-phase voltage to obtain corresponding A-phase phase angle, B-phase phase angle and C-phase phase angle respectively;
[0114] A phase difference calculation module 13 is used to determine the phase difference between any two corresponding phase angles of the A phase, the B phase and the C phase;
[0115] The phase sequence determination module 14 is used to determine the phase sequence of the three-phase power grid according to the phase difference.
[0116] From the above, it can be seen that after obtaining each corresponding phase voltage of the three-phase voltage, this embodiment processes and analyzes the phase voltage of each phase respectively, and after obtaining its corresponding phase angle, the phase sequence of the three-phase power grid is determined by calculating the phase difference of the phase angle. It can be applied to any system without considering whether it needs phase locking, and no filtering is required after obtaining the three-phase voltage, which greatly reduces the time for phase sequence judgment. The code for calculating the phase angle by the three-phase voltage to determine the phase sequence of the three-phase power grid has simple logic and small code volume, avoiding the problem of excessive redundancy of the overall code.
[0117] In some specific implementations, the phase angle acquisition module 12 includes:
[0118] A Fourier decomposition submodule is used to perform Fourier decomposition on the A-phase voltage, the B-phase voltage and the C-phase voltage to obtain their corresponding real parts and imaginary parts respectively;
[0119] The phase angle acquisition submodule is used to calculate the real part and imaginary part of any corresponding one of the three-phase voltages based on a preset functional relationship to determine the phase angle of the current phase; and calculate the A phase angle, the B phase angle and the C phase angle in sequence.
[0120] In some specific implementations, the phase angle acquisition submodule includes:
[0121] A first phase angle calculation unit, configured to calculate the real part and the imaginary part of any corresponding phase of the three-phase voltage based on an inverse sine function to determine the phase angle of the current phase;
[0122] A second phase angle calculation unit, configured to calculate the real part and the imaginary part of any corresponding phase of the three-phase voltage based on an inverse tangent function to determine the phase angle of the current phase;
[0123] The third phase angle calculation unit is used to calculate the real part and the imaginary part of any corresponding phase of the three-phase voltage based on the atan2 (y, x) function to determine the phase angle of the current phase.
[0124] In some specific implementations, the first phase angle calculation unit is specifically used to:
[0125] Calculate the ratio of any corresponding imaginary part of the three-phase voltage to the effective value of the fundamental voltage; wherein the effective value of the fundamental voltage is the square root of the sum of the squares of the current corresponding real part and imaginary part;
[0126] Determine whether the current corresponding real part is greater than 0;
[0127] If the real part is greater than 0, an inverse sine function of the ratio is determined, and the result is used as the phase angle of the current phase;
[0128] If the real part is less than 0, the difference between π and the arc sine function of the ratio is calculated, and the difference is used as the phase angle of the current phase.
[0129] In some specific implementations, the second phase angle calculation unit is specifically used to:
[0130] Calculate the ratio of the imaginary part and the real part corresponding to any one of the three-phase voltages;
[0131] The arc tangent function of the ratio is determined, and the result is used as the phase angle of the current phase.
[0132] In some specific implementations, the third phase angle calculation unit is specifically used to:
[0133] Taking any corresponding real part and imaginary part of the three-phase voltage as x and y respectively;
[0134] Calculate the atan2(y, x) function and use the result as the phase angle of the current phase.
[0135] In some specific implementations, the phase difference calculation module 13 includes:
[0136] A positive sequence judgment module, used for judging that if the phase difference is 120°±20° or -240°±20°, the three-phase power grid is a positive sequence;
[0137] The negative sequence judgment module is used to determine that if the phase difference is -120°±20° or 240°±20°, the three-phase power grid is in negative sequence.
[0138] Furthermore, the present application also discloses an electronic device. Figure 4It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the three-phase power grid phase sequence measurement method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0139] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0140] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0141] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the three-phase power grid phase sequence measurement method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0142] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the above-disclosed three-phase power grid phase sequence measurement method is implemented. The specific steps of the method can refer to the corresponding contents disclosed in the above-disclosed embodiments, and will not be repeated here.
[0143] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0144] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0145] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0146] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0147] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A three-phase power grid phase sequence detection method, characterized in that: include: Respectively obtain three-phase voltages of a three-phase power grid, wherein the three-phase voltages include an A-phase voltage, a B-phase voltage, and a C-phase voltage; The A-phase voltage, the B-phase voltage and the C-phase voltage are processed respectively to obtain corresponding A-phase phase angle, B-phase phase angle and C-phase phase angle; Determine the phase difference between any two corresponding phase angles of the A phase, the B phase and the C phase; The phase sequence of the three-phase power grid is determined according to the phase difference.
2. The three-phase power grid phase sequence detection method according to claim 1, characterized in that: The processing of the A-phase voltage, the B-phase voltage and the C-phase voltage respectively to obtain the corresponding A-phase phase angle, B-phase phase angle and C-phase phase angle includes: Performing Fourier decomposition on the A-phase voltage, the B-phase voltage and the C-phase voltage to obtain their corresponding real parts and imaginary parts respectively; Based on a preset functional relationship, calculating the real part and the imaginary part of any corresponding phase of the three-phase voltage to determine the phase angle of the current phase; The A phase angle, the B phase angle and the C phase angle are calculated in sequence.
3. The three-phase power grid phase sequence detection method according to claim 2, characterized in that: The calculating, based on a preset functional relationship, the real part and the imaginary part of any corresponding one of the three-phase voltages to determine the phase angle of the current phase includes: Based on the inverse sine function, calculating the real part and the imaginary part of any corresponding phase of the three-phase voltage to determine the phase angle of the current phase; or, based on the inverse tangent function, calculating the real part and the imaginary part corresponding to any one of the three-phase voltages to determine the phase angle of the current phase; Or, based on the atan2(y, x) function, the real part and the imaginary part of any corresponding pair of the three-phase voltages are calculated to determine the phase angle of the current phase.
4. The three-phase power grid phase sequence detection method according to claim 3, characterized in that: The method of calculating the real part and the imaginary part of any corresponding phase of the three-phase voltage based on the inverse sine function to determine the phase angle of the current phase includes: Calculate the ratio of any corresponding imaginary part of the three-phase voltage to the effective value of the fundamental voltage; wherein the effective value of the fundamental voltage is the square root of the sum of the squares of the current corresponding real part and imaginary part; Determine whether the current corresponding real part is greater than 0; If the real part is greater than 0, an inverse sine function of the ratio is determined, and the result is used as the phase angle of the current phase; If the real part is less than 0, the difference between π and the arc sine function of the ratio is calculated, and the difference is used as the phase angle of the current phase.
5. The three-phase power grid phase sequence detection method according to claim 3, characterized in that: The method of calculating the real part and the imaginary part of any corresponding phase of the three-phase voltage based on the inverse tangent function to determine the phase angle of the current phase includes: Calculate the ratio of the imaginary part and the real part corresponding to any one of the three-phase voltages; The arc tangent function of the ratio is determined, and the result is used as the phase angle of the current phase.
6. The three-phase power grid phase sequence detection method according to claim 3, characterized in that: The method of calculating the real part and the imaginary part of any corresponding phase of the three-phase voltage based on the atan2 (y, x) function to determine the phase angle of the current phase includes: Taking any corresponding real part and imaginary part of the three-phase voltage as x and y respectively; Calculate the atan2(y, x) function and use the result as the phase angle of the current phase.
7. The three-phase power grid phase sequence detection method according to any one of claims 1 to 6, characterized in that: Determining the phase sequence of the three-phase power grid according to the phase difference includes: If the phase difference is 120°±20° or -240°±20°, the three-phase power grid is in positive sequence; If the phase difference is -120°±20° or 240°±20°, the three-phase power grid is in negative sequence.
8. A three-phase power grid phase sequence detection device, characterized in that: include: A voltage acquisition module is used to respectively acquire the three-phase voltages of the three-phase power grid, wherein the three-phase voltages include an A-phase voltage, a B-phase voltage, and a C-phase voltage; A phase angle acquisition module, used for processing the A-phase voltage, the B-phase voltage and the C-phase voltage respectively to obtain corresponding A-phase phase angle, B-phase phase angle and C-phase phase angle; A phase difference calculation module, used to determine the phase difference between any two corresponding phase angles of the A phase, the B phase and the C phase; A phase sequence determination module is used to determine the phase sequence of the three-phase power grid according to the phase difference.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the three-phase power grid phase sequence detection method as claimed in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the three-phase power grid phase sequence detection method as described in any one of claims 1 to 8 is implemented.