Power quality disturbance detection method and device, computer equipment, readable storage medium and program product
By using continuous wavelet transformation and pre-trained detection models in power quality disturbance detection, the voltage signal is processed and the type of power quality disturbance is detected in real time, the problem of insufficient detection accuracy and real-time in the prior art is solved, and the detection efficiency is significantly improved.
Patent Information
- Application Number
- CN202411521077.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, the power quality disturbance detection method based on space transformation is poorly accurate and cannot realize real-time detection, resulting in low detection efficiency of power quality disturbance detection.
The voltage signal is processed using continuous wavelet transformation, a target spectrum image is generated, and inputted into a pre-trained power mass disturbance detection model to achieve real-time detection of power mass disturbance types.
It improves the accuracy of power quality disturbance detection, realizes real-time detection, shortens the detection time, and thus improves detection efficiency.
Smart Images

Figure CN119513737A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power systems, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for detecting power quality disturbances. Background Art
[0002] Power quality disturbance refers to the phenomenon that abnormal changes in parameters such as voltage, current or frequency in the power system cause the equipment to fail to work normally or its performance to deteriorate. Therefore, power quality disturbance will have a serious impact on the stability of the power system and the performance of the equipment.
[0003] In the prior art, most of the methods are based on space transformation to detect power quality disturbances in power systems.
[0004] However, this method based on spatial transformation not only has poor accuracy, but also cannot achieve real-time detection, which makes the efficiency of power quality disturbance detection low. Summary of the invention
[0005] Based on this, it is necessary to provide a more efficient power quality disturbance detection method, device, computer equipment, computer readable storage medium and computer program product to address the above technical problems.
[0006] In a first aspect, the present application provides a method for detecting power quality disturbances, comprising:
[0007] Acquire a voltage signal of a target power system, and process the voltage signal based on a continuous wavelet transform to obtain a target spectrum image corresponding to the voltage signal;
[0008] Inputting the target spectrum image into a pre-trained power quality disturbance detection model to obtain power quality disturbance detection information output by the power quality disturbance detection model;
[0009] The power quality disturbance detection information is used to indicate the power quality disturbance type of the target power system, and the power quality disturbance type includes voltage sag, voltage swell, flicker, harmonics and transient pulses.
[0010] In one embodiment, the voltage signal is processed based on continuous wavelet transform to obtain a target spectrum image corresponding to the voltage signal, including: processing the voltage signal based on continuous wavelet transform to obtain a first spectrum image corresponding to the voltage signal; cropping the first spectrum image based on preset rules to obtain the target spectrum image, and the cropping is used to remove the portion of the first spectrum image that does not contain amplitude information.
[0011] In one embodiment, the voltage signal is processed based on continuous wavelet transform to obtain a first spectrum image corresponding to the voltage signal, including: performing signal expansion configuration on the voltage signal, and performing continuous wavelet transform processing on the voltage signal after the signal expansion configuration based on a target complex-valued wavelet to obtain the first spectrum image.
[0012] In one of the embodiments, the training method of the power quality disturbance detection model includes: obtaining training data, the training data including a simulated voltage signal, a simulated power quality disturbance type corresponding to the simulated voltage signal, a real voltage signal and a real power quality disturbance type corresponding to the real voltage signal; processing the simulated voltage signal and the real voltage signal based on continuous wavelet transform to obtain training spectrum images corresponding to the simulated voltage signal and the real voltage signal; training an initial power quality disturbance detection model based on the training spectrum image, the simulated power quality disturbance type and the real power quality disturbance type to obtain the power quality disturbance detection model.
[0013] In one of the embodiments, the initial power quality disturbance detection model is trained based on the training spectrum image, the simulated power quality disturbance type and the real power quality disturbance type to obtain the power quality disturbance detection model, including: training the initial power quality disturbance detection model based on the training spectrum image, the power quality disturbance type corresponding to the simulated voltage signal and the power quality disturbance type corresponding to the real voltage signal to obtain a candidate power quality disturbance detection model; inputting the training spectrum image corresponding to the real voltage signal into the candidate power quality disturbance detection model to obtain a test power quality disturbance type corresponding to the real voltage signal; comparing the real power quality disturbance type with the test power quality disturbance type to obtain the accuracy of the candidate power quality disturbance detection model; and when the accuracy is greater than a preset accuracy threshold, determining the candidate power quality disturbance detection model as the power quality disturbance detection model.
[0014] In one of the embodiments, the obtaining of training data includes: obtaining an initial simulated voltage signal, and adding white Gaussian noise to the initial simulated voltage signal at different preset signal-to-noise ratios to obtain the simulated voltage signal; obtaining a real voltage signal and a real power quality disturbance type corresponding to the real voltage signal, and determining the simulated voltage signal, the simulated power quality disturbance type corresponding to the simulated voltage signal, the real voltage signal, and the real power quality disturbance type as the training data.
[0015] In a second aspect, the present application also provides a power quality disturbance detection device, comprising:
[0016] An acquisition module is used to acquire a voltage signal of a target power system and process the voltage signal based on a continuous wavelet transform to obtain a target spectrum image corresponding to the voltage signal;
[0017] An execution module, used for inputting the target spectrum image into a pre-trained power quality disturbance detection model to obtain power quality disturbance detection information output by the power quality disturbance detection model;
[0018] The power quality disturbance detection information is used to indicate the power quality disturbance type of the target power system, and the power quality disturbance type includes voltage sag, voltage swell, flicker, harmonics and transient pulses.
[0019] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any embodiment of the first aspect when executing the computer program.
[0020] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any embodiment of the first aspect above.
[0021] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in any embodiment of the first aspect above.
[0022] The above-mentioned power quality disturbance detection method, device, computer equipment, computer-readable storage medium and computer program product first obtain the voltage signal of the target power system, and process the voltage signal based on continuous wavelet transform to obtain a target spectrum image corresponding to the voltage signal; then input the target spectrum image into a pre-trained power quality disturbance detection model to obtain power quality disturbance detection information output by the power quality disturbance detection model, and the power quality disturbance detection information is used to indicate the power quality disturbance type of the target power system, and the power quality disturbance type includes voltage sag, voltage swell, flicker, harmonics and transient pulses. The power quality disturbance detection method provided in the present application adopts continuous wavelet transform to process the voltage signal. Since continuous wavelet transform can effectively process non-stationary signals, the accuracy of power quality disturbance detection is effectively improved. In the method provided in the present application, continuous wavelet transform and power quality disturbance detection model are also combined, which can not only realize real-time detection of power quality disturbance, but also shorten the duration of power quality disturbance detection, thereby effectively improving the efficiency of power quality disturbance detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 is a flow chart of a method for detecting power quality disturbance in one embodiment;
[0025] Figure 2 A schematic diagram of a flow chart of a method for obtaining a target spectrum image corresponding to a voltage signal in one embodiment;
[0026] Figure 3 is a flow chart of a method for training a power quality disturbance detection model in one embodiment;
[0027] Figure 4 A schematic diagram of a flow chart for obtaining the power quality disturbance detection model in an embodiment;
[0028] Figure 5 A schematic diagram of a flow chart of a method for obtaining training data in one embodiment;
[0029] Figure 6 is a flow chart of a method for detecting power quality disturbances in another embodiment;
[0030] Figure 7 is a structural block diagram of a power quality disturbance detection device in one embodiment;
[0031] Figure 8 is an internal structure diagram of a computer device in one embodiment;
[0032] Fig. 9 is an internal structure diagram of a computer device in another embodiment;
[0033] Fig.10 is a schematic diagram of an ideal sine wave in one embodiment;
[0034] Fig.11 A schematic diagram of a voltage signal of a voltage sag type in one embodiment;
[0035] Fig.12 A schematic diagram of a voltage signal of a voltage swell type in one embodiment;
[0036] Fig.13 is a schematic diagram of a flicker type voltage signal in one embodiment;
[0037] Fig.14is a schematic diagram of a harmonic voltage signal in one embodiment;
[0038] Fig.15 is a schematic diagram of a transient pulse type voltage signal in one embodiment;
[0039] Fig.16 FIG. 4 is a schematic diagram of a real voltage signal in an embodiment. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0041] Power quality disturbance refers to the phenomenon that abnormal changes in parameters such as voltage, current or frequency in the power system cause the equipment to fail to work normally or its performance to deteriorate. Therefore, power quality disturbance will have a serious impact on the stability of the power system and the performance of the equipment.
[0042] In the prior art, most of the methods are based on space transformation to detect power quality disturbances in power systems.
[0043] However, this method based on spatial transformation not only has poor accuracy, but also cannot achieve real-time detection, which makes the efficiency of power quality disturbance detection low.
[0044] In view of this, the present application provides a power quality disturbance detection method, which can not only improve the accuracy of power quality disturbance detection, but also realize real-time detection of power quality disturbance, thereby effectively improving the efficiency of power quality disturbance detection.
[0045] The power quality disturbance detection method provided in the present application may be executed by a computer device, which may be a terminal or a server.
[0046] In an exemplary embodiment, Figure 1 As shown, a method for detecting power quality disturbance is provided, the method comprising the following steps:
[0047] Step 101: Acquire a voltage signal of a target power system, and process the voltage signal based on continuous wavelet transform to obtain a target frequency spectrum image corresponding to the voltage signal.
[0048] Optionally, the power system refers to a system for producing, transmitting, distributing and using electric energy. The target power system refers to a power system to be subjected to power quality disturbance detection. The power system may include power plants, substations, transmission lines, distribution networks and user equipment.
[0049] Continuous Wavelet Transform (CWT) refers to a technology that can be used for signal analysis and processing. Continuous wavelet transform can provide both time information and frequency information.
[0050] For example, CWT can extract information from voltage signals through windows, which can be evaluated by the mother wavelet. This process gives CWT the flexibility to adjust the window size according to the scale of the selected mother wavelet. In other words, the window can be enlarged or reduced as needed to better capture the details of the voltage signal. Therefore, a smaller scale means more sensitivity to frequency changes, which can be specifically expressed as ,in, is the transformation function, is the scale factor, is the overlap time, is the mother wavelet function, is the input signal that changes with time, that is, the voltage signal. CMT can scale the voltage signal according to actual needs, so that a high-resolution target spectrum image can be obtained according to the needs of analyzing the voltage signal. In addition, since the energy it represents is limited, the wavelet function used by the continuous wavelet transform must also meet certain constraints and acceptable conditions. Specifically, , ,in, is the energy of the wavelet, is the mother wavelet function.
[0051] The frequency spectrum image can be used to characterize the frequency components of a signal. The target frequency spectrum image is also a frequency spectrum image that can be used to characterize the frequency components of a target power system voltage signal.
[0052] In some exemplary embodiments, the voltage signal of the target power system can be acquired in real time, and then the target wavelet function can be determined from multiple wavelet functions according to the specific and actual needs of the voltage signal, and then the voltage signal can be processed by continuous wavelet transformation based on the target wavelet function to obtain the target spectrum image corresponding to the voltage signal.
[0053] In other exemplary embodiments, the voltage signal of the target power system can be acquired in real time, and then the voltage signal can be input into a pre-trained target spectrum image determination model to obtain a target spectrum image corresponding to the voltage signal. The target spectrum image determination model can be used to perform continuous wavelet transform processing on the voltage signal.
[0054] Step 102: input the target spectrum image into a pre-trained power quality disturbance detection model to obtain power quality disturbance detection information output by the power quality disturbance detection model.
[0055] The power quality disturbance detection information is used to indicate the power quality disturbance type of the target power system, and the power quality disturbance type includes voltage sag, voltage swell, flicker, harmonics and transient pulses.
[0056] Optionally, the power quality disturbance detection model may be a convolutional neural network (CNN) model.
[0057] Exemplarily, the power quality disturbance detection model may include a convolution layer, a pooling layer, a flattening layer, and a classification layer. The convolution layer is the main component of the power quality disturbance detection model and includes a series of filters (convolution kernels). Specifically, the convolution layer may include four layers, with 8, 16, 32, and 64 neurons, respectively, and use a rectified linear unit (ReLU) activation function. The convolution layer maps the target spectrum image to a new space through a convolution operation. That is, as the filtering process proceeds, the most representative features are extracted from the target spectrum image. The process performed by the convolution network can be expressed as ,in, represents the output of the mapping feature, Indicates input, represents a two-dimensional filter set, is the bias training parameter.
[0058] Furthermore, the pooling layer is also the polishing layer. The feature extraction process of the pooling layer when performing max-pooling can be expressed as ,in, represents the feature output after mapping, are the elements in the clustered area, The size of the aggregation map dimension.
[0059] The flattening layer is responsible for vectorizing the mapping performed by the previous layers to form a vector containing the information processed by all the stages of convolution and polishing. In this process, a concentrated feature vector is generated for better processing in the classification layer. The classification layer is responsible for processing all the information passed by the flattening layer and using an activation function in the process of performing category classification, which can be a Softmax function.
[0060] Optionally, the voltage sag can be a sudden drop in voltage at a certain point in the power system in a short period of time, but it does not reach the level of power outage. It usually lasts for a few milliseconds to a few seconds. The voltage sag may cause sensitive equipment such as computers, programmable logic controllers (PLCs), etc. to malfunction or shut down. Voltage swell is the opposite of voltage sag, which refers to a sudden increase in voltage in a short period of time. This situation may be caused by the sudden removal of a large load or the input of a capacitor bank. Excessive voltage may damage electrical equipment or shorten its service life. Flicker refers to the flickering phenomenon of lights caused by voltage fluctuations. It is usually caused by the start of large motors, arc furnace operation, etc. Flicker may cause malfunctions of televisions, lighting equipment, etc. Harmonics refer to voltage or current components with frequencies that are integer multiples of the fundamental wave. They are mainly generated by nonlinear loads (such as rectifiers, inverters, etc.). Harmonics can cause problems such as motor overheating, increased transformer noise, and communication interference. Transient pulses refer to voltage or current mutations that occur in a very short period of time. They may be caused by lightning, switch operation, electrostatic discharge, etc. Transient pulses have high energy and may cause serious damage to electronic equipment.
[0061] In some exemplary embodiments, after determining the target spectrum image corresponding to the voltage signal, the target spectrum image can be input into a pre-trained power quality disturbance detection model to obtain power quality disturbance detection information output by the power quality disturbance detection model. The current power quality disturbance type of the power system can be determined through the power quality disturbance detection information.
[0062] The above-mentioned power quality disturbance detection method first obtains the voltage signal of the target power system, and processes the voltage signal based on continuous wavelet transform to obtain the target spectrum image corresponding to the voltage signal; then the target spectrum image is input into the pre-trained power quality disturbance detection model to obtain the power quality disturbance detection information output by the power quality disturbance detection model, and the power quality disturbance detection information is used to indicate the power quality disturbance type of the target power system, and the power quality disturbance type includes voltage sag, voltage swell, flicker, harmonics and transient pulses. The power quality disturbance detection method provided by the present application uses continuous wavelet transform to process the voltage signal. Since continuous wavelet transform can effectively process non-stationary signals, the accuracy of power quality disturbance detection is effectively improved. In the method provided by the present application, continuous wavelet transform and power quality disturbance detection model are also combined, which can not only realize real-time detection of power quality disturbance, but also shorten the duration of power quality disturbance detection, thereby effectively improving the efficiency of power quality disturbance detection.
[0063] In an exemplary embodiment, Figure 2As shown, the voltage signal is processed based on continuous wavelet transform to obtain a target spectrum image corresponding to the voltage signal, including the following steps:
[0064] Step 201 : Process the voltage signal based on continuous wavelet transform to obtain a first spectrum image corresponding to the voltage signal.
[0065] In an optional embodiment of the present application, the voltage signal is processed based on a continuous wavelet transform to obtain a first spectrum image corresponding to the voltage signal, including: performing signal expansion configuration on the voltage signal, and performing a continuous wavelet transform on the voltage signal after the signal expansion configuration based on a target complex-valued wavelet to obtain the first spectrum image.
[0066] Optionally, the signal extension configuration can be a mirror extension or a periodic extension. When performing continuous wavelet transform processing, boundary effects may occur at the boundaries of the voltage signal, which will affect the accuracy of the transformation result. In order to reduce this effect, the voltage signal can be expanded first, for example, by mirror extension or periodic extension. Mirror extension is to symmetrically copy the boundary part of the signal, while periodic extension is to treat the signal as a periodic signal for processing. This can eliminate the discontinuity at the boundary to a certain extent and improve the reliability of the transformation result.
[0067] The target complex-valued wavelet may be a Morlet wavelet. Morlet wavelet is a commonly used complex-valued wavelet with good time-frequency localization characteristics and can provide information on both time and frequency. This makes it advantageous in analyzing non-stationary signals, such as voltage signals in power systems.
[0068] In some exemplary embodiments, after acquiring the voltage signal of the target power system, the voltage signal may be firstly expanded and then subjected to continuous wavelet transform processing based on Morlet wavelet to obtain the first spectrum image.
[0069] Step 202: Crop the first spectrum image based on a preset rule to obtain the target spectrum image.
[0070] The cropping process is used to remove the portion of the first spectrum image that does not contain amplitude information.
[0071] Optionally, the preset rule can be set by a technician according to actual needs.
[0072] In some exemplary embodiments, the resolution of the first spectrum image may be 875×656 pixels. Since not all areas of the first spectrum image contain information useful for power quality disturbance detection, the first spectrum image may be cropped to retain only the portion containing the amplitude component information. Specifically, the cropped image size may be 600×200 pixels. Furthermore, in order to reduce computational complexity, the size of the cropped image is adjusted to 128×128 pixels, and the resulting image is the target spectrum image.
[0073] In an exemplary embodiment, Figure 3 As shown, the training method of the power quality disturbance detection model includes the following steps:
[0074] Step 301: Obtain training data.
[0075] The training data includes a simulated voltage signal, a simulated power quality disturbance type corresponding to the simulated voltage signal, a real voltage signal, and a real power quality disturbance type corresponding to the real voltage signal.
[0076] Optionally, the simulated voltage signal is generated at a base frequency of 50 Hz and a sampling rate of 8 kHz, and has a duration of 0.3 seconds. Fig.10 , Fig.11 , Fig.12 , Fig.13 , Fig.14 and Fig.15 As shown, Fig.10 is an ideal sine wave, Fig.11 It is a voltage signal of voltage sag type. Fig.12 It is a voltage signal of voltage swell type. Fig.13 It is a flicker type voltage signal. Fig.14 is a harmonic voltage signal, Fig.15 It is a transient pulse type voltage signal.
[0077] The real voltage signal is collected from a 30MW photovoltaic power plant. The real voltage signal is collected on a 100kW three-phase inverter. The base frequency of the inverter is 50Hz, the voltage RMS is 220V, and there is a voltage sag disturbance. The real voltage signal can be Fig.16 As shown, it should be noted that the acquisition of the real voltage signal should be as close as possible to the disturbance point of interest to ensure that there is no environmental or structural interference causing errors. It should be noted that the amplitudes of all real voltage signals have been normalized.
[0078] Step 302: Process the simulated voltage signal and the real voltage signal based on continuous wavelet transform to obtain training spectrum images corresponding to the simulated voltage signal and the real voltage signal.
[0079] In some exemplary embodiments, the process of processing the voltage signal based on continuous wavelet transform can refer to the above content, which will not be repeated here.
[0080] Step 303: training an initial power quality disturbance detection model based on the training spectrum image, the simulated power quality disturbance type and the real power quality disturbance type to obtain the power quality disturbance detection model.
[0081] In some exemplary embodiments, after processing the simulated voltage signal and the real voltage signal based on continuous wavelet transform to obtain training spectrum images corresponding to the simulated voltage signal and the real voltage signal, an initial power quality disturbance detection model can be trained based on the training spectrum image, the simulated power quality disturbance type and the real power quality disturbance type to obtain the power quality disturbance detection model.
[0082] In an exemplary embodiment, Figure 4 As shown, the initial power quality disturbance detection model is trained based on the training spectrum image, the simulated power quality disturbance type and the real power quality disturbance type to obtain the power quality disturbance detection model, including the following steps:
[0083] Step 401: training an initial power quality disturbance detection model based on the training spectrum image, the power quality disturbance type corresponding to the simulated voltage signal, and the power quality disturbance type corresponding to the real voltage signal to obtain a candidate power quality disturbance detection model;
[0084] Step 402: input the training spectrum image corresponding to the real voltage signal into the candidate power quality disturbance detection model to obtain the test power quality disturbance type corresponding to the real voltage signal;
[0085] Step 403: compare the real power quality disturbance type with the test power quality disturbance type to obtain the accuracy of the candidate power quality disturbance detection model;
[0086] Step 404: when the accuracy is greater than a preset accuracy threshold, determine the candidate power quality disturbance detection model as the power quality disturbance detection model.
[0087] Optionally, the preset accuracy threshold may be pre-set by a technician according to actual needs.
[0088] In some exemplary embodiments, after processing the simulated voltage signal and the real voltage signal based on continuous wavelet transform to obtain training spectrum images corresponding to the simulated voltage signal and the real voltage signal, the initial power quality disturbance detection model can be trained based on the training spectrum image, the power quality disturbance type corresponding to the simulated voltage signal, and the power quality disturbance type corresponding to the real voltage signal to obtain a candidate power quality disturbance detection model.
[0089] Furthermore, the training spectrum image corresponding to the real voltage signal is input into the candidate power quality disturbance detection model to obtain the test power quality disturbance type corresponding to the real voltage signal, and the real power quality disturbance type and the test power quality disturbance type are compared to obtain the accuracy of the candidate power quality disturbance detection model, and when the accuracy is greater than a preset accuracy threshold, the candidate power quality disturbance detection model is determined as the power quality disturbance detection model.
[0090] Otherwise, the candidate power quality disturbance detection model is optimized until its accuracy is greater than a preset accuracy threshold, and then the candidate power quality disturbance detection model is determined as the power quality disturbance detection model.
[0091] In an exemplary embodiment, Figure 5 As shown, the method of obtaining training data includes the following steps:
[0092] Step 501, obtaining an initial simulated voltage signal, and adding white Gaussian noise to the initial simulated voltage signal at different preset signal-to-noise ratios to obtain the simulated voltage signal;
[0093] Step 502: Obtain a real voltage signal and a real power quality disturbance type corresponding to the real voltage signal, and determine the simulated voltage signal, the simulated power quality disturbance type corresponding to the simulated voltage signal, the real voltage signal and the real power quality disturbance type as the training data.
[0094] In some exemplary embodiments, since the initial simulated voltage signal can be regarded as an ideal signal to some extent and is different from the actual signal, white Gaussian noise can be added to the initial simulated voltage signal, and this operation can be repeated under signal-to-noise ratios of 0 dB, 10 dB, 20 dB, and 30 dB to generate simulated voltage signals under different signal-to-noise ratio conditions;
[0095] Furthermore, a real voltage signal and a real power quality disturbance type corresponding to the real voltage signal are obtained, and the simulated voltage signal, the simulated power quality disturbance type corresponding to the simulated voltage signal, the real voltage signal and the real power quality disturbance type are determined as the training data.
[0096] In an exemplary embodiment, Figure 6 As shown, another method for detecting power quality disturbance is provided, the method comprising the following steps:
[0097] Step 601, acquiring a voltage signal of a target power system; performing signal expansion configuration on the voltage signal, and performing continuous wavelet transform processing on the voltage signal after signal expansion configuration based on a target complex-valued wavelet to obtain the first spectrum image;
[0098] Step 602: performing a cropping process on the first spectrum image based on a preset rule to obtain the target spectrum image, wherein the cropping process is used to remove a portion of the first spectrum image that does not contain amplitude information;
[0099] Step 603: input the target spectrum image into a pre-trained power quality disturbance detection model to obtain power quality disturbance detection information output by the power quality disturbance detection model; wherein the power quality disturbance detection information is used to indicate the power quality disturbance type of the target power system, and the power quality disturbance type includes voltage sag, voltage swell, flicker, harmonics and transient pulses.
[0100] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0101] Based on the same inventive concept, the embodiment of the present application also provides a power quality disturbance detection device for implementing the power quality disturbance detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more power quality disturbance detection device embodiments provided below can refer to the limitations of the power quality disturbance detection method above, and will not be repeated here.
[0102] In an exemplary embodiment, Figure 7 As shown, a power quality disturbance detection device 700 is provided, comprising: an acquisition module 701 and an execution module 702, wherein:
[0103] An acquisition module 701 is used to acquire a voltage signal of a target power system and process the voltage signal based on a continuous wavelet transform to obtain a target spectrum image corresponding to the voltage signal;
[0104] An execution module 702 is used to input the target spectrum image into a pre-trained power quality disturbance detection model to obtain power quality disturbance detection information output by the power quality disturbance detection model;
[0105] The power quality disturbance detection information is used to indicate the power quality disturbance type of the target power system, and the power quality disturbance type includes voltage sag, voltage swell, flicker, harmonics and transient pulses.
[0106] In one embodiment, the acquisition module 701 is specifically used to process the voltage signal based on continuous wavelet transform to obtain a first spectrum image corresponding to the voltage signal; and to crop the first spectrum image based on preset rules to obtain the target spectrum image, and the cropping process is used to remove the part of the first spectrum image that does not contain amplitude information.
[0107] In one embodiment, the acquisition module 701 is specifically configured to perform signal expansion configuration on the voltage signal, and perform continuous wavelet transform processing on the voltage signal after the signal expansion configuration based on a target complex-valued wavelet to obtain the first spectrum image.
[0108] In one embodiment, the execution module 702 is also used to obtain training data, which includes a simulated voltage signal, a simulated power quality disturbance type corresponding to the simulated voltage signal, a real voltage signal, and a real power quality disturbance type corresponding to the real voltage signal; the simulated voltage signal and the real voltage signal are processed based on continuous wavelet transform to obtain training spectrum images corresponding to the simulated voltage signal and the real voltage signal; an initial power quality disturbance detection model is trained based on the training spectrum image, the simulated power quality disturbance type, and the real power quality disturbance type to obtain the power quality disturbance detection model.
[0109] In one embodiment, the execution module 702 is specifically used to train an initial power quality disturbance detection model based on the training spectrum image, the power quality disturbance type corresponding to the simulated voltage signal, and the power quality disturbance type corresponding to the real voltage signal to obtain a candidate power quality disturbance detection model; input the training spectrum image corresponding to the real voltage signal into the candidate power quality disturbance detection model to obtain a test power quality disturbance type corresponding to the real voltage signal; compare the real power quality disturbance type with the test power quality disturbance type to obtain the accuracy of the candidate power quality disturbance detection model; and when the accuracy is greater than a preset accuracy threshold, determine the candidate power quality disturbance detection model as the power quality disturbance detection model.
[0110] In one embodiment, the execution module 702 is specifically used to obtain an initial simulated voltage signal, and add white Gaussian noise to the initial simulated voltage signal under different preset signal-to-noise ratios to obtain the simulated voltage signal; obtain a real voltage signal and a real power quality disturbance type corresponding to the real voltage signal, and determine the simulated voltage signal, the simulated power quality disturbance type corresponding to the simulated voltage signal, the real voltage signal and the real power quality disturbance type as the training data.
[0111] Each module in the above-mentioned power quality disturbance detection device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0112] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for detecting power quality disturbances is implemented.
[0113] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for detecting power quality disturbance is implemented.
[0114] Those skilled in the art will understand that Figure 8 and Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0115] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0116] Acquire a voltage signal of a target power system, and process the voltage signal based on a continuous wavelet transform to obtain a target spectrum image corresponding to the voltage signal;
[0117] Inputting the target spectrum image into a pre-trained power quality disturbance detection model to obtain power quality disturbance detection information output by the power quality disturbance detection model;
[0118] The power quality disturbance detection information is used to indicate the power quality disturbance type of the target power system, and the power quality disturbance type includes voltage sag, voltage swell, flicker, harmonics and transient pulses.
[0119] In one embodiment, when the processor executes the computer program, the following steps are also implemented: processing the voltage signal based on continuous wavelet transform to obtain a first spectrum image corresponding to the voltage signal; cropping the first spectrum image based on preset rules to obtain the target spectrum image, and the cropping process is used to remove the portion of the first spectrum image that does not contain amplitude information.
[0120] In one embodiment, when the processor executes the computer program, the following steps are further implemented: performing signal expansion configuration on the voltage signal, and performing continuous wavelet transform processing on the voltage signal after signal expansion configuration based on the target complex-valued wavelet to obtain the first spectrum image.
[0121] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining training data, which includes a simulated voltage signal, a simulated power quality disturbance type corresponding to the simulated voltage signal, a real voltage signal, and a real power quality disturbance type corresponding to the real voltage signal; processing the simulated voltage signal and the real voltage signal based on continuous wavelet transform to obtain training spectrum images corresponding to the simulated voltage signal and the real voltage signal; training an initial power quality disturbance detection model based on the training spectrum image, the simulated power quality disturbance type, and the real power quality disturbance type to obtain the power quality disturbance detection model.
[0122] In one embodiment, when the processor executes the computer program, the following steps are also implemented: an initial power quality disturbance detection model is trained based on the training spectrum image, the power quality disturbance type corresponding to the simulated voltage signal, and the power quality disturbance type corresponding to the real voltage signal to obtain a candidate power quality disturbance detection model; the training spectrum image corresponding to the real voltage signal is input into the candidate power quality disturbance detection model to obtain a test power quality disturbance type corresponding to the real voltage signal; the real power quality disturbance type and the test power quality disturbance type are compared to obtain the accuracy of the candidate power quality disturbance detection model; when the accuracy is greater than a preset accuracy threshold, the candidate power quality disturbance detection model is determined as the power quality disturbance detection model.
[0123] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining an initial simulated voltage signal, and adding white Gaussian noise to the initial simulated voltage signal at different preset signal-to-noise ratios to obtain the simulated voltage signal; obtaining a real voltage signal and a real power quality disturbance type corresponding to the real voltage signal, and determining the simulated voltage signal, the simulated power quality disturbance type corresponding to the simulated voltage signal, the real voltage signal, and the real power quality disturbance type as the training data.
[0124] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0125] Acquire a voltage signal of a target power system, and process the voltage signal based on a continuous wavelet transform to obtain a target spectrum image corresponding to the voltage signal;
[0126] Inputting the target spectrum image into a pre-trained power quality disturbance detection model to obtain power quality disturbance detection information output by the power quality disturbance detection model;
[0127] The power quality disturbance detection information is used to indicate the power quality disturbance type of the target power system, and the power quality disturbance type includes voltage sag, voltage swell, flicker, harmonics and transient pulses.
[0128] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: processing the voltage signal based on continuous wavelet transform to obtain a first spectrum image corresponding to the voltage signal; cropping the first spectrum image based on preset rules to obtain the target spectrum image, and the cropping process is used to remove the portion of the first spectrum image that does not contain amplitude information.
[0129] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: performing signal expansion configuration on the voltage signal, and performing continuous wavelet transform processing on the voltage signal after signal expansion configuration based on the target complex-valued wavelet to obtain the first spectrum image.
[0130] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: obtaining training data, which includes a simulated voltage signal, a simulated power quality disturbance type corresponding to the simulated voltage signal, a real voltage signal, and a real power quality disturbance type corresponding to the real voltage signal; processing the simulated voltage signal and the real voltage signal based on continuous wavelet transform to obtain training spectrum images corresponding to the simulated voltage signal and the real voltage signal; training an initial power quality disturbance detection model based on the training spectrum image, the simulated power quality disturbance type, and the real power quality disturbance type to obtain the power quality disturbance detection model.
[0131] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: an initial power quality disturbance detection model is trained based on the training spectrum image, the power quality disturbance type corresponding to the simulated voltage signal, and the power quality disturbance type corresponding to the real voltage signal to obtain a candidate power quality disturbance detection model; the training spectrum image corresponding to the real voltage signal is input into the candidate power quality disturbance detection model to obtain a test power quality disturbance type corresponding to the real voltage signal; the real power quality disturbance type and the test power quality disturbance type are compared to obtain the accuracy of the candidate power quality disturbance detection model; when the accuracy is greater than a preset accuracy threshold, the candidate power quality disturbance detection model is determined as the power quality disturbance detection model.
[0132] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining an initial simulated voltage signal, and adding white Gaussian noise to the initial simulated voltage signal at different preset signal-to-noise ratios to obtain the simulated voltage signal; obtaining a real voltage signal and a real power quality disturbance type corresponding to the real voltage signal, and determining the simulated voltage signal, the simulated power quality disturbance type corresponding to the simulated voltage signal, the real voltage signal and the real power quality disturbance type as the training data.
[0133] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0134] Acquire a voltage signal of a target power system, and process the voltage signal based on a continuous wavelet transform to obtain a target spectrum image corresponding to the voltage signal;
[0135] Inputting the target spectrum image into a pre-trained power quality disturbance detection model to obtain power quality disturbance detection information output by the power quality disturbance detection model;
[0136] The power quality disturbance detection information is used to indicate the power quality disturbance type of the target power system, and the power quality disturbance type includes voltage sag, voltage swell, flicker, harmonics and transient pulses.
[0137] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: processing the voltage signal based on continuous wavelet transform to obtain a first spectrum image corresponding to the voltage signal; cropping the first spectrum image based on preset rules to obtain the target spectrum image, and the cropping process is used to remove the portion of the first spectrum image that does not contain amplitude information.
[0138] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: performing signal expansion configuration on the voltage signal, and performing continuous wavelet transform processing on the voltage signal after signal expansion configuration based on the target complex-valued wavelet to obtain the first spectrum image.
[0139] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: obtaining training data, which includes a simulated voltage signal, a simulated power quality disturbance type corresponding to the simulated voltage signal, a real voltage signal, and a real power quality disturbance type corresponding to the real voltage signal; processing the simulated voltage signal and the real voltage signal based on continuous wavelet transform to obtain training spectrum images corresponding to the simulated voltage signal and the real voltage signal; training an initial power quality disturbance detection model based on the training spectrum image, the simulated power quality disturbance type, and the real power quality disturbance type to obtain the power quality disturbance detection model.
[0140] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: an initial power quality disturbance detection model is trained based on the training spectrum image, the power quality disturbance type corresponding to the simulated voltage signal, and the power quality disturbance type corresponding to the real voltage signal to obtain a candidate power quality disturbance detection model; the training spectrum image corresponding to the real voltage signal is input into the candidate power quality disturbance detection model to obtain a test power quality disturbance type corresponding to the real voltage signal; the real power quality disturbance type and the test power quality disturbance type are compared to obtain the accuracy of the candidate power quality disturbance detection model; when the accuracy is greater than a preset accuracy threshold, the candidate power quality disturbance detection model is determined as the power quality disturbance detection model.
[0141] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining an initial simulated voltage signal, and adding white Gaussian noise to the initial simulated voltage signal at different preset signal-to-noise ratios to obtain the simulated voltage signal; obtaining a real voltage signal and a real power quality disturbance type corresponding to the real voltage signal, and determining the simulated voltage signal, the simulated power quality disturbance type corresponding to the simulated voltage signal, the real voltage signal and the real power quality disturbance type as the training data.
[0142] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0143] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0144] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for detecting power quality disturbance, characterized in that: The method comprises: Acquire a voltage signal of a target power system, and process the voltage signal based on a continuous wavelet transform to obtain a target frequency spectrum image corresponding to the voltage signal; Inputting the target spectrum image into a pre-trained power quality disturbance detection model to obtain power quality disturbance detection information output by the power quality disturbance detection model; The power quality disturbance detection information is used to indicate the power quality disturbance type of the target power system, and the power quality disturbance type includes voltage sag, voltage swell, flicker, harmonics and transient pulses.
2. The method according to claim 1, characterized in that: The processing of the voltage signal based on continuous wavelet transform to obtain a target spectrum image corresponding to the voltage signal includes: Processing the voltage signal based on continuous wavelet transform to obtain a first spectrum image corresponding to the voltage signal; The first spectrum image is cropped based on a preset rule to obtain the target spectrum image, wherein the cropping is used to remove a portion of the first spectrum image that does not contain amplitude information.
3. The method according to claim 2, characterized in that The step of processing the voltage signal based on continuous wavelet transform to obtain a first spectrum image corresponding to the voltage signal includes: The voltage signal is subjected to signal expansion configuration, and a continuous wavelet transform process is performed on the voltage signal after the signal expansion configuration based on a target complex-valued wavelet, so as to obtain the first spectrum image.
4. The method according to claim 1, characterized in that The training method of the power quality disturbance detection model comprises: Acquire training data, the training data comprising a simulated voltage signal, a simulated power quality disturbance type corresponding to the simulated voltage signal, a real voltage signal, and a real power quality disturbance type corresponding to the real voltage signal; Processing the simulated voltage signal and the real voltage signal based on continuous wavelet transform to obtain training spectrum images corresponding to the simulated voltage signal and the real voltage signal; An initial power quality disturbance detection model is trained based on the training spectrum image, the simulated power quality disturbance type and the real power quality disturbance type to obtain the power quality disturbance detection model.
5. The method according to claim 4, characterized in that The training of the initial power quality disturbance detection model based on the training spectrum image, the simulated power quality disturbance type and the real power quality disturbance type to obtain the power quality disturbance detection model includes: Training an initial power quality disturbance detection model based on the training spectrum image, the power quality disturbance type corresponding to the simulated voltage signal, and the power quality disturbance type corresponding to the real voltage signal to obtain a candidate power quality disturbance detection model; Inputting the training spectrum image corresponding to the real voltage signal into the candidate power quality disturbance detection model to obtain the test power quality disturbance type corresponding to the real voltage signal; Comparing the actual power quality disturbance type with the test power quality disturbance type to obtain the accuracy of the candidate power quality disturbance detection model; In a case where the accuracy is greater than a preset accuracy threshold, the candidate power quality disturbance detection model is determined as the power quality disturbance detection model.
6. The method according to claim 4, characterized in that The obtaining of training data comprises: Acquire an initial simulated voltage signal, and add white Gaussian noise to the initial simulated voltage signal at different preset signal-to-noise ratios to obtain the simulated voltage signal; A real voltage signal and a real power quality disturbance type corresponding to the real voltage signal are obtained, and the simulated voltage signal, the simulated power quality disturbance type corresponding to the simulated voltage signal, the real voltage signal and the real power quality disturbance type are determined as the training data.
7. A power quality disturbance detection device, characterized in that: The device comprises: An acquisition module, used for acquiring a voltage signal of a target power system, and processing the voltage signal based on a continuous wavelet transform to obtain a target spectrum image corresponding to the voltage signal; An execution module, used for inputting the target spectrum image into a pre-trained power quality disturbance detection model to obtain power quality disturbance detection information output by the power quality disturbance detection model; The power quality disturbance detection information is used to indicate the power quality disturbance type of the target power system, and the power quality disturbance type includes voltage sag, voltage swell, flicker, harmonics and transient pulses.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.