Compression processing method and device of power signal, electronic equipment and storage medium
By combining frequency domain transformation and staged matching pursuit methods with sparsification and improved orthogonal matching pursuit algorithm, the problems of large sampling volume and insufficient accuracy in power signal monitoring are solved, achieving efficient and accurate signal compression processing, which is suitable for monitoring power systems with limited resources.
Patent Information
- Application Number
- CN202511054164.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2025-11-14
AI Technical Summary
Existing power signal monitoring and analysis technologies suffer from large sampling volumes and insufficient algorithm processing precision, resulting in poor signal processing quality, especially in resource-constrained distributed sensor networks.
A frequency domain transformation and staged matched pursuit method are adopted. A sparse representation is formed through discrete cosine transform. Combined with an adaptive observation matrix and an improved orthogonal matched pursuit algorithm, an appropriate compressed sampling method is selected to process the frequency domain components with signal energy above and below the threshold, and then the signal is reconstructed and inverse time domain transform is performed.
It significantly reduces the amount of data for power signal monitoring, improves algorithm processing accuracy, and enhances signal processing efficiency and quality. It is suitable for resource-constrained rural power distribution network monitoring scenarios and supports power quality analysis and real-time fault diagnosis.
Smart Images

Figure CN120956280A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power signal processing technology, and more specifically, to a method and apparatus for compressing power signals, an electronic device, and a storage medium. Background Technology
[0002] In the field of power system operation and monitoring, accurate detection and analysis of power signals are crucial for ensuring grid security, improving power quality, and enabling rapid fault diagnosis. Traditional power signal detection methods, especially harmonic and transient signal analysis, mainly rely on Fourier transform and its derivative techniques (such as short-time Fourier transform and wavelet transform). While these methods meet the needs of power signal analysis to some extent, they still reveal significant limitations when faced with the increasingly complex signal environment of modern power systems.
[0003] Fourier transform can only be used for periodic signals, and in order to satisfy the Nyquist sampling theorem, it often requires a high sampling rate, resulting in massive data acquisition and increased storage and transmission costs. This is particularly unfriendly to distributed sensor networks, especially resource-constrained devices such as smart meters and online monitoring terminals in rural power distribution networks. Furthermore, although short-time Fourier transform overcomes the periodicity dependence of signals, its time-frequency resolution is limited by the width of the fixed window function, making it difficult to accurately capture both high-frequency transients and low-frequency harmonics simultaneously. Its limitations are particularly prominent in the processing of power grid disturbances and non-stationary signals. In addition, wavelet transform, as a multi-scale analysis tool, can solve the above problems to some extent, but because the selection of basis functions depends on experience and the computational complexity is high, its application is limited in scenarios with limited real-time performance and computational resources, and its processing effect on 50Hz and its integer multiples of harmonics is not ideal.
[0004] In summary, existing power signal monitoring and analysis technologies suffer from large sampling volumes and insufficient algorithm processing accuracy. They are inadequate in terms of processing efficiency, computational resource requirements, weak harmonic identification capabilities, and adaptability to complex operating conditions, resulting in poor signal processing quality.
[0005] There is currently no effective solution to the above problems. Summary of the Invention
[0006] This invention provides a method, apparatus, electronic device, and storage medium for compressing power signals, in order to at least solve the technical problems of low signal processing quality caused by the large sampling volume and insufficient algorithm processing accuracy in related power signal monitoring methods.
[0007] According to one aspect of the present invention, a method for compressing power signals is provided, comprising: acquiring an original power signal and performing a frequency domain transformation on the original power signal to obtain a frequency domain feature representation composed of N frequency domain components, wherein N is a positive integer; selecting a target sampling method from a variety of predefined compression sampling methods according to the energy distribution characteristics of the frequency domain components, and performing compression sampling on the original power signal according to the target sampling method to obtain a compressed measurement signal; processing the compressed measurement signal according to the energy distribution characteristics using a staged matching pursuit method to obtain a reconstructed frequency domain signal, wherein the staged matching pursuit method comprises: first processing the main frequency domain components whose signal energy is higher than a first threshold, then processing the secondary frequency domain components whose signal energy is lower than the first threshold but higher than a second threshold, iteratively generating the reconstructed frequency domain signal; performing an inverse time domain transformation on the reconstructed frequency domain signal, and outputting the compressed power signal.
[0008] Further, the step of performing frequency domain transformation on the original power signal to obtain a frequency domain feature representation composed of N frequency domain components includes: performing amplitude normalization processing on the original power signal, converting the normalized time-domain signal into frequency domain form, generating an initial feature set containing K orthogonal frequency domain components, where K is an integer greater than or equal to N; calculating the proportion of each orthogonal frequency domain component in the total signal energy, and sorting all orthogonal frequency domain components in descending order of proportion; accumulating signal energy starting from the orthogonal frequency domain component with the highest proportion, and when the accumulated signal energy reaches a preset threshold, determining the top N orthogonal frequency domain components contained in the accumulated signal energy as key frequency domain components; and constructing the frequency domain feature representation based on the N key frequency domain components.
[0009] Further, the step of selecting a target sampling method from a variety of predefined compression sampling methods based on the energy distribution characteristics of the frequency domain components includes: statistically analyzing the amplitude of each frequency domain component and identifying significant components whose amplitude exceeds a preset multiple of the average amplitude; determining whether the original power signal has an equally spaced component distribution characteristic with the fundamental frequency as the interval based on the frequency distribution characteristics of all the significant components; selecting a partial Fourier sampling method as the target sampling method if the equally spaced component distribution characteristic exists; selecting a sparse random sampling method as the target sampling method if the equally spaced component distribution characteristic does not exist; and adjusting the target sampling method to a Bernoulli sampling method if the computational resources required by the target sampling method exceed the real-time processing capability of the current processing device.
[0010] Further, the step of compressing and sampling the original power signal according to the target sampling method to obtain a compressed measurement signal includes: constructing an observation matrix according to the matrix construction rules corresponding to the target sampling method, wherein the observation matrix has a specified number of rows and a specified number of columns, and the specified number of rows is less than the specified number of columns; segmenting the time-domain waveform of the original power signal to obtain M signal segments of equal duration, wherein M is a positive integer, and the duration of the signal segment is determined based on the specified number of columns; for each signal segment, performing matrix multiplication with the observation matrix to obtain the corresponding compressed measurement data segment; and concatenating the compressed measurement data segments corresponding to all the signal segments in the original order to obtain the compressed measurement signal.
[0011] Further, the step of processing the compressed measurement signal according to the energy distribution characteristics using a phased matching pursuit method to obtain a reconstructed frequency domain signal includes: a signal reconstruction step, in which the main frequency domain components with signal energy higher than a first threshold are extracted from the compressed measurement signal, the signal parameters of the main frequency domain components are calculated using the least squares method, and the power signal is reconstructed based on the signal parameters to obtain a first reconstructed signal, wherein the signal parameters include: frequency parameters, amplitude parameters, and phase parameters; a signal correction step, in which residual analysis is performed on the first reconstructed signal, the secondary frequency domain components with signal energy lower than a first threshold but higher than a second threshold are extracted, the correction parameters of the secondary frequency domain components are calculated using a dynamic regularization algorithm, and the first reconstructed signal is corrected based on the correction parameters to obtain a second reconstructed signal, wherein the correction parameters include: frequency calibration parameters, amplitude correction parameters, and phase compensation parameters; the signal reconstruction step and the signal correction step are repeated until any preset stopping condition is met to obtain the reconstructed frequency domain signal, wherein the preset stopping conditions include: the number of iterations reaches a preset maximum value, the determination coefficient of the reconstructed signal reaches a target value, and the residual signal energy is lower than a set threshold.
[0012] Furthermore, before performing the time-domain inverse transform on the reconstructed frequency domain signal, the method further includes: determining a characteristic frequency band range centered on a specified operating frequency and integer multiples of the specified operating frequency, wherein the characteristic frequency band range includes: the fundamental frequency band and the harmonic frequency band; marking frequency domain components located outside the characteristic frequency band range in the reconstructed frequency domain signal; performing amplitude attenuation processing on the marked non-characteristic frequency band components, wherein the amplitude attenuation intensity increases with the degree of deviation of the signal frequency from the center of the characteristic frequency band; and performing transition processing on frequency domain components located within a specified frequency range at the boundary of the characteristic frequency band using a cosine smoothing function.
[0013] Furthermore, before outputting the compressed power signal, the method further includes: calculating the determination coefficient between the time-domain signal corresponding to the reconstructed frequency-domain signal and the original power signal, wherein the determination coefficient is used to characterize the waveform similarity between the time-domain signal and the original power signal; comparing the determination coefficient with a preset quality threshold, and outputting the compressed power signal if the determination coefficient is higher than the preset quality threshold; otherwise, triggering a parameter adjustment process, wherein the parameter adjustment process includes: lowering a first threshold if a major frequency-domain component is missing; lowering a second threshold if a minor frequency-domain component is missing; re-executing the staged matching tracking method using the adjusted first threshold and / or second threshold; and outputting the compressed power signal if the determination coefficient meets the preset quality threshold, or if the number of parameter adjustments reaches the upper limit, or if the quality improvement after three consecutive adjustments is less than a preset amplitude threshold.
[0014] According to another aspect of the present invention, a power signal compression processing apparatus is also provided, comprising: a frequency domain transformation unit, configured to acquire an original power signal and perform a frequency domain transformation on the original power signal to obtain a frequency domain feature representation composed of N frequency domain components, wherein N is a positive integer; a compression sampling unit, configured to select a target sampling method from a variety of predefined compression sampling methods according to the energy distribution characteristics of the frequency domain components, and perform compression sampling on the original power signal according to the target sampling method to obtain a compressed measurement signal; a processing unit, configured to process the compressed measurement signal according to the energy distribution characteristics using a staged matching pursuit method to obtain a reconstructed frequency domain signal, wherein the staged matching pursuit method includes: first processing the main frequency domain components whose signal energy is higher than a first threshold, then processing the secondary frequency domain components whose signal energy is lower than the first threshold but higher than a second threshold, and iteratively generating the reconstructed frequency domain signal; and a time domain inverse transformation unit, configured to perform a time domain inverse transformation on the reconstructed frequency domain signal and output the compressed power signal.
[0015] Further, the frequency domain transformation unit includes: a conversion module, used to perform amplitude normalization processing on the original power signal, and convert the normalized time-domain signal into a frequency-domain form to generate an initial feature set containing K orthogonal frequency-domain components, where K is an integer greater than or equal to N; a first calculation module, used to calculate the proportion of each orthogonal frequency-domain component in the total signal energy, and sort all the orthogonal frequency-domain components in descending order of proportion; a first determination module, used to accumulate signal energy starting from the orthogonal frequency-domain component with the highest proportion, and when the accumulated signal energy reaches a preset threshold, determine the first N orthogonal frequency-domain components contained in the accumulated signal energy as key frequency-domain components; and a first construction module, used to construct the frequency domain feature representation based on the N key frequency-domain components.
[0016] Further, the compressed sampling unit includes: an identification module, used to count the amplitude of each frequency domain component and identify significant components whose amplitude exceeds a preset multiple of the average amplitude; a judgment module, used to determine whether the original power signal has an equally spaced component distribution characteristic with the fundamental frequency as the interval based on the frequency distribution characteristics of all the significant components; a first selection module, used to select a partial Fourier sampling method as the target sampling method when the equally spaced component distribution characteristic exists; a second selection module, used to select a sparse random sampling method as the target sampling method when the equally spaced component distribution characteristic does not exist; and an adjustment module, used to adjust the target sampling method to a Bernoulli sampling method when the computational resources required by the target sampling method exceed the real-time processing capability of the current processing device.
[0017] Further, the compressed sampling unit includes: a second construction module, configured to construct an observation matrix according to the matrix construction rules corresponding to the target sampling method, wherein the observation matrix has a specified number of rows and a specified number of columns, the specified number of rows being less than the specified number of columns; a first processing module, configured to segment the time-domain waveform of the original power signal to obtain M signal segments of equal duration, wherein M is a positive integer, and the duration of the signal segment is determined based on the specified number of columns; a calculation module, configured to perform matrix multiplication on each signal segment and the observation matrix to obtain the corresponding compressed measurement data segment; and a splicing module, configured to splice the compressed measurement data segments corresponding to all the signal segments in the original order to obtain the compressed measurement signal.
[0018] Further, the processing unit includes: a reconstruction module, used to perform a signal reconstruction step, extracting the main frequency domain components whose signal energy is higher than a first threshold from the compressed measurement signal, calculating the signal parameters of the main frequency domain components using the least squares method, and reconstructing the power signal based on the signal parameters to obtain a first reconstructed signal, wherein the signal parameters include: frequency parameters, amplitude parameters, and phase parameters; a correction module, used to perform a signal correction step, performing residual analysis on the first reconstructed signal, extracting the secondary frequency domain components whose signal energy is lower than a first threshold but higher than a second threshold, calculating the correction parameters of the secondary frequency domain components using a dynamic regularization algorithm, and correcting the first reconstructed signal based on the correction parameters to obtain a second reconstructed signal, wherein the correction parameters include: frequency calibration parameters, amplitude correction parameters, and phase compensation parameters; and a repetition module, used to repeatedly execute the signal reconstruction step and the signal correction step until any preset stopping condition is met to obtain the reconstructed frequency domain signal, wherein the preset stopping conditions include: the number of iterations reaching a preset maximum value, the determination coefficient of the reconstructed signal reaching a target value, and the residual signal energy being lower than a set threshold.
[0019] Furthermore, the power signal compression processing device further includes: a second determining module, used to determine a characteristic frequency band range centered on a specified operating frequency and integer multiples of the specified operating frequency before performing a time-domain inverse transform on the reconstructed frequency domain signal, wherein the characteristic frequency band range includes: a fundamental frequency band and a harmonic frequency band; a marking module, used to mark frequency domain components located outside the characteristic frequency band range in the reconstructed frequency domain signal; a second processing module, used to perform amplitude attenuation processing on the marked non-characteristic frequency band components, wherein the amplitude attenuation intensity increases with the degree of deviation of the signal frequency from the center of the characteristic frequency band; and a third processing module, used to perform transition processing on frequency domain components located within a specified frequency range at the boundary of the characteristic frequency band using a cosine smoothing function.
[0020] Furthermore, the power signal compression processing device further includes: a second calculation module, used to calculate the determination coefficient between the time-domain signal corresponding to the reconstructed frequency-domain signal and the original power signal before outputting the compressed power signal, wherein the determination coefficient is used to characterize the waveform similarity between the time-domain signal and the original power signal; a comparison module, used to compare the determination coefficient with a preset quality threshold, and output the compressed power signal if the determination coefficient is higher than the preset quality threshold; otherwise, trigger a parameter adjustment process, wherein the parameter adjustment process includes: reducing a first threshold if a major frequency-domain component is missing; reducing a second threshold if a minor frequency-domain component is missing; an execution module, used to re-execute the staged matching tracking method using the adjusted first threshold and / or second threshold; and an output module, used to output the compressed power signal if the determination coefficient meets the preset quality threshold, or if the number of parameter adjustments reaches an upper limit, or if the quality improvement after three consecutive adjustments is less than a preset amplitude threshold.
[0021] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the power signal compression processing method described in any one of the above embodiments.
[0022] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the power signal compression processing method described in any one of the above embodiments.
[0023] According to another aspect of the present invention, a computer program product is also provided, including computer instructions, wherein when the computer instructions are executed by a processor, they implement the steps of the power signal compression processing method described in any one of the above embodiments.
[0024] This invention proposes a method for compressing power signals. First, the original power signal is acquired and subjected to frequency domain transformation to obtain a frequency domain feature representation composed of N frequency domain components, where N is a positive integer. Then, based on the energy distribution characteristics of the frequency domain components, a target sampling method is selected from a variety of predefined compression sampling methods, and the original power signal is compressed and sampled according to the target sampling method to obtain a compressed measurement signal. Next, a staged matching pursuit method is used to process the compressed measurement signal based on the energy distribution characteristics to obtain a reconstructed frequency domain signal. The staged matching pursuit method includes: first processing the main frequency domain components whose signal energy is higher than a first threshold; then processing the secondary frequency domain components whose signal energy is lower than the first threshold but higher than a second threshold; iteratively generating the reconstructed frequency domain signal; and finally, performing an inverse time domain transformation on the reconstructed frequency domain signal to output the compressed power signal.
[0025] This invention employs an innovative approach that combines signal sparsification with compressed sensing. By integrating discrete cosine transform preprocessing with an improved orthogonal matching pursuit algorithm, it achieves a significant reduction in the amount of data in power signal monitoring and a substantial improvement in algorithm processing accuracy. This results in efficient and high-fidelity compressed processing of power signals, thereby solving the technical problems of large sampling volumes and insufficient algorithm processing accuracy in related power signal monitoring methods, which lead to low signal processing quality.
[0026] Specifically, this invention first acquires the original power signal, then maps it to the frequency domain based on discrete cosine transform, forming a sparse representation composed of frequency domain components. Through an adaptive observation matrix system, the most suitable compression sampling method is dynamically selected based on energy distribution characteristics, effectively reducing data dimensionality and alleviating storage and transmission burdens. During signal reconstruction, a staged matching pursuit method is introduced to locate and process the main frequency domain components with signal energy above a first threshold, capturing the main features of the signal and ensuring the accuracy of the basic framework of the reconstructed signal. Subsequently, fine-tuning is performed to process secondary frequency domain components with signal energy below the first threshold but above the second threshold, capturing the integrity details of low-energy signals. This balances the speed and accuracy of signal reconstruction during the reconstruction process. Finally, the compressed power signal is output through inverse time-domain transform, significantly improving the processing efficiency of the power signal and ensuring the quality of signal reconstruction. Even at low sampling rates, the integrity and accuracy of the signal are maintained. Compared with existing technologies, this invention is particularly suitable for distributed resource monitoring scenarios in resource-constrained rural distribution networks, providing strong technical support for power quality analysis and real-time fault diagnosis, and effectively promoting the intelligent upgrading and stable operation of power systems. Attached Figure Description
[0027] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0028] Figure 1 This is a flowchart of an optional power signal compression processing method according to an embodiment of the present invention;
[0029] Figure 2 This is a flowchart of an optional power signal compressed sensing method combining DCT sparse basis and improved OMP algorithm according to an embodiment of the present invention.
[0030] Figure 3 This is a schematic diagram illustrating the results of an optional reconstruction effect analysis according to an embodiment of the present invention;
[0031] Figure 4 This is a schematic diagram of an optional power signal compression processing device according to an embodiment of the present invention;
[0032] Figure 5 This is a structural block diagram of an electronic device for performing a power signal compression processing method according to an embodiment of the present invention. Detailed Implementation
[0033] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0035] To facilitate understanding of the present invention by those skilled in the art, some terms or nouns involved in the various embodiments of the present invention are explained below:
[0036] DCT, Discrete Cosine Transform, is a mathematical tool for signal processing, particularly suitable for processing signals composed of superimposed cosine waves. DCT can convert time-domain signals into frequency-domain representations, and in power signals, it effectively concentrates signal energy on a few frequency components, exhibiting typical sparsity characteristics.
[0037] Compressed Sensing (CS) is a technique in signal processing that allows signals to be acquired at rates far lower than the Nyquist sampling rate, and then reconstructed from a small number of observations using optimization algorithms. The key to compressed sensing lies in the sparse representation of the signal and the design of the measurement matrix. This invention uses Direct Transformation Cosine Transform (DCT) as a sparse transform basis, combined with adaptive observation matrix optimization, to achieve efficient compression and reconstruction of power signals.
[0038] OMP, or Orthogonal Matching Pursuit, is an iterative algorithm for signal reconstruction, suitable for selecting atoms from an overcomplete dictionary to sparsely represent a signal. OMP reconstructs the signal by progressively selecting the basis function that best matches the residual. However, in traditional power signal processing, the reconstruction accuracy and efficiency of OMP may be limited due to the complexity of the signal and the characteristics of DCT basis functions. This invention proposes an improved OMP algorithm that significantly improves the detection accuracy of weak harmonic components in power signals by introducing dynamic threshold adjustment and residual correlation weighting strategies.
[0039] An adaptive observation matrix is used in compressed sensing to map signals from a high-dimensional space to a low-dimensional space. However, traditional fixed matrices are difficult to adapt to the characteristics of different signals. In this invention, the adaptive observation matrix refers to an observation matrix dynamically selected based on the harmonic components and frequency domain characteristics of the power signal. This includes Gaussian random matrices, Bernoulli matrices, sparse random matrices, and partial Fourier matrices, etc., to improve compressed sampling efficiency and signal reconstruction accuracy.
[0040] The dual-threshold strategy, in an improved OMP algorithm, distinguishes between the primary and secondary frequency components of a signal by setting two thresholds. Initially, a higher threshold is used to quickly locate the primary harmonics, and then the threshold is gradually lowered to capture weak low-energy harmonics. This approach balances reconstruction speed and accuracy and is particularly suitable for the dynamic characteristics of power signals.
[0041] The following embodiments of the present invention can be applied to various systems / applications / equipment that require efficient power signal compression, high-precision harmonic analysis, and transient signal detection, enabling a power signal compression sensing system that combines DCT sparse basis and an improved OMP algorithm. The present invention uses Discrete Cosine Transform (DCT) for frequency domain sparse representation of power signals, and then adaptively selects the optimal observation matrix based on signal characteristics, thus achieving a better balance between signal compression ratio and reconstruction accuracy.
[0042] In practical implementation, this invention first acquires grid voltage / current signals using power sensors, and then maps the signals to the frequency domain using DCT transform technology to construct a highly sparsity signal feature representation. Subsequently, based on the energy distribution characteristics of the signal's frequency domain components, the observation matrix type is dynamically adjusted (e.g., using a partial Fourier matrix when detecting higher harmonics, and selecting a Gaussian random matrix under steady-state conditions) to ensure the efficiency and relevance of compressed sampling. Next, an improved OMP algorithm with phased matching pursuit is used to process the compressed measurement signal, and the frequency domain characteristics of the power signal are gradually reconstructed through a dual-threshold strategy and dynamic regularized least squares method. Finally, the time domain signal is recovered through inverse DCT transform, and the integrity and accuracy of the signal under low sampling rate conditions are ensured through signal reconstruction quality evaluation.
[0043] This invention combines efficient signal sparsification through DCT preprocessing with intelligent reconstruction through an improved OMP algorithm, avoiding the dependence of traditional signal processing techniques on high sampling rates. It also overcomes the limitations of Fourier transform and wavelet transform in processing power signals, significantly improving the efficiency of power signal processing and the ability to identify weak harmonics. It is not only suitable for resource-constrained rural power distribution network monitoring and smart meter applications, but also provides reliable technical support for power quality analysis, real-time detection of power grid disturbances, and fault diagnosis.
[0044] The present invention will now be described in detail with reference to various embodiments.
[0045] Example 1
[0046] According to an embodiment of the present invention, a method for compressing power signals is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0047] The implementation subject of this invention can be a smart grid signal monitoring and analysis system, or integrated into various power equipment (such as smart meters and online monitoring terminals). Combining Discrete Cosine Transform (DCT) and improved Orthogonal Matching Pursuit (OMP) algorithms, as well as signal processing methods such as adaptive compressed sampling, dynamic threshold adjustment, and residual correlation weighting, it achieves efficient and high-precision compressed sensing and reconstruction of power signals. This provides key technical means to improve the accuracy and real-time performance of dynamic assessment and operation optimization of distributed resource carrying capacity in rural distribution networks. It is particularly suitable for power signal monitoring scenarios with limited resources and low power consumption requirements, and helps overcome signal processing difficulties caused by large data volumes and high computational complexity, significantly improving the stability of power system operation and fault diagnosis efficiency.
[0048] The embodiments of the present invention will now be described in detail with reference to the specific implementation steps.
[0049] Figure 1 This is a flowchart of an optional power signal compression processing method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:
[0050] Step S101: Acquire the original power signal and perform frequency domain transformation on the original power signal to obtain a frequency domain feature representation composed of N frequency domain components, where N is a positive integer.
[0051] Specifically, raw power signals refer to voltage or current signals obtained directly from the power system without any preprocessing. They contain all the information about the operation of the power system, including basic power frequency components (usually 50Hz or 60Hz), various harmonic components (integer multiples of the power frequency, reflecting the presence of nonlinear loads in the power system), and possible transient signals (such as pulses or oscillations caused by short circuits, open circuits, and system disturbances).
[0052] Frequency domain transformation refers to the mathematical process of converting the original time-domain signal to the frequency domain. In this embodiment of the invention, the Discrete Cosine Transform (DCT), an orthogonal transform in the real number domain, can be used. It is particularly suitable for signals composed of multiple superimposed cosine waves, such as power signals. Compared to the Fourier Transform, the DCT can more effectively concentrate the signal energy on a few frequency components when processing power signals, presenting a sparse distribution. This allows the signal to be expressed and transmitted with less data while preserving the key characteristics of the signal.
[0053] After DCT transformation, the original power signal is represented by various frequency components in the frequency domain. Each frequency component corresponds to a frequency information in the original signal, such as the fundamental wave, second harmonic, third harmonic, etc. The value of N depends on the number of sampling points of the original signal and the specific implementation of the transformation, representing the complete representation of the signal in the frequency domain.
[0054] Frequency domain feature representation is a sparse representation that uses frequency domain components to describe the characteristics of the original power signal. It characterizes the fact that most frequency domain components have relatively small amplitudes, while only a few components have large amplitudes; these components with large amplitudes are the key features of the signal. The energy distribution of power signals in the DCT domain exhibits significant sparsity. By preserving and analyzing key frequency domain components, the basic characteristics and potential abnormal events of the power signal, such as harmonic distortion and system faults, can be effectively captured. This approach can significantly reduce the amount of data while retaining key information about the power signal, which is beneficial for subsequent signal compression and efficient transmission.
[0055] To improve the efficiency and quality of signal processing, signal features can be intelligently extracted and optimized. Optionally, the original power signal can be frequency-domain transformed to obtain a frequency-domain feature representation composed of N frequency-domain components. This includes: normalizing the amplitude of the original power signal and converting the normalized time-domain signal into a frequency-domain form to generate an initial feature set containing K orthogonal frequency-domain components, where K is an integer greater than or equal to N; calculating the proportion of each orthogonal frequency-domain component in the total signal energy and sorting all orthogonal frequency-domain components in descending order of proportion; accumulating signal energy starting from the orthogonal frequency-domain component with the highest proportion; when the accumulated signal energy reaches a preset threshold, identifying the top N orthogonal frequency-domain components contained in the accumulated signal energy as key frequency-domain components; and constructing a frequency-domain feature representation based on the N key frequency-domain components.
[0056] In one optional embodiment, the acquired raw power signal is first subjected to amplitude normalization to eliminate differences in signal amplitude and ensure the accuracy and reliability of subsequent frequency domain transformation. Normalization can be performed using the Z-score normalization method, which involves subtracting the signal mean from each signal point and then dividing by the signal's standard deviation.
[0057] Next, the normalized time-domain signal is transformed into the frequency domain, and an initial feature set containing K orthogonal frequency domain components is generated using Discrete Cosine Transform (DCT). Here, K is an integer greater than or equal to N, representing the number of potential components representing the signal in the frequency domain.
[0058] After obtaining K orthogonal frequency domain components, the energy proportion of each component is calculated, which is the square of the amplitude of that component divided by the sum of the squares of the amplitudes of all components. This identifies the distribution of signal energy and highlights which frequency domain components have the greatest impact on the signal composition. Then, all orthogonal frequency domain components are sorted from highest to lowest energy proportion.
[0059] The signal energy is accumulated starting from the frequency domain components sorted by energy percentage until the accumulated signal energy reaches a preset threshold (e.g., 95% of the total signal energy). At this point, the top N orthogonal frequency domain components contained in the accumulated signal energy are identified as key frequency domain components, ensuring that the most critical information is retained in the frequency domain representation of the signal, while discarding components with extremely low energy percentages, thereby reducing the amount of data and the complexity of subsequent processing.
[0060] Finally, a frequency domain feature representation is constructed based on the determined key frequency domain components. This representation not only includes the key spectral information of the signal, but also, due to the intelligent analysis of the signal energy distribution characteristics, can precisely control the size (N components) to adapt to the data transmission and storage needs of different scenarios.
[0061] Step S102: Based on the energy distribution characteristics of the frequency domain components, select the target sampling method from a variety of predefined compression sampling methods, and compress and sample the original power signal according to the target sampling method to obtain the compressed measurement signal.
[0062] Specifically, the series of frequency domain components obtained after the DCT transformation of a power signal exhibit non-uniform energy distribution characteristics. Most of the signal energy is concentrated in a few dominant frequency components, forming a typical sparse distribution. This characteristic is crucial for compressed sensing processing of power signals because high-energy components (such as the fundamental frequency and major harmonics) often contain the main features of the signal, while low-energy components (such as weak harmonics and noise) have less impact on the overall signal description. By analyzing the energy distribution of the frequency domain components, the dominant features of the signal can be intelligently selected, providing a basis for subsequent compressed sampling.
[0063] The core of compressed sampling technology lies in how to acquire signals at a rate far lower than the Nyquist rate while preserving the effective information of the signal. This invention can achieve this goal by predefining various observation matrices, including Gaussian random matrices, Bernoulli matrices, sparse random matrices, and partial Fourier matrices. The different characteristics (such as randomness and orthogonality) and application scenarios of these matrices allow for flexible selection of the most suitable compressed sampling method based on the frequency domain characteristics of the power signal (such as energy concentration and frequency distribution range), thereby achieving a significant reduction in data volume while ensuring signal reconstruction quality.
[0064] The target sampling method refers to the most suitable compression sampling scheme dynamically selected from predefined compression sampling methods based on the energy distribution characteristics of the frequency domain components of the power signal. In this embodiment of the invention, when the signal contains high-frequency harmonics, a partial Fourier matrix is preferentially used to improve the frequency domain resolution and capture rapidly changing signal characteristics; while for low-frequency signals or steady-state conditions, a Gaussian random matrix or a Bernoulli matrix is used to ensure a balance between real-time performance and reconstruction accuracy. In addition, depending on equipment performance and resource constraints, a sparse random matrix is also an effective choice, especially suitable for low-power devices (such as smart meters).
[0065] It's important to note that compressed sampling is a signal processing technique that allows signals to be acquired and reconstructed at rates lower than the Nyquist sampling rate. By using targeted sampling, only compressed measurements sufficient to describe the key features of the signal are obtained. These measurements are obtained by multiplying a specific observation matrix with the sparse representation of the signal. Compressed sampling not only significantly reduces the frequency and bandwidth requirements of data acquisition but also substantially reduces the cost of data processing and storage, making it particularly suitable for resource-constrained scenarios, such as real-time monitoring of rural power distribution networks.
[0066] After compressed sampling, the resulting set of observations, i.e., the compressed measurement signal, contains key information from the original signal, but the data volume is much smaller than that of the original signal. Generating the compressed measurement signal depends on the target sampling method and the corresponding observation matrix. Essentially, it involves subsampling the signal (i.e., sampling below the Nyquist rate) and preserving the dominant frequency components of the signal to ensure the quality of the subsequent reconstructed signal. In this embodiment of the invention, the goal can be to reduce the sampling rate of the original signal to 30%-40% of the Nyquist rate, while simultaneously ensuring accurate signal recovery through an improved reconstruction algorithm.
[0067] To further reduce unnecessary data acquisition and improve the accuracy of the reconstructed signal, optionally, a step of selecting a target sampling method from a variety of predefined compression sampling methods based on the energy distribution characteristics of the frequency domain components includes: statistically analyzing the amplitude of each frequency domain component and identifying significant components whose amplitude exceeds a preset multiple of the average amplitude; determining whether the original power signal has an equally spaced component distribution characteristic with the fundamental frequency as the interval based on the frequency distribution characteristics of all significant components; selecting a partial Fourier sampling method as the target sampling method if the equally spaced component distribution characteristic exists; selecting a sparse random sampling method as the target sampling method if the equally spaced component distribution characteristic does not exist; and adjusting the target sampling method to a Bernoulli sampling method if the computational resources required by the target sampling method exceed the real-time processing capability of the current processing device.
[0068] In one optional embodiment, the amplitude of each frequency domain component is first calculated, i.e., the absolute value of each DCT coefficient is calculated; then, significant components are identified based on the statistical results. The determination of significant components is based on a preset amplitude threshold, which is usually set to a certain multiple of the average amplitude of all frequency domain components (e.g., it can be set to 3 times the standard deviation). Any frequency domain component with an amplitude exceeding this threshold is considered a significant component, and the focus can be placed on key features in the signal, i.e., those frequency components with concentrated energy.
[0069] Next, based on the frequency distribution characteristics of all significant components, it is determined whether the original power signal has the characteristic of equally spaced components with the fundamental frequency as the interval. Integer multiples of the fundamental frequency usually correspond to harmonics in the power system and are the focus of power signal analysis. If the frequency distribution of significant components conforms to the equally spaced characteristic, it indicates that there is a significant harmonic structure in the signal. In this case, partial Fourier sampling is preferred as the target sampling method.
[0070] Regarding the selection of the target sampling method, this embodiment of the invention designs partial Fourier sampling when the equal interval characteristic exists, and sparse random sampling when the equal interval characteristic does not exist.
[0071] Specifically, partial Fourier matrices are designed for signals with equally spaced frequency distributions. By selecting m rows from the complete Fourier transform matrix (where m is much smaller than the original signal length N), the main frequency components of the signal are efficiently preserved at a lower sampling rate. Especially when the signal contains high-frequency harmonics (such as >50th harmonics), partial Fourier matrices can provide good frequency domain resolution and ensure accurate capture of signal features.
[0072] If the significant components of a signal do not exhibit obvious equally spaced distribution characteristics, a sparse random sampling method is chosen. By randomly selecting a certain number of basis functions for measurement, it is suitable for situations where the signal components are complex, non-periodic, or contain random noise. It can better maintain the sparsity of the signal and achieve efficient compression even when the signal structure is difficult to predict.
[0073] This invention can also intelligently adjust the sampling method to adapt to the computing resources of the current processing device. If the computational complexity of the target sampling method (whether partial Fourier or sparse random) exceeds the real-time processing capability of the device, the sampling method will be automatically adjusted to Bernoulli sampling. Bernoulli matrices have low computational and storage requirements, and their generation and application are simple and fast, making them suitable for environments with limited computing power, such as smart meters or small monitoring terminals.
[0074] To further achieve efficient compression of power signals and improve the adaptability and flexibility of the scheme, optionally, the step of compressing and sampling the original power signal according to the target sampling method to obtain a compressed measurement signal includes: constructing an observation matrix according to the matrix construction rules corresponding to the target sampling method, wherein the observation matrix has a specified number of rows and columns, and the specified number of rows is less than the specified number of columns; segmenting the time-domain waveform of the original power signal to obtain M signal segments of equal duration, wherein M is a positive integer, and the duration of the signal segment is determined based on the specified number of columns; for each signal segment, performing matrix multiplication with the observation matrix to obtain the corresponding compressed measurement data segment; and splicing the compressed measurement data segments corresponding to all signal segments in the original order to obtain the compressed measurement signal.
[0075] In one alternative embodiment, an observation matrix is first constructed based on the target sampling method. This must follow specific rules, where the number of rows m is much smaller than the number of columns N, to acquire key information of the signal at a rate lower than the Nyquist sampling rate, while maintaining the sparsity of the signal.
[0076] In the segmentation of the time-domain waveform of the original power signal, the duration of the signal segment is selected based on the compression sampling theory and the specified number of columns N. This ensures that each signal segment can be effectively compressed by the observation matrix after being converted to the frequency domain representation, while maintaining the integrity and consistency of the signal characteristics. This makes the compression sampling process more flexible and applicable to the acquisition of signals of different lengths. It also helps to realize parallel processing and improve the overall processing speed.
[0077] In compressed sampling and data segment concatenation, matrix multiplication is performed on each signal segment using a constructed observation matrix to obtain the compressed measurement data segment. Efficient encoding of signal information is achieved by projecting the signal segments into a low-dimensional space. The acquisition of compressed measurement data segments depends not only on the selection of the observation matrix but also on the length and characteristics of the signal segments, ensuring a balance between data compression ratio and reconstruction quality.
[0078] After all signal segments have been compressed and sampled, the compressed measurement data segments are spliced together according to the original timing sequence to form the final compressed measurement signal. The structure of the compressed measurement signal reflects the key characteristics of the original power signal in the time and frequency domains. The splicing process ensures the continuity and integrity of the signal, providing a clear and coherent data stream for subsequent steps.
[0079] Step S103: A phased matching pursuit method is adopted to process the compressed measurement signal according to the energy distribution characteristics to obtain the reconstructed frequency domain signal. The phased matching pursuit method includes: first processing the main frequency domain components whose signal energy is higher than the first threshold, then processing the secondary frequency domain components whose signal energy is lower than the first threshold but higher than the second threshold, and iteratively generating the reconstructed frequency domain signal.
[0080] It should be noted that the staged matching pursuit method is an innovative application of the improved orthogonal matching pursuit (OMP) algorithm in this embodiment of the invention. It can effectively reconstruct the frequency domain representation of the power signal from the compressed measurement signal, while balancing processing speed and reconstruction accuracy. The core of this method lies in decomposing the signal into multiple processing stages based on the energy distribution characteristics of the signal's frequency domain components, and iteratively pursuing the different energy level components of the signal respectively.
[0081] Specifically, the first stage is the tracking of major frequency domain components. In this stage, the focus is on the major frequency domain components whose signal energy is higher than the first threshold. A higher threshold strategy is used to quickly lock the main characteristic frequencies of the signal, ensuring the accurate recovery of the basic structure and main harmonic components of the reconstructed signal, which is equivalent to establishing the skeleton of the reconstructed signal.
[0082] The second stage is secondary frequency domain component tracking. This stage involves refinement, processing secondary frequency domain components whose signal energy is below the first threshold but above the second threshold. Although these components have lower energy, they are still important for capturing the integrity and subtle features of the signal. By lowering the threshold, information from these weak frequency components can be captured more precisely, filling in the detail gaps left over from the first stage.
[0083] It should be noted that the entire phased matching and tracking process is an iterative process, continuously searching for the optimal match between the frequency domain components of the signal, gradually approximating the frequency domain representation of the original signal. In each iteration, the selected basis function set is updated based on the current residual, and the coefficients are re-estimated until the stopping criterion is met or the predetermined number of iterations is reached, thereby generating a reconstructed frequency domain signal that is as close as possible to the original signal.
[0084] The amplitude and phase information of a series of frequency domain components in the reconstructed frequency domain signal are accurately estimated and reconstructed to reflect the spectral characteristics of the original signal. The staged matched pursuit method of this invention can effectively process compressed measurement signals, recovering most of the signal's frequency domain information even at low sampling rates, especially for weak but important harmonic components in power signals. This ensures the overall quality and precision of the signal reconstruction, compensates for the shortcomings of traditional signal processing when dealing with the sparsity of power signals, and significantly improves the efficiency and accuracy of signal processing.
[0085] To improve the reconstruction accuracy of compressed sensing of power signals and optimize real-time performance, robustness, and computational efficiency, a staged matching pursuit method can be optionally adopted. This method involves processing the compressed measurement signal according to its energy distribution characteristics to obtain a reconstructed frequency domain signal. The steps include: a signal reconstruction step, whereby the main frequency domain components with signal energy higher than a first threshold are extracted from the compressed measurement signal; signal parameters of the main frequency domain components are calculated using the least squares method; and power signal reconstruction is performed based on these parameters to obtain a first reconstructed signal. The signal parameters include frequency parameters, amplitude parameters, and phase parameters. A signal correction step involves performing residual analysis on the first reconstructed signal, extracting secondary frequency domain components with signal energy lower than a first threshold but higher than a second threshold; calculating correction parameters for the secondary frequency domain components using a dynamic regularization algorithm; and correcting the first reconstructed signal based on these correction parameters to obtain a second reconstructed signal. The correction parameters include frequency calibration parameters, amplitude correction parameters, and phase compensation parameters. The signal reconstruction and signal correction steps are repeated until any preset stopping condition is met, resulting in a reconstructed frequency domain signal. The preset stopping conditions include: the number of iterations reaching a preset maximum value, the determination coefficient of the reconstructed signal reaching a target value, and the residual signal energy falling below a set threshold.
[0086] In an optional embodiment, during the signal reconstruction step, this embodiment first extracts the main frequency domain components whose signal energy exceeds a first threshold from the compressed measurement signal. The first threshold is set based on the signal energy distribution characteristics and aims to quickly locate the main harmonics or characteristic frequencies in the signal. The signal parameters of these main frequency domain components, including frequency parameters, amplitude parameters, and phase parameters, are calculated using the least squares method. The least squares method is a statistical method for parameter estimation that provides an optimal estimate of the signal model by finding parameter values that minimize the sum of squared errors between the observed data and the model's predicted data.
[0087] After obtaining the signal parameters, power signal reconstruction is performed to generate the first reconstructed signal. This process mainly relies on the DCT basis function, using a matching pursuit algorithm to gradually accumulate signal energy, ensuring that the main components of the signal are accurately recovered. The first reconstructed signal is the preliminary result of the signal reconstruction process, preserving the main characteristics of the signal.
[0088] In another specific embodiment, the signal correction step is a crucial step in fine-tuning the first reconstructed signal. Secondary frequency domain components with signal energy below a first threshold but above a second threshold are extracted from the residual signal. The second threshold is set even lower to capture weak but important signal components. A dynamic regularization algorithm is used to calculate the correction parameters for the secondary frequency domain components, including frequency calibration parameters, amplitude correction parameters, and phase compensation parameters. Considering the time-varying nature of the signal and the influence of noise, the regularization strength or step size control factor is dynamically adjusted to ensure that the processing of the residual signal is both sufficient and not excessive, avoiding overfitting or underfitting problems during signal reconstruction.
[0089] The second reconstructed signal is obtained by correcting the first reconstructed signal based on the correction parameters. This not only improves the estimation of the signal's frequency, amplitude, and phase, but also specifically suppresses noise and pseudo-Gibbs oscillations, thereby improving the overall accuracy and robustness of the signal reconstruction.
[0090] The embodiments of the present invention repeatedly execute the signal reconstruction step and the signal correction step through an iterative optimization mechanism until any preset stopping condition is met, such as the number of iterations reaching a preset maximum value, the determination coefficient (R2) of the reconstructed signal reaching a target value, or the residual signal energy being lower than a set threshold. This ensures that each correction of the signal moves towards a higher quality reconstructed signal, while also avoiding unnecessary calculations and improving the efficiency of the algorithm.
[0091] Step S104: Perform inverse time-domain transformation on the reconstructed frequency domain signal to output the compressed power signal.
[0092] It should be noted that the inverse time-domain transform is the final key step in compressed sensing technology to recover the original signal. Specifically, in this embodiment of the invention, it refers to performing an inverse discrete cosine transform (IDCT) on the reconstructed frequency domain signal. IDCT is a mathematical transform that restores the frequency domain components obtained after the DCT transform back to the time domain signal, which is used to recover the original time domain form of the power signal from the compressed signal.
[0093] The compressed output power signal was successfully recovered from the compressed sampled frequency domain representation to its original time domain form. Despite undergoing compressed sampling and frequency domain reconstruction, the output signal still retains key characteristics of the power signal, such as the precise amplitude and phase of the fundamental and harmonic frequencies, as well as details of transient signals, thanks to the use of DCT sparse basis and an improved matched pursuit algorithm.
[0094] In power systems, time-domain signals directly reflect the true state of power quality and changes in transient events. The reconstructed signal obtained through IDCT (Inductively Coupled Transmission Testing) can not only be used for visualization, facilitating an intuitive understanding of the power system's operating status, but also for further power quality analysis, harmonic detection, and power system fault diagnosis. The quality of the reconstructed signal directly affects the accuracy of power system monitoring and fault location.
[0095] To achieve high-quality optimization of the reconstructed frequency domain signal and improve the applicability of compressed sensing methods in power signal processing, optionally, before performing inverse time-domain transformation on the reconstructed frequency domain signal, the method further includes: determining a characteristic frequency band range centered on a specified operating frequency and integer multiples of the specified operating frequency, wherein the characteristic frequency band range includes: the fundamental frequency band and the harmonic frequency band; marking frequency domain components located outside the characteristic frequency band range in the reconstructed frequency domain signal; performing amplitude attenuation processing on the marked non-characteristic frequency band components, wherein the amplitude attenuation intensity increases with the degree of deviation of the signal frequency from the center of the characteristic frequency band; and performing transition processing on frequency domain components located within a specified frequency range at the boundary of the characteristic frequency band using a cosine smoothing function.
[0096] In one alternative embodiment, a characteristic frequency band range centered on a specified operating frequency (typically the fundamental frequency of the power grid, such as 50Hz or 60Hz) and its integer multiples (i.e., harmonic frequencies) is first determined. This range includes the fundamental and harmonic bands, focusing on the most important frequency components of the signal, i.e., the fundamental building blocks of the power signal and various harmonics. In the reconstructed frequency domain signal, frequency components located outside the characteristic frequency band range are marked. Based on an understanding of the spectral characteristics of the power signal, frequency components that are unrelated to or weakly correlated with the core features of the signal are identified and highlighted.
[0097] Next, the marked non-characteristic frequency band components undergo amplitude attenuation. The attenuation intensity increases with the deviation of the signal frequency from the center of the characteristic frequency band; that is, the further the frequency domain component is from the important frequency component, the more drastic its amplitude attenuation. This processing method helps to reduce the influence of noise, reduce the negative impact of non-characteristic frequency components on the reconstructed signal quality, and at the same time maintain the key features of the signal.
[0098] For frequency components near the boundary of the characteristic frequency band and within the specified frequency range, a cosine smoothing function is used for transition processing. This processing aims to ensure a smooth transition of the signal between different frequency bands, prevent abrupt changes at the boundary between characteristic and non-characteristic frequency bands, thereby avoiding unnecessary oscillations or distortions in the reconstructed signal and improving the visual and physical continuity of the signal.
[0099] To address the challenge of signal reconstruction quality control in power signal processing, optionally, before outputting the compressed power signal, the process includes: calculating the determination coefficient between the reconstructed frequency domain signal and the original power signal, where the determination coefficient characterizes the waveform similarity between the time domain signal and the original power signal; comparing the determination coefficient with a preset quality threshold; outputting the compressed power signal if the determination coefficient is higher than the preset quality threshold; otherwise, triggering a parameter adjustment process, where the parameter adjustment process includes: lowering a first threshold if a major frequency domain component is missing; lowering a second threshold if a minor frequency domain component is missing; re-executing the staged matching pursuit method using the adjusted first and / or second thresholds; and outputting the compressed power signal if the determination coefficient meets the preset quality threshold, or if the number of parameter adjustments reaches the upper limit, or if the quality improvement after three consecutive adjustments is less than a preset amplitude threshold.
[0100] In one alternative embodiment, a coefficient of determination (R²) calculation and quality feedback mechanism is introduced before outputting the compressed power signal to ensure the accuracy and reliability of the signal reconstruction. The coefficient of determination, also known as the coefficient of variation, is used to evaluate the waveform similarity between the reconstructed time-domain signal and the original power signal. Its value ranges from 0 to 1, with values closer to 1 indicating greater similarity between the two signals.
[0101] The calculated determination coefficient is then compared with a preset quality threshold. If the determination coefficient is higher than the quality threshold, it indicates that the signal reconstruction quality meets the requirements, and the compressed power signal can be output. However, if the determination coefficient is lower than the preset threshold, it indicates that the signal reconstruction quality does not meet expectations, and a parameter adjustment process needs to be triggered to optimize the signal reconstruction effect.
[0102] In the parameter adjustment process, if the main frequency domain components (such as the fundamental wave and significant components of the harmonics) are missing, resulting in the main features of the signal not being fully captured, the first threshold is lowered to allow more frequency domain components to enter the set of main frequency domain components, and the phased matching and tracking method is re-executed in order to improve the signal reconstruction quality.
[0103] In the case of missing secondary frequency domain components (such as weak harmonics or transient signals), the second threshold is lowered to increase the number of secondary frequency domain components, thereby improving the integrity and detail resolution of the signal through more refined signal correction steps.
[0104] The staged matching pursuit method is repeatedly executed using the adjusted first and / or second thresholds. When the determination coefficient meets the preset quality threshold, the maximum number of parameter adjustments is reached, or the quality improvement after three consecutive adjustments is less than the preset amplitude threshold, the compressed power signal is output, terminating further parameter adjustments. This ensures that the signal reconstruction quality dynamically meets the preset standard. Even in environments with variable signal characteristics or noise interference, threshold adjustments can compensate for signal loss and avoid wasting computational resources due to over-optimization.
[0105] Through steps S101 to S104 above, the original power signal can be acquired first, and the original power signal can be transformed in the frequency domain to obtain a frequency domain feature representation composed of N frequency domain components, where N is a positive integer. Then, according to the energy distribution characteristics of the frequency domain components, a target sampling method is selected from a variety of predefined compression sampling methods, and the original power signal is compressed and sampled according to the target sampling method to obtain a compressed measurement signal. Then, a staged matching pursuit method is used to process the compressed measurement signal according to the energy distribution characteristics to obtain a reconstructed frequency domain signal. The staged matching pursuit method includes: first processing the main frequency domain components whose signal energy is higher than a first threshold, then processing the secondary frequency domain components whose signal energy is lower than the first threshold but higher than a second threshold, iteratively generating a reconstructed frequency domain signal, and finally performing a time-domain inverse transform on the reconstructed frequency domain signal to output the compressed power signal.
[0106] In this embodiment of the invention, an innovative method of fusing signal sparsity and compressed sensing is adopted. By combining discrete cosine transform preprocessing and an improved orthogonal matching pursuit algorithm, the amount of data in power signal monitoring is significantly reduced and the accuracy of algorithm processing is greatly improved. This achieves the technical effect of efficient and high-fidelity compressed processing of power signals, thereby solving the technical problems of large sampling volume and insufficient algorithm processing accuracy in power signal monitoring methods in related technologies, which lead to low signal processing quality.
[0107] Specifically, this invention first acquires the original power signal, then maps it to the frequency domain based on discrete cosine transform, forming a sparse representation composed of frequency domain components. Through an adaptive observation matrix system, the most suitable compression sampling method is dynamically selected based on energy distribution characteristics, effectively reducing data dimensionality and alleviating storage and transmission burdens. During signal reconstruction, a staged matching pursuit method is introduced to locate and process the main frequency domain components with signal energy above a first threshold, capturing the main features of the signal and ensuring the accuracy of the basic framework of the reconstructed signal. Subsequently, fine-tuning is performed to process secondary frequency domain components with signal energy below the first threshold but above the second threshold, capturing the integrity details of low-energy signals. This balances the speed and accuracy of signal reconstruction during the reconstruction process. Finally, the compressed power signal is output through inverse time-domain transform, significantly improving the processing efficiency of the power signal and ensuring the quality of signal reconstruction. Even at low sampling rates, the integrity and accuracy of the signal are maintained. Compared with existing technologies, this invention is particularly suitable for distributed resource monitoring scenarios in resource-constrained rural distribution networks, providing strong technical support for power quality analysis and real-time fault diagnosis, and effectively promoting the intelligent upgrading and stable operation of power systems.
[0108] The present invention will now be described with reference to a specific embodiment.
[0109] Figure 2 This is a flowchart of an optional power signal compressed sensing method combining DCT sparse basis and improved OMP algorithm according to an embodiment of the present invention, as shown below. Figure 2 As shown, firstly, raw power signals (grid voltage / current signals) are acquired through power sensors; secondly, the raw power signals undergo DCT transformation, and a specified number of coefficients are retained to achieve sparsity, the specified number being adaptively determined based on the signal harmonic characteristics; then, the observation matrix type is dynamically selected based on signal sparsity, prioritizing partial Fourier matrices when the signal contains high-frequency harmonics, and Gaussian random matrices for low-frequency signals; in the reconstruction stage, a dual-threshold strategy is adopted based on the improved OMP algorithm, initially setting a higher threshold to quickly locate major harmonics, and later lowering the threshold to capture weak harmonics, while introducing an adaptive weighting factor based on signal-to-noise ratio to optimize the residual update process; finally, the reconstructed DCT coefficients undergo inverse transformation, and the coefficient of determination R is calculated. 2 These are some of the key performance indicators. The entire process is deployed and implemented on an intelligent measurement and control terminal, and the sampling rate can be reduced to 40% of the Nyquist rate, meeting the real-time requirements of devices such as smart meters.
[0110] The following explanation will cover each step.
[0111] 1. Sparsification of power signals.
[0112] Power signal sparsity processing requires normalization of the original power signal. The Z-score normalization method is used to eliminate amplitude differences caused by different acquisition devices.
[0113] Where x[n] represents the original signal, n represents the number of sampling points, μ is the mean, and σ is the standard deviation.
[0114] Performing Discrete Cosine Transform (DCT) on the preprocessed signal is a key step in achieving sparse signal representation. DCT is an orthogonal transform in the real number domain, suitable for processing power signal data composed of superimposed cosine waves. Its mathematical expression is:
[0115] Where k represents the k-th frequency component after DCT transformation; N represents the data length; The rest of c k =1. Because power signals have obvious periodic characteristics, their energy is mainly concentrated in the low-frequency region, causing the coefficients after DCT transformation to exhibit typical sparse distribution characteristics.
[0116] Based on the energy concentration characteristics, an adaptive threshold method is used to select key coefficients. First, the energy proportion of each coefficient is calculated: Then, the energy is accumulated in descending order. When the accumulated energy reaches a preset threshold (usually 95%), the number of coefficients K (sparseness) to be retained is determined.
[0117] 2. Adaptive compressed sampling.
[0118] In power system monitoring, compressed sensing technology can achieve high-precision signal reconstruction with observations at a much lower Nyquist sampling rate. However, traditional fixed observation matrices are difficult to adapt to the dynamic characteristics of power signals (such as steady-state fundamental waves, transient harmonics, fault pulses, etc.). To address this, this invention proposes an adaptive compressed sampling method that optimizes both compressed sampling efficiency and reconstruction accuracy by dynamically adjusting the observation matrix type and the number of measurements.
[0119] Four typical observation matrices are designed (as shown in Table 1), balancing theoretical performance and engineering feasibility, where m is the defined compressed data length:
[0120] Table 1 Adaptive Observation Matrix Design
[0121]
[0122] The core of the adaptive compressed sampling strategy lies in adjusting the observation matrix type and measurement parameters in real time according to the dynamic characteristics of the power signal to achieve optimal compressed sensing performance. This strategy first extracts key signal characteristics, including harmonic component intensity and non-stationarity indices, through frequency and time domain feature analysis.
[0123] In frequency domain analysis, the FFT peak-to-peak ratio of a signal is calculated to quantify the concentration of harmonic energy.
[0124] Where: f0 is the fundamental frequency. x[n] is the original signal; X(f) is the Fourier transform of x[n]; ||X(f)||2 is the L2 norm (Euclidean norm) of X(f); when R harm When the value is greater than 0.7, strong harmonic interference is determined to exist;
[0125] In time-domain analysis, approximate entropy (ApEn) is used to evaluate the complexity and transient characteristics of a signal:
[0126] Where m is the dimension of each vector when constructing the phase space; φ m (r) is the similarity statistic of the sequence when the embedding dimension is m; r is the threshold for judging whether two vectors are similar (usually r = 0.2σ, where σ is the standard deviation of the sequence); d(·) is the Euclidean distance; N is the signal length.
[0127] Based on these feature parameters, a decision function is established to select the optimal matrix from the candidate matrix library {Φi}i=14:
[0128]
[0129] For transient signals with high entropy (such as fault pulses), a sparse random matrix (Φ) is automatically selected. Sparse To reduce computational complexity; when significant higher harmonic components are detected, a partial Fourier matrix (Φ) is preferred. Fourier To improve frequency domain resolution; under steady-state conditions, based on device resource constraints within the Bernoulli matrix (Φ Bern ) and Gaussian matrix (Φ Gauss Choose between the two: the former is suitable for scenarios with high real-time requirements, while the latter is used for occasions that require high-precision reconstruction.
[0130] The determination of the number of measurements adopts a dynamic adjustment mechanism, dynamically optimizing the number of measurements m to balance efficiency and accuracy. Its basic value strictly follows the lower limit of compressed sensing theory. At the same time, an adaptive redundancy compensation term based on signal-to-noise ratio is introduced to automatically increase the number of measurements under low signal-to-noise ratio conditions to ensure reconstruction quality.
[0131] m=[[K log(N / K)]]+η·Δm (8); where: N is the signal length; m is the compressed signal length; K is the sparsity; η is the weighting coefficient; Δm is the dynamic correction term, calculated as follows:
[0132] Where: SNR is the signal-to-noise ratio, the power ratio of signal to noise; K is the sparsity; the entire decision-making process is implemented using a lightweight algorithm to ensure real-time execution on edge computing devices, while significantly reducing computational overhead through a pre-built matrix parameter template library.
[0133] 3. Improve OMP reconstruction of power signals.
[0134] Traditional Orthogonal Matching Pursuit (OMP) algorithms have significant limitations when using DCT sparse bases to process power signals. First, due to the frequency domain continuity of DCT basis functions, there is high correlation between adjacent frequency atoms (typically coherence coefficients > 0.8), leading to frequency aliasing when reconstructing integer multiples of harmonics at 50Hz. Second, DCT is poorly adapted to non-stationary transient characteristics. When the signal contains impulse-type faults (such as short-circuit impacts with rise times < 1ms), at least five times the sparse coefficients of the wavelet basis are required to achieve the same reconstruction accuracy. This not only increases computational complexity (by 300%) but also introduces pseudo-Gibbs oscillations. To address these limitations, improvements are proposed to significantly enhance the reconstruction accuracy and computational efficiency of power signals.
[0135] The first is a band-limited atom selection mechanism (first threshold: harmonic feature screening).
[0136] In sparse signal representation, an atom is the basic unit that constitutes the sparse dictionary, and each atom corresponds to a cosine waveform of a specific frequency. To address the harmonic aliasing problem, a bandwidth-limited atom selection strategy was designed:
[0137] Establish a characteristic frequency band model for power signals: Where: h is the harmonic order; U is the union operator; Hz is the frequency unit.
[0138] Improved atom selection criteria:
[0139]
[0140] Where: i k D is the index of the optimal atom (or feature) selected in the k-th iteration; i Let r be the i-th column of the dictionary matrix D, which is usually a basis function (such as a sine wave or wavelet); k-1 This refers to the signal portion that was not represented in the previous iteration. The projection amplitude of the residual along the atomic direction is normalized to the atomic energy, where, It refers to D i transpose, It means Determinant calculation, ||D i ||2 refers to D iThe L2 norm (Euclidean norm) of the function; w(h) is the weight function.
[0141] Next is dynamic regularized least squares (second threshold: iterative adaptive adjustment).
[0142] Dynamic regularized least squares addresses ill-conditioned problems and noise interference in power signal reconstruction by adaptively adjusting the regularization parameters. Its core lies in constructing a regularization strength that dynamically changes with the iteration process: in the early stages of iteration (when k is small), a stronger regularization is used to suppress noise and pseudo-Gibbs oscillations; as the iteration progresses (k increases), the regularization strength is gradually reduced to preserve transient details. The regularization parameters consist of three parts: a base coefficient of 0.1 to ensure numerical stability, a residual term to adaptively adjust the reconstruction error, and an iteration term to control the parameter decay rate. Simultaneously, a frequency domain weighting matrix W is introduced, assigning higher weights to the power frequency harmonic region (integer multiples of 50Hz) to suppress non-characteristic frequency components.
[0143] To address the problem of transient feature reconstruction, an adaptive regularization parameter is introduced: Where: λ k r is the regularization parameter or step size control factor for the k-th iteration; k is the Euclidean norm (i.e., energy) of the residual vector at the k-th iteration; m is the length of the compressed signal; K is the sparsity.
[0144] Where: θ k y represents the optimal parameter vector or matrix obtained by solving the optimization problem; θ represents the parameter to be optimized; y represents the model prediction result corresponding to parameter θ. λ represents the desired output. k (Regularization coefficient);
[0145] The diagonal elements of the weighted matrix w are given by the following formula: W ii =1 / (1+0.05|f i -50h|) (15); where: f i is the current frequency; h is the harmonic order.
[0146] Finally, there's post-processing.
[0147] To eliminate Gibbs oscillations, a soft thresholding process is applied to the sparse coefficient vector:
[0148] Where: θ filtered [i] represents the result of filtering or thresholding the i-th parameter; θ K [i] represents the original value of the i-th parameter in the K-th iteration or K-th layer; λ is a preset critical value used to determine whether the parameter is significant.
[0149] Adaptive threshold calculation: Where: σ is the standard deviation; N is the data length; θ high For DCT coefficients with frequencies greater than 1 kHz, the divisor is 0.6745 (the conversion factor from the median to the standard deviation of the Gaussian distribution).
[0150] Further suppress boundary effects: θ final [i] = θ filtered [i]·w(f i (18);
[0151]
[0152] Where: θ final [i] represents the final value of the i-th parameter, which combines the filtering result and the frequency weight; θ filtered [i] represents the sparse parameters after thresholding. w(f i f is the frequency weighting function; i The frequency corresponding to the parameter.
[0153] Finally, the time-domain signal is obtained through inverse DCT transform: in: The reconstructed signal; D T θ is the dictionary matrix for the inverse DCT transform; final is the final sparsity coefficient.
[0154] 4. Signal reconstruction quality assessment.
[0155] Calculate the mean square error (MSE), which measures the magnitude of the error between the reconstructed signal and the original signal at each time step.
[0156] Where: x[n] is the original signal; The signal is the reconstructed signal; N is the signal length.
[0157] Furthermore, in power signal reconstruction quality assessment, the coefficient of determination (R²) directly reflects the overall similarity between the reconstructed signal and the original signal. Its calculation method is as follows: in: R² represents the average signal value. The closer R² is to 1, the better the reconstruction quality.
[0158] Figure 3 This is a schematic diagram illustrating the results of an optional reconstruction effect analysis according to an embodiment of the present invention, such as... Figure 3 As shown, the system achieves good signal reconstruction results under a compression ratio of 39% (100 / 256). The determination coefficient R of the reconstructed signal is obtained through a compressed sensing method based on DCT sparse basis and an improved OMP algorithm. 2The result reached 0.87, proving that the method can effectively preserve the main harmonic characteristics of power signals.
[0159] The invention will now be described in conjunction with another alternative embodiment.
[0160] Example 2
[0161] The power signal compression processing device provided in this embodiment includes multiple implementation units, each of which corresponds to a specific implementation step in Embodiment 1 above.
[0162] Figure 4 This is a schematic diagram of an optional power signal compression processing apparatus according to an embodiment of the present invention, such as... Figure 4 As shown, the device may include: a frequency domain transformation unit 401, a compressed sampling unit 402, a processing unit 403, and a time domain inverse transformation unit 404.
[0163] The frequency domain transformation unit 401 is used to acquire the original power signal and perform frequency domain transformation on the original power signal to obtain a frequency domain feature representation composed of N frequency domain components, where N is a positive integer.
[0164] The compression sampling unit 402 is used to select a target sampling method from a variety of predefined compression sampling methods according to the energy distribution characteristics of the frequency domain components, and to compress and sample the original power signal according to the target sampling method to obtain a compressed measurement signal.
[0165] The processing unit 403 is used to process the compressed measurement signal according to the energy distribution characteristics using a phased matching pursuit method to obtain a reconstructed frequency domain signal. The phased matching pursuit method includes: first processing the main frequency domain components whose signal energy is higher than a first threshold, then processing the secondary frequency domain components whose signal energy is lower than the first threshold but higher than a second threshold, and iteratively generating the reconstructed frequency domain signal.
[0166] The inverse time-domain transform unit 404 is used to perform inverse time-domain transform on the reconstructed frequency domain signal and output the compressed power signal.
[0167] The aforementioned power signal compression processing device can first acquire the original power signal through the frequency domain transformation unit 401 and perform frequency domain transformation on the original power signal to obtain a frequency domain feature representation composed of N frequency domain components, where N is a positive integer. Then, the compression sampling unit 402 selects a target sampling method from a variety of predefined compression sampling methods according to the energy distribution characteristics of the frequency domain components, and performs compression sampling on the original power signal according to the target sampling method to obtain a compressed measurement signal. Then, the processing unit 403 uses a staged matching pursuit method to process the compressed measurement signal according to the energy distribution characteristics to obtain a reconstructed frequency domain signal. The staged matching pursuit method includes: first processing the main frequency domain components whose signal energy is higher than a first threshold, then processing the secondary frequency domain components whose signal energy is lower than the first threshold but higher than a second threshold, iteratively generating a reconstructed frequency domain signal, and finally performing a time-domain inverse transformation on the reconstructed frequency domain signal through the time-domain inverse transformation unit 404 to output the compressed power signal.
[0168] In this embodiment of the invention, an innovative method of signal sparsification and compressed sensing fusion is adopted. By combining discrete cosine transform preprocessing and an improved orthogonal matching pursuit algorithm, the amount of data in power signal monitoring is significantly reduced and the accuracy of algorithm processing is greatly improved. This achieves the technical effect of efficient and high-fidelity compressed processing of power signals, thereby solving the technical problems of large sampling volume and insufficient algorithm processing accuracy in power signal monitoring methods in related technologies, which lead to low signal processing quality.
[0169] Specifically, this invention first acquires the original power signal, then maps it to the frequency domain based on discrete cosine transform, forming a sparse representation composed of frequency domain components. Through an adaptive observation matrix system, the most suitable compression sampling method is dynamically selected based on energy distribution characteristics, effectively reducing data dimensionality and alleviating storage and transmission burdens. During signal reconstruction, a staged matching pursuit method is introduced to locate and process the main frequency domain components with signal energy above a first threshold, capturing the main features of the signal and ensuring the accuracy of the basic framework of the reconstructed signal. Subsequently, fine-tuning is performed to process secondary frequency domain components with signal energy below the first threshold but above the second threshold, capturing the integrity details of low-energy signals. This balances the speed and accuracy of signal reconstruction during the reconstruction process. Finally, the compressed power signal is output through inverse time-domain transform, significantly improving the processing efficiency of the power signal and ensuring the quality of signal reconstruction. Even at low sampling rates, the integrity and accuracy of the signal are maintained. Compared with existing technologies, this invention is particularly suitable for distributed resource monitoring scenarios in resource-constrained rural distribution networks, providing strong technical support for power quality analysis and real-time fault diagnosis, and effectively promoting the intelligent upgrading and stable operation of power systems.
[0170] Furthermore, the frequency domain transformation unit includes: a transformation module, used to perform amplitude normalization processing on the original power signal and convert the normalized time-domain signal into a frequency-domain form, generating an initial feature set containing K orthogonal frequency-domain components, where K is an integer greater than or equal to N; a first calculation module, used to calculate the proportion of each orthogonal frequency-domain component in the total signal energy and sort all orthogonal frequency-domain components in descending order of proportion; a first determination module, used to accumulate signal energy starting from the orthogonal frequency-domain component with the highest proportion, and when the accumulated signal energy reaches a preset threshold, determine the top N orthogonal frequency-domain components contained in the accumulated signal energy as key frequency-domain components; and a first construction module, used to construct a frequency-domain feature representation based on the N key frequency-domain components.
[0171] Furthermore, the compressed sampling unit includes: an identification module, used to statistically analyze the amplitude of each frequency domain component and identify significant components whose amplitude exceeds a preset multiple of the average amplitude; a judgment module, used to determine whether the original power signal has an equally spaced component distribution characteristic with the fundamental frequency as the interval based on the frequency distribution characteristics presented by all significant components; a first selection module, used to select a partial Fourier sampling method as the target sampling method when the equally spaced component distribution characteristic exists; a second selection module, used to select a sparse random sampling method as the target sampling method when the equally spaced component distribution characteristic does not exist; and an adjustment module, used to adjust the target sampling method to a Bernoulli sampling method when the computational resources required by the target sampling method exceed the real-time processing capability of the current processing device.
[0172] Furthermore, the compressed sampling unit includes: a second construction module, used to construct an observation matrix according to the matrix construction rules corresponding to the target sampling method, wherein the observation matrix has a specified number of rows and a specified number of columns, and the specified number of rows is less than the specified number of columns; a first processing module, used to segment the time-domain waveform of the original power signal to obtain M signal segments of equal duration, wherein M is a positive integer, and the duration of the signal segment is determined based on the specified number of columns; a calculation module, used to perform matrix multiplication operation between the signal segment and the observation matrix for each signal segment to obtain the corresponding compressed measurement data segment; and a splicing module, used to splice the compressed measurement data segments corresponding to all signal segments in the original order to obtain the compressed measurement signal.
[0173] Further, the processing unit includes: a reconstruction module, used to perform a signal reconstruction step, extracting the main frequency domain components with signal energy higher than a first threshold from the compressed measurement signal, calculating the signal parameters of the main frequency domain components using the least squares method, and reconstructing the power signal based on the signal parameters to obtain a first reconstructed signal, wherein the signal parameters include: frequency parameters, amplitude parameters, and phase parameters; a correction module, used to perform a signal correction step, performing residual analysis on the first reconstructed signal, extracting the secondary frequency domain components with signal energy lower than a first threshold but higher than a second threshold, calculating the correction parameters of the secondary frequency domain components using a dynamic regularization algorithm, and correcting the first reconstructed signal based on the correction parameters to obtain a second reconstructed signal, wherein the correction parameters include: frequency calibration parameters, amplitude correction parameters, and phase compensation parameters; and a repetition module, used to repeatedly execute the signal reconstruction step and the signal correction step until any preset stopping condition is met to obtain a reconstructed frequency domain signal, wherein the preset stopping conditions include: the number of iterations reaching a preset maximum value, the determination coefficient of the reconstructed signal reaching a target value, and the residual signal energy being lower than a set threshold.
[0174] Furthermore, the power signal compression processing device further includes: a second determining module, used to determine a characteristic frequency band range centered on a specified operating frequency and integer multiples of the specified operating frequency before performing a time-domain inverse transform on the reconstructed frequency domain signal, wherein the characteristic frequency band range includes: the fundamental frequency band and the harmonic frequency band; a marking module, used to mark frequency domain components located outside the characteristic frequency band range in the reconstructed frequency domain signal; a second processing module, used to perform amplitude attenuation processing on the marked non-characteristic frequency band components, wherein the amplitude attenuation intensity increases with the degree of deviation of the signal frequency from the center of the characteristic frequency band; and a third processing module, used to perform transition processing on the frequency domain components located within a specified frequency range at the boundary of the characteristic frequency band using a cosine smoothing function.
[0175] Furthermore, the power signal compression processing device also includes: a second calculation module, used to calculate the determination coefficient between the time-domain signal corresponding to the reconstructed frequency-domain signal and the original power signal before outputting the compressed power signal, wherein the determination coefficient is used to characterize the waveform similarity between the time-domain signal and the original power signal; a comparison module, used to compare the determination coefficient with a preset quality threshold, and output the compressed power signal if the determination coefficient is higher than the preset quality threshold; otherwise, trigger a parameter adjustment process, wherein the parameter adjustment process includes: lowering the first threshold if the main frequency-domain component is missing; lowering the second threshold if the secondary frequency-domain component is missing; an execution module, used to re-execute the staged matching tracking method using the adjusted first threshold and / or second threshold; and an output module, used to output the compressed power signal if the determination coefficient meets the preset quality threshold, or if the number of parameter adjustments reaches the upper limit, or if the quality improvement after three consecutive adjustments is less than a preset amplitude threshold.
[0176] The aforementioned power signal compression processing device may further include a processor and a memory. The frequency domain transformation unit 401, compression sampling unit 402, processing unit 403, time domain inverse transformation unit 404, etc., are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0177] The aforementioned processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting kernel parameters, a staged matched pursuit method is employed to process the compressed measurement signal based on energy distribution characteristics, resulting in a reconstructed frequency domain signal. The staged matched pursuit method includes: first processing the primary frequency domain components whose signal energy is above a first threshold; then processing the secondary frequency domain components whose signal energy is below the first threshold but above a second threshold; iteratively generating the reconstructed frequency domain signal; performing an inverse time-domain transform on the reconstructed frequency domain signal; and outputting the compressed power signal.
[0178] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0179] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: acquiring an original power signal and performing a frequency domain transformation on the original power signal to obtain a frequency domain feature representation composed of N frequency domain components, where N is a positive integer; selecting a target sampling method from a variety of predefined compression sampling methods according to the energy distribution characteristics of the frequency domain components, and performing compression sampling on the original power signal according to the target sampling method to obtain a compressed measurement signal; using a staged matching pursuit method to process the compressed measurement signal according to the energy distribution characteristics to obtain a reconstructed frequency domain signal, wherein the staged matching pursuit method includes: first processing the main frequency domain components whose signal energy is higher than a first threshold, then processing the secondary frequency domain components whose signal energy is lower than the first threshold but higher than a second threshold, iteratively generating a reconstructed frequency domain signal; performing an inverse time domain transformation on the reconstructed frequency domain signal, and outputting the compressed power signal.
[0180] According to another aspect of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to perform the power signal compression processing method of any one of the above embodiments.
[0181] According to another aspect of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the power signal compression processing method of any one of the above embodiments.
[0182] Figure 5 This is a structural block diagram of an electronic device for performing a power signal compression processing method according to an embodiment of the present invention, such as... Figure 5 As shown, the electronic device may include: one or more ( Figure 5 Only one of the components is shown: processor 502, memory 504, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module, and display.
[0183] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the power signal compression processing method and apparatus in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned power signal compression processing method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0184] Those skilled in the art will understand that Figure 5 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 5 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 5 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 5 The different configurations shown.
[0185] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0186] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0187] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0188] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0189] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0190] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0191] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0192] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for compressing power signals, characterized in that, include: The raw power signal is acquired and frequency domain transformed to obtain a frequency domain feature representation consisting of N frequency domain components, where N is a positive integer; Based on the energy distribution characteristics of the frequency domain components, a target sampling method is selected from a variety of predefined compression sampling methods, and the original power signal is compressed and sampled according to the target sampling method to obtain a compressed measurement signal; A staged matching pursuit method is used to process the compressed measurement signal according to the energy distribution characteristics to obtain a reconstructed frequency domain signal. The staged matching pursuit method includes: first processing the main frequency domain components whose signal energy is higher than a first threshold, then processing the secondary frequency domain components whose signal energy is lower than the first threshold but higher than a second threshold, and iteratively generating the reconstructed frequency domain signal. The reconstructed frequency domain signal is subjected to inverse time-domain transformation to output a compressed power signal.
2. The power signal compression processing method according to claim 1, characterized in that, The step of performing a frequency domain transformation on the original power signal to obtain a frequency domain feature representation composed of N frequency domain components includes: The original power signal is normalized in amplitude, and the normalized time-domain signal is converted into frequency-domain form to generate an initial feature set containing K orthogonal frequency-domain components, where K is an integer greater than or equal to N. Calculate the proportion of each of the orthogonal frequency domain components in the total signal energy, and sort all the orthogonal frequency domain components in descending order of proportion; The signal energy is accumulated starting from the orthogonal frequency domain component with the highest proportion. When the accumulated signal energy reaches a preset threshold, the top N orthogonal frequency domain components contained in the accumulated signal energy are determined as key frequency domain components. The frequency domain feature representation is constructed based on the N key frequency domain components.
3. The power signal compression processing method according to claim 1, characterized in that, The step of selecting a target sampling method from a variety of predefined compression sampling methods based on the energy distribution characteristics of the frequency domain components includes: The amplitude of each frequency domain component is statistically analyzed, and significant components whose amplitude exceeds a preset multiple of the average amplitude are identified. Based on the frequency distribution characteristics of all the significant components, determine whether the original power signal has an equally spaced component distribution characteristic with the fundamental frequency as the interval; Given the existence of the aforementioned equally spaced component distribution characteristics, a partial Fourier sampling method is selected as the target sampling method. In the absence of the aforementioned equally spaced component distribution characteristic, sparse random sampling is selected as the target sampling method; If the computational resources required by the target sampling method exceed the real-time processing capability of the current processing device, the target sampling method will be adjusted to the Bernoulli sampling method.
4. The power signal compression processing method according to claim 3, characterized in that, The step of compressing and sampling the original power signal according to the target sampling method to obtain a compressed measurement signal includes: An observation matrix is constructed according to the matrix construction rules corresponding to the target sampling method, wherein the observation matrix has a specified number of rows and a specified number of columns, and the specified number of rows is less than the specified number of columns; The time-domain waveform of the original power signal is segmented to obtain M signal segments of equal duration, where M is a positive integer, and the duration of the signal segment is determined based on the specified number of columns; For each signal segment, perform matrix multiplication between the signal segment and the observation matrix to obtain the corresponding compressed measurement data segment; The compressed measurement data segments corresponding to all the signal segments are spliced together in the original order to obtain the compressed measurement signal.
5. The power signal compression processing method according to claim 1, characterized in that, The step of processing the compressed measurement signal according to the energy distribution characteristics using a staged matching pursuit method to obtain the reconstructed frequency domain signal includes: The signal reconstruction step involves extracting the main frequency domain components whose signal energy is higher than a first threshold from the compressed measurement signal, calculating the signal parameters of the main frequency domain components using the least squares method, and reconstructing the power signal based on the signal parameters to obtain a first reconstructed signal. The signal parameters include: frequency parameters, amplitude parameters, and phase parameters. The signal correction step involves performing residual analysis on the first reconstructed signal, extracting the secondary frequency domain components whose energy is below a first threshold but above a second threshold, calculating the correction parameters of the secondary frequency domain components using a dynamic regularization algorithm, and correcting the first reconstructed signal based on the correction parameters to obtain the second reconstructed signal. The correction parameters include: frequency calibration parameters, amplitude correction parameters, and phase compensation parameters. The signal reconstruction step and the signal correction step are repeated until any preset stopping condition is met, and the reconstructed frequency domain signal is obtained. The preset stopping conditions include: the number of iterations reaches a preset maximum value, the determination coefficient of the reconstructed signal reaches a target value, and the residual signal energy is lower than a set threshold.
6. The method for compressing power signals according to claim 1, characterized in that, Before performing the time-domain inverse transform on the reconstructed frequency domain signal, the method further includes: Determine a characteristic frequency band range centered on a specified operating frequency and integer multiples of the specified operating frequency, wherein the characteristic frequency band range includes: the fundamental frequency band and the harmonic frequency band; In the reconstructed frequency domain signal, mark the frequency domain components located outside the range of the characteristic frequency band; The non-characteristic frequency band components of the marker are subjected to amplitude attenuation processing, wherein the amplitude attenuation intensity increases with the degree of deviation of the signal frequency from the center of the characteristic frequency band; For frequency components located within a specified frequency range at the boundary of the characteristic frequency band, a cosine smoothing function is used for transition processing.
7. The method for compressing power signals according to claim 1, characterized in that, Before outputting the compressed power signal, the following is also included: Calculate the determination coefficients between the time-domain signal corresponding to the reconstructed frequency-domain signal and the original power signal, wherein the determination coefficients are used to characterize the waveform similarity between the time-domain signal and the original power signal; The determination coefficient is compared with a preset quality threshold. If the determination coefficient is higher than the preset quality threshold, the compressed power signal is output. Otherwise, a parameter adjustment process is triggered. The parameter adjustment process includes: lowering the first threshold when the main frequency domain component is missing; and lowering the second threshold when the secondary frequency domain component is missing. The phased matching tracking method is re-executed using the adjusted first threshold and / or second threshold. The compressed power signal is output when the determination coefficient meets the preset quality threshold, or when the number of parameter adjustments reaches the upper limit, or when the quality improvement after three consecutive adjustments is less than the preset magnitude threshold.
8. A power signal compression processing device, characterized in that, include: The frequency domain transformation unit is used to acquire the original power signal and perform frequency domain transformation on the original power signal to obtain a frequency domain feature representation composed of N frequency domain components, where N is a positive integer; The compression sampling unit is used to select a target sampling method from a variety of predefined compression sampling methods according to the energy distribution characteristics of the frequency domain components, and to compress and sample the original power signal according to the target sampling method to obtain a compressed measurement signal; The processing unit is used to process the compressed measurement signal according to the energy distribution characteristics using a phased matching pursuit method to obtain a reconstructed frequency domain signal. The phased matching pursuit method includes: first processing the main frequency domain components whose signal energy is higher than a first threshold, then processing the secondary frequency domain components whose signal energy is lower than the first threshold but higher than a second threshold, and iteratively generating the reconstructed frequency domain signal. The inverse time-domain transform unit is used to perform an inverse time-domain transform on the reconstructed frequency-domain signal and output a compressed power signal.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the power signal compression processing method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the power signal compression processing method according to any one of claims 1 to 7.