DC signal ripple detection method, system and device, and storage medium

Through compression perception technology and DCAR-QLI algorithm, the real-time and resource utilization problems of ripple detection in DC signals are solved, and accurate detection under a small amount of sampled data is achieved, reducing hardware and storage requirements.

CN119165230AInactive Publication Date: 2024-12-20STATE GRID ZHEJIANG ELECTRIC POWER CO MARKETING SERVICE CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411668201.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2024-12-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has poor real-time performance and takes up a lot of space and hardware costs when detecting ripple in DC signals, making it difficult to achieve accurate detection with less sampled data.

Method used

Using a compression perception method, the Gaussian measurement matrix of four third-order Nuttal window functions is constructed for compression sensing sampling, combined with DFT sparse basis and sparse adaptive reconstruction algorithm, DCAR-QLI algorithm is used to calculate DC components and ripple components. amplitude, frequency and phase.

Benefits of technology

Accurate detection of DC components and ripple components with less sampled data is achieved, reducing storage space and hardware pressure, and improving real-time and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119165230A_ABST
    Figure CN119165230A_ABST
Patent Text Reader

Abstract

The invention discloses a DC signal ripple detection method, system and device and a storage medium. The direct current signal ripple detection method comprises the steps of collecting a non-ideal direct current signal, constructing a Gaussian measurement matrix based on a four-item three-order Nuttal window function, and performing compressed sensing sampling on the non-ideal direct current signal according to a preset compression ratio to obtain a compressed signal; selecting a DFT (Discrete Fourier Transform) sparse base as a sparse base of a sparsity self-adaptive reconstruction algorithm, and reconstructing the compressed signal by adopting the sparsity self-adaptive reconstruction algorithm to obtain a reconstructed sparse vector; and calculating the reconstructed sparse vector by using an algorithm combining a direct-current component recovery algorithm and a four-spectral-line interpolation algorithm, and simultaneously obtaining the amplitude of the direct-current component and the amplitude, frequency and phase of the ripple component. According to the invention, accurate detection of a direct current component and a ripple component is realized, synchronization of compression sampling of a non-ideal direct current signal is realized, and the storage space of a sampling end and the pressure of hardware can be greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of DC signal measurement, and relates to a DC signal ripple detection method, system, device and storage medium taking waveform distortion into account based on compressed sensing. Background Art

[0002] Since there are a large number of nonlinear power electronic devices in the DC transmission system, ripples will inevitably be generated. The existence of ripples will not only affect the power quality of the DC distribution network, but also endanger the stable operation of the power supply and distribution system, so it is necessary to accurately detect and analyze the ripples in the DC system. The existing high-density environment will cause a sharp increase in the number of terminal devices, resulting in a huge amount of data, which will create pressure on data transmission and storage. Furthermore, in the prior art, the monitoring of DC ripples first uses a filter circuit to remove the DC component from the non-ideal DC signal, and then detects the ripple. The real-time performance is poor and it takes up a lot of space and hardware costs. Summary of the invention

[0003] The technical problem to be solved by the present invention is to overcome the defects of the above-mentioned prior art and provide a DC signal ripple detection method and system based on compressed sensing, which can realize accurate detection of DC components and ripple components with less sampling data and save storage space.

[0004] To this end, the present invention adopts the following technical solution.

[0005] In a first aspect, the present invention provides a DC signal ripple detection method, comprising: Step 1, collecting a non-ideal DC signal, constructing a Gaussian measurement matrix based on four third-order Nuttal window functions, and performing compressed sensing sampling on the non-ideal DC signal at a preset compression ratio to obtain a compressed signal; Step 2, selecting a DFT sparse basis as a sparse basis of a sparsity adaptive reconstruction algorithm, and reconstructing the compressed signal using the sparsity adaptive reconstruction algorithm to obtain a reconstructed sparse vector; Step 3: Use a DC component recovery algorithm combined with a four-line interpolation algorithm (DCAR-QLI algorithm) to calculate the reconstructed sparse vector, and simultaneously obtain the amplitude of the DC component and the amplitude, frequency and phase of the ripple component.

