Voltage Sag Detection Method, System and Medium Based on Hilbert Transform and Otsu Segmentation

Through Hilbert transformation and Otsu segmentation technology, voltage drop characteristics are directly extracted from the original sampled signal, solving the problems of complex calculations and poor robustness in the prior art, and achieving high-precision and easy-to-embedded voltage drop detection.

CN115825537BActive Publication Date: 2025-07-01STATE GRID HUNAN ENERGY SAVING SERVICE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211182546.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-27
Publication Date
2025-07-01
Estimated Expiration
2042-09-27

AI Technical Summary

Technical Problem

The existing voltage drop detection technology requires time-frequency conversion, resulting in complex calculations, poor robustness, low detection accuracy, and difficult to implement in embedded systems.

Method used

The voltage envelope is extracted by Hilbert transformation, and the segmented voltage signal is extracted from it using Otsu segmentation. The voltage drop parameter is calculated based on the signal to determine whether the voltage drop occurs.

Benefits of technology

It realizes the technical indicators such as whether the voltage drop occurs or not, the depth of the drop, the time of occurrence and duration, and has the advantages of simple calculation, strong robustness, high detection accuracy, and easy to be implemented in embedded form.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115825537B_ABST
    Figure CN115825537B_ABST
Patent Text Reader

Abstract

The present invention discloses a voltage sag detection method, system and medium based on Hilbert transform and Otsu segmentation. The method of the present invention includes: for the measured analog voltage signal X(t), using Hilbert transform to extract the voltage envelope D(n); using Otsu segmentation to extract the segmented voltage signal D1(n) from the voltage envelope D(n); calculating voltage sag parameters based on the segmented voltage signal D1(n), and judging whether a voltage sag occurs according to the voltage sag parameters. The present invention can accurately detect whether a voltage sag occurs and technical indicators such as the sag depth, occurrence time and duration. It can accurately and effectively extract voltage sag feature quantities only using the original sampling signal, solves the defect that most of the existing voltage sag detection technologies need to perform voltage sag parameter detection through time-frequency transformation, and has the advantages of simple calculation, strong robustness, high detection accuracy, and easy embedded implementation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power systems, and in particular to a voltage sag detection method, system and medium based on Hilbert transformation and Otsu segmentation. Background Art

[0002] Voltage sag is the most frequent and influential power quality problem in the power system. It can cause abnormal operation of sensitive power equipment in the power system. In severe cases, it can also cause equipment failure and stop operation, thus causing huge economic losses to the majority of power users. With the continuous development of electronic technology and digital signal processing technology, voltage sag detection methods such as residual voltage detection method, two-point detection method, wavelet transform method, S transform detection method, and dq transform method have emerged.

[0003] 1. Residual voltage detection method: The residual voltage detection method relies on the deviation between the reference voltage and the actual voltage to deduce the amplitude and phase information of the actual voltage. This method is simple to calculate, but when calculating the amplitude of the defect voltage, it is necessary to construct a reference voltage, so it is necessary to introduce a phase-locked loop and cooperate with the voltage effective value calculation method. In addition, the phase angle of the reference voltage and the actual sag voltage needs to be known. Obtaining these characteristic quantities requires a certain time delay, which affects the rapidity of the detection algorithm.

[0004] 2. Two-point detection method: The two-point detection method is a fast and good detection method and system, because it only needs two adjacent sampling points for product operation to calculate the voltage amplitude, it is also called two-sample product algorithm, curve fitting method, etc. Because this method only requires simple mathematics and square operations, it is also very conducive to programming implementation, but it requires four consecutive points for phase mutation detection, 2 points before the phase mutation and 2 points after the mutation, and the numerical information of the mutation phase will only appear at the moment of the phase mutation. When the voltage is in a continuous phase mutation state, the result obtained by this method is zero. Therefore, the practicality is poor, and the two-point algorithm is greatly affected by harmonic interference.

