Super-harmonic signal acquisition method and device, computer equipment, readable storage medium and program product
By obtaining the sampling frequency and the number of data blocks, using compressed sensing reconstruction model and global objective function, accurately measure the frequency and amplitude of the ultra-harmonic signal in the power grid, solving the problem of inaccurate measurement in the existing technology and ensuring the stability of the power grid.
Patent Information
- Application Number
- CN202411681799.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The prior art is difficult to accurately measure ultraharmonic signals in the power grid, which may cause problems such as frequency resonance, equipment failure and power supply voltage interruption.
By obtaining the sampling frequency, the number of sampling points and the frequency ratio, using compressed sensing reconstruction model and global objective function, multiple data blocks are obtained from the power grid, and the frequency and amplitude of the ultraharmonic signal are reconstructed and extracted.
It realizes accurate measurement of ultra-harmonic signals in the power grid, can effectively prevent frequency resonance and equipment failure, and ensure the stable operation of the power grid.
Smart Images

Figure CN119780520A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of signal and data analysis, and in particular to a method, apparatus, computer equipment, computer-readable storage medium and computer program product for acquiring an ultraharmonic signal. Background Art
[0002] With the rapid development of modern power grids, especially the popularity of renewable energy, electric vehicles, and efficient household appliances, the penetration rate of power electronic converters has gradually increased, bringing many power quality problems to the power grid. Among them, the problem of increased voltage and current distortion in the frequency range of 2 kHz to 150 kHz, namely the problem of superharmonic distortion, is more prominent. Superharmonic signals have the characteristics of wide frequency range, diverse emission sources, and complex propagation interactions, which may pose a threat to the stable operation of the power grid. For example, superharmonic signals are prone to cause frequency resonance, leading to equipment failure, and even affecting the normal operation of communication equipment. In severe cases, it may also cause power supply voltage interruption. Therefore, it is necessary to accurately measure superharmonic signals. Summary of the invention
[0003] Based on this, it is necessary to provide a superharmonic signal acquisition method, device, computer equipment, computer-readable storage medium and computer program product that can accurately measure superharmonic signals in order to solve the above technical problems.
[0004] In a first aspect, the present application provides a method for acquiring an ultra-harmonic signal, the method comprising:
[0005] Acquire a sampling frequency, a number of sampling points, and a frequency ratio of the sampling frequency, and acquire a plurality of data blocks from a power grid within a preset time period based on the sampling frequency and the number of sampling points, wherein the data blocks include a superharmonic data sequence;
[0006] Acquire a compressed sensing reconstruction model, and reconstruct the data in the data block based on the compressed sensing reconstruction model;
[0007] Based on the number of the sampling points and the frequency ratio, a super harmonic compressed sensing model of the data block after data reconstruction is obtained;
[0008] A global objective function is obtained, and a superharmonic signal is obtained from the data block after the data reconstruction based on the superharmonic compressed sensing model and the global objective function, wherein the global objective function is used to obtain the frequency and amplitude of the superharmonic signal.
[0009] In one embodiment, the acquiring a plurality of data blocks from a power grid within a preset time period based on the sampling frequency and the number of sampling points includes:
[0010] Based on the sampling frequency and the number of sampling points, obtaining an initial frequency resolution of the sampling frequency;
[0011] The data block is acquired based on the sampling frequency, the number of sampling points and the initial frequency resolution.
[0012] In one of the embodiments, the step of acquiring a super harmonic compressed sensing model of a data block after data reconstruction based on the number of sampling points and the frequency ratio includes:
[0013] Based on the number of the sampling points, obtaining an initial signal length corresponding to the data block;
[0014] An interpolation factor is obtained, and based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio, the super harmonic compressed sensing model is obtained.
[0015] In one embodiment, the acquiring the superharmonic compressed sensing model based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio includes:
[0016] Acquire a target frequency resolution based on the interpolation factor and the initial frequency resolution, and acquire a target signal length based on the interpolation factor and the initial signal length;
[0017] Based on the target frequency resolution and the frequency ratio, acquiring a signal frequency corresponding to the data block after the data reconstruction;
[0018] The superharmonic compressed sensing model is acquired based on the target frequency resolution, the target signal length and the signal frequency.
[0019] In one embodiment, obtaining the global objective function includes:
[0020] Obtaining a Gaussian noise matrix and compressed sensing input parameters, and obtaining a preset similarity matrix based on a preset clustering model;
[0021] Acquire a preset low-rank matrix based on the Gaussian noise matrix and the preset similarity matrix;
[0022] The global objective function is obtained based on the preset similarity matrix, the preset low-rank matrix and the compressed sensing input parameters.
[0023] In one embodiment, the obtaining of the superharmonic signal from the data block after the data reconstruction based on the superharmonic compressed sensing model and the global objective function includes:
[0024] Obtaining a regularization factor, and regularizing the preset low-rank matrix based on the regularization factor;
[0025] Optimizing the global objective function based on the regularized low-rank matrix;
[0026] Based on the superharmonic compressed sensing model and the optimized global objective function, the superharmonic signal is obtained.
[0027] In a second aspect, the present application further provides a superharmonic signal acquisition device, the device comprising:
[0028] A first acquisition module is used to acquire a sampling frequency, a number of sampling points and a frequency ratio of the sampling frequency, and based on the sampling frequency and the number of sampling points, acquire a plurality of data blocks from the power grid within a preset time period, wherein the data blocks include a superharmonic data sequence;
[0029] A second acquisition module is used to acquire a compressed sensing reconstruction model, and reconstruct the data in the data block based on the compressed sensing reconstruction model;
[0030] A third acquisition module, configured to acquire a super harmonic compressed sensing model of the data block after data reconstruction based on the number of sampling points and the frequency ratio;
[0031] The fourth acquisition module is used to obtain a global objective function, and based on the superharmonic compressed sensing model and the global objective function, obtains a superharmonic signal from the data block after the data reconstruction, and the global objective function is used to obtain the frequency and amplitude of the superharmonic signal.
[0032] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.
[0033] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.
[0034] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.
[0035] The above-mentioned superharmonic signal acquisition method, device, computer equipment, computer-readable storage medium and computer program product obtain the sampling frequency, the number of sampling points and the frequency ratio of the sampling frequency, and based on the sampling frequency and the number of sampling points, obtain multiple data blocks from the power grid within a preset time period, wherein the data blocks include superharmonic data sequences; obtain a compressed sensing reconstruction model, and reconstruct the data in the data block based on the compressed sensing reconstruction model; obtain a superharmonic compressed sensing model of the data block after data reconstruction based on the number of sampling points and the frequency ratio; obtain a global objective function, and obtain a superharmonic signal from the data block after data reconstruction based on the superharmonic compressed sensing model and the global objective function, wherein the global objective function is used to obtain the frequency and amplitude of the superharmonic signal. The method provided in the present application can accurately measure superharmonic signals in the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] 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.
[0037] Figure 1 A schematic diagram of a process of obtaining a superharmonic signal in an embodiment;
[0038] Figure 2 A schematic diagram of a flow chart of a method for obtaining a data block in an embodiment;
[0039] Figure 3 A schematic diagram of measurement results in another embodiment;
[0040] Figure 4 A schematic diagram of a flow chart of a method for acquiring a superharmonic signal in another embodiment;
[0041] Figure 5 is a structural block diagram of a superharmonic signal acquisition device in an embodiment;
[0042] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0043] 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.
[0044] In one embodiment, Figure 1As shown, a method for obtaining an ultra-harmonic signal is provided. This embodiment takes the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0045] S102, obtaining a sampling frequency, the number of sampling points and a frequency ratio of the sampling frequency, and based on the sampling frequency and the number of sampling points, obtaining a plurality of data blocks from the power grid within a preset time period, wherein the data blocks include a superharmonic data sequence.
[0046] Among them, frequency ratio refers to the proportional relationship between the sampling frequency and the highest frequency component of the signal during the signal acquisition process. Data block refers to a group of data organized in a certain format or structure within a period of time. Data blocks are usually divided based on time. It represents the sampling results of a specific time period. Each data block contains the data of all sampling points collected within the sampling window; superharmonic refers to the harmonic frequency higher than the fundamental frequency in the power system due to the switching action of nonlinear loads or power electronic equipment.
[0047] Optionally, the sampling period is first calculated based on the sampling frequency, and then data blocks are periodically collected at the sampling points based on the sampling period. For example, the preset time period may be 200 ms, the corresponding time period of each data block is 0.5 ms, and the number of data blocks is 32.
[0048] S104: Obtain a compressed sensing reconstruction model, and reconstruct the data in the data block based on the compressed sensing reconstruction model.
[0049] Among them, the compressed sensing reconstruction model refers to a mathematical model that uses compressed sensing theory to reconstruct signals or images. Compressed sensing is a signal processing technology that allows sparse or compressible signals to be sampled at a sampling rate much lower than that required by the Nyquist sampling theorem, and accurately restores the original signal from these samples through an optimization algorithm.
[0050] Optionally, a standard compressed sensing reconstruction algorithm is used to reconstruct the signal to obtain an initial estimated phase d:
[0051]
[0052] Where s represents the sampled signal and D represents the random measurement matrix.
[0053] S106: Based on the number of sampling points and the frequency ratio, a super harmonic compressed sensing model of the data block after data reconstruction is obtained.
[0054] Among them, the superharmonic compressed sensing model is a specific type of compressed sensing model designed for superharmonic signal processing.
[0055] S108, obtaining a global objective function, obtaining a superharmonic signal from the data block after data reconstruction based on the superharmonic compressed sensing model and the global objective function, the global objective function is used to obtain the frequency and amplitude of the superharmonic signal.
[0056] Optionally, solve for the superharmonic frequency estimate and the amplitude estimate :Solve the simplified global objective function to obtain the final reconstruction vector . Estimated frequency of superharmonic components and the amplitude estimate It can be obtained by the following formula:
[0057]
[0058] in, For vector The 0th-order derivative estimate of For vector The first-order derivative estimate of .
[0059] After obtaining the frequency and amplitude of the superharmonic signal, the superharmonic signal can be determined.
[0060] In the above-mentioned superharmonic signal acquisition method, the sampling frequency, the number of sampling points and the frequency ratio of the sampling frequency are obtained, and based on the sampling frequency and the number of sampling points, multiple data blocks are obtained from the power grid within a preset time period, and the data blocks include superharmonic data sequences; a compressed sensing reconstruction model is obtained, and the data in the data block is reconstructed based on the compressed sensing reconstruction model; based on the number of sampling points and the frequency ratio, a superharmonic compressed sensing model of the data block after data reconstruction is obtained; a global objective function is obtained, and based on the superharmonic compressed sensing model and the global objective function, a superharmonic signal is obtained from the data block after data reconstruction, and the global objective function is used to obtain the frequency and amplitude of the superharmonic signal. The method provided in the present application can accurately measure superharmonic signals in the power grid.
[0061] In some embodiments, Figure 2 As shown, based on the sampling frequency and the number of sampling points, multiple data blocks are obtained from the power grid within a preset time period, including:
[0062] S202: Based on the sampling frequency and the number of sampling points, obtain an initial frequency resolution of the sampling frequency.
[0063] S204: Acquire a data block based on the sampling frequency, the number of sampling points and the initial frequency resolution.
[0064] Frequency resolution refers to the minimum frequency difference between two adjacent frequency components that a spectrum analyzer or signal processing system can distinguish in spectrum analysis.
[0065] Optionally, the signal model of the sampling signal s(t) corresponding to the data block is as follows:
[0066]
[0067] In the formula, , , They represent the amplitude (V), frequency (Hz), and initial phase (°) of the hth harmonic component, and Y represents the highest harmonic order; is the sampling period, is the sampling frequency, is the frequency resolution, N is the total length of the sample sequence, n is each sampling point, , n is an integer.
[0068] In this embodiment, data blocks are acquired based on the sampling frequency, the number of sampling points and the initial frequency resolution, so that the acquired data blocks are more accurate, thereby making the subsequently acquired superharmonic signals more accurate.
[0069] In some embodiments, based on the number of sampling points and the frequency ratio, a super-harmonic compressed sensing model of the data block after data reconstruction is obtained, including: obtaining the corresponding initial signal length of the data block based on the number of sampling points; obtaining an interpolation factor, and obtaining a super-harmonic compressed sensing model based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio.
[0070] Among them, the signal length refers to the time range occupied by the signal on the time axis, that is, the time span of the signal from the beginning to the end; the interpolation factor is a parameter introduced in the reconstruction process, which is used to improve the frequency resolution of the reconstructed signal and improve the signal quality.
[0071] In this embodiment, based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio, a superharmonic compressed sensing model is obtained, so that the obtained superharmonic compressed sensing model is more accurate, thereby making the subsequently obtained superharmonic signal more accurate.
[0072] In some embodiments, a super harmonic compressed sensing model is obtained based on an interpolation factor, an initial frequency resolution, an initial signal length, and a frequency ratio, including: obtaining a target frequency resolution based on the interpolation factor and the initial frequency resolution, and obtaining a target signal length based on the interpolation factor and the initial signal length; obtaining a signal frequency corresponding to a data block after data reconstruction based on the target frequency resolution and the frequency ratio; and obtaining a super harmonic compressed sensing model based on the target frequency resolution, the target signal length, and the signal frequency.
[0073] Among them, signal frequency refers to the number of times a signal repeats in a unit of time.
[0074] Optionally, an interpolation factor F is introduced, and the frequency resolution of the reconstructed signal is , signal length , signal frequency ,in, Represents the frequency ratio. The 32 data blocks are reorganized into a matrix S by vectorization. Considering the influence of noise, the super harmonic compressed sensing model is constructed as follows:
[0075]
[0076] Where S(c) represents the cth data block in the sampling sequence, d(c) represents the cth high-resolution signal to be reconstructed, e(c) represents the noise vector, and D represents the dimension. The random measurement matrix of .
[0077] In this embodiment, a superharmonic compressed sensing model is obtained based on the target frequency resolution, the target signal length and the signal frequency, so that the obtained superharmonic compressed sensing model is more accurate, thereby making the subsequently obtained superharmonic signal more accurate.
[0078] In some embodiments, obtaining a global objective function includes: obtaining a Gaussian noise matrix and compressed sensing input parameters, and obtaining a preset similarity matrix based on a preset clustering model; obtaining a preset low-rank matrix based on the Gaussian noise matrix and the preset similarity matrix; obtaining a global objective function based on the preset similarity matrix, the preset low-rank matrix and compressed sensing input parameters.
[0079] Among them, Gaussian noise matrix refers to Gaussian noise expressed in matrix form, which is usually used to simulate or introduce randomness into data; compressed sensing input parameters refer to several key parameters that need to be determined when applying compressed sensing algorithms. For example, compressed sensing input parameters may include signal sampling rate, perception matrix and signal processing parameters; low-rank matrix refers to a matrix with a smaller rank.
[0080] Optionally, a similarity matrix is constructed using a k-nearest neighbor clustering algorithm :According to the principle of minimum Euclidean distance, the search radius is taken as w, and M matches are found within the search range. adjacent points and combine similar points into a similarity matrix , Among them, the minimum Euclidean distance principle is, let the distance between any x and y be Minimum, among which express norm, at this time, for Norm and The dataset with the smallest distance.
[0081] Considering the interference of noise in actual test, ,in and They represent the low-rank matrix and Gaussian noise matrix to be determined respectively.
[0082] In this embodiment, a global objective function is obtained based on a preset similarity matrix, a preset low-rank matrix and compressed sensing input parameters, so that the obtained global objective function is more accurate, thereby making the subsequently obtained superharmonic signal more accurate.
[0083] In some embodiments, based on the superharmonic compressed sensing model and the global objective function, a superharmonic signal is obtained from the data block after data reconstruction, including: obtaining a regularization factor, and regularizing a preset low-rank matrix based on the regularization factor; optimizing the global objective function based on the regularized low-rank matrix; and obtaining a superharmonic signal based on the superharmonic compressed sensing model and the optimized global objective function.
[0084] Among them, the regularization factor is used to control the influence of the regularization term in the objective function or cost function.
[0085] Optionally, to avoid directly asking The NP-difficult problem introduced when solving the rank minimization solution of As follows:
[0086]
[0087] in, is a diagonal matrix whose diagonal elements are The singular values of represents a small constant value, and I represents the identity matrix. At this time, the Lagrangian form of the constrained minimization problem and the global objective function of compressed sensing recovery are as follows:
[0088]
[0089]
[0090] in, represents a given regularization factor, represents a matrix composed of similar block matrices, Represents compressed sensing input parameters.
[0091] In this embodiment, a superharmonic signal is obtained based on a superharmonic compressed sensing model and an optimized global objective function, so that the obtained superharmonic signal is more accurate.
[0092] In one embodiment, another method for acquiring an ultra-harmonic signal is provided, the method comprising the following contents:
[0093] In order to highlight the detection performance of the present invention, this embodiment selects the multi-measurement vector compressed sensing-orthogonal matching pursuit algorithm (MCS-OMP), compressed sensing-multi-frequency Taylor Fourier transform algorithm (CS-TFM) and the equal-interval sampling method proposed in IEC 61000-4-30 as comparison algorithms (IEC). The frequency relative error (FE) and amplitude relative error (ME) are used to compare the estimation effects of different methods, and the unit is taken as percentage (%). and Initialized to an all-zero matrix, parameters , search radius w=0.06, number of similar points M=300.
[0094] The test signal selection in this implementation is shown in the following formula:
[0095]
[0096] Baseband Take it as 50.1Hz. , are the fundamental frequency phase angle and superharmonic phase angle respectively, and their value range is The high-frequency harmonic order k is taken as 195, 197, 199, 201, 203 and 205 respectively. Considering the influence of interference and uncertainty in actual measurement, a white noise signal nosie with a signal-to-noise ratio of 20 dB is superimposed on the test signal.
[0097] The measurement results are as follows Figure 3 shown. Figure 3 (a) is the frequency estimation error FE of the present invention and the comparison algorithm, Figure 3 (b) is the amplitude estimation error ME of the present invention and the comparison algorithm. It can be seen from the figure that when the method of the present invention is used, the values of the frequency error FE and the amplitude estimation error ME are both within 1%, which is smaller than the estimation error of the comparison algorithm.
[0098] See also Figure 4 , the specific implementation method includes the following steps:
[0099] S1. Obtain the sampling signal s(t) and the initial phasor estimate d: Based on the equally spaced sampling technology proposed in the IEC 61000-4-30 standard, the sampling signal s(t) containing 32 0.5 ms data blocks is obtained through the sampling module of the power quality intelligent perception and collaborative control platform. The signal is reconstructed using the standard compressed sensing reconstruction algorithm to obtain the initial estimated phasor d.
[0100] S2. Interpolation and reconstruction of super-harmonic compressed sensing model: The interpolation factor F is introduced, and the 32 data blocks are reconstructed into a matrix S through vector reorganization. Considering the influence of noise, the super-harmonic compressed sensing model is constructed.
[0101] S3, using k nearest neighbor clustering algorithm to construct similarity matrix :According to the principle of minimum Euclidean distance, the search radius is taken as w, and M matches are found within the search range. adjacent points and combine similar points into a similarity matrix .set up ,in and They represent the low-rank matrix and Gaussian noise matrix to be determined respectively.
[0102] S4. Construct auxiliary matrix ,Will Low-rank regularization results in a simplified constrained minimization problem and a global objective function for compressed sensing recovery.
[0103] S5, the reconstruction vector obtained by solving the global objective function , solve for the superharmonic frequency estimate and the amplitude estimate .
[0104] 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.
[0105] Based on the same inventive concept, the embodiment of the present application also provides a superharmonic signal acquisition device for implementing the superharmonic signal acquisition method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more superharmonic signal acquisition device embodiments provided below can refer to the limitations of the superharmonic signal acquisition method above, and will not be repeated here.
[0106] In an exemplary embodiment, Figure 5 As shown, a superharmonic signal acquisition device 500 is provided, comprising: a first acquisition module 501, a second acquisition module 502, a third acquisition module 503 and a fourth acquisition module 504, wherein:
[0107] The first acquisition module 501 is used to acquire a sampling frequency, a number of sampling points and a frequency ratio of the sampling frequency, and based on the sampling frequency and the number of sampling points, acquire a plurality of data blocks from the power grid within a preset time period, wherein the data blocks include a superharmonic data sequence.
[0108] The second acquisition module 502 is used to acquire a compressed sensing reconstruction model, and reconstruct the data in the data block based on the compressed sensing reconstruction model.
[0109] The third acquisition module 503 is used to acquire a super harmonic compressed sensing model of the data block after data reconstruction based on the number of sampling points and the frequency ratio.
[0110] The fourth acquisition module 504 is used to acquire a global objective function, and acquires a superharmonic signal from the data block after the data reconstruction based on the superharmonic compressed sensing model and the global objective function, wherein the global objective function is used to acquire the frequency and amplitude of the superharmonic signal.
[0111] In some embodiments, the first acquisition module 501 is further used to acquire the initial frequency resolution of the sampling frequency based on the sampling frequency and the number of sampling points; and acquire the data block based on the sampling frequency, the number of sampling points and the initial frequency resolution.
[0112] In some embodiments, the third acquisition module 503 includes:
[0113] The first acquisition unit is used to acquire the initial signal length corresponding to the data block based on the number of the sampling points.
[0114] The second acquisition unit is used to acquire an interpolation factor, and acquire the super harmonic compressed sensing model based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio.
[0115] In some embodiments, the second acquisition unit is also used to acquire the target frequency resolution based on the interpolation factor and the initial frequency resolution, and to acquire the target signal length based on the interpolation factor and the initial signal length; based on the target frequency resolution and the frequency ratio, to acquire the signal frequency corresponding to the data block after the data reconstruction; based on the target frequency resolution, the target signal length and the signal frequency, to acquire the superharmonic compressed sensing model.
[0116] In some embodiments, the fourth acquisition module 504 is also used to obtain a Gaussian noise matrix and compressed sensing input parameters, and obtain a preset similarity matrix based on a preset clustering model; obtain a preset low-rank matrix based on the Gaussian noise matrix and the preset similarity matrix; obtain the global objective function based on the preset similarity matrix, the preset low-rank matrix and the compressed sensing input parameters.
[0117] In some embodiments, the fourth acquisition module 504 is also used to obtain a regularization factor, regularize the preset low-rank matrix based on the regularization factor; optimize the global objective function based on the regularized low-rank matrix; and obtain the superharmonic signal based on the superharmonic compressed sensing model and the optimized global objective function.
[0118] Each module in the above-mentioned ultra-harmonic signal acquisition 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.
[0119] 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. Figure 6As 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 acquiring an ultraharmonic signal is implemented.
[0120] Those skilled in the art will understand that Figure 6 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.
[0121] 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 the processor implements the following steps when executing the computer program: obtaining a sampling frequency, a number of sampling points, and a frequency ratio of the sampling frequency, and based on the sampling frequency and the number of sampling points, obtaining multiple data blocks from a power grid within a preset time period, wherein the data blocks include a superharmonic data sequence; obtaining a compressed sensing reconstruction model, and reconstructing the data in the data block based on the compressed sensing reconstruction model; obtaining a superharmonic compressed sensing model of the data block after data reconstruction based on the number of sampling points and the frequency ratio; obtaining a global objective function, and based on the superharmonic compressed sensing model and the global objective function, obtaining a superharmonic signal from the data block after data reconstruction, wherein the global objective function is used to obtain the frequency and amplitude of the superharmonic signal.
[0122] In one embodiment, the processor executes a computer program to obtain multiple data blocks from the power grid within a preset time period based on the sampling frequency and the number of sampling points, including: obtaining an initial frequency resolution of the sampling frequency based on the sampling frequency and the number of sampling points; and obtaining the data block based on the sampling frequency, the number of sampling points and the initial frequency resolution.
[0123] In one embodiment, the processor executes a computer program to obtain a super-harmonic compressed sensing model of a data block after data reconstruction based on the number of sampling points and the frequency ratio, including: obtaining an initial signal length corresponding to the data block based on the number of sampling points; obtaining an interpolation factor, and obtaining the super-harmonic compressed sensing model based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio.
[0124] In one embodiment, the processor executes a computer program to obtain the super harmonic compressed sensing model based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio, including: obtaining a target frequency resolution based on the interpolation factor and the initial frequency resolution, and obtaining a target signal length based on the interpolation factor and the initial signal length; obtaining a signal frequency corresponding to the data block after the data is reconstructed based on the target frequency resolution and the frequency ratio; and obtaining the super harmonic compressed sensing model based on the target frequency resolution, the target signal length and the signal frequency.
[0125] In one embodiment, the global objective function obtained when the processor executes a computer program includes: obtaining a Gaussian noise matrix and compressed sensing input parameters, and obtaining a preset similarity matrix based on a preset clustering model; obtaining a preset low-rank matrix based on the Gaussian noise matrix and the preset similarity matrix; and obtaining the global objective function based on the preset similarity matrix, the preset low-rank matrix and the compressed sensing input parameters.
[0126] In one embodiment, the processor executes a computer program to obtain a superharmonic signal from the data block after data reconstruction based on the superharmonic compressed sensing model and the global objective function, including: obtaining a regularization factor, and regularizing the preset low-rank matrix based on the regularization factor; optimizing the global objective function based on the regularized low-rank matrix; and obtaining the superharmonic signal based on the superharmonic compressed sensing model and the optimized global objective function.
[0127] 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: obtaining a sampling frequency, a number of sampling points, and a frequency ratio of the sampling frequency, and based on the sampling frequency and the number of sampling points, obtaining multiple data blocks from a power grid within a preset time period, wherein the data blocks include a superharmonic data sequence; obtaining a compressed sensing reconstruction model, and reconstructing the data in the data block based on the compressed sensing reconstruction model; obtaining a superharmonic compressed sensing model of the data block after data reconstruction based on the number of sampling points and the frequency ratio; obtaining a global objective function, and based on the superharmonic compressed sensing model and the global objective function, obtaining a superharmonic signal from the data block after data reconstruction, wherein the global objective function is used to obtain the frequency and amplitude of the superharmonic signal.
[0128] In one embodiment, the computer program implemented when executed by the processor obtains multiple data blocks from the power grid within a preset time period based on the sampling frequency and the number of sampling points, including: obtaining an initial frequency resolution of the sampling frequency based on the sampling frequency and the number of sampling points; obtaining the data block based on the sampling frequency, the number of sampling points and the initial frequency resolution.
[0129] In one embodiment, the computer program implemented when executed by the processor obtains a super harmonic compressed sensing model of the data block after data reconstruction based on the number of sampling points and the frequency ratio, including: obtaining the initial signal length corresponding to the data block based on the number of sampling points; obtaining an interpolation factor, and obtaining the super harmonic compressed sensing model based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio.
[0130] In one embodiment, the computer program implemented when executed by the processor obtains the super harmonic compressed sensing model based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio, including: obtaining the target frequency resolution based on the interpolation factor and the initial frequency resolution, and obtaining the target signal length based on the interpolation factor and the initial signal length; obtaining the signal frequency corresponding to the data block after the data reconstruction based on the target frequency resolution and the frequency ratio; obtaining the super harmonic compressed sensing model based on the target frequency resolution, the target signal length and the signal frequency.
[0131] In one embodiment, the computer program implemented when being executed by a processor to obtain a global objective function includes: obtaining a Gaussian noise matrix and compressed sensing input parameters, and obtaining a preset similarity matrix based on a preset clustering model; obtaining a preset low-rank matrix based on the Gaussian noise matrix and the preset similarity matrix; and obtaining the global objective function based on the preset similarity matrix, the preset low-rank matrix and the compressed sensing input parameters.
[0132] In one embodiment, the computer program implemented when executed by the processor obtains a superharmonic signal from the data block after data reconstruction based on the superharmonic compressed sensing model and the global objective function, including: obtaining a regularization factor, and regularizing the preset low-rank matrix based on the regularization factor; optimizing the global objective function based on the regularized low-rank matrix; and obtaining the superharmonic signal based on the superharmonic compressed sensing model and the optimized global objective function.
[0133] In one embodiment, a computer program product is provided, comprising a computer program, which implements the following steps when executed by a processor: obtaining a sampling frequency, a number of sampling points, and a frequency ratio of the sampling frequency, and based on the sampling frequency and the number of sampling points, obtaining multiple data blocks from a power grid within a preset time period, wherein the data blocks include a superharmonic data sequence; obtaining a compressed sensing reconstruction model, and reconstructing the data in the data block based on the compressed sensing reconstruction model; obtaining a superharmonic compressed sensing model of the data block after data reconstruction based on the number of sampling points and the frequency ratio; obtaining a global objective function, and based on the superharmonic compressed sensing model and the global objective function, obtaining a superharmonic signal from the data block after data reconstruction, wherein the global objective function is used to obtain the frequency and amplitude of the superharmonic signal.
[0134] In one embodiment, the computer program implemented when executed by the processor obtains multiple data blocks from the power grid within a preset time period based on the sampling frequency and the number of sampling points, including: obtaining an initial frequency resolution of the sampling frequency based on the sampling frequency and the number of sampling points; obtaining the data block based on the sampling frequency, the number of sampling points and the initial frequency resolution.
[0135] In one embodiment, the computer program implemented when executed by the processor obtains a super harmonic compressed sensing model of the data block after data reconstruction based on the number of sampling points and the frequency ratio, including: obtaining the initial signal length corresponding to the data block based on the number of sampling points; obtaining an interpolation factor, and obtaining the super harmonic compressed sensing model based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio.
[0136] In one embodiment, the computer program implemented when executed by the processor obtains the super harmonic compressed sensing model based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio, including: obtaining the target frequency resolution based on the interpolation factor and the initial frequency resolution, and obtaining the target signal length based on the interpolation factor and the initial signal length; obtaining the signal frequency corresponding to the data block after the data reconstruction based on the target frequency resolution and the frequency ratio; obtaining the super harmonic compressed sensing model based on the target frequency resolution, the target signal length and the signal frequency.
[0137] In one embodiment, the computer program implemented when being executed by a processor to obtain a global objective function includes: obtaining a Gaussian noise matrix and compressed sensing input parameters, and obtaining a preset similarity matrix based on a preset clustering model; obtaining a preset low-rank matrix based on the Gaussian noise matrix and the preset similarity matrix; and obtaining the global objective function based on the preset similarity matrix, the preset low-rank matrix and the compressed sensing input parameters.
[0138] In one embodiment, the computer program implemented when executed by the processor obtains a superharmonic signal from the data block after data reconstruction based on the superharmonic compressed sensing model and the global objective function, including: obtaining a regularization factor, and regularizing the preset low-rank matrix based on the regularization factor; optimizing the global objective function based on the regularized low-rank matrix; and obtaining the superharmonic signal based on the superharmonic compressed sensing model and the optimized global objective function.
[0139] 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 relevant regulations.
[0140] 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.
[0141] 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.
[0142] 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 acquiring an ultra-harmonic signal, characterized in that: The method comprises: Acquire a sampling frequency, a number of sampling points, and a frequency ratio of the sampling frequency, and acquire a plurality of data blocks from a power grid within a preset time period based on the sampling frequency and the number of sampling points, wherein the data blocks include a superharmonic data sequence; Acquire a compressed sensing reconstruction model, and reconstruct the data in the data block based on the compressed sensing reconstruction model; Based on the number of the sampling points and the frequency ratio, a super harmonic compressed sensing model of the data block after data reconstruction is obtained; A global objective function is obtained, and a superharmonic signal is obtained from the data block after the data reconstruction based on the superharmonic compressed sensing model and the global objective function, wherein the global objective function is used to obtain the frequency and amplitude of the superharmonic signal.
2. The method according to claim 1, characterized in that The acquiring a plurality of data blocks from the power grid within a preset time period based on the sampling frequency and the number of sampling points includes: Based on the sampling frequency and the number of sampling points, obtaining an initial frequency resolution of the sampling frequency; The data block is acquired based on the sampling frequency, the number of sampling points and the initial frequency resolution.
3. The method according to claim 2, characterized in that The method of acquiring a super harmonic compressed sensing model of a data block after data reconstruction based on the number of sampling points and the frequency ratio includes: Based on the number of the sampling points, obtaining an initial signal length corresponding to the data block; An interpolation factor is obtained, and based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio, the super harmonic compressed sensing model is obtained.
4. The method according to claim 3, characterized in that The acquiring the superharmonic compressed sensing model based on the interpolation factor, the initial frequency resolution, the initial signal length and the frequency ratio includes: Acquire a target frequency resolution based on the interpolation factor and the initial frequency resolution, and acquire a target signal length based on the interpolation factor and the initial signal length; Based on the target frequency resolution and the frequency ratio, acquiring a signal frequency corresponding to the data block after the data reconstruction; The superharmonic compressed sensing model is acquired based on the target frequency resolution, the target signal length and the signal frequency.
5. The method according to claim 1, characterized in that: The obtaining of the global objective function comprises: Obtaining a Gaussian noise matrix and compressed sensing input parameters, and obtaining a preset similarity matrix based on a preset clustering model; Acquire a preset low-rank matrix based on the Gaussian noise matrix and the preset similarity matrix; The global objective function is obtained based on the preset similarity matrix, the preset low-rank matrix and the compressed sensing input parameters.
6. The method according to claim 5, characterized in that The step of obtaining a superharmonic signal from the data block after the data reconstruction based on the superharmonic compressed sensing model and the global objective function includes: Obtaining a regularization factor, and regularizing the preset low-rank matrix based on the regularization factor; Optimizing the global objective function based on the regularized low-rank matrix; Based on the superharmonic compressed sensing model and the optimized global objective function, the superharmonic signal is obtained.
7. A superharmonic signal acquisition device, characterized in that: The device comprises: A first acquisition module is used to acquire a sampling frequency, a number of sampling points and a frequency ratio of the sampling frequency, and based on the sampling frequency and the number of sampling points, acquire a plurality of data blocks from the power grid within a preset time period, wherein the data blocks include a superharmonic data sequence; A second acquisition module is used to acquire a compressed sensing reconstruction model, and reconstruct the data in the data block based on the compressed sensing reconstruction model; A third acquisition module, configured to acquire a super harmonic compressed sensing model of the data block after data reconstruction based on the number of sampling points and the frequency ratio; The fourth acquisition module is used to obtain a global objective function, and based on the superharmonic compressed sensing model and the global objective function, obtains a superharmonic signal from the data block after the data reconstruction, and the global objective function is used to obtain the frequency and amplitude of the superharmonic signal.
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.
Citation Information
Patent Citations
Harmonic detection method based on compressive sampling orthogonal matching pursuit
CN102955068A
Time-interleaved multi-harmonic signal undersampling method
CN108132383A
Ultra-high harmonic detection device and detection method based on compressed sensing
CN109164298A
Ultra-high harmonic measurement method based on compressed sensing MACSMP
CN110716088A
Accurate reconstruction of frequency-sparse signals with arbitrary frequencies from non-uniform samples
US9064136B1