A high-precision frequency measurement method based on sparse fourier transform
By rearranging the signal spectrum using sparse Fourier transform and combining it with hash mapping and voting algorithms, the problem of low resolution in spectrum analysis of digital oscilloscopes under large data volume conditions is solved, achieving efficient and accurate frequency measurement.
Patent Information
- Application Number
- CN202411606970.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-11-12
AI Technical Summary
Existing digital oscilloscopes have low resolution in spectrum analysis under large data volume conditions, and it is difficult to improve their computational efficiency and accuracy, resulting in limited spectrum analysis capabilities.
By employing the sparse Fourier transform method, the signal spectrum is rearranged through positive and negative mapping parameter sequences, and combined with window function filtering, downsampling FFT transform, frequency point hash mapping, and voting algorithm, high-precision frequency measurement is achieved.
It improves the frequency resolution of spectrum analysis, reduces computational complexity, and enhances the reliability and efficiency of spectrum identification.
Smart Images

Figure CN119619622B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of digital oscilloscope, more specifically, it relates to a high-precision frequency measurement method based on sparse Fourier transform. BACKGROUND
[0002] Discrete Fourier transform (DFT) is one of the most basic theoretical algorithms in signal processing. The most widely used method for calculating DFT is Fast Fourier Transform (FFT), which has a time complexity of O (Nlog2N). Compared with direct calculation of DFT, FFT greatly simplifies the operation process and can shorten the operation amount by 1-2 orders of magnitude, thus promoting revolutionary progress in signal processing technology. However, with the rapid growth of data volume, the operation speed of FFT is already not fast enough. In order to improve the time complexity of DFT, researchers have been constantly pursuing the improvement of FFT algorithm and have proposed several variants, such as in-place FFT algorithm and split-radix FFT algorithm. These variants are indeed helpful in some hardware implementations, but the complexity has not been significantly improved. Therefore, researchers began to focus on the characteristics of signals themselves. Research has found that a large number of signals have "sparsity": only a small number of points in the frequency domain have large values, and the rest of the points tend to zero. In real life, many signals have few frequencies that contribute to the entire signal, and they all have this "sparse" characteristic. Based on the characteristic that the data of signals is dense or sparse, some researchers have proposed a sparse Fourier transform algorithm (SFT), which is widely used in image and speech signal, machine learning theory, Boolean function analysis, compressed sensing, wideband spectrum sensing and other fields. Related research shows that if the data is sparse in the frequency domain, it can effectively calculate the transformation of millions of points. SFT meets the demand of fast and efficient Fourier transform of large data volume.
[0003] In the field of electronic measurement, digital oscilloscopes are commonly used devices, and their main function is to observe and analyze time-domain waveforms. With the development and progress of technology, more and more oscilloscopes have integrated frequency-domain analysis functions. Typical hybrid-domain oscilloscopes can simultaneously observe time-domain waveforms and frequency spectrum distributions, and have local time-frequency joint analysis capabilities. The frequency spectrum analysis function of the hybrid-domain oscilloscope is realized through software FFT operation. After a small amount of data is collected by the acquisition system, the frequency spectrum distribution information is obtained through butterfly fast Fourier transform algorithm. Considering that the software execution of FFT operation takes a long time, the FFT spectrum update rate is slow. In addition, software FFT operation will additionally increase software overhead, resulting in a longer cycle of the entire software running process, which ultimately manifests as slow waveform and spectrum refresh speed. Software-based FFT operation is mainly limited by three factors: operation capacity, operation efficiency, and operation precision. First, considering the operation capacity, with the development of intelligent technology, the demand for large data analysis is increasing. Software is difficult to load when it comes to G data analysis and processing. A more efficient spectrum analysis algorithm is needed to realize massive data spectrum sensing. Second, operation efficiency is also an important factor. Software uses a procedural processing method for spectrum analysis, which occupies a large amount of system operation resources and affects the overall system operation efficiency. In addition, operation precision is also an important factor. Operation precision ultimately affects the reliability and credibility of spectrum sensing. Limited by the ability of software spectrum analysis, it is difficult to greatly improve the analysis accuracy and accuracy. Therefore, there are great challenges in software implementation of large data FFT operation, and therefore hardware-based large data FFT operation is the trend.
[0004] Hardware-based spectrum analysis can reduce the working pressure of the system and improve the system operation efficiency. Currently, the main hardware-based spectrum analysis algorithm is the fast Fourier transform algorithm. However, in the design of oscilloscopes today, due to the development of deep storage technology, there is a large capacity of storage depth, and the data throughput is very large. With the increase of data volume, the operation complexity increases linearly, and it is difficult to solve the massive data spectrum sensing based on the existing scheme. For large data FFT operation, segmented FFT or parallel FFT is commonly used. The former divides the collected data into multiple smaller segments and then performs FFT calculation on each segment. The latter uses parallel processing technology to process multiple FFT calculation tasks simultaneously to improve the FFT calculation speed. However, both methods essentially process all large data, and the ability to improve the calculation speed is limited, which limits the spectrum analysis capability of the oscilloscope and affects the frequency resolution of the spectrum analysis. SUMMARY
[0005] The present application aims to overcome the shortcomings of the prior art and provide a high-precision frequency measurement method based on sparse Fourier transform, which utilizes the sparsity of signals in the frequency domain to solve the problem of low resolution in large quantity spectrum analysis.
[0006] To achieve the above-mentioned objectives, the present invention provides a high-precision frequency measurement method based on sparse Fourier transform, characterized by comprising the following steps:
[0007] (1) Power on the digital oscilloscope and connect the signal to be measured;
[0008] (2) The host computer generates a set of positive mapping parameter sequence σ of length L, and the corresponding negative mapping parameter sequence σ. -1 Then the forward and reverse mapping parameter sequences are sent to the sparse Fourier module.
[0009] (3) Set the maximum number of iterations of the sparse Fourier transform to L, and initialize the current number of iterations l = 1, l = 1, 2, ..., L;
[0010] (4) Perform sparse Fourier transform on the signal under test by iterative loop;
[0011] (4.1) Let x be the time-domain sequence of length N obtained by the acquisition system of the digital oscilloscope during the l-th iteration. l (n), n = 0, 1, 2, ..., N-1;
[0012] (4.2) Read the l-th positive mapping parameter σ in the positive mapping parameter sequence σ. l Then, for the time-domain sequence x l (n) do σ l Uniform sampling at a multiple yields the time-rearranged sequence.
[0013]
[0014] Where δ is the starting address for extraction;
[0015] (4.3) Sequence Perform window function filtering;
[0016] (4.3.1) Define the flat window function y(n);
[0017]
[0018] in, For convolution operations, p(n) is a rectangular window function that satisfies: μ is the width of the rectangular window; g(n) is a Gaussian function that satisfies: b is the mean of the Gaussian function, a is the variance of the Gaussian function, and x is the variable of the Gaussian function;
[0019] (4.3.2) Based on fixed-point multiplication Multiplying the result point by point with the window function y(n) yields the sequence.
[0020] (4.4) For the sequence Perform depletion FFT processing;
[0021] (4.4.1) Using sampling rate B for the sequence Downsampling is performed to obtain the sequence.
[0022]
[0023] (4.4.2) For the sequence Perform an FFT transform to obtain the spectrum X. l (k);
[0024]
[0025] Where k represents the frequency index value of the output spectrum;
[0026] (4.5) Frequency point hash mapping;
[0027] (4.5.1) Based on spectrum X l (k), filtering out those with energy exceeding the threshold A Thres The frequency points are then identified, and their frequency index numbers k are recorded. l and amplitude value A(k) l );
[0028] (4.5.2) Read the inverse mapping parameter sequence σ -1 The l-th positive mapping parameter Then, the recorded frequency points are hashed to obtain frequency points with higher frequency precision.
[0029]
[0030] Where N is the number of sparse Fourier transform points;
[0031] (4.5.3) Recording frequency points The corresponding amplitude Then let
[0032] (4.6) Determine whether the current iteration number l has reached the maximum iteration number L. If l < L, let l = l + 1, and then return to step (4.1) for the next iteration; otherwise, proceed to step (5).
[0033] (5) Frequency voting;
[0034] (5.1) All frequency points obtained after L rounds of iteration Merge;
[0035] If a certain frequency point If it occurs more than once, then all amplitudes will be... Accumulate the values and then retain a frequency index number. Its corresponding amplitude is denoted as We obtain a set of frequency index vectors with unique frequency index numbers and their corresponding cumulative amplitudes;
[0036] (5.2) Traverse each frequency index number in the frequency index vector and corresponding cumulative amplitude Record amplitude Greater than L*A thres The frequency index number, denoted as k. v The corresponding amplitude is denoted as A(k). v );
[0037] (5.3) Set the frequency index number k v Convert to the actual frequency value f;
[0038]
[0039] Among them, F s The sampling rate of the signal being measured;
[0040] (6) Spectrum visualization;
[0041] Spectral distribution (k) v ,A(k v It is displayed on the screen in real time.
[0042] The objective of this invention is achieved as follows:
[0043] This invention relates to a high-precision frequency measurement method based on sparse Fourier transform. First, positive and negative mapping parameters are issued. Then, the spectrum of the sampled signal under test is rearranged in the FPGA. The rearranged sequence is filtered by a window function and subjected to FFT transformation with row downsampling to obtain the spectrum data. Next, high-energy frequency points are removed, and the remaining frequency points are hashed and voted to obtain high-precision frequency information.
[0044] Meanwhile, the high-precision frequency measurement method based on sparse Fourier transform of the present invention also has the following beneficial effects:
[0045] (1) This invention greatly reduces the computational complexity of spectrum analysis by rearranging the signal spectrum and detecting frequency point hash mapping, while improving the frequency resolution of large data volume spectrum analysis.
[0046] (2) The present invention reduces the computational load of spectrum analysis by performing FFT on the extracted signal;
[0047] (3) The present invention improves the reliability of spectrum identification through multiple rounds of hash mapping and voting. Attached Figure Description
[0048] Figure 1 This is a block diagram illustrating the principle of high-precision frequency measurement based on sparse Fourier transform in this invention.
[0049] Figure 2 This is a flowchart of the high-precision frequency measurement method based on sparse Fourier transform of the present invention;
[0050] Figure 3 This is a schematic diagram of basket sorting during downsampling. Detailed Implementation
[0051] The specific embodiments of the present invention will now be described with reference to the accompanying drawings to enable those skilled in the art to better understand the invention. It should be particularly noted that in the following description, detailed descriptions of known functions and designs that might obscure the main content of the invention will be omitted here.
[0052] Example
[0053] In this embodiment, as Figure 1 As shown, the high-precision frequency measurement method based on sparse Fourier transform of the present invention mainly includes three steps: binning, reconstruction, and iteration. By performing multiple rounds of binning and reconstruction iteration on the measured signal x(n), high-precision frequency data x(k) is obtained.
[0054] Below we combine Figure 2 The specific operation process is described in detail below:
[0055] (1) Power on the digital oscilloscope and connect the signal to be measured;
[0056] (2) The host computer generates a set of positive mapping parameter sequence σ of length L, and the corresponding negative mapping parameter sequence σ. -1 Then the forward and reverse mapping parameter sequences are sent to the sparse Fourier module.
[0057] In this embodiment, the positive mapping parameter sequence σ is a prime number starting from 3, including 3, 5, 7, 11, 13, 17, 19, 23, 29, ..., and its length depends on the iteration number parameter L of the sparse Fourier transform.
[0058] Inverse mapping parameter sequence σ -1 By applying the parameters σ in the positive mapping parameter sequence σ l Perform modular inverse operation to obtain the inverse mapping parameter σ.l -1 ;
[0059]
[0060] Where N is the number of sparse Fourier transform points, and we take N = 65536;
[0061] In this embodiment, assuming the total number of iterations of the sparse Fourier module is set to L = 8, then the positive mapping parameter sequence σ = {3, 5, 7, 11, 13, 17, 19, 23}, and the negative mapping parameter sequence σ -1 ={43691,52429,28087,35747,20165,61681,51739,14247};
[0062] (3) Set the maximum number of iterations of the sparse Fourier transform to L, and initialize the current number of iterations l = 1, l = 1, 2, ..., L;
[0063] (4) Perform sparse Fourier transform on the signal under test by iterative loop;
[0064] (4.1) During the l-th iteration, the acquisition system of the digital oscilloscope samples the signal under test and obtains a time-domain sequence of length 65536, denoted as x. l (n), n = 0, 1, 2, ..., 65535;
[0065] (4.2) Read the l-th positive mapping parameter σ in the positive mapping parameter sequence σ. l Then, for the time-domain sequence x l (n) do σ l Uniform sampling at a multiple yields the time-rearranged sequence.
[0066]
[0067] Where δ is the starting address for extraction, and δ = 0;
[0068] In this embodiment, during the first iteration, the first positive mapping parameter σ1 = 3 is read, and the subsequent corresponding inverse mapping parameter...
[0069] (4.3) Sequence Perform window function filtering;
[0070] (4.3.1) Define the flat window function y(n);
[0071]
[0072] in, For convolution operations, p(n) is a rectangular window function that satisfies: μ is the width of the rectangular window, taken as μ = 128; g(n) is a Gaussian function, satisfying: Let b be the mean of the Gaussian function and a be the variance of the Gaussian function. Let b = 0.
[0073] (4.3.2) Based on fixed-point multiplication Multiplying the result point by point with the window function y(n) yields the sequence.
[0074] (4.4) For the sequence Perform depletion FFT processing;
[0075] (4.4.1) Using sampling rate B for the sequence Downsampling is performed to obtain the sequence.
[0076]
[0077] In this embodiment, as Figure 3 As shown, after downsampling the sequence, the N high-frequency points are mapped to the B low-frequency bins. Subsequently, only FFT operation needs to be performed on the extracted data and the frequency points in the B bins need to be detected, which greatly reduces the computational complexity.
[0078] (4.4.2) For the sequence Perform an FFT transform to obtain the spectrum X. l (k);
[0079]
[0080] Where k represents the frequency index value of the output spectrum;
[0081] (4.5) Frequency point hash mapping;
[0082] (4.5.1) Based on spectrum X l (k), filtering out those with energy exceeding the threshold A Thres The frequency points are then identified, and their frequency index numbers k are recorded. l and amplitude value A(k) l );
[0083] (4.5.2) Read the inverse mapping parameter sequence σ -1 The l-th positive mapping parameter Then, the recorded frequency points are hashed to obtain frequency points with higher frequency precision.
[0084]
[0085] Where N is the number of sparse Fourier transform points;
[0086] (4.5.3) Recording frequency points The corresponding amplitude Then let
[0087] (4.6) Determine whether the current iteration number l has reached the maximum iteration number L. If l < L, let l = l + 1, and then return to step (4.1) for the next iteration; otherwise, proceed to step (5).
[0088] (5) Frequency voting;
[0089] (5.1) All frequency points obtained after L rounds of iteration Merge;
[0090] If a certain frequency point If it occurs more than once, then all amplitudes will be... Accumulate the values and then retain a frequency index number. Its corresponding amplitude is denoted as We obtain a set of frequency index vectors with unique frequency index numbers and their corresponding cumulative amplitudes;
[0091] (5.2) Traverse each frequency index number in the frequency index vector and corresponding cumulative amplitude Record amplitude Greater than L*A thres The frequency index number, denoted as k. v The corresponding amplitude is denoted as A(k). v );
[0092] (5.3) Set the frequency index number k v Convert to the actual frequency value f;
[0093]
[0094] Among them, F s The sampling rate of the signal being measured is F, which corresponds to F in this embodiment. s =20×10 9 ;
[0095] (6) Spectrum visualization;
[0096] Spectral distribution (k) v ,A(k v It is displayed on the screen in real time.
[0097] Although the illustrative specific embodiments of the present invention have been described above to enable those skilled in the art to understand the invention, it should be understood that the invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the invention as defined and determined by the appended claims, and all inventions utilizing the concept of the present invention are protected.
Claims
1. A high-precision frequency measurement method based on sparse Fourier transform, characterized in that, Includes the following steps: (1) Power on the digital oscilloscope and connect the signal to be measured; (2) The host computer generates a set of positive mapping parameter sequence σ of length L, and the corresponding negative mapping parameter sequence σ. -1 Then the forward and reverse mapping parameter sequences are sent to the sparse Fourier module. (3) Set the maximum number of iterations of the sparse Fourier transform to L, and initialize the current number of iterations l = 1, l = 1, 2, ..., L; (4) Perform sparse Fourier transform on the signal under test by iterative loop; (4.1) Let x be the time-domain sequence of length N obtained by the acquisition system of the digital oscilloscope during the l-th iteration. l (n), n = 0, 1, 2, ..., N-1; (4.2) Read the l-th positive mapping parameter σ in the positive mapping parameter sequence σ. l Then, for the time-domain sequence x l (n) do σ l Uniform sampling at a multiple yields the time-rearranged sequence. Where δ is the starting address for extraction; (4.3) Sequence Perform window function filtering; (4.3.1) Define the flat window function y(n); in, For convolution operations, p(n) is a rectangular window function that satisfies: μ is the width of the rectangular window; g(n) is a Gaussian function that satisfies: b is the mean of the Gaussian function, a is the variance of the Gaussian function, and x is the variable of the Gaussian function; (4.3.2) Based on fixed-point multiplication Multiplying the result point by point with the window function y(n) yields the sequence. (4.4) For the sequence Perform depletion FFT processing; (4.4.1) Using sampling rate B for the sequence Downsampling is performed to obtain the sequence. (4.4.2) For the sequence Perform an FFT transform to obtain the spectrum X. l (k); Where k represents the frequency index value of the output spectrum; (4.5) Frequency point hash mapping; (4.5.1) Based on spectrum X l (k), filtering out those with energy exceeding the threshold A Thres The frequency points are then identified, and their frequency index numbers k are recorded. l and amplitude value A(k) l ); (4.5.2) Read the inverse mapping parameter sequence σ -1 The l-th positive mapping parameter Then, the recorded frequency points are hashed to obtain frequency points with higher frequency precision. Where N is the number of sparse Fourier transform points; (4.5.3) Recording frequency points The corresponding amplitude Then let (4.6) Determine whether the current iteration number l has reached the maximum iteration number L. If l < L, let l = l + 1, and then return to step (4.1) for the next iteration; otherwise, proceed to step (5). (5) Frequency voting; (5.1) All frequency points obtained after L rounds of iteration Merge; If a certain frequency point If it occurs more than once, then all amplitudes will be... Accumulate the values and then retain a frequency index number. Its corresponding amplitude is denoted as We obtain a set of frequency index vectors with unique frequency index numbers and their corresponding cumulative amplitudes; (5.2) Traverse each frequency index number in the frequency index vector and corresponding cumulative amplitude Record amplitude Greater than L*A thres The frequency index number, denoted as k. v The corresponding amplitude is denoted as A(k). v ); (5.3) Set the frequency index number k v Convert to the actual frequency value f; Among them, F s The sampling rate of the signal being measured; (6) Spectrum visualization; Spectral distribution (k) v ,A(k v It is displayed on the screen in real time.
2. The high-precision frequency measurement method based on sparse Fourier transform according to claim 1, characterized in that, The positive mapping parameter sequence σ is a sequence of prime numbers starting from 3, including 3, 5, 7, 11, 13, 17, 19, 23, 29, ..., and the sequence length depends on the number of iterations L of the sparse Fourier transform.
3. The high-precision frequency measurement method based on sparse Fourier transform according to claim 1, characterized in that, The inverse mapping parameter sequence σ -1 By applying the parameters σ in the positive mapping parameter sequence σ l Perform modular inverse operation to obtain the inverse mapping parameters. Where l represents the parameter number and N is the number of sparse Fourier transform points.
Citation Information
Patent Citations
Signal spectrum reconstruction method and device, computer equipment and storage medium
CN115730178A
Quantum sparse fourier transform
US20220107989A1