[0005] 3. Wavelet transform method: Wavelet transform (WT) is a time-frequency localization analysis method with multi-resolution characteristics. By introducing variable scale factors and translation factors, WT has an adjustable time-frequency window in signal analysis, which cleverly solves the contradiction between time resolution and frequency domain resolution, and provides a dynamic analysis method under multi-resolution for signal processing. There are still many limitations in the application of WT in parameter quantitative detection: 1) The frequency domain resolution is coarse, and there may be serious frequency aliasing between frequency bands. Even if the scale factor is introduced, the result is still not a true time-frequency spectrum. In addition, wavelet functions of different scales interfere with each other in the frequency domain, and the influence of noise makes it difficult to separate harmonics and interharmonics with close frequencies; 2) It can only qualitatively analyze the signal amplitude or harmonic components, but cannot accurately detect; 3) It is not easy to effectively detect disturbance signals such as voltage surges and dips that are mainly characterized by changes in time domain characteristics; 4) The algorithm is complex and the amount of calculation is large, which is not conducive to real-time calculation. It cannot be implemented in embedded systems at present and is difficult to be applied in practice.

[0006] 4. S-transform detection method: S-transform inherits and develops the local ideas of short-time Fourier transform and wavelet transform. It is a reversible time-frequency analysis method with good time-frequency focusing or resolution. The result of S-transform is a two-dimensional complex time-frequency matrix. The columns in the matrix correspond to discrete frequencies, the rows correspond to sampling time points, and each row corresponds to the local spectrum at that time point. The matrix obtained by performing a modulo operation on each element in the S matrix is ​​called the S-modulo matrix. The matrix reflects the time-frequency-amplitude information. Extracting the column vector or row vector can obtain the distribution of a certain frequency amplitude over time. The algorithm can directly reflect the voltage sag information and can effectively avoid the influence of harmonics, but the S-transform has high computational complexity, long calculation time, and high requirements for computing equipment.

[0007] 5. dq transformation method: dq transformation transforms the electrical quantity from the static abc three-phase coordinates to the d and q two-phase coordinates rotating at a synchronous angular frequency, and obtains two orthogonal DC components. The three-phase symmetrical positive sequence, negative sequence, and zero sequence components can be decomposed from the three-phase asymmetrical electrical quantity through symmetrical component transformation. The dq transformation is used to obtain the instantaneous root mean square value of the symmetrical three-phase voltage, thereby obtaining the sag characteristic quantity. However, the corresponding phase delay is required before detection, which will increase the response time of the system, resulting in a large error in the detection of the sag duration. Summary of the invention

[0008] Technical problems to be solved by the present invention: In view of the above problems of the prior art, a voltage sag detection method, system and medium based on Hilbert transform and Otsu segmentation are provided. The present invention can accurately detect whether a voltage sag occurs, as well as technical indicators such as the sag depth, occurrence time and duration. It can accurately and effectively extract voltage sag feature quantities only using the original sampling signal, solves the defect that most of the existing voltage sag detection technologies need to perform time-frequency transformation for voltage sag parameter detection, and has the advantages of simple calculation, strong robustness, high detection accuracy, and easy embedded implementation.

[0009] To solve the above technical problems, the technical solution adopted by the present invention is as follows:

[0010] A voltage sag detection method based on Hilbert transform and Otsu segmentation, comprising:

[0011] S101, for the measured analog voltage signal X(t), use Hilbert transform to extract the voltage envelope D(n);

[0012] S102, use Otsu segmentation to extract the segmented voltage signal D1(n) from the voltage envelope D(n);

[0013] S103, calculate the voltage sag parameters based on the segmented voltage signal D1(n), and judge whether a voltage sag occurs according to the voltage sag parameters.

[0014] Optionally, the use of Hilbert transform to extract the voltage envelope D(n) in step S101 includes:

[0015] S201, for the measured analog voltage signal X(t), use Hilbert transform to obtain the Hilbert transform result Y(t);

[0016] S202, form a complex conjugate pair of the measured analog voltage signal X(t) and the Hilbert transform result Y(t);

[0017] S203, discretize the analytic signal Z(t) obtained by forming the complex conjugate pair to obtain the voltage envelope D(n).