[0006] The present invention solves the problem of difficulty in accurately analyzing the DC component and ripple component in the existing distorted modal DC signal. First, compressed sensing sampling is used, and the use of compressed sensing can greatly reduce the hardware requirements and storage pressure of the sampling end; then, a sparsity adaptive reconstruction algorithm (SAMP algorithm) is used to reconstruct a sparse vector for the compressed signal; finally, the DCAR-QLI algorithm is used to calculate the reconstructed sparse vector, and the amplitude of the DC component and the amplitude, frequency and phase of the ripple component are obtained at the same time.

[0007] Furthermore, in step 1, the discrete sequence of the non-ideal DC signal The expression is: , in, is the DC component of the non-ideal DC signal, is the ripple component of the non-ideal DC signal, h is the number of ripples, For the The frequency of the ripple component, For the The initial phase of the ripple component; Indicates the sampling frequency; For the The amplitude of the ripple component; is the number of points in the discrete sequence.

[0008] Furthermore, in step 1, the four third-order Nuttal window functions The time domain expression of is: , In the formula, N is the length of the window function.

[0009] Furthermore, in step 1, the window function Discrete sequence of non-ideal DC signals The expression for window truncation is as follows: , , According to the compressed sensing sampling framework, combined with the selection of window function and random Gaussian measurement matrix, a windowed random Gaussian measurement matrix is ​​constructed, and compressed sensing sampling is realized with a preset compression ratio. The expression is as follows: , in, and are random Gaussian measurement matrix and windowed random Gaussian measurement matrix respectively, and Both dimensional column vector; for The compressed matrix obtained after dimensional compressed sampling; is the window function w N A diagonal array of elements.

[0010] Furthermore, the preset compression ratio for: .

[0011] Furthermore, the step 2 specifically includes: Step 2.1, select DFT sparse basis As the sparse basis of the sparsity adaptive reconstruction algorithm, the specific expression is: , Among them, the sparse vector of K sparsity The dimension of , sparse basis The dimension of , sensor matrix ,at this time: ; Step 2.2, based on the DFT sparse basis selected in step 2.1 And the windowed random Gaussian measurement matrix constructed in step 1 , the compressed matrix y is reconstructed using the sparsity adaptive reconstruction algorithm to obtain the reconstructed sparse vector required for the next step .

[0012] Furthermore, the step 3 specifically includes: Step 3.1, search for reconstructed sparse vector The zero frequency line , the amplitude of the DC component is restored using the four-term third-order Nuttal window DC component recovery coefficients obtained in advance. D The recovery formula is: ; Step 3.2: Use the four-line interpolation algorithm to reconstruct the sparse vector Ripple component parameter correction.

[0013] In a second aspect, the present invention provides a DC signal ripple detection system, comprising: Compressed signal acquisition unit: collects non-ideal DC signals, constructs a Gaussian measurement matrix based on four-term third-order Nuttall window functions, and performs compressed sensing sampling on the non-ideal DC signals at a preset compression ratio to obtain compressed signals; Sparse vector reconstruction unit: select DFT sparse basis as the sparse basis of the sparsity adaptive reconstruction algorithm, and reconstruct the compressed signal using the sparsity adaptive reconstruction algorithm to obtain a reconstructed sparse vector; Component parameter acquisition unit: uses a DC component recovery algorithm combined with a four-spectrum interpolation algorithm to calculate the reconstructed sparse vector, and simultaneously obtains the amplitude of the DC component and the amplitude, frequency and phase of the ripple component.

[0014] In a third aspect, the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the DC signal ripple detection method when executing the computer program.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the DC signal ripple detection method.

[0016] The beneficial effects of the present invention are as follows: the present invention not only realizes the accurate detection of DC components and ripple components, but also realizes the synchronization of compressed sampling of non-ideal DC signals, which can greatly reduce the storage space and hardware pressure of the sampling end. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 This is a flow chart of a DC signal ripple detection method based on compressed sensing of the present invention; Figure 2 is a flow chart of the DCAR-QLI algorithm of the present invention; Figure 3 This is a diagram of the original signal sampling sequence in Example 1 of the present invention; Figure 4 This is a sequence diagram after the original signal is compressed and sampled in Embodiment 1 of the present invention; Figure 5 This is a waveform diagram of a distorted DC signal containing three types of ripples in Example 1 of the present invention; Figure 6 This is an architecture diagram of a DC signal ripple detection system based on compressed sensing of the present invention; Figure 7 A schematic diagram of a logical structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention 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 invention and are not used to limit the present invention, that is, the embodiments described are only part of the embodiments of the present invention, rather than all of the embodiments.

