Single frequency signal frequency estimation and tracking method based on discrete Fourier transform
By using discrete Fourier transform and DFT calculation of equally spaced data points in frequency tracking of a single frequency signal, the problem of high frequency tracking calculation in embedded systems is solved, and the effect of reducing CPU working time and system power consumption is achieved. , improves system performance.
Patent Information
- Application Number
- CN202410929494.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The calculation amount of a single frequency signal in the frequency tracking stage is large, resulting in an increase in CPU working time, an increase in system power consumption, and a decrease in embedded system performance.
The discrete Fourier transform method is used to select data points with equal interval distribution in the frequency tracking stage for DFT calculation, which reduces the number of calls of the DFT algorithm and converts it to FFT calculation when the frequency changes, reducing the calculation amount.
It effectively reduces the calculation amount of frequency determination and tracking algorithms, reduces CPU working time and system power consumption, and improves the performance of embedded systems.
Smart Images

Figure CN118897936A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to single frequency signal frequency estimation and tracking, and relates to a single frequency signal frequency estimation and tracking method of discrete Fourier transform. Background Art
[0002] Single frequency signal frequency estimation and tracking. By combining with DFT algorithm, the frequency of the measured signal can be analyzed, but the calculation amount of the judgment and tracking algorithm is large in the frequency tracking stage, and multiple calls of DFT algorithm are required. For embedded systems, the CPU performance of their computer systems is generally relatively weak, and the application scenarios have high power consumption requirements. The use of DFT algorithm increases the CPU working time, increases the system power consumption, and reduces the system performance. Summary of the invention
[0003] 1. Technical problems to be solved:
[0004] How to reduce the power consumption of frequency estimation and tracking of a single frequency signal, reduce the CPU working time, reduce system power consumption, and improve system performance.
[0005] 2. Technical solution:
[0006] In order to solve the above problems, the present invention provides a single frequency signal frequency estimation and tracking method based on discrete Fourier transform, comprising the following steps:
[0007] Step 1: Initialization work, setting the sampling frequency f s , sampling length N, variable clearing, etc.;
[0008] Step 2: Start the ADC at sampling frequency f s Sampling is performed to obtain the initial sampling sequence {x(n)}, 1≤n≤N;
[0009] Step 3: Call the standard FFT calculation to obtain the maximum frequency point position k, and retain the calculation result X(k);
[0010] Step 4: In the subsequent frequency tracking stage, select m equally spaced data points from the subsequent sampling sequence (m is much smaller than N, so that the amount of DFT calculation for m points is smaller than the amount of FFT calculation for N points), perform m-point DFT on the phase factor corresponding to the m points and the k frequency, and obtain X'(k);
[0011] Step 5: According to the DFT principle, at the most relevant frequency k, there should be Compare the results of X'(k) and X(k). If they are close to m / N, it means that the current frequency has not changed. Keep the DFT algorithm for the next sampling and go to step 3. Otherwise, it means that the frequency has changed. Set the algorithm after the next sampling to FFT and go to step 2.
[0012] 3. Beneficial effects:
[0013] The present invention reduces the amount of calculation of the frequency determination and tracking algorithm and reduces the number of calls to the DFT algorithm. For embedded systems, the CPU performance of their computer systems is generally relatively weak, and the application scenarios have high power consumption requirements. After using this improved method, the CPU working time can be reduced, the system power consumption is reduced, and the system performance is improved, which has obvious significance for related product designs. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0015] The present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0016] When the frequency has been determined in the previous calculation, in the subsequent tracking process, the DFT algorithm replaces the FFT through the frequency estimation and tracking method of the single frequency signal based on the discrete Fourier transform, further reducing the calculation work brought by the FFT.
[0017] like Figure 1 As shown, a single frequency signal frequency estimation and tracking method based on discrete Fourier transform includes the following steps:
[0018] Step 1: Initialization work, setting the sampling frequency f s , sampling length N, variable clearing, etc.;
[0019] Step 2: Start the ADC at sampling frequency f s Sampling is performed to obtain the initial sampling sequence {x(n)}, 1≤n≤N;
[0020] Step 3: Call the standard FFT calculation to obtain the maximum frequency point position k, and retain the calculation result X(k);
[0021] Step 4: In the subsequent frequency tracking stage, select m equally spaced data points from the subsequent sampling sequence (m is much smaller than N, so that the amount of DFT calculation for m points is smaller than the amount of FFT calculation for N points), perform m-point DFT on the phase factor corresponding to the m points and the k frequency, and obtain X'(k);
[0022] Step 5: According to the DFT principle, at the most relevant frequency k, there should be Compare the results of X'(k) and X(k). If they are close to m / N, it means that the current frequency has not changed. Keep the DFT algorithm for the next sampling and go to step 3. Otherwise, it means that the frequency has changed. Set the algorithm after the next sampling to FFT and go to step 2.
[0023] According to the above steps, the DFT[x'(n)] of frequency k contains 2m complex multiplications if Then, it is only necessary to verify whether a small number of points are completely correlated to determine whether the frequency is still the same as before. The improved algorithm only uses DFT to verify the frequency correlation of the concerned frequency points, which can further simplify the calculation steps based on FFT and improve the program efficiency.
[0024] In one embodiment, in step 1, the initial frequency calculation method is set to FFT.
[0025] In one embodiment, in step 3, the method for obtaining the calculation result X(k) is: assuming that the system sampling frequency f s , the number of calculation points of DFT / FFT is N. According to the DFT algorithm formula, DFT can be expressed as the following linear matrix multiplication
[0026] X=W N x (Formula 1)
[0027] in:
[0028] X=[X(0),X(1),…,X(n)] H It is the frequency value obtained by DFT calculation of the N-point sampling value sequence;
[0029] x=[x(0),x(1),…,x(n)] H is a finite length sample sequence of length N;
[0030] W N It is an N×N matrix, which represents the phase points of each harmonic within a period of 2π:
[0031]
[0032] in It represents the phase step size of the kth frequency.
[0033] If you need to calculate the DFT value corresponding to the k point, use the formula
[0034]
[0035] Formula 2 shows that the final value of X(k) is the value of the sequence x(n) on a sinusoidal curve with a frequency of k and a sampling time interval of T. S The cumulative projection value at the moment can also be regarded as the correlation value between the sequence x(n) and the frequency k. Considering that the purpose of this algorithm is to track the frequency and determine whether the frequency has shifted, under the premise of known frequency, it is not necessary to calculate all the probability values to determine them.
[0036] Formula 2 needs to go through N2 The amount of calculation for the complex number multiplication is very large, so the FFT algorithm is used. FFT can reduce the amount of complex number calculation to N / 2log2N.
[0037] Assuming that only a single frequency f0 signal is analyzed, according to the FFT calculation results, the frequency closest to f0 will be For the normalized sequence, if N is selected appropriately, the maximum value is N / 2. This indicates that the projection of each sampling point at frequency k is 1. If DFT is understood as a correlation calculation, then it also indicates that It has the maximum correlation with the original signal f0.
Claims
1. A single frequency signal frequency estimation and tracking method based on discrete Fourier transform, characterized in that: The following steps are involved: Step 1: Initialization work, setting the sampling frequency f s , sampling length N, variable clearing work; Step 2: Start the ADC at sampling frequency f s Sampling is performed to obtain the initial sampling sequence {x(n)}, 1≤n≤N; Step 3: Call the standard FFT calculation to obtain the maximum frequency point position k, and retain the calculation result X(k); Step 4: In the subsequent frequency tracking stage, select m equally spaced data points from the subsequent sampling sequence (m is much smaller than N, so that the amount of DFT calculation for m points is smaller than the amount of FFT calculation for N points), perform m-point DFT on the phase factor corresponding to the m points and the k frequency, and obtain X'(k); Step 5: According to the DFT principle, at the most relevant frequency k, there should be Compare the results of X'(k) and X(k). If they are close to m / N, it means that the current frequency has not changed. Keep the DFT algorithm for the next sampling and go to step 3. Otherwise, it means that the frequency has changed. Set the algorithm after the next sampling to FFT and go to step 2.
2. The method for frequency estimation and tracking of a single frequency signal based on discrete Fourier transform according to claim 1, characterized in that: In step 1, the initial frequency calculation method is set to FFT.
3. The method for frequency estimation and tracking of a single frequency signal based on discrete Fourier transform according to claim 1, characterized in that: In step 3, the method for obtaining the calculation result X(k) is: Assume that the system sampling frequency f s , the number of DFT calculation points is N, and DFT is expressed as the following linear matrix multiplication X=W N x (Formula 1) in: X=[X(0),X(1),…,X(n)] H It is the frequency value obtained by DFT calculation of the N-point sampling value sequence; x=[x(0),x(1),…,x(n)] H is a finite length sample sequence of length N; W N It is an N×N matrix, which represents the phase points of each harmonic within a period of 2π: in It represents the phase step size of the kth frequency. Then use the formula Get the value of X(k).
4. The method for frequency estimation and tracking of a single frequency signal based on discrete Fourier transform according to claim 1, characterized in that: Step 4 is as follows: In the tracking phase after locking the frequency, the formulas 1 and 2 are still used, but only the sequence subscripts corresponding to Phase point for frequency verification. That The principle lies in the frequency selectivity of DFT: if the N sampled points are regarded as the periodic principal values of the cyclic extension, m equally spaced points x′(m)=e can be selected from the set of N points. j2πmq / N (Assume the interval is Δ), then according to the DFT formula we can get the closed-form solution and frequency selection conclusion, The FFT calculation of the original x(n) requires If x′(m) is subjected to DFT, m complex multiplications are required. In the verification case, Δ can be selected to be large enough so that Formula 3 does not reduce the sampling rate while reducing the sample calculation amount, so the frequency resolution can be kept unchanged.