[0018] Optionally, the functional expression for obtaining the Hilbert transform result Y(t) using Hilbert transform in step S201 is:

[0019]

[0020] In the above formula, t is the sampling signal duration, X(τ) is the function of the measured analog voltage signal with respect to the integral time variable τ, and τ is the integral time variable.

[0021] Optionally, the function expressions forming a complex conjugate pair in step S202 are:

[0022] Z(t) = X(t) + jY(t) = a(t)e iθ(t) ,

[0023] In the above formula, Z(t) is the obtained analytic signal, j is the imaginary unit, a(t) is the instantaneous amplitude, θ(t) is the phase, and there are:

[0024]

[0025] Optionally, the function expression for obtaining the voltage envelope D(n) by discretization processing in step S203 is:

[0026] D(n) = |Z(n)| = |a(n)e iθ(n) | = |a(n)|

[0027] In the above formula, Z(n) is the nth analytic signal, a(n) is the instantaneous amplitude of Z(n), θ(n) is the phase of Z(n), and i is the imaginary unit.

[0028] Optionally, step S102 includes:

[0029] S301, extracting two thresholds T1 and T2 from the voltage envelope D(n) using Otsu segmentation, and performing signal binary segmentation on the voltage envelope D(n) according to the following formula to obtain the binary segmentation signal g(x, y);

[0030]

[0031] In the above formula, f(x, y) is the voltage signal in the voltage envelope D(n);

[0032] S302, based on the obtained binary segmentation signal g(x, y), extracting the segmented voltage signal D1(n) according to the following formula;

[0033] D1(n) = D(n) - g(x, y)

[0034] In the above formula, D(n) is the voltage envelope.

[0035] Optionally, extracting two thresholds T1 and T2 from the voltage envelope D(n) using Otsu segmentation in step S301 includes:

[0036] S401, respectively dividing the voltage envelope D(n) into three different regions according to different thresholds k1 and k2, and performing iterative calculation of the between-class variance for the voltage envelope D(n) according to the following formula;

[0037]

[0038] In the above formula, represents the between-class variance, P1 to P3 are the probabilities of the i-th gray level in three different regions respectively, m1 to m3 are the probabilities of the i-th gray level in three different regions respectively, and m G is the global gray mean value, and there are:

[0039]

[0040] In the above formula, p i is the histogram component of the i-th gray level after normalization, k1 is the first threshold, k2 is the second threshold, and k2 is greater than k1, L is the signal gray level, and i is a value between 0 and L-1; and the relational expression is as shown in the following formula:

[0041] P1m1 + P2m2 + P3m3 = m G , P1 + P2 + P3 = 1;

[0042] S403. When the between-class variance is the largest, the thresholds k1 and k2 are used as two thresholds T1 and T2 respectively.

[0043] Optionally, step S103 includes:

[0044] S501. Calculate the voltage sag parameters based on the segmented voltage signal D1(n), including the duration t D of the voltage sag and the depth Y D of the voltage sag. Among them, the duration t D of the voltage sag is the length on both sides of the segmented voltage signal D1(n), and the depth Y D of the voltage sag is the value that minimizes the variance of the segmented voltage signal D1(n) between 0 and 1. The calculation function expressions of the duration t D of the voltage sag and the depth Y D of the voltage sag are:

[0045] t D = n / f s

[0046]

[0047] In the above formula, n is the signal length in the voltage sag signal D1(n), f s is the sampling frequency, and k is the discrete point number from 1 to n.

[0048] S502. Judge whether a voltage sag occurs according to the duration t D of the voltage sag and the depth Y D of the voltage sag. If the depth Y Dis within a preset range, and the duration t of the voltage sag D satisfies:

[0049] 0.5f s / f0 ≤ t D ≤ A

[0050] In the above formula, f s is the sampling frequency, f0 is the power frequency, and A is the set time; then it is determined that a voltage sag has occurred, and the occurrence time t of the voltage sag is output s .

[0051] In addition, the present invention also provides a voltage sag detection system based on Hilbert transform and Otsu segmentation, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the voltage sag detection method based on Hilbert transform and Otsu segmentation.