[0020] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0021] Example 1 This embodiment is a DC signal ripple detection method based on compressed sensing. Figure 1 As shown, the steps are as follows: Step 1: collect non-ideal DC signals, construct a measurement matrix with four third-order Nuttal windows, and perform compression sampling on the signals at a certain compression ratio.

[0022] Discrete sequence of components (DC component and ripple component) contained in non-ideal DC signal The expression is: , in, is the DC component of the non-ideal DC signal, is the ripple component of the non-ideal DC signal, h is the number of ripples, For the The frequency of the ripple component, For the The initial phase of the ripple component; Indicates the sampling frequency; For the The amplitude of the ripple component; is the number of points in the discrete sequence.

[0023] By analyzing and comparing the spectral characteristics of commonly used window functions, a window function with narrow main lobe width, small side lobe peak level and high side lobe attenuation rate should be selected. However, the three conditions cannot be met at the same time. In order to minimize the impact of spectrum leakage on the results, the window function selected by the present invention is a four-term third-order Nuttal window function. The time domain expression of this window function is: , In the formula, N is the length of the window function; Since the measurement matrix should satisfy the RIP condition, and the complexity of the RIP condition is too high, Baraniuk proved that the equivalent condition of RIP is that the measurement matrix and the sparse basis matrix are uncorrelated. In fact, each element of the Gaussian random matrix independently obeys the mean of 0 and the variance of The Gaussian distribution of is expressed as , when the length of the K-sparse vector x is N, the observation dimension M of the Gaussian measurement matrix only needs to satisfy , can basically satisfy the RIP condition with any sparse matrix, so in the present invention, a Gaussian random matrix is ​​selected as the measurement matrix; c is a constant that depends on the specific recovery algorithm and the conditions required for successful signal recovery, and its specific value varies with different recovery algorithms; K is the sparsity. In particular, in order to prevent the Gaussian random matrix generated each time from being different, resulting in unstable measurement result errors, the present invention saves the mode of generating the Gaussian random matrix in the same state.

[0024] Use a window function of length N Discrete sequence of non-ideal DC signals The expression for window truncation is as follows: , , According to the compressed sensing sampling framework, combined with the selection of window function and measurement matrix, a windowed random Gaussian measurement matrix is ​​constructed to realize compressed sensing sampling. The expression is as follows: , in, and are random Gaussian measurement matrix and windowed random Gaussian measurement matrix respectively, and Both dimensional column vector; for The compressed matrix obtained after dimensional compressed sampling; is the window function w N A diagonal array of elements.

[0025] The default compression ratio is: .

[0026] Step 2: Select the DFT sparse basis as the sparse basis of the sparsity adaptive reconstruction algorithm, and reconstruct the sparse vector by using the sparsity adaptive reconstruction algorithm (SAMP algorithm) on the compressed signal.

[0027] Specifically, the step 2 includes the following steps: Step 2.1, select a suitable sparse basis The signal processed by compressed sensing is usually not sparse in the original domain, but has sparseness in a certain transformed domain. Therefore, a sparse basis The original signal is projected into another transform domain to meet the sparsity of compressed sensing, thereby achieving the goal of efficiently reconstructing the signal from a small amount of sampled data.

[0028] The non-ideal DC signal in the power grid often cannot meet the sparsity in the time domain. If the signal is transformed into the frequency domain, the sparsity can be met. Among the many sparse bases, the DFT sparse base can transform the non-ideal DC signal into the frequency domain, and can make the resulting sparse vector have good sparsity, which meets the prerequisite for compressed sensing applications. Therefore, the present invention selects the DFT sparse base As the sparse basis of the reconstruction algorithm, the specific expression is as follows: , Among them, the sparse vector of K sparsity The dimension of , sparse basis The dimension of , sensor matrix ,at this time: .

