Electric energy quality data optimization method and device, electronic equipment and storage medium
By periodically segmenting and classifying the power quality data and utilizing the combination of Fourier transform basis and observation matrix, the problem of low reconstruction efficiency in the existing technology is solved and efficient power quality data optimization is achieved.
Patent Information
- Application Number
- CN202510832515.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-09-12
AI Technical Summary
Existing technologies cannot effectively distinguish different types of power quality data, especially transient distortion data and standard sinusoidal data, resulting in low reconstruction efficiency.
The power quality data is periodically segmented and classified, and sparse transformation is performed using the Fourier transform basis to generate an observation matrix, which is then reconstructed using the orthogonal matching pursuit algorithm.
The data processing efficiency and reconstruction accuracy are significantly improved, and the reconstruction process of different types of power quality data is optimized.
Smart Images

Figure CN120632367A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric energy data processing, and in particular to a method, device, electronic equipment and storage medium for optimizing electric energy quality data. Background Art
[0002] With the development of smart grids and the power Internet of Things (IoT), the demand for data collection and storage in power systems is increasing. This is particularly true for the collection of massive amounts of power quality data. Traditional Shannon sampling theorem faces challenges with high-frequency sampling and data redundancy, resulting in the generation of large amounts of redundant data and placing a significant burden on computation and storage. Therefore, efficiently processing and optimizing power quality data has become a critical issue that needs to be addressed in the power sector.
[0003] The introduction of compressed sensing (CS) theory offers a new approach to solving this problem. Using sparse representation and observation matrices, CS can directly compress data during sampling, significantly reducing redundancy and alleviating computational and storage requirements.
[0004] Traditional compressed sensing techniques typically rely on a sinusoidal-based compressed measurement matrix to compress the periodic characteristics of power signals. However, these methods fail to fully consider the heterogeneity of data when dealing with different types of power quality data, and typically adopt a unified compression method, resulting in low reconstruction efficiency. Another method is to perform sparse transformation based on Fourier transform and apply it to standard sinusoidal power quality data processing. However, the processing effect is not ideal for sudden transient distortion data such as voltage sags and harmonics. Therefore, these methods generally have the disadvantage of being unable to effectively distinguish between different types of power quality data, especially transient distortion data and standard sinusoidal data, and are unable to fully improve reconstruction efficiency. Summary of the Invention
[0005] The present invention provides a power quality data optimization method, device, electronic device and storage medium, which are used to solve the technical problem that the existing technology cannot effectively distinguish different types of power quality data, especially transient distortion data and standard sinusoidal data, and cannot fully improve the reconstruction efficiency.
[0006] The present invention provides a method for optimizing power quality data, comprising:
[0007] Periodically segmenting the original power quality data to obtain power quality segmented data;
[0008] Classifying the power quality segmented data to obtain power quality data groups;
[0009] Performing a sparse transformation on the data in the power quality data group using a Fourier transform basis to obtain transformed power quality data groups with different sparsities;
[0010] generating an observation matrix for each of the transformed power quality data groups;
[0011] The transformed power quality data are grouped and reconstructed using the observation matrix to obtain power quality optimization data.
[0012] Optionally, the power quality data group includes a transient distortion power quality data set and a standard sinusoidal power quality data set; and the step of classifying the power quality segmented data to obtain the power quality data group includes:
[0013] Select the benchmark reference quantity among all power quality segment data;
[0014] Calculating the distance between each of the power quality segment data and the benchmark reference value;
[0015] Determining the power quality segmented data with the distance less than a preset distance measurement threshold as a standard sinusoidal power quality data set;
[0016] The power quality segmented data whose distance is not less than the preset distance measurement threshold is determined as a transient distorted power quality data set.
[0017] Optionally, after the step of generating the observation matrix for transforming the power quality data group, the method further includes:
[0018] extracting a plurality of data segments from the transformed power quality data group to generate a random data matrix;
[0019] Based on the random data matrix, the observation matrix is verified using constrained isometry;
[0020] When the verification fails, returning to the step of generating an observation matrix for each of the transformed power quality data groups;
[0021] When the verification is passed, the process jumps to the step of reconstructing the transformed power quality data groups using the observation matrix to obtain power quality optimization data.
[0022] Optionally, the step of reconstructing the transformed power quality data groups using the observation matrix to obtain power quality optimization data includes:
[0023] Using the observation matrix to observe the converted power quality data in groups to obtain observation values;
[0024] Taking the observation values as constraints, an orthogonal matching pursuit algorithm is used to reconstruct the transformed power quality data groups to obtain power quality optimization data.
[0025] The present invention also provides a power quality data optimization device, comprising:
[0026] A segmentation module is used to periodically segment the original power quality data to obtain power quality segmentation data;
[0027] a classification module, configured to classify the power quality segmented data to obtain power quality data groups;
[0028] a sparse transformation module, configured to perform sparse transformation on the data in the power quality data group using a Fourier transform basis to obtain transformed power quality data groups with different sparsities;
[0029] An observation matrix generating module, configured to generate an observation matrix for each of the transformed power quality data groups;
[0030] The reconstruction module is used to reconstruct the transformed power quality data groups using the observation matrix to obtain power quality optimization data.
[0031] Optionally, the power quality data group includes a transient distortion power quality data set and a standard sinusoidal power quality data set; and the classification module includes:
[0032] A benchmark reference quantity selection submodule is used to select a benchmark reference quantity from all power quality segmented data;
[0033] a distance calculation submodule, configured to calculate the distance between each of the power quality segment data and the benchmark reference quantity;
[0034] a standard sinusoidal power quality data set determining submodule, configured to determine the power quality segmented data whose distance is less than a preset distance measurement threshold as a standard sinusoidal power quality data set;
[0035] The transient distorted power quality data set determining submodule is configured to determine the power quality segmented data whose distance is not less than the preset distance measurement threshold as a transient distorted power quality data set.
[0036] Optionally, it also includes:
[0037] A random data matrix generation module, configured to extract a plurality of data segments from the converted power quality data grouping to generate a random data matrix;
[0038] A verification module, configured to verify the measurement matrix using constrained isometry based on the random data matrix;
[0039] Return module, used to return to the observation matrix generation module when verification fails;
[0040] The jump module is used to jump to the reconstruction module when the verification passes.
[0041] Optionally, the reconstruction module includes:
[0042] An observation submodule, configured to observe the transformed power quality data groups using the observation matrix to obtain observation values;
[0043] The reconstruction submodule is used to reconstruct the transformed power quality data groups using the observation values as constraints and adopting an orthogonal matching pursuit algorithm to obtain power quality optimization data.
[0044] The present invention further provides an electronic device, comprising a processor and a memory:
[0045] The memory is used to store program code and transmit the program code to the processor;
[0046] The processor is configured to execute the power quality data optimization method as described above according to instructions in the program code.
[0047] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the power quality data optimization method as described in any one of the above items.
[0048] It can be seen from the above technical solution that the present invention has the following advantages: the present invention provides a method for optimizing power quality data, and specifically discloses: periodically segmenting the original power quality data to obtain power quality segmented data; classifying the power quality segmented data to obtain power quality data groups; using a Fourier transform basis to perform a sparse transformation on the data in the power quality data group to obtain transformed power quality data groups with different sparsities; generating an observation matrix for each transformed power quality data group; and using the observation matrix to reconstruct the transformed power quality data group to obtain power quality optimized data.
[0049] The present invention first utilizes the periodicity and redundancy of power quality data to periodically segment the raw data and classify the data using a distance measure. Next, a randomized observation matrix is designed for different data types to optimize the data reconstruction process, significantly improving data processing efficiency and reconstruction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0051] Figure 1 A flowchart of the steps of a power quality data optimization method provided by an embodiment of the present invention;
[0052] Figure 2 A flowchart of a method for optimizing power quality data according to another embodiment of the present invention;
[0053] Figure 3 A flow chart of a method for optimizing power quality data provided by an embodiment of the present invention;
[0054] Figure 4 This is a structural block diagram of a power quality data optimization device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] Embodiments of the present invention provide a power quality data optimization method, device, electronic device, and storage medium, which are used to solve the technical problem that the existing technology cannot effectively distinguish different types of power quality data, especially transient distortion data and standard sinusoidal data, and cannot fully improve the reconstruction efficiency.
[0056] In order to make the purpose, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0057] See also Figure 1 , Figure 1 A flowchart of the steps of a power quality data optimization method provided by an embodiment of the present invention.
[0058] The present invention provides a method for optimizing power quality data, which may include the following steps:
[0059] Step 101, periodically segmenting the original power quality data to obtain power quality segmented data;
[0060] First, the original power quality data Perform periodic segmentation processing to obtain ,in . Indicates the position of the i-th segment in the original data matrix, i is used as a position mark, N is the number of cycles, .
[0061] Step 102, classifying the power quality segmented data to obtain power quality data groups;
[0062] Next, the power quality segmented data can be classified based on the Hausdorff distance, and each power quality segmented data can be divided into different categories based on a distance measurement threshold that takes noise into account. The categories can include transient distortion power quality data type and standard sinusoidal power quality data type.
[0063] Step 103, performing a sparse transformation on the data in the power quality data group using a Fourier transform basis to obtain transformed power quality data groups with different sparsities;
[0064] Sparsity is a key metric that describes the proportion of nonzero elements in a signal, vector, or matrix. It is crucial in fields such as compressed sensing, machine learning, and signal processing. The core idea is that many high-dimensional data (such as images and audio) have only a small number of nonzero elements in a specific basis (such as the Fourier transform basis or the wavelet basis). This property is called sparsity.
[0065] The Fourier transform basis is an orthogonal basis composed of complex exponential functions (or sine and cosine functions) used to transform signals from the time domain (or spatial domain) to the frequency domain. It is a core mathematical tool in fields such as signal processing, image analysis, and quantum computing, and is particularly adept at processing periodic or globally smooth signals.
[0066] After the power quality data is grouped, sparse transformation may be performed on the data in the power quality data group to obtain transformed power quality data groups with different sparsities.
[0067] Step 104, generating an observation matrix for each transformed power quality data group;
[0068] After generating the transformed power quality data groups, a Gaussian random matrix of a specific dimension may be generated as an observation matrix for subsequent reconstruction of the transformed power quality groups.
[0069] Gaussian random matrix is an important random matrix whose elements obey the independent and identically distributed (iid) Gaussian distribution N(0,σ 2 It is widely used in compressed sensing, statistical learning, numerical linear algebra and other fields, especially in compressed sensing as a typical measurement matrix that satisfies the constrained isometry property (RIP).
[0070] Step 105 : Reconstruct the transformed power quality data groups using the observation matrix to obtain power quality optimization data.
[0071] After the observation matrix is generated, the observation matrix can be used to reconstruct the transformed power quality data groups to obtain power quality optimization data.
[0072] The present invention first utilizes the periodicity and redundancy of power quality data to periodically segment the raw data and classify the data using a distance measure. Next, a randomized observation matrix is designed for different data types to optimize the data reconstruction process, significantly improving data processing efficiency and reconstruction accuracy.
[0073] See also Figure 2 , Figure 2 This is a flowchart of a method for optimizing power quality data according to another embodiment of the present invention. Specifically, the method may include the following steps:
[0074] Step 201, periodically segmenting the original power quality data to obtain power quality segmented data;
[0075] In the embodiment of the present invention, the base frequency of the original power quality data is 50 Hz. , the sampling frequency is set to 1600Hz.
[0076] The original power quality data Perform periodic segmentation processing to obtain ,in , is a real matrix of dimension n by 1. Indicates the position of the i-th segment in the original data matrix, i is used as a position mark, N is the number of cycles, , n is the length of the periodically segmented power quality segment data.
[0077] Step 202, selecting a benchmark reference value from all power quality segmented data;
[0078] Step 203, calculating the distance between each power quality segment data and the benchmark reference value;
[0079] Step 204 , determining the power quality segmented data with a distance less than a preset distance measurement threshold as a standard sinusoidal power quality data set;
[0080] Step 205 , determining the power quality segmented data with a distance not less than a preset distance measurement threshold as a transient distorted power quality data set;
[0081] In the embodiment of the present invention, transient distortion power quality data may include the following seven types: voltage harmonics, voltage oscillation, voltage notch, voltage pulse, voltage interruption, voltage swell, and voltage sag.
[0082] In the embodiment of the present invention, a period of standard electric energy data can be selected (Electric energy data under normal voltage conditions) is used as a benchmark reference quantity, and the Hausdorff distance formula is used to calculate the power quality segmented data. Hausdorff distance from the reference volume , the specific formula is as follows:
[0083]
[0084] Next, the power quality segmented data is normalized and then feature marked. Specifically, δ is set as the distance measurement threshold considering noise. , then Marked as 1, forming a transient distortion power quality data set , sorted by index number; if , then Marked as 0, forming a standard sinusoidal power quality data set , sorted by index number.
[0085] Step 206, performing a sparse transformation on the data in the power quality data group using a Fourier transform basis to obtain transformed power quality data groups with different sparsities;
[0086] After the power quality data is grouped, sparse transformation may be performed on the data in the power quality data group to obtain transformed power quality data groups with different sparsities.
[0087] In the specific implementation, the standard sinusoidal power quality data set can be and transient distortion power quality datasets The sparse transform is performed using the Fourier transform basis, which is:
[0088]
[0089] Among them, k is the sparsity, and k is 8.
[0090] After transformation, we get signals with sparsity of k1 and k0 respectively. and , thus obtaining the transformed power quality data groups with different sparsity:
[0091]
[0092] Step 207, generating an observation matrix for each transformed power quality data group;
[0093] In the embodiment of the present invention, assuming that the size of the power quality data is 1×M, for the transient distortion power quality data set , the generated dimension is Gaussian random matrix Φ1; for the standard sinusoidal power quality data set , the generated dimension is A Gaussian random matrix Φ0, where , c is a constant related to the reconstruction algorithm used and the tolerated error probability (usually between 2 and 5), and k is the sparsity; the Gaussian random matrix is constructed by making each element in Φ1 and Φ0 obey a Gaussian distribution with mean 0 and variance 1 / M.
[0094]
[0095] Furthermore, in the embodiment of the present invention, after generating the measurement matrix, the following steps may be further included:
[0096] S11, extracting a number of data segments from the transformed power quality data group to generate a random data matrix;
[0097] S12, based on the random data matrix, the observation matrix is verified using constrained isometry;
[0098] S13, when the verification fails, returning to the step of generating an observation matrix for each transformed power quality data group;
[0099] S14, when the verification is passed, jump to the step of reconstructing the transformed power quality data groups using the observation matrix to obtain power quality optimization data.
[0100] In the specific implementation, the distorted power quality data sets are randomly selected and standard sinusoidal power quality datasets The m data segments in form a Random data matrix and ; Use the constrained isometry RIP to verify whether the observation matrices Φ1 and Φ0 meet the requirements. If they do, continue to step 208. If not, return to step 207.
[0101] The RIP test method for constrained isometry is: there is a constant , so that all k sparsity vectors x satisfy the following inequality, then the constrained isometry RIP test is satisfied:
[0102]
[0103] Step 208: Reconstruct the transformed power quality data groups using the observation matrix to obtain power quality optimization data.
[0104] After the observation matrix is generated, the observation matrix can be used to reconstruct the transformed power quality data groups to obtain power quality optimization data.
[0105] In one example, step 208 may include the following sub-steps:
[0106] S81, using an observation matrix to observe the transformed power quality data in groups to obtain observation values;
[0107] S82, using the observation value as a constraint condition, using the orthogonal matching pursuit algorithm to reconstruct the transformed power quality data groups to obtain power quality optimization data.
[0108] In the specific implementation, and Use the observation matrices Φ1 and Φ0 to observe and obtain the corresponding observation values and :
[0109]
[0110] Then, the Orthogonal Matching Pursuit (OMP) algorithm is used to reconstruct the transformed power quality data groups, and then reorganize them according to the position index i from small to large to obtain the reconstructed signal :
[0111]
[0112] Orthogonal Matching Pursuit (OMP) is a greedy algorithm for sparse signal recovery, widely used in compressed sensing, signal processing, and machine learning. Its core idea is to gradually select the most relevant atoms (basis) and update the residual through orthogonalization, ultimately approximating the original sparse signal.
[0113] The present invention first utilizes the periodicity and redundancy of power quality data to periodically segment the raw data and classify the data using a distance measure. Next, a randomized observation matrix is designed for different data types to optimize the data reconstruction process, significantly improving data processing efficiency and reconstruction accuracy.
[0114] For ease of understanding, the embodiments of the present invention are described below with reference to specific examples:
[0115] See also Figure 3 , Figure 3 A flowchart of a method for optimizing power quality data provided by an embodiment of the present invention.
[0116] First, the original power quality data is preprocessed, and then the preprocessed original power quality data is periodically segmented to obtain power quality segmented data; then the distance measure of each power quality segmented data is calculated to determine whether the distance measure H is greater than or equal to the preset distance measure threshold; if so, it is marked as 1 to form f1, and then a random data matrix is generated and Gaussian random measurement matrix Φ1; perform RIP condition judgment through random data matrix and Gaussian random measurement matrix. When the condition is not met, return to the step of generating Gaussian random measurement matrix. When the condition is met, generate data observation value Y1 and reconstruct the data before output. If the distance measure H is less than the preset distance measure threshold, it is marked as 0, forming f0, and then generating random data matrix and Gaussian random measurement matrix Φ0; perform RIP condition judgment through the random data matrix and Gaussian random measurement matrix. When the condition is not met, return to the step of generating the Gaussian random measurement matrix. When the condition is met, generate the data observation value Y0 and reconstruct the data before output.
[0117] See also Figure 4 , Figure 4 This is a structural block diagram of a power quality data optimization device provided by an embodiment of the present invention.
[0118] An embodiment of the present invention further provides a power quality data optimization device, comprising:
[0119] The segmentation module 401 is used to periodically segment the original power quality data to obtain power quality segmented data;
[0120] A classification module 402 is used to classify the power quality segmented data to obtain power quality data groups;
[0121] The sparse transformation module 403 is used to perform sparse transformation on the data in the power quality data group using a Fourier transform basis to obtain transformed power quality data groups with different sparsities;
[0122] An observation matrix generating module 404 is used to generate an observation matrix for each transformed power quality data group;
[0123] The reconstruction module 405 is used to reconstruct the transformed power quality data groups using the observation matrix to obtain power quality optimization data.
[0124] In an embodiment of the present invention, the power quality data group includes a transient distortion power quality data set and a standard sinusoidal power quality data set; the classification module 402 includes:
[0125] A benchmark reference quantity selection submodule is used to select a benchmark reference quantity from all power quality segmented data;
[0126] The distance calculation submodule is used to calculate the distance between each power quality segment data and the benchmark reference quantity;
[0127] A standard sinusoidal power quality data set determination submodule is used to determine the power quality segmented data with a distance less than a preset distance measurement threshold as a standard sinusoidal power quality data set;
[0128] The transient distorted power quality data set determination submodule is used to determine the power quality segmented data with a distance not less than a preset distance measurement threshold as the transient distorted power quality data set.
[0129] In an embodiment of the present invention, the following further comprises:
[0130] A random data matrix generation module is used to extract a number of data segments from the transformed power quality data group to generate a random data matrix;
[0131] Verification module, used to verify the observation matrix based on the random data matrix using constrained isometry;
[0132] Return module, used to return to the observation matrix generation module when verification fails;
[0133] The jump module is used to jump to the reconstruction module when the verification passes.
[0134] In this embodiment of the present invention, the reconstruction module 405 includes:
[0135] The observation submodule is used to observe the transformed power quality data in groups using an observation matrix to obtain observation values;
[0136] The reconstruction submodule is used to reconstruct the transformed power quality data groups using the orthogonal matching pursuit algorithm with the observation values as constraints to obtain power quality optimization data.
[0137] An embodiment of the present invention further provides an electronic device, the device including a processor and a memory:
[0138] The memory is used to store program codes and transmit the program codes to the processor;
[0139] The processor is configured to execute the power quality data optimization method according to the instructions in the program code.
[0140] An embodiment of the present invention further provides a computer-readable storage medium, which is used to store program code, and the program code is used to execute the power quality data optimization method of the embodiment of the present invention.
[0141] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0142] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0143] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatus, or computer program products. Thus, embodiments of the present invention may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0144] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0145] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0146] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1A step that specifies a function in one or more boxes.
[0147] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0148] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0149] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0150] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for optimizing power quality data, characterized in that: include: Periodically segmenting the original power quality data to obtain power quality segmented data; Classifying the power quality segmented data to obtain power quality data groups; Performing a sparse transformation on the data in the power quality data group using a Fourier transform basis to obtain transformed power quality data groups with different sparsities; generating an observation matrix for each of the transformed power quality data groups; The transformed power quality data are grouped and reconstructed using the observation matrix to obtain power quality optimization data.
2. The method according to claim 1, characterized in that The power quality data group includes transient distortion power quality data set and standard sinusoidal power quality data set; The step of classifying the power quality segmented data to obtain power quality data groups includes: Select the benchmark reference quantity among all power quality segment data; Calculating the distance between each of the power quality segment data and the benchmark reference value; Determining the power quality segmented data with the distance less than a preset distance measurement threshold as a standard sinusoidal power quality data set; The power quality segmented data whose distance is not less than the preset distance measurement threshold is determined as a transient distorted power quality data set.
3. The method according to claim 1, characterized in that After the step of generating the observation matrix for transforming the power quality data group, the method further includes: extracting a plurality of data segments from the transformed power quality data group to generate a random data matrix; Based on the random data matrix, the observation matrix is verified using constrained isometry; When the verification fails, returning to the step of generating an observation matrix for each of the transformed power quality data groups; When the verification is passed, the process jumps to the step of reconstructing the transformed power quality data groups using the observation matrix to obtain power quality optimization data.
4. The method according to any one of claims 1 to 3, characterized in that The step of reconstructing the transformed power quality data groups using the observation matrix to obtain power quality optimization data includes: Using the observation matrix to observe the converted power quality data in groups to obtain observation values; Taking the observation values as constraints, an orthogonal matching pursuit algorithm is used to reconstruct the transformed power quality data groups to obtain power quality optimization data.
5. A power quality data optimization device, characterized in that: include: A segmentation module is used to periodically segment the original power quality data to obtain power quality segmentation data; a classification module, configured to classify the power quality segmented data to obtain power quality data groups; a sparse transformation module, configured to perform sparse transformation on the data in the power quality data group using a Fourier transform basis to obtain transformed power quality data groups with different sparsities; An observation matrix generating module, configured to generate an observation matrix for each of the transformed power quality data groups; The reconstruction module is used to reconstruct the transformed power quality data groups using the observation matrix to obtain power quality optimization data.
6. The device according to claim 5, characterized in that The power quality data group includes transient distortion power quality data set and standard sinusoidal power quality data set; The classification module includes: A benchmark reference quantity selection submodule is used to select a benchmark reference quantity from all power quality segmented data; a distance calculation submodule, configured to calculate the distance between each of the power quality segment data and the benchmark reference quantity; a standard sinusoidal power quality data set determining submodule, configured to determine the power quality segmented data whose distance is less than a preset distance measurement threshold as a standard sinusoidal power quality data set; The transient distorted power quality data set determining submodule is configured to determine the power quality segmented data whose distance is not less than the preset distance measurement threshold as a transient distorted power quality data set.
7. The device according to claim 5, characterized in that Also includes: A random data matrix generation module, configured to extract a plurality of data segments from the converted power quality data grouping to generate a random data matrix; A verification module, configured to verify the measurement matrix using constrained isometry based on the random data matrix; Return module, used to return to the observation matrix generation module when verification fails; The jump module is used to jump to the reconstruction module when the verification passes.
8. The device according to any one of claims 5 to 7, characterized in that: The reconstruction module includes: An observation submodule, configured to observe the transformed power quality data groups using the observation matrix to obtain observation values; The reconstruction submodule is used to reconstruct the transformed power quality data groups using the observation values as constraints and adopting an orthogonal matching pursuit algorithm to obtain power quality optimization data.
9. An electronic device, characterized in that: The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the power quality data optimization method according to any one of claims 1 to 4 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store program code, and the program code is used to execute the power quality data optimization method according to any one of claims 1 to 4.