[0052] In addition, the present invention also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is used to be programmed or configured by a microprocessor to execute the voltage sag detection method based on Hilbert transform and Otsu segmentation.

[0053] Compared with the prior art, the present invention mainly has the following advantages:

[0054] The present invention includes, for the measured analog voltage signal X(t), using Hilbert transform to extract the voltage envelope D(n); using Otsu segmentation to extract the voltage sag signal D1(n) from the voltage envelope D(n); calculating the depth, occurrence time and duration of the voltage sag based on the voltage sag signal D1(n). The present invention can accurately detect whether a voltage sag occurs and technical indicators such as the sag depth, occurrence time and duration, and can accurately and effectively extract the voltage sag characteristic quantities only using the original sampling signal, solving the defect that most of the existing voltage sag detection technologies need to perform voltage sag parameter detection through time-frequency transformation, and having the advantages of simple calculation, strong robustness, high detection accuracy, and easy embedded implementation. Description of the Drawings

[0055] Figure 1 is a schematic diagram of the basic flow of the method of the embodiment of the present invention.

[0056] Figure 2 is a diagram of extracting the voltage sag envelope by Hilbert transform in the embodiment of the present invention.

[0057] Figure 3 is a diagram of segmenting the sag signal by Ostu double thresholds in the embodiment of the present invention.

[0058] Figure 4This is the complete implementation flowchart in the embodiments of the present invention.

[0059] Figure 5 This is the simulation result diagram of the relative error of the signal depth with different sag depths in the embodiments of the present invention.

[0060] Figure 6 This is the simulation result diagram of the relative error of the signal duration with different sag depths in the embodiments of the present invention.

[0061] Figure 7 This is the hardware structure diagram of the system in the embodiments of the present invention. Specific implementation manners

[0062] As Figure 1 and Figure 4 shown, the voltage sag detection method in this embodiment includes:

[0063] S101. For the measured analog voltage signal X(t), use the Hilbert transform to extract the voltage envelope D(n);

[0064] S102. Use Otsu segmentation to extract the segmented voltage signal D1(n) from the voltage envelope D(n);

[0065] S103. Calculate the voltage sag parameters based on the segmented voltage signal D1(n), and determine whether a voltage sag occurs according to the voltage sag parameters.

[0066] In this embodiment, the process of using the Hilbert transform to extract the voltage envelope D(n) in step S101 includes:

[0067] S201. For the measured analog voltage signal X(t), use the Hilbert transform to obtain the Hilbert transform result Y(t);

[0068] S202. Combine the measured analog voltage signal X(t) and the Hilbert transform result Y(t) into a complex conjugate pair;

[0069] S203. Discretize the analytic signal Z(t) obtained by combining the complex conjugate pair to obtain the voltage envelope D(n).

[0070] In this embodiment, the functional expression for obtaining the Hilbert transform result Y(t) by using the Hilbert transform in step S201 is:

[0071]

[0072] In the above formula, t is the sampling signal duration, X(τ) is the function of the measured analog voltage signal with respect to the integral time variable τ, and τ is the integral time variable. Correspondingly, the functional expression of the Hilbert inverse transform is shown in the following formula:

[0073]

[0074] In the above formula, X(t) is the analog voltage signal to be measured, and Y(t) is the result of the Hilbert transform.

[0075] In this embodiment, the function expressions of the complex conjugate pair in step S202 are:

[0076] Z(t) = X(t) + jY(t) = a(t)e iθ(t) ,

[0077] In the above formula, Z(t) is the obtained analytic signal, j is the imaginary unit, a(t) is the instantaneous amplitude, θ(t) is the phase, and there are:

[0078]

[0079] In this embodiment, the function expression for obtaining the voltage envelope D(n) by discretization processing in step S203 is:

[0080] D(n) = |Z(n)| = |a(n)e iθ(n) | = |a(n)|