[0029] Step 2.2, input the DFT sparse basis selected in step 2.1 And the windowed measurement matrix constructed in step 1 , the SAMP reconstruction algorithm is used to reconstruct the compressed matrix y to obtain the reconstructed sparse vector required for the next step .

[0030] Since most reconstruction algorithms require the sparsity K as a priori for accurate recovery, and in reality, it is usually impossible to know the sparsity of the signal in advance, so the sparsity adaptive reconstruction algorithm is selected to restore the sparse vector. The SAMP reconstruction algorithm does not need to know the sparsity K of the signal in advance, and uses adaptive adjustment of the step size to slowly approximate the signal. The pseudo code of the algorithm process is as follows (in the following process: represents the j-th column of matrix A, Represents a collection by index The selected set of columns of matrix A (assuming the number of columns is ), for : Input: Sensor Matrix ; Compression matrix ; Step size S.

[0031] Step 1. Initialization: Residual , index (column sequence) collection , the number of elements , number of iterations ; Step 2. Calculate the inner product of the residual and the sensor matrix (i.e. calculation ), select the L largest values ​​in u, and correspond these values ​​to the column number j of A to form a signal support index set (column number set); Step 3. Add the found signal support index to the index set ; Step 4. Ask The least squares solution of : ; Step 5. From The L term with the largest absolute value is selected and recorded as , corresponding to The L column in is denoted as , the corresponding column number of A is recorded as , remember the set ; Step 6. Update residual ; Step7. If the residual Then stop the iteration and go to Step8; if , update step size Return to Step 2 to continue iteration; if the previous two conditions are not met in turn, then ,like , then stop the iteration and go to Step8, otherwise return to Step2 and continue the iteration; Step 8. Reconstruct to obtain the reconstructed sparse vector exist There are non-zero entries at the last iteration. .

[0032] Output: signal sparse representation coefficient estimate ; Dimensional residual ; Note: It means to find the inner product of vectors. Indicates the modulo value.

[0033] Step 3: Use the algorithm combining the DC component recovery algorithm and the improved four-line interpolation algorithm (DCAR-QLI algorithm) to reconstruct the sparse vector Calculate and obtain the amplitude of the DC component and the amplitude, frequency and phase of the ripple component at the same time.

[0034] The reconstructed sparse vector obtained by the reconstruction algorithm of the signal based on the DFT sparse basis It has all the information of the key spectral lines of the original signal in the frequency domain, and the reconstructed sparse vector at this time The signals obtained by Fourier transform with the original signal have the additivity of Fourier transform. Therefore, the DC component and the ripple component can be processed in different ways according to the additivity of Fourier transform. For the DC component, since the window function compresses the amplitude of the DC component, it causes deviation from the actual amplitude. Therefore, it is necessary to calculate the recovery coefficient based on the window function used to restore the amplitude. For the ripple component, due to the fence effect, each actual peak spectral line frequency point of the sparse vector cannot coincide with the discrete frequency point. Only by reconstructing the sparse vector It is difficult to achieve accurate detection of ripples. Therefore, in order to reduce the impact of the fence effect on the results, the four-spectrum interpolation algorithm is used for interpolation correction to improve the detection accuracy.

[0035] Specifically, the step 3 includes the following steps: Figure 2 As shown: Step 3.1, search for reconstructed sparse vector The zero frequency line , the amplitude of the DC component is restored using the four-term third-order Nuttal window DC component restoration coefficients obtained in advance. The restoration coefficient derivation process is as follows: The four-term third-order Nuttal window function selected is a type of cosine window. The frequency domain expression of the cosine window is:

[0036] in, represents the angular frequency of the signal; is the number of terms in the cosine window function; is the coefficient of the cosine window function; is the discrete Fourier transform of the rectangular window, .

[0037] Cosine window truncated sparse vector DC part The frequency domain expression of is as follows:

[0038] In the formula, T s represents the sampling time interval; f represents the frequency of the DC component.

[0039] Expand , and ignore the sidelobe effect of negative frequency points:

[0040] in, are the coefficients of the cosine window function; is the amplitude of the DC component. According to the frequency of the DC component is 0, that is, when , items 2 to k are all 0, and the first term is expanded to:

[0041] Therefore , so the actual amplitude of the DC component can be obtained by the following formula:

[0042] in, is the DC component restoration coefficient, which can be obtained from the coefficient of the cosine window function So according to the coefficients of the four-term third-order Nuttal window function The amplitude recovery formula of the DC component can be obtained as: .

[0043] Step 3.2: Reconstruct the sparse vector using four-line interpolation The following is the derivation process of the four-spectrum interpolation correction formula based on the four-term third-order Nuttal window: The actual spectrum line is , The four surrounding spectral lines are denoted as , the positions of the five spectral lines are ,in The relationship is:

[0044] Four lines The amplitude is recorded as . Introduce parameters:

[0045]

[0046] Establishing the offset and The relationship between for The function is denoted as , since the offset is required , so we set the inverse function . Using the ployfit function in MATLAB to perform polynomial approximation, we get The fitting polynomial of . The correction formulas for the ripple component amplitude, frequency and phase are obtained as follows: , The relevant approximation in the four-line interpolation correction formula of the four-term third-order Nuttal window obtained based on multiple fitting is: , in, , , , Respectively represent The amplitudes corresponding to the four spectral lines near the peak point of the ripple component; Indicates frequency resolution; For the The second largest spectral line closest to the value of each ripple component; , , Respectively The frequency, amplitude and phase of each ripple component; , Both represent offset.

[0047] In order to prove the advantage of introducing compressed sensing to reduce the amount of data and the effectiveness of the method of the present invention in detecting distorted DC signals, the following four simulations are mainly included: (1) Comparison of data before and after the introduction of compressed sensing to prove the advantage of the method of the present invention (also known as the algorithm of the present invention) in reducing the amount of data. (2) Changing the compression ratio to study the influence of the compression ratio on the measurement accuracy of the method of the present invention. (3) For the first type of ripple (i.e., the ripple component of integer multiples of the power frequency), the feasibility of the method of the present invention is studied and its anti-noise performance is studied by adding a certain amount of noise. (4) The accuracy of the method of the present invention in detecting distorted DC signals containing three types of ripples at the same time is studied.

[0048] MATLAB is used to construct a distorted DC signal without noise, which consists of a DC component and a ripple component. The signal parameters are shown in Table 1.

[0049] Table 1 Signal parameter settings 1

[0050] The accuracy of the measurement result is calculated based on the relative error. The relative error calculation expression is:

[0051] in, is the actual value, is the difference between the true value and the actual value, is the relative error.

[0052] 1. Data volume simulation analysis Assuming the sampling frequency is 1kHz, we get an N-dimensional sampling sequence. Taking the compression ratio C=M / N=0.2 as an example, we get the compressed M-dimensional sampling data. Figure 3 , Figure 4The following are the original signal sampling sequence diagram and the sequence diagram after compressed sampling. It can be seen that the compressed data is obviously sparse, which proves that the method of the present invention can break through the limitation of Nyquist sampling theorem and greatly reduce the amount of data transmission. This reflects the advantage of compressed sensing data compression and sampling synchronously, which reduces the pressure on the sampling end.

[0053] 2. Compression ratio simulation analysis The compression ratio is an important parameter of the reconstruction algorithm. It determines the length of the sampling sequence, affects the compressed observation vector, and further affects how much important spectral information of the original signal is contained in the reconstructed sparse vector after the reconstruction algorithm.

[0054] In order to further experimentally analyze the degree of data reduction and detection accuracy of the method of the present invention, the detection relative error of the method of the present invention is measured under the condition of adjusting the compression ratio C. The compression sampling point M is adjusted so that the compression ratios are 0.3, 0.4, 0.5, and 0.6 respectively. The simulation results are shown in Tables 2 and 3.

[0055] Table 2 Amplitude detection relative error (%)

[0056] Table 3 Frequency detection relative error (%)

[0057] When the compression ratio is less than 0.4, the distorted DC signal cannot be accurately reconstructed, resulting in the detection accuracy failing to meet the standard requirements. When the compression ratio is 0.4, 0.5, and 0.6, the measurement effects of the three are not much different. This shows that when the compression ratio is greater than 0.4, the detection accuracy tends to be stable. This is because after the compression ratio reaches a certain value, the compressed sampling sequence can cover a large part of the useful information of the DC distortion signal. Therefore, the detection accuracy obtained after calculating the sparse vector tends to be stable. Therefore, the compression ratio in the subsequent examples is 0.4.

[0058] 3. Simulation analysis with white noise In order to verify the anti-noise interference performance of the method of the present invention, a distorted DC signal model containing white noise is constructed on the MATLAB platform, as shown below: , In the formula, Represents a distorted DC signal; Represents the noise component.

[0059] The parameters of the DC component and the ripple component are still used in Table 1, and 50dB, 60dB and 70dB Gaussian white noise are added respectively. The sampling frequency is 1kHz, the signal length is 1000, and the compression ratio is 0.4. When analyzing the noise resistance of the method, since there is no error standard for distorted DC signals, the method of the present invention will be compared with the detection effect of the VMD-HT algorithm used in most existing literature.

[0060] Table 4 Amplitude detection relative error (%)

[0061] Table 5 Frequency detection relative error (%)

[0062] It can be seen from the data in Table 4 and Table 5 that due to the interference of noise, a large number of interference components appear in the reconstructed sparse vector, which affects the detection accuracy. However, after adding 50dB, 60dB and 70dB white noise, the amplitude relative error of the VMD-HT algorithm can be basically maintained at the same order of magnitude, and the frequency relative error of the method of the present invention can be slightly lower than that of the VMD-HT algorithm, indicating that the detection accuracy of the method of the present invention can meet the requirements of the distorted DC signal detection accuracy after adding a certain amount of noise, indicating the noise robustness of the method of the present invention. It is worth mentioning that on the basis of meeting the requirements of detection accuracy, the method of the present invention reduces the signal sampling amount, data storage amount and transmission amount compared with the VMD-HT algorithm.

[0063] 4. Simulation analysis of algorithms containing three ripple types at the same time The previous examples are all based on the distorted DC signal model of DC plus integer multiples of the power frequency ripple component to simulate and analyze the detection accuracy of the algorithm. In fact, in the DC distribution network, there may be distorted DC signals with integer multiples of the power frequency ripple, non-integer multiples of the power frequency ripple, and high-frequency ripple. Therefore, the detection accuracy of the method of the present invention will be simulated and analyzed for the distorted DC signal containing three types of ripples. Still using the aforementioned distorted DC signal model, add 60dB of Gaussian white noise, set 2 integer multiples of the power frequency ripples (i.e., ripple component 1 and ripple component 3 in Table 7), 2 non-integer multiples of the power frequency ripples (i.e., ripple component 2 and ripple component 4 in Table 7) and 2 high-frequency ripples (i.e., ripple component 5 and ripple component 6 in Table 7), the sampling frequency is 5kHz, the signal length is 5000, and the compression ratio is 0.4. The parameters of each component of the distorted DC signal are set as shown in Table 6. The waveform of the distorted DC signal containing three types of ripples is shown in Figure 5 shown.

[0064] Table 6 Signal parameter settings 2

[0065] Table 7 Relative error of detection with 60dB noise added (%)

[0066] From the data in Table 7, we can see that in a 60dB noise environment, the relative error of the amplitude for detecting the three types of ripples can be guaranteed to be within (2.325×10 -2 )% or less, and can effectively detect three types of ripples. It can also detect the DC component at the same time, and the relative error of the amplitude can reach (9.419×10 -3 )%, with better detection effect. Secondly, the relative frequency error can be guaranteed within (3.157×10 -4 )% or less. This shows that the method of the present invention is feasible for detecting distorted DC signals containing various ripple types.

[0067] Example 2 This embodiment is a DC signal ripple detection system based on compressed sensing. Figure 6 As shown, it includes: Compressed signal acquisition unit: collects non-ideal DC signals, constructs a Gaussian measurement matrix based on four-term third-order Nuttall window functions, and performs compressed sensing sampling on the non-ideal DC signals at a preset compression ratio to obtain compressed signals; Sparse vector reconstruction unit: select DFT sparse basis as the sparse basis of the sparsity adaptive reconstruction algorithm, and reconstruct the compressed signal using the sparsity adaptive reconstruction algorithm to obtain a reconstructed sparse vector; Component parameter acquisition unit: uses a DC component recovery algorithm combined with a four-spectrum interpolation algorithm to calculate the reconstructed sparse vector, and simultaneously obtains the amplitude of the DC component and the amplitude, frequency and phase of the ripple component.

[0068] Specifically, in the compression signal acquisition unit, the discrete sequence of the non-ideal DC signal The expression is: , in, is the DC component of the non-ideal DC signal, is the ripple component of the non-ideal DC signal, h is the number of ripples, For the The frequency of the ripple component, For the The initial phase of the ripple component; Indicates the sampling frequency; For the The amplitude of the ripple component; is the number of points in the discrete sequence.

[0069] The four-term third-order Nuttal window function The time domain expression of is: , In the formula, N is the length of the window function; Use window function Discrete sequence of non-ideal DC signals The expression for window truncation is as follows: , , According to the compressed sensing sampling framework, combined with the selection of window function and random Gaussian measurement matrix, a windowed random Gaussian measurement matrix is ​​constructed, and compressed sensing sampling is realized with a preset compression ratio. The expression is as follows: , in, and are random Gaussian measurement matrix and windowed random Gaussian measurement matrix respectively, and Both dimensional column vector; for The compressed matrix obtained after dimensional compressed sampling; is the window function w N A diagonal array of elements.

[0070] In the compressed signal acquisition unit, the preset compression ratio for: .

[0071] Specifically, the sparse vector reconstruction unit includes: Sparse basis selection subunit: Select DFT sparse basis As the sparse basis of the sparsity adaptive reconstruction algorithm, the specific expression is: , Among them, the sparse vector of K sparsity The dimension of , sparse basis The dimension of , sensor matrix ,at this time: ; Reconstruct subunit: DFT sparse basis selected by subunit based on sparse basis And the windowed random Gaussian measurement matrix constructed by the compressed signal acquisition unit , the compressed matrix y is reconstructed using the sparsity adaptive reconstruction algorithm to obtain the reconstructed sparse vector required for the next step .

[0072] Specifically, the component parameter acquisition unit includes: DC component amplitude restoration subunit: search and reconstruct sparse vector The zero frequency line , the amplitude of the DC component is restored using the four-term third-order Nuttal window DC component recovery coefficients obtained in advance. D The recovery formula is: ; Ripple component parameter correction subunit: Reconstruct sparse vectors using four-spectral line interpolation algorithm The ripple component parameter correction, the correction formula for the amplitude, frequency and phase of the ripple component is: , The relevant approximation in the four-line interpolation correction formula of the four-term third-order Nuttal window obtained based on multiple fitting is: , in, , , , Respectively represent The amplitudes corresponding to the four spectral lines near the peak point of the ripple component; Indicates frequency resolution; For the The second largest spectral line closest to the peak value at the frequency point of each ripple component; , , Respectively The frequency, amplitude and phase of each ripple component; , Both represent offset.

[0073] It should be noted that each unit in the above-mentioned DC signal ripple detection system based on compressed sensing can be fully or partially implemented by software, hardware and a combination thereof. The above-mentioned units can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned units. For the specific definition of a DC signal ripple detection system based on compressed sensing, please refer to the definition of a DC signal ripple detection method based on compressed sensing (ie, Example 1) above. The two have the same functions and effects, which will not be repeated here.

[0074] Example 3 This embodiment provides an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication. The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the electronic device executes the method according to Embodiment 1 of the present invention.

[0075] Example 4 This embodiment provides a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to execute the method according to Embodiment 1 of the present invention.

[0076] refer to Figure 7 , a block diagram of an electronic device 400 that can be used as a server or client of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0077] like Figure 7 As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0078] A plurality of components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, an output unit 407, a storage unit 408, and a communication unit 409. The input unit 406 may be any type of device capable of inputting information to the electronic device 400, and the input unit 406 may receive input digital or character information, and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 407 may be any type of device capable of presenting information, and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 408 may include, but is not limited to, a disk, an optical disk. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0079] The computing unit 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 401 performs the various methods and processes described above. For example, in some embodiments, the aforementioned DC signal ripple detection method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 408. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 400 via the ROM 402 and / or the communication unit 409. In some embodiments, the computing unit 401 may be configured to perform the aforementioned DC signal ripple detection method in any other appropriate manner (e.g., by means of firmware).

[0080] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0081] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0082] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0083] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0084] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0085] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0086] It is obvious that those skilled in the art can easily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without creative work. Therefore, the present invention is not limited to the above embodiments, and improvements and modifications made by those skilled in the art to the present invention based on the disclosure of the present invention should be within the protection scope of the present invention.

Claims

1. A DC signal ripple detection method, characterized in that: include: Step 1, collecting a non-ideal DC signal, constructing a Gaussian measurement matrix based on four third-order Nuttal window functions, and performing compressed sensing sampling on the non-ideal DC signal at a preset compression ratio to obtain a compressed signal; Step 2, selecting a DFT sparse basis as a sparse basis of a sparsity adaptive reconstruction algorithm, and reconstructing the compressed signal using the sparsity adaptive reconstruction algorithm to obtain a reconstructed sparse vector; Step 3: Use a DC component recovery algorithm combined with a four-spectrum interpolation algorithm to calculate the reconstructed sparse vector, and simultaneously obtain the amplitude of the DC component and the amplitude, frequency and phase of the ripple component.

2. The DC signal ripple detection method according to claim 1, characterized in that: In step 1, the discrete sequence of the non-ideal DC signal The expression is: , in, is the DC component of the non-ideal DC signal, is the ripple component of the non-ideal DC signal, h is the number of ripples, For the The frequency of the ripple component, For the The initial phase of the ripple component; Indicates the sampling frequency; For the The amplitude of the ripple component; is the number of points in the discrete sequence.