[0081] In the above formula, Z(n) is the nth analytic signal, a(n) is the instantaneous amplitude of Z(n), θ(n) is the phase of Z(n), and i is the imaginary unit. Examples of the analog voltage signal X(t) to be measured and the obtained voltage envelope D(n) in this embodiment are as Figure 2 shown.

[0082] In this embodiment, step S102 includes:

[0083] S301, extracting two thresholds T1 and T2 from the voltage envelope D(n) using Otsu segmentation, and performing signal binary segmentation on the voltage envelope D(n) according to the following formula to obtain the binary segmentation signal g(x, y);

[0084]

[0085] In the above formula, f(x, y) is the voltage signal in the voltage envelope D(n);

[0086] S302, on the basis of obtaining the binary segmentation signal g(x, y), extracting the segmented voltage signal D1(n) according to the following formula;

[0087] D1(n) = D(n) - g(x, y)

[0088] In the above formula, D(n) is the voltage envelope.

[0089] In this embodiment, the extraction of two thresholds T1 and T2 from the voltage envelope D(n) in step S301 includes:

[0090] S401. The voltage envelope D(n) is divided into three different regions according to different thresholds k1 and k2, and the between-class variance is calculated iteratively for the voltage envelope D(n) according to the following formula;

[0091]

[0092] In the above formula, represents the between-class variance, P1 to P3 are the probabilities of the i-th gray level in the three different regions respectively, m1 to m3 are the probabilities of the i-th gray level in the three different regions respectively, and m G is the global gray mean, and there are:

[0093]

[0094] In the above formula, p i is the histogram component of the gray level i after normalization, k1 is the first threshold, k2 is the second threshold, and k2 is greater than k1, L is the signal gray level, and i is a value between 0 and L-1; and the relational expression is as shown in the following formula:

[0095] P1m1 + P2m2 + P3m3 = m G , P1 + P2 + P3 = 1;

[0096] S403. When the between-class variance is the largest, the thresholds k1 and k2 are used as the two thresholds T1 and T2 respectively, and this process can be expressed as:

[0097]

[0098] In the above formula, is the finally determined between-class variance based on the two thresholds T1 and T2.

[0099] See Figure 3 for the Ostu double-threshold segmentation sag signal diagram. The signal can be accurately segmented into three parts: (a) the sag start and end moments, (b) the non-sag region, and (c) the sag region through the two thresholds of the Ostu double thresholds T1 and T2.

[0100] As Figure 4 shown, step S103 in this embodiment includes:

[0101] S501. Calculate the voltage sag parameters based on the segmented voltage signal D1(n), including the duration t D of the voltage sag and the depth Y D of the voltage sag respectively. Among them, the duration tD To divide the lengths on both sides of the voltage signal D1(n), the depth Y of the voltage sag D is the value between 0 and 1 that minimizes the variance of the divided voltage signal D1(n), and the duration t of the voltage sag D and the depth Y of the voltage sag D The calculation function expressions are as follows:

[0102] t D = n / f s

[0103]

[0104] In the above formula, n is the signal length in the voltage sag signal D1(n), f s is the sampling frequency, and k is the discrete point number from 1 to n.

[0105] S502. According to the duration t of the voltage sag D and the depth Y of the voltage sag D Judge whether a voltage sag occurs. If the depth Y of the voltage sag D is within the preset interval range, and the duration t of the voltage sag D satisfies:

[0106] 0.5f s / f0 ≤ t D ≤ A

[0107] In the above formula, f s is the sampling frequency, f0 is the power frequency, and A is the set time; then it is determined that a voltage sag occurs, and the occurrence time t of the voltage sag is output s . Specifically, the judgment condition for whether a voltage sag occurs in this embodiment is:

[0108] 0.1 ≤ Y D ≤ 0.9 (p.u.) and 0.5f s / f0 ≤ t D ≤ 60 (s).

[0109] See Figure 1 , as an alternative implementation, if a voltage sag occurs in this embodiment, the sag parameters (the depth of the voltage sag, the occurrence time, and the duration) can be output for fault diagnosis and analysis.

[0110] The effects of the present invention can be obtained through the following simulation experiments, specifically as follows:

[0111] 1. Simulation for voltage sag signal detection: To verify the accuracy and reliability of the proposed algorithm, a simulation experiment is carried out in MATLAB. Under 50 dB white noise, assuming the sampling frequency f s= 800 Hz, the number of sampling points N = 1600, the grid fundamental voltage U0 and frequency f0 are respectively 50 HZ, the start and end times t1 and t2 of the sag are set to 0.5 and 0.7 respectively, and the sag depth a varies in the range of 0.2 to 0.8 with a step of 0.1 for simulation. The resulting relative depth error and relative duration error results are respectively as Figure 5 and Figure 6 shown. From Figure 5 it can be seen that the algorithm of the present invention can accurately obtain the voltage sag depth. From Figure 5 it can be seen that the maximum error of the voltage sag depth does not exceed -0.128%. From Figure 6 it can be seen that the maximum relative error of the duration of the voltage sag does not exceed -0.71%. That is, the method of this embodiment can accurately detect the voltage sag depth and duration.

[0112] 2. Simulation for voltage sag detection under harmonic influence: To verify the accuracy and reliability of the proposed algorithm, a simulation experiment is carried out in MATLAB. When there is harmonic interference, the mathematical expression of the voltage simulation signal is:

[0113]

[0114] In the above formula, u(n) is the voltage sag simulation signal, and the sampling frequency f s = 800 Hz, the number of sampling points N = 1600, the grid fundamental voltage U0 and frequency f0 are respectively 50 HZ, the sag depth a is 0.4, and the duration is 0.1 s for simulation. The resulting relative depth error and relative duration error results are shown in Table 1.

[0115] Table 1: Voltage sag detection results under harmonic influence.

[0116]

[0117] As can be seen from Table 1, for voltage sag detection under harmonic influence, the method proposed in the present invention can still accurately obtain the relevant parameters. The relative error of the sag depth is 0.1252% and the relative error of the duration is -0.2503%. That is, the method of this embodiment also has a high accuracy for voltage sag detection under harmonic influence.

[0118] 3. Simulation for comparison with the detection results of other detection methods: To verify the effectiveness of the proposed method, the sampling frequency f s = 800 Hz, the number of sampling points N = 1600, the grid fundamental voltage U0 and frequency f0 are respectively 50HZ, the sag depth a is 0.4, and the duration is 0.06s. The detection results obtained by the algorithm are compared with the detection results of the improved αβ-dq transformation detection method (Method 1 in Table 2) and the improved S transformation detection method (Method 2 in Table 2). The comparison results are shown in Table 2.

[0119] Table 2: Voltage sag detection results under harmonic influence.

[0120] Detection method Starting time Ending time Voltage sag depth / % Duration relative error / t Method 1 0.0604 0.1213 —— 1.5% Method 2 0.0594 0.1198 39.55 0.67% Method of this embodiment 0.0600 0.1201 40.03 0.17%

[0121] As can be seen from Table 2, the starting time of the voltage sag measured by the method of this embodiment is 0.0600s, the ending time is 0.1201s, the sag depth is 40.03%, and the relative error of the duration is 0.17%. It has the highest accuracy among the three detection methods.

[0122] 4. Application test of the present invention in actual voltage sags: To verify the accuracy and effectiveness of the algorithm of the present invention in detecting the voltage sag parameters of the power system in the actual power grid. The present invention constructs a voltage sag test hardware platform based on the Spartan-6 LX FPGA processor XC6SLX16 of XILINX Corporation and the analog-to-digital converter AD7606 of ADI Corporation. The overall structure of the entire voltage sag test hardware platform is as Figure 7 shown. The standard power signal source (Fluke 6100A) generates the voltage sag signal for testing. This signal is sent to the analog-to-digital converter AD7606 for data acquisition after passing through the signal conditioning circuit. The acquired data is transmitted to the FPGA via the serial communication SPI method, and the voltage sag parameters are detected and analyzed in the FPGA, and the analysis results are displayed through the LCD. The oscilloscope Agilent DS01102B is used to monitor the generated voltage sag signal in real time. The voltage sag detection results obtained from the actual hardware test platform are shown in Table 3.