3. The DC signal ripple detection method according to claim 2, characterized in that: In step 1, the four third-order Nuttal window functions The time domain expression of is: , In the formula, N is the length of the window function.

4. The DC signal ripple detection method according to claim 3, characterized in that: In step 1, the window function Discrete sequence of non-ideal DC signals The expression for window truncation is as follows: , , According to the compressed sensing sampling framework, combined with the selection of window function and random Gaussian measurement matrix, a windowed random Gaussian measurement matrix is ​​constructed, and compressed sensing sampling is realized with a preset compression ratio. The expression is as follows: , in, and are random Gaussian measurement matrix and windowed random Gaussian measurement matrix respectively, and Both dimensional column vector; for The compressed matrix obtained after dimensional compressed sampling; is the window function w N A diagonal array of elements.

5. The DC signal ripple detection method according to claim 4, characterized in that: In step 1, the preset compression ratio for: .

6. The DC signal ripple detection method according to claim 4, characterized in that: The step 2 specifically includes: Step 2.1, select DFT sparse basis As the sparse basis of the sparsity adaptive reconstruction algorithm, the specific expression is: , Among them, the sparse vector of K sparsity The dimension of , sparse basis The dimension of , sensor matrix ,at this time: ; Step 2.2, based on the DFT sparse basis selected in step 2.1 And the windowed random Gaussian measurement matrix constructed in step 1 , using the sparsity adaptive reconstruction algorithm to compress the matrix y Reconstruct and obtain the reconstructed sparse vector required for the next step .

7. The DC signal ripple detection method according to claim 6, characterized in that: The step 3 specifically includes: Step 3.1, search for reconstructed sparse vector The zero frequency line , the amplitude of the DC component is restored using the four pre-calculated third-order Nuttal window DC component restoration coefficients; Step 3.2: Use the four-line interpolation algorithm to reconstruct the sparse vector Ripple component parameter correction.

8. A DC signal ripple detection system, characterized in that: include: Compressed signal acquisition unit: collects non-ideal DC signals, constructs a Gaussian measurement matrix based on four-term third-order Nuttall window functions, and performs compressed sensing sampling on the non-ideal DC signals at a preset compression ratio to obtain compressed signals; Sparse vector reconstruction unit: select DFT sparse basis as the sparse basis of the sparsity adaptive reconstruction algorithm, and reconstruct the compressed signal using the sparsity adaptive reconstruction algorithm to obtain a reconstructed sparse vector; Component parameter acquisition unit: uses a DC component recovery algorithm combined with a four-spectrum interpolation algorithm to calculate the reconstructed sparse vector, and simultaneously obtains the amplitude of the DC component and the amplitude, frequency and phase of the ripple component.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. 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 7 are implemented.