[0123] Table 3: Flicker parameter detection results obtained from the actual hardware platform.

[0124] Voltage sag depth / p.u. Starting time / t Ending time / t Voltage sag depth relative error / % Duration relative error / % 0.1 0.5s 0.6 0.1000 1.3333 0.2 0.7s 0.8 1.3500 -1 0.3 0.9s 1.0 0.0330 -0.667 0.4 1s 1.1 0.1750 -0.334

[0125] As can be seen from Table 3, the relative error of the sag depth obtained from the actual test does not exceed 1.35%, and the relative error of the duration does not exceed 1.33%. Both meet the voltage sag detection error requirements specified in the GBT-30137-2013 standard.

[0126] In summary, the method of this embodiment uses the Otsu double-threshold segmentation method to improve the segmentation accuracy of the voltage sag signal occurring in D1(n). By directly analyzing and calculating the original signal of D1(n), the method of this embodiment effectively extracts the voltage sag depth and duration, optimizes the algorithm flow, and solves the technical problems that most of the existing technologies need to detect voltage sag parameters through time-frequency changes, resulting in poor robustness of the algorithm and inability to accurately detect voltage sag parameters in practical applications. The method can accurately and effectively extract voltage sag characteristic quantities only using the original sampling signal, solves the defect that most of the existing voltage sag detection technologies need to perform time-frequency transformation to detect voltage sag parameters, improves the detection accuracy and reliability of voltage sag, and has the advantages of simple calculation, strong robustness, high detection accuracy, and easy embedded implementation.

[0127] In addition, this embodiment also provides a voltage sag detection system based on Hilbert transform and Otsu segmentation, including a microprocessor and a memory connected to each other. The microprocessor is programmed or configured to execute the foregoing voltage sag detection method based on Hilbert transform and Otsu segmentation.

[0128] In addition, this embodiment also provides a computer-readable storage medium, in which a computer program is stored. The computer program is used to be programmed or configured by a microprocessor to execute the foregoing voltage sag detection method based on Hilbert transform and Otsu segmentation.

[0129] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate for realizing in the process Figure 1 one process or multiple processes and / or blocks Figure 1Apparatus for the functions specified in one or more boxes. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction apparatus that implements the operations in the process Figure 1 One process or more processes and / or boxes Figure 1 Apparatus for the functions specified in one or more boxes. These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the process Figure 1 One process or more processes and / or boxes Figure 1 Apparatus for the functions specified in one or more boxes.

[0130] The above is only the preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions falling within the idea of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A voltage sag detection method based on Hilbert transform and Otsu segmentation, characterized in that, Including: S101, for the analog voltage signal to be measured X ( t ) Use Hilbert transform to extract the voltage envelope D ( n ); S102, from the voltage envelope D ( n ) Use Otsu segmentation to extract the segmented voltage signal D 1( n ); S103, based on the segmented voltage signal D 1( n ) Calculate the voltage sag parameters, and determine whether a voltage sag has occurred according to the voltage sag parameters; Step S102 includes: S301, from the voltage envelope D ( n ) Use Otsu segmentation to extract two thresholds T 1 and T 2, and according to the following formula, the voltage envelope D ( n ) is subjected to signal binary segmentation to obtain the binary segmentation signal g ( x , y ); , In the above formula, f ( x , y ) is the voltage envelope D ( n ) in the voltage signal; S302. On obtaining the binary segmentation signal g ( x , y ), based on this, extract the segmentation voltage signal according to the following formula D 1( n ); In the above formula, D ( n ) is the voltage envelope.

2. The voltage sag detection method based on Hilbert transform and Otsu segmentation according to claim 1, wherein In step S101, the Hilbert transform is used to extract the voltage envelope D ( n ) includes: S201, for the analog voltage signal to be measured X ( t ), the Hilbert transform result is obtained by using the Hilbert transform Y ( t ); S202, the analog voltage signal to be measured X ( t ) and the Hilbert transform result Y ( t ) form a complex conjugate pair; S203, the analytical signal obtained by forming a complex conjugate pair Z ( t ) is discretized to obtain a voltage envelope D ( n ).

3. The voltage sag detection method based on Hilbert transform and Otsu segmentation according to claim 2, characterized in that In step S201, the Hilbert transform result is obtained by using the Hilbert transform Y ( t ) The functional expression is as follows: In the above formula, t is the sampling signal duration, X ( τ ) is the function of the measured analog voltage signal with respect to the integration time variable τ , τ is the integration time variable.

4. The voltage sag detection method based on Hilbert transform and Otsu segmentation according to claim 2, wherein The function expressions forming a complex conjugate pair in step S202 are: , In the above formula, Z ( t ) is the obtained analytic signal, j is the imaginary unit, a ( t ) is the instantaneous amplitude, θ ( t ) is the phase, and there is: 。 5. The voltage sag detection method based on Hilbert transform and Otsu segmentation according to claim 2, wherein In step S203, discretization processing is performed to obtain a voltage envelope D ( n ) The functional expression of is: In the above formula, Z ( n ) is the n th analytical signal, a ( n ) is the Z ( n ) instantaneous amplitude, θ ( n ) is the Z ( n ) phase, i is the imaginary unit.

6. The voltage sag detection method based on Hilbert transform and Otsu segmentation according to claim 1, characterized in that In step S301, from the voltage envelope D ( n ) Use Otsu segmentation to extract two thresholds T 1 and T 2 includes: S401. Respectively, divide the voltage envelope D ( n ) into three different regions according to different thresholds k 1 and k 2, and perform iterative calculations of the between-class variance for the voltage envelope D ( n ) according to the following formula; , In the above formula, represents the between-class variance, P 1 to P 3 are respectively the probabilities of the th gray levels of three different regions, m 1 to m 3 are respectively the gray mean values of the th gray levels of three different regions, m G is the global gray mean value, and there is: , , In the above formula, p i is the histogram component of the normalized gray level i , k 1 is the first threshold, k 2 is the second threshold, and k 2 is greater than k 1, L is the signal gray level, i is a value between 0 and L- 1; and the relational expression is as shown in the following formula: , ; S402, at the maximum of the between-class variance when it is the maximum, take the thresholds k 1 and k 2 as the two thresholds T 1 and T 2 respectively.

7. The voltage sag detection method based on Hilbert transform and Otsu segmentation according to claim 1, characterized in that Step S103 includes: S501, based on the segmented voltage signal D 1( n ) calculate the voltage sag parameters, including the duration t D and the depth Y D of the voltage sag, where the duration t D of the voltage sag is the length between both sides of the segmented voltage signal D 1( n ), and the depth Y D of the voltage sag is the value between 0 and 1 that minimizes the variance of the segmented voltage signal D 1( n ). The calculation function expressions for the duration t D and the depth Y D of the voltage sag are as follows: In the above formula, n is the voltage sag signal D 1( n ) is the signal length in f s is the sampling frequency, k is from 1 to n is the number of discrete points; S502, according to the duration of the voltage sag t D and the depth of the voltage sag Y D determine whether a voltage sag occurs. If the depth of the voltage sag Y D is within a preset range, and the duration of the voltage sag t D satisfies: In the above formula, f s is the sampling frequency, f 0 is the power frequency, A is the set time; then it is determined that a voltage sag has occurred, and the occurrence time of the voltage sag is output t s .

8. A voltage sag detection system based on Hilbert transform and Otsu segmentation, comprising a microprocessor and a memory connected to each other, characterized in that, The microprocessor is programmed or configured to execute the voltage sag detection method based on Hilbert transform and Otsu segmentation according to any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program therein, characterized in that, The computer program is used to be programmed or configured by a microprocessor to execute the voltage sag detection method based on Hilbert transform and Otsu segmentation according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for extracting edge of laser cladding molten pool based on phase congruency

    CN105427323A

  • Image auxiliary diagnosis technology for maximum power point tracking of photovoltaic power generation system

    CN106094969A