Frequency estimation method, device, equipment and medium
By performing frequency shift and interpolation correction on the differential frequency signal sequence, the problem of low frequency estimation accuracy in the prior art is solved, and a higher accuracy frequency estimation, speed measurement and ranging effects are achieved.
Patent Information
- Application Number
- CN202510296729.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-09-05
AI Technical Summary
In the prior art, the accuracy of differential frequency signal frequency estimation is low, which affects the accuracy of speed measurement and distance measurement.
By performing frequency shift operations on the signal sequence, adjusting the spectrum characteristics, and determining the frequency of the signal sequence using the spectrum representation of the target signal sequence, especially when the amplitude difference between the first large spectrum line and the second large spectrum line is less than the preset threshold, frequency shift and interpolation methods are used for frequency correction.
It improves the accuracy of frequency estimation, reduces misjudgment caused by noise interference, and improves the accuracy of speed measurement and distance measurement.
Smart Images

Figure CN120594938A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to signal processing technology, and in particular to a frequency estimation method, apparatus, device and medium. Background Art
[0002] Currently, frequency estimation of beat frequency signals is often required in fields such as sensors and radar. For example, for frequency modulated continuous wave (FMCW) radar, frequency estimation of beat frequency signals is required to achieve speed and distance measurement.
[0003] It is understandable that the accuracy of the frequency estimation of the difference frequency signal affects the accuracy of applications such as speed measurement and distance measurement. Therefore, it is very necessary to accurately estimate the difference frequency signal. Known technologies propose to use Fast Fourier Transform (FFT) to achieve frequency estimation of the difference frequency signal. Specifically, the signal sequence in the time domain is converted into a spectrum representation in the frequency domain, and the frequency point corresponding to the maximum spectrum line in the spectrum representation is found to preliminarily estimate the frequency. Furthermore, a correction method is proposed based on FFT to compensate for the defects of FFT itself such as limited resolution and spectrum leakage, so as to improve the accuracy of frequency estimation. Among them, commonly used correction methods include energy centroid method, interpolation method, etc.
[0004] When frequency estimation is performed using the above method, there is a drawback of low accuracy. Summary of the Invention
[0005] The present application provides a frequency estimation method, apparatus, device, and medium to improve the accuracy of frequency estimation.
[0006] In a first aspect, the present application provides a frequency estimation method, the method comprising:
[0007] For a signal sequence to be estimated, when the difference in amplitude between the first large spectral line and the second large spectral line is less than a preset threshold, a frequency shift operation is performed on the signal sequence to obtain a target signal sequence after frequency shift; the first large spectral line and the second large spectral line are respectively located on either side of the maximum spectral line and are determined based on the frequency spectrum representation corresponding to the signal sequence;
[0008] The frequency of the signal sequence is determined according to a target frequency spectrum representation corresponding to the target signal sequence.
[0009] In one possible implementation, performing a frequency shift operation on the signal sequence to obtain a frequency-shifted target signal sequence includes:
[0010] A frequency shift operation is performed on the signal sequence according to a first preset frequency shift amount to obtain a frequency-shifted target signal sequence; the first preset frequency shift amount is related to a frequency resolution corresponding to the frequency spectrum representation.
[0011] In a possible implementation, the first preset frequency shift is any value within a range of 0.3Δf-0.5Δf, where Δf is the frequency resolution.
[0012] In one possible implementation, determining the frequency of the signal sequence according to a target frequency spectrum representation corresponding to the target signal sequence includes:
[0013] Determine, according to the target spectrum representation corresponding to the target signal sequence, a first target second largest spectrum line and a second target second largest spectrum line located on both sides of the target maximum spectrum line;
[0014] A correction direction is determined according to the first target second largest spectral line and the second target second largest spectral line, and the frequency of the signal sequence is estimated according to the correction direction.
[0015] In one possible implementation, determining the correction direction according to the first target second largest spectral line and the second target second largest spectral line includes:
[0016] When the modulus of the amplitude corresponding to the first target second largest spectral line is greater than the modulus of the amplitude corresponding to the second target second largest spectral line, the correction direction is determined to indicate correction from the target maximum spectral line to the first target second largest spectral line.
[0017] In one possible implementation, estimating the frequency of the signal sequence according to the correction direction includes:
[0018] When the correction direction is used to indicate correction from the target maximum spectral line to any target second largest spectral line, the frequency of the signal sequence is determined according to the amplitude corresponding to any target second largest spectral line and the amplitude corresponding to the target maximum spectral line.
[0019] In one possible implementation, determining the frequency of the signal sequence according to the amplitude corresponding to any target second-largest spectral line and the amplitude corresponding to the target maximum spectral line includes:
[0020] Calculating a correction deviation of the interpolation according to the amplitude corresponding to any target second largest spectral line and the amplitude corresponding to the target largest spectral line;
[0021] The frequency of the signal sequence is determined based on the corrected deviation.
[0022] In one possible implementation, calculating the interpolation correction deviation based on the amplitude corresponding to any target second largest spectral line and the amplitude corresponding to the target largest spectral line includes:
[0023] The correction deviation is calculated according to the target formula; the target formula is expressed as: Among them, |X(k1)| is used to represent the modulus of the amplitude corresponding to any target second largest spectrum line, |X(k0)| is used to represent the modulus of the amplitude corresponding to the target maximum spectrum line, k1 is used to represent the index of the frequency point corresponding to any target second largest spectrum line, k0 is used to represent the index of the frequency point corresponding to the target maximum spectrum line, and n is related to the correction direction.
[0024] In one possible implementation, determining the frequency of the signal sequence according to the corrected deviation includes:
[0025] When the corrected deviation is less than a preset deviation threshold, performing a frequency shift operation on the target signal sequence to obtain an updated signal sequence;
[0026] The frequency of the signal sequence is determined according to the updated frequency spectrum representation corresponding to the updated signal sequence.
[0027] In one possible implementation, performing a frequency shift operation on the target signal sequence to obtain an updated signal sequence includes:
[0028] The target signal sequence is subjected to a frequency shift operation according to a second preset frequency shift amount; the second preset frequency shift amount is any value within a range of 0-0.5Δf, where Δf is the frequency resolution.
[0029] In one possible implementation, the preset deviation threshold is any value within the range of 0.2-0.4.
[0030] In one possible implementation, performing a frequency shift operation on the target signal sequence to obtain an updated signal sequence includes:
[0031] A frequency shift operation is performed on the target signal sequence according to a preset frequency shift direction, where the preset frequency shift direction is consistent with the correction direction.
[0032] In one possible implementation, determining the frequency of the signal sequence according to the updated frequency spectrum representation corresponding to the updated signal sequence includes:
[0033] Determine an updated maximum spectrum line and a first updated second largest spectrum line and a second updated second largest spectrum line located on both sides of the updated maximum spectrum line according to the updated spectrum representation;
[0034] Calculating an updated correction deviation according to the updated maximum spectrum line, the first updated second largest spectrum line, and the second updated second largest spectrum line;
[0035] When the updated correction deviation is not less than the correction deviation, the frequency of the signal sequence is determined according to the updated correction deviation.
[0036] In one possible implementation, determining the frequency of the signal sequence according to the updated corrected deviation includes:
[0037] The frequency of the signal sequence is determined according to the updated correction deviation, the updated signal sequence, a first preset frequency shift amount, and a second preset frequency shift amount.
[0038] In one possible implementation, determining the frequency of the signal sequence according to the updated corrected deviation includes:
[0039] The frequency of the signal sequence is determined according to a first frequency calculation formula; the first frequency calculation formula is expressed as: m =(k x +δ)Δf-a·Δf-b·Δf, Δf=f s / N, where f m Used to represent the frequency of the signal sequence, k x It is used to indicate the index of the frequency point corresponding to the updated maximum spectrum line, δ is used to indicate the updated correction deviation, Δf is used to indicate the frequency resolution of the discrete Fourier transform with a length of N, and f s It is used to represent the sampling frequency, N is used to represent the number of discrete Fourier transform points, a·Δf is used to represent the first preset frequency shift amount, and b·Δf is used to represent the second preset frequency shift amount.
[0040] In one possible implementation, the method further includes:
[0041] When the updated correction deviation is smaller than the correction deviation, the frequency of the signal sequence is determined according to the correction deviation, the target signal sequence, and a first preset frequency shift.
[0042] In one possible implementation, the method further includes:
[0043] When the updated correction deviation is less than the correction deviation, the frequency of the signal sequence is determined according to a second frequency calculation formula; the second frequency calculation formula is expressed as: f m =(k y +δ)Δf-a·Δf, where f m Used to represent the frequency of the signal sequence, k y It is used to represent the amplitude index corresponding to the target maximum spectrum line, δ is used to represent the correction deviation, Δf is used to represent the frequency resolution of the discrete Fourier transform with a length of N, and f s is used to represent the sampling frequency, N is used to represent the number of discrete Fourier transform points, and a·Δf is used to represent the first preset frequency shift amount.
[0044] In a second aspect, the present application provides a frequency estimation device, the device comprising:
[0045] a frequency shift module configured to perform a frequency shift on a signal sequence to be estimated when the difference in amplitude between the first large spectral line and the second large spectral line is less than a preset threshold, thereby obtaining a target signal sequence after frequency shift; wherein the first large spectral line and the second large spectral line are located on either side of the maximum spectral line, respectively, and are determined based on a spectral representation corresponding to the signal sequence;
[0046] The determination module is configured to determine the frequency of the signal sequence according to a target frequency spectrum representation corresponding to the target signal sequence.
[0047] In a third aspect, the present application provides an electronic device, comprising a processor and a memory communicatively connected to the processor;
[0048] The memory stores computer-executable instructions;
[0049] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the first aspects.
[0050] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.
[0051] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method as described in any one of the first aspects.
[0052] The present application provides a frequency estimation method, apparatus, device and medium, wherein the method of the present application is executed by any electronic device. Specifically, when the electronic device estimates the frequency of a signal sequence to be estimated, if the gap between the two second-largest spectral lines of the signal sequence is less than a preset threshold, the signal sequence will be frequency shifted to obtain a target signal sequence after the frequency shift. Furthermore, the frequency corresponding to the signal sequence is determined based on the target spectrum representation corresponding to the target signal sequence. In the method of the present application, since the signal sequence will be frequency shifted when the gap between the two second-largest spectral lines is less than a preset threshold, the spectral characteristics of the signal sequence can be adjusted, making the key features in the spectral representation more obvious or easier to analyze, thereby avoiding the situation where the correction direction is misjudged due to noise interference, etc., which is conducive to obtaining an accurate correction direction, and further conducive to obtaining a more accurate frequency. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0054] Figure 1 A schematic diagram of an application scenario of a frequency estimation method provided in an embodiment of the present application;
[0055] Figure 2 A schematic diagram of the spectrum of an FMCW radar provided in an embodiment of the present application;
[0056] Figure 3 A flow chart of a frequency estimation method provided in an embodiment of the present application Figure 1 ;
[0057] Figure 4 A flow chart of a frequency estimation method provided in an embodiment of the present application Figure 2 ;
[0058] Figure 5 A flowchart of a frequency estimation method provided in an embodiment of the present application;
[0059] Figure 6 A schematic structural diagram of a frequency estimation device provided in an embodiment of the present application;
[0060] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0061] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0062] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0063] Currently, in fields such as sensors and radars, frequency estimation of beat frequency signals is often required because they rely on beat frequency signals to achieve functions such as speed and distance measurement. For example, in a frequency modulated continuous wave (FMCW) radar, the frequency modulated signal emitted by the radar is mixed with the echo signal to generate a beat frequency signal, which is used to measure speed or distance.
[0064] It's understandable that accurately estimating the beat frequency signal is beneficial for improving the accuracy of applications such as speed and distance measurement. Therefore, accurately estimating the beat frequency signal has long been a hot topic in signal processing research. Numerous signal frequency estimation algorithms have been proposed, primarily those based on differential phase algorithms, maximum likelihood estimation algorithms, and various frequency estimation algorithms based on the Discrete Fourier Transform (DFT).
[0065] Among them, the algorithm based on differential phase has the advantage of high frequency resolution, but it is sensitive to the signal-to-noise ratio and has poor performance at low signal-to-noise ratios. The maximum likelihood estimation algorithm has the best performance, but this algorithm is a nonlinear least squares fitting problem with high computational complexity and is difficult to apply in real time. The method based on DFT spectrum correction can use the Fast Fourier Transform (FFT) to estimate the frequency of the difference frequency signal. It has the advantages of small computational complexity, high accuracy, and good real-time performance. It also has the advantages of high signal-to-noise ratio gain and insensitivity to algorithm parameters. It is a relatively robust method that is easy to implement in engineering, and has therefore been widely used and studied.
[0066] Based on the FFT, various correction methods have been proposed. Currently, these methods primarily include the energy centroid method, the FFT+FT spectrum continuous refinement analysis Fourier transform method, and interpolation. The energy centroid method suffers from reduced estimation accuracy when the signal-to-noise ratio is low, while the computational complexity of the FFT+FT method increases significantly with increasing refinement factors.
[0067] Therefore, among known technologies, interpolation is the most studied parameter estimation method. The most representative ones are Rife interpolation and Quinn interpolation. Rife interpolation and Quinn interpolation respectively use the spectral lines on both sides of the spectrum peak to perform offset calculations. By correcting the estimation results through interpolation, the estimation error caused by spectrum leakage can be reduced.
[0068] The above interpolation method is simple to implement and has been widely used and studied. However, it still has the defect of low accuracy when used for frequency estimation.
[0069] Therefore, the present application provides a frequency estimation method, apparatus, device, and medium for solving the above-mentioned problems. Specifically, the frequency estimation method in the present application is performed by any electronic device. When the electronic device performs frequency estimation on any signal sequence, it first determines whether the amplitudes of the first large spectral line and the second large spectral line on both sides of the maximum spectral line are close. If the difference is small, the signal sequence is first frequency shifted. After the frequency shift operation, the frequency of the signal sequence is determined based on the new spectrum representation corresponding to the target signal sequence.
[0070] It is understandable that the method of the present application is applicable to any scenario involving frequency estimation, such as any scenario where a difference frequency signal is used to implement speed measurement, distance measurement, and the like. Figure 1 A schematic diagram of an application scenario of a frequency estimation method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method of the present application can be used for an FMCW radar in any vehicle, and the FMCW radar is connected to an electronic device that executes the frequency estimation method of the present application.
[0071] Specifically, when driving on a highway with ACC enabled, the FMCW radar continuously transmits frequency-modulated continuous wave (FMCW) signals in front of the vehicle. These signals generate echoes from vehicles traveling in the same direction ahead. The FMCW radar receives these echoes and sends them to an electronic device. The electronic device mixes the echo signals with the transmitted wave to generate a difference frequency signal. Using the method described in this application, the frequency of this difference frequency signal is estimated to accurately calculate the real-time distance to the vehicle ahead.
[0072] More specifically, when the electronic device uses the method of the present application to estimate the difference frequency signal, it first determines the two second-largest spectral lines of the difference frequency signal sequence. When the difference between the first and second largest spectral lines is less than a preset threshold, the electronic device performs a frequency shift on the signal sequence to obtain a target signal sequence after the frequency shift. The frequency of the difference frequency signal is further estimated based on the target signal sequence.
[0073] Figure 2 A schematic diagram of the spectrum of an FMCW radar provided in an embodiment of the present application is shown in FIG. Figure 2 In the spectrum diagram (A) shown in FIG, the gap between the two second largest spectral lines is large. In this case, the accurate correction direction can be obtained by the method in the known technology. However, for Figure 2 In the spectrum diagram shown in (B), the gap between the two secondary spectral lines is small. At this time, the method in the known technology may be interfered by noise and lead to misjudgment, that is, it may cause a reverse difference, thereby increasing the error. However, the method of the present application can timely adjust the spectrum characteristics through frequency shift, making the key spectrum characteristics more significant and more conducive to subsequent analysis, thereby helping to avoid misjudgment of the correction direction due to noise interference, etc., and helping to obtain an accurate correction direction, and thus helping to obtain a more accurate frequency.
[0074] It is understandable that the electronic device can be specifically integrated into the FMCW radar as part of the FMCW radar, or it can be an independently set device, such as a user's mobile phone, a vehicle controller, or any other electronic device with computing power. This is not limited in this embodiment.
[0075] In the following, some embodiments of the frequency estimation method of the present application are described in detail with reference to the accompanying drawings. In the event that the embodiments do not conflict with each other, the following embodiments and features in the embodiments may be combined with each other.
[0076] The present invention provides a frequency estimation method. Figure 3 A flow chart of a frequency estimation method provided in an embodiment of the present application Figure 1 ,like Figure 3 As shown, a frequency estimation method provided in an embodiment of the present application includes the following contents:
[0077] S301 : For a signal sequence to be estimated, when the amplitude difference between the first large spectrum line and the second large spectrum line is smaller than a preset threshold, a frequency shift operation is performed on the signal sequence to obtain a target signal sequence after frequency shift.
[0078] Among them, the first large spectrum line and the second large spectrum line are located on both sides of the maximum spectrum line, respectively, and are determined according to the spectrum representation corresponding to the signal sequence.
[0079] It should be understood that the signal sequence represents the signal to be estimated in the time domain. Correspondingly, the spectral representation represents the signal to be estimated in the frequency domain. Specifically, it can be a spectrogram corresponding to the signal to be estimated, obtained by performing an FFT calculation on the signal sequence of the signal to be estimated. Based on this, each discrete frequency point corresponds to a spectral line, and each spectral line has a corresponding amplitude. Among the spectral lines, the one with the largest amplitude is the maximum spectral line. The spectral lines with the largest amplitudes on either side of the maximum spectral line are the first and second largest spectral lines, respectively.
[0080] It is understandable that, in practical applications, the spectrum representation may also be other visual representations such as a spectrum data table, which is not limited in this embodiment.
[0081] In this embodiment, the electronic device judges the amplitude of the first large spectrum line and the second large spectrum line to determine whether the amplitude difference between the first large spectrum line and the second large spectrum line is less than a preset threshold. Specifically, as a preferred embodiment, the electronic device determines that the amplitude of the first large spectrum line and the second large spectrum line is less than a preset threshold when the ratio of the amplitude modulus of the second large spectrum line to the amplitude modulus of the first large spectrum line meets the preset range. More specifically, the preset range is
[0082] In practical applications, a preset threshold value may also be directly given. The electronic device may determine the amplitude difference based on the modulus of the amplitude corresponding to the first large spectral line and the modulus of the amplitude corresponding to the second large spectral line, and compare the amplitude difference with the preset threshold value. The preset threshold value may be set based on experience or after extensive simulation verification, and is not limited in this embodiment.
[0083] In this embodiment, when the difference in amplitude between the first large spectral line and the second large spectral line is less than a preset threshold, the electronic device performs a frequency shift on the signal sequence to obtain a target signal sequence after the frequency shift. Specifically, the electronic device performs a frequency shift on the signal sequence according to a first preset frequency shift amount to obtain the target signal sequence after the frequency shift. The first preset frequency shift amount is related to the frequency resolution corresponding to the spectrum representation. More specifically, the first preset frequency shift amount is any value within the range of 0.3Δf-0.5Δf, preferably 0.5Δf, where Δf is the frequency resolution.
[0084] In this embodiment, the frequency shift direction applied to the frequency shift operation on the signal sequence can be specifically from the maximum spectrum line to the first large spectrum line, or from the maximum spectrum line to the second large spectrum line, as long as the spectrum characteristics can be adjusted, which is not limited in this embodiment.
[0085] It can be understood that after the first preset frequency shift amount and frequency shift direction are known, when the frequency shift operation is performed on the signal sequence, the frequency shift operation can be implemented based on the idea of time domain processing or frequency domain processing. This is not limited in this embodiment, and both processing ideas are known technologies and will not be repeated here.
[0086] It's understandable that frequency resolution reflects how finely the spectrum distinguishes between different frequency components. Therefore, in the above process, the first preset frequency shift amount is associated with the frequency resolution, even if the first preset frequency shift amount is set to match the current spectrum resolution. This setting allows the spectral characteristics of the estimated signal to better match the spectral resolution after the frequency shift operation. This allows previously fuzzy and difficult-to-distinguish frequency components to become more clearly defined, making subsequent feature extraction and analysis easier and helping to accurately locate key frequencies.
[0087] Furthermore, since frequency resolution represents the minimum interval between two adjacent frequency components that can be distinguished on a spectrum, setting the first preset frequency shift amount to 0.5Δf allows each frequency shift operation to move the signal spectrum to the middle of the adjacent frequency intervals. This facilitates more detailed exploration of spectral characteristics, uncovering weak frequency signals at the edge of resolution that would otherwise be easily overlooked, maximizing spectrum utilization and ensuring that no potentially critical frequency information is missed.
[0088] S302: Determine the frequency of the signal sequence according to the target frequency spectrum representation corresponding to the target signal sequence.
[0089] In this embodiment, after obtaining the target signal sequence, the electronic device obtains a target spectrum representation corresponding to the target signal sequence through FFT, and determines the frequency of the signal sequence according to the target spectrum representation.
[0090] It's understandable that while the frequency corresponding to the maximum spectral line is likely the dominant frequency component in the signal, given the presence of noise interference, spectrum leakage, and other factors in real-world situations, it's necessary to correct the amplitude of the maximum spectral line to eliminate false peaks and more accurately determine the true frequency of the signal. Therefore, in this embodiment, the electronic device determines the target maximum spectral line based on the target spectral representation and, by correcting the amplitude corresponding to the target maximum spectral line, obtains the frequency of the signal sequence.
[0091] In the method provided in this embodiment, when frequency estimation is performed on any signal to be estimated, if the difference in amplitude between the first and second major spectral lines corresponding to the signal sequence is less than a preset threshold, the signal sequence is frequency shifted to obtain a target signal sequence after the frequency shift. Furthermore, the frequency of the signal sequence is determined based on the target spectral representation corresponding to the target signal sequence.
[0092] Through the method of this embodiment, when the amplitudes of the first large spectral line and the second large spectral line are close, the spectral characteristics of the signal sequence can be adjusted through a frequency shift operation, which helps to make the key features in the spectral representation more obvious or easier to analyze, thereby reducing noise interference and misjudgment of the correction direction caused by spectral aliasing, thereby improving the accuracy of subsequent signal processing processes.
[0093] As a possible situation, when the difference in amplitude between the first large spectral line and the second large spectral line is not less than a preset threshold, the electronic device determines the frequency of the signal sequence according to the current spectrum representation.
[0094] The present application also provides a method embodiment, specifically for further describing in detail the process of determining the frequency of a signal sequence according to a target frequency spectrum representation. Figure 4 A flow chart of a frequency estimation method provided in an embodiment of the present application Figure 2 ,like Figure 4 As shown, the method of this embodiment includes:
[0095] S401 , determining a first target second largest spectral line and a second target second largest spectral line located on both sides of a target maximum spectral line according to a target spectrum representation corresponding to a target signal sequence.
[0096] In this embodiment, the electronic device processes the target signal sequence using an FFT algorithm to obtain a corresponding target spectrum representation. Similarly, the target spectrum representation in this embodiment is specifically a spectrogram. Furthermore, the electronic device iterates through the amplitudes corresponding to each spectral line in the target spectrum representation, identifies the spectral line with the largest amplitude as the target maximum spectral line, and then finds spectral lines with the largest amplitudes on either side of the target maximum spectral line, each of which serves as the first target sub-maximum spectral line and the second target sub-maximum spectral line, respectively.
[0097] S402: Determine a correction direction according to the first target second largest spectral line and the second target second largest spectral line.
[0098] Specifically, when the amplitude modulus corresponding to the first target second largest spectral line is greater than the amplitude modulus corresponding to the second target second largest spectral line, the correction direction is determined to indicate correction from the target maximum spectral line to the first target second largest spectral line.
[0099] It is understandable that when judging the correction direction, the phase difference between different spectral lines is not helpful for judging which side of the spectral line is stronger, and may also interfere with the judgment. Therefore, in this embodiment, the electronic device compares the modulus of the amplitude corresponding to the first target second largest spectral line and the modulus of the amplitude corresponding to the second target second largest spectral line, and when the modulus of the amplitude corresponding to the first target second largest spectral line is greater than the modulus of the amplitude corresponding to the second target second largest spectral line, determines the correction direction to indicate correction from the target maximum spectral line to the first target second largest spectral line.
[0100] The first target secondary largest spectral line may be the target secondary largest spectral line located to the left of the target maximum spectral line, and correspondingly, the second target secondary largest spectral line is the target secondary largest spectral line located to the right of the target maximum spectral line. The first target secondary largest spectral line may also be the target secondary largest spectral line located to the right of the target maximum spectral line, and correspondingly, the second target secondary largest spectral line is the target secondary largest spectral line located to the left of the target maximum spectral line. This is not limited in this embodiment.
[0101] It can be understood that when the modulus of the amplitude corresponding to the first target second largest spectral line is not greater than the modulus of the amplitude corresponding to the second target second largest spectral line, the electronic device determines the correction direction to indicate correction from the target maximum spectral line to the second target second largest spectral line.
[0102] In this embodiment, the electronic device performs a modulo operation on the amplitudes of the two target sub-maximum spectral lines and then compares them, eliminating the phase component and focusing solely on the amplitude information, so that the comparison result only reflects the amplitude difference, thereby providing a more reliable and clear basis for determining the correction direction, and simplifying the consideration of amplitude comparison when determining the correction direction.
[0103] S403: Estimate the frequency of the signal sequence according to the correction direction.
[0104] Specifically, when the correction direction is used to indicate correction from the target maximum spectral line to any target second largest spectral line, the frequency of the signal sequence is determined according to the amplitude corresponding to any target second largest spectral line and the amplitude corresponding to the target maximum spectral line.
[0105] It's understandable that the amplitude of a spectral line corresponds, to a certain extent, to the energy distribution of the signal at that frequency component. The more concentrated the energy, the more likely it is to be the true frequency. Therefore, when the correction direction is directed toward a target secondary-maximum spectral line, combining the target maximum spectral line with the amplitude of that target secondary-maximum spectral line can reveal more detailed frequency information. Therefore, in this embodiment, when determining a correction direction to indicate correction from the target maximum spectral line to any target secondary-maximum spectral line, the electronic device determines the frequency of the signal sequence based on the amplitude corresponding to the target secondary-maximum spectral line and the amplitude corresponding to the target maximum spectral line.
[0106] More specifically, in this embodiment, the electronic device uses the Rife interpolation method to determine the frequency of the signal sequence by combining the amplitude corresponding to the target maximum spectral line and the amplitude corresponding to the target second largest spectral line. Based on this, the frequency of the signal sequence is determined based on the amplitude corresponding to any target second largest spectral line and the amplitude corresponding to the target maximum spectral line, including the following steps:
[0107] Step a: Calculate the interpolation correction deviation based on the amplitude corresponding to any target second largest spectral line and the amplitude corresponding to the target largest spectral line.
[0108] As a preferred embodiment, when any target sub-maximum spectral line is the first target sub-maximum spectral line, the correction deviation is calculated according to the target formula; the target formula is expressed as: Among them, |X(k1)| is used to represent the modulus of the amplitude corresponding to the first target second largest spectrum line, |X(k0)| is used to represent the modulus of the amplitude corresponding to the target maximum spectrum line, k1 is used to represent the index of the frequency point corresponding to the first target second largest spectrum line, k0 is used to represent the index of the frequency point corresponding to the target maximum spectrum line, and n is related to the correction direction.
[0109] In this embodiment, each frequency point in the target spectrum representation corresponds to a unique index. The frequency point corresponding to the target maximum spectral line is indexed as k0, and the frequency point corresponding to the first target second-largest spectral line is indexed as k1. Based on this, the electronic device can determine the target maximum spectral line by searching for the frequency point index corresponding to the maximum amplitude within the index range 1 ≤ k ≤ N.
[0110] In this embodiment, n specifically takes a value of 1 or 2. When the first target sub-maximum spectral line is located to the left of the target maximum spectral line, n takes a value of 1. When the first target sub-maximum spectral line is located to the right of the target maximum spectral line, n takes a value of 2. It is understood that in practical applications, n may also take other values, as long as the two values of n are odd and even, respectively, and this embodiment is not limited to this.
[0111] In this embodiment, when the electronic device determines that the correction direction is to correct from the target maximum spectrum line to the first target second largest spectrum line, it first performs a modulo operation on the first target second largest spectrum line and the target maximum spectrum line to obtain |X(k1)| and |X(k0)|, and then determines the positional relationship between the first target second largest spectrum line and the target maximum spectrum line to determine the value of n. Finally, |X(k1)|, |X(k0)|, and n are substituted into the target formula to obtain the correction deviation at this time.
[0112] In this process, the electronic device calculates the correction deviation using the modulus of the amplitudes of the target maximum spectral line and the second-largest target spectral line, as well as their relative positional relationship. This overcomes resolution limitations and refines frequency estimation. Furthermore, by varying the value of n to control the correction direction and incorporating this information into the calculation of the correction deviation, the system can more flexibly and accurately respond to the actual distribution of frequencies in the spectrum, avoiding the errors introduced by a single calculation model.
[0113] Step b: Determine the frequency of the signal sequence based on the corrected deviation.
[0114] In this embodiment, as a possible situation, when the corrected deviation is less than the preset deviation threshold, a frequency shift operation is performed on the target signal sequence to obtain an updated signal sequence; and the frequency of the signal sequence is determined according to an updated spectrum representation corresponding to the updated signal sequence.
[0115] It can be understood that when the true frequency falls near a frequency point, the corresponding estimation error will be significantly greater than the estimation error when it falls in the central area between two frequency points. Therefore, in this embodiment, when the true frequency falls near a frequency point, a frequency shift operation is performed on the target signal sequence to move the true frequency to the central area between the two frequency points, and then interpolation calculation is performed.
[0116] Specifically, in this embodiment, the preset deviation threshold is 0.35. After obtaining the corrected deviation, the electronic device compares the corrected deviation with the preset deviation threshold of 0.35. If the corrected deviation is less than the preset deviation threshold, it is determined that the true frequency will fall near the frequency point. In this case, a frequency shift operation is performed on the target signal sequence to obtain an updated signal sequence. The frequency of the signal sequence is then determined based on the updated spectrum representation of the updated signal sequence. This frequency shift operation prevents the true frequency from falling near the frequency point, reducing estimation error and thereby improving frequency estimation accuracy.
[0117] It is worth noting that 0.35 is the optimal value obtained after a large number of simulation verifications. In actual applications, the preset deviation threshold can be any value in the range of 0.2-0.4, which is not limited in this embodiment.
[0118] In this embodiment, the electronic device performs a frequency shift on the target signal sequence, specifically according to a second preset frequency shift amount and a preset frequency shift direction. Specifically, the second preset frequency shift amount is related to a preset deviation threshold, and the preset frequency shift direction is consistent with the aforementioned correction direction. More specifically, the second preset frequency shift amount is any value within the range of 0-0.5Δf, preferably 0.35Δf. In this embodiment, the second preset frequency shift amount is 0.35Δf, where Δf is the frequency resolution.
[0119] It can be understood that by making the second preset frequency shift amount related to the preset deviation threshold, the movement amplitude can be determined based on the size of the corrected deviation calculated previously. When the corrected deviation is less than the preset deviation threshold, the corresponding second preset frequency shift amount is adjusted, so that the estimated frequency can be closer to the true value, thereby improving the accuracy of signal demodulation and decoding.
[0120] In addition, since the secondary spectral lines reflect the deviation trend of the actual frequency, determining the preset frequency shift direction based on them can allow the frequency shift operation to follow the general direction of the actual frequency, which is conducive to ensuring that the frequency landing point after frequency shift is more in line with the actual spectrum distribution of the signal, and can effectively compensate for the frequency positioning deviation.
[0121] In summary, by performing frequency shift operations on the target signal sequence with the above-mentioned precise frequency shift direction and appropriate frequency shift amount, the problem of over-correction or under-correction can be avoided, so that each frequency shift can make the frequency estimate as close to the true frequency as possible, thereby preventing new errors from being introduced due to improper frequency shifting, and thus maintaining the accuracy of the frequency estimation.
[0122] In this embodiment, the electronic device determines the frequency of the signal sequence according to the updated spectrum representation corresponding to the updated signal sequence, specifically including the following steps:
[0123] Step b1: determining the updated maximum spectrum line and the first updated second largest spectrum line and the second updated second largest spectrum line located on both sides of the updated maximum spectrum line according to the updated spectrum representation.
[0124] Specifically, after obtaining the updated spectrum representation, the electronic device determines the updated maximum spectrum line, the first updated second-largest spectrum line, and the second updated second-largest spectrum line by traversing the updated spectrum representation. For details on how the electronic device obtains the updated spectrum representation, the specific form of the updated spectrum representation, and how to determine the updated maximum spectrum line, the first updated second-largest spectrum line, and the second updated second-largest spectrum line, please refer to the aforementioned embodiments and will not be repeated here.
[0125] Step b2: Calculate the updated correction deviation based on the updated maximum spectrum line, the first updated second largest spectrum line, and the second updated second largest spectrum line.
[0126] Specifically, in this embodiment, the electronic device first compares the amplitudes of the first updated second largest spectrum line and the second updated second largest spectrum line, determines the update correction direction according to the updated second largest spectrum line with the larger amplitude, then uses the updated second largest spectrum line with the larger amplitude as the first updated second largest spectrum line, and determines the value of n according to the update correction direction, finally, substitutes n, the modulus of the amplitude of the first updated second largest spectrum line, and the modulus of the amplitude of the updated maximum spectrum line into the target formula to obtain the update correction deviation.
[0127] Step b3: When the updated correction deviation is not less than the correction deviation, the frequency of the signal sequence is determined according to the updated correction deviation.
[0128] It can be understood that a larger correction deviation indicates that the corresponding true frequency is closer to the center region between the two frequency points. Therefore, in this embodiment, when the updated correction deviation obtained after the electronic device performs a frequency shift operation on the target signal sequence is not less than the correction deviation, the frequency of the signal sequence is determined based on the updated correction deviation. This can reduce the error in the estimated true frequency and bring the variance of the corrected error closer to the Cramer-Rao lower bound.
[0129] In this embodiment, when the electronic device determines the frequency of the signal sequence according to the updated correction deviation, the updated signal sequence, the first preset frequency shift amount, and the second preset frequency shift amount, the frequency of the signal sequence is determined specifically according to the updated correction deviation.
[0130] More specifically, the frequency of the signal sequence is determined according to the first frequency calculation formula; the first frequency calculation formula is expressed as: f m =(k x +δ)Δf-a·Δf-b·Δf, Δf=f s / N, where f m Used to represent the frequency of the signal sequence, k x It is used to indicate the index of the frequency point corresponding to the updated maximum spectrum line, δ is used to indicate the updated correction deviation, Δf is used to indicate the frequency resolution of the discrete Fourier transform with a length of N, and f s It is used to represent the sampling frequency, N is used to represent the number of discrete Fourier transform points, a·Δf is used to represent the first preset frequency shift amount, and b·Δf is used to represent the second preset frequency shift amount.
[0131] It should be understood that the value of a is specifically determined by the first preset frequency shift amount, the value of b is specifically determined by the second preset frequency shift amount, and the positive or negative value of b is specifically related to the preset frequency shift direction of the second frequency shift operation. When the preset frequency shift direction is from the updated maximum spectrum line to the updated second largest spectrum line to its right, b is specifically a positive value, otherwise it is a negative value.
[0132] It can be understood that when the electronic device needs to determine the frequency of the signal sequence based on the updated correction deviation, it means that two frequency shift operations have been performed on the original signal sequence. Therefore, in this embodiment, the electronic device determines the frequency of the signal sequence based on the updated correction deviation, the updated maximum spectrum line, the first preset frequency shift amount and the second preset frequency shift amount.
[0133] In the above process, the first and second preset frequency shift amounts are included in the frequency calculation, which can reflect the impact of the previous frequency shift operation, avoid missing the frequency changes caused by the frequency shift, and continuously correct the frequency estimate, thereby reducing the cumulative error. On this basis, a first frequency calculation formula is constructed in advance. After the electronic device determines the values of each component, it can directly input the values of each component into the first frequency calculation formula to quickly obtain the corresponding result, effectively ensuring computational efficiency.
[0134] Step b4: When the updated correction deviation is smaller than the correction deviation, the frequency of the signal sequence is determined according to the correction deviation, the target signal sequence, and the first preset frequency shift amount.
[0135] Specifically, when the updated correction deviation is less than the correction deviation, the frequency of the signal sequence is determined according to the second frequency calculation formula; the second frequency calculation formula is expressed as: f m =(k y +δ)Δf-a·Δf, where f m Used to represent the frequency of the signal sequence, k y It is used to indicate the index of the frequency point corresponding to the maximum spectrum line of the target, δ is used to indicate the correction deviation, Δf is used to indicate the frequency resolution of the discrete Fourier transform with a length of N, and f s is used to represent the sampling frequency, N is used to represent the number of discrete Fourier transform points, and a·Δf is used to represent the first preset frequency shift amount.
[0136] It can be understood that when the updated correction deviation is less than the correction deviation, it means that the final true frequency can be closer to the center area between the two frequency points based on the correction deviation. Therefore, in this embodiment, when the updated correction deviation is less than the correction deviation, the electronic device directly determines the frequency of the signal sequence based on the correction deviation, the target maximum spectrum line, and the first preset frequency shift.
[0137] It should be understood that the process illustrated in this embodiment represents only a single frequency estimation process. In practical applications, multiple estimations of the same signal sequence are required before the final frequency is determined. Therefore, the above configuration can, on the one hand, minimize the frequency error of this estimation, thereby improving the accuracy of the final frequency estimate. Furthermore, this embodiment eliminates the need for further frequency shifting of the updated signal sequence and repeated calculations, thereby effectively conserving computing resources and ensuring computational efficiency.
[0138] In the method provided in this embodiment, after obtaining the target spectrum representation, the electronic device first determines the first and second target second-largest spectral lines on either side of the target maximum spectral line based on the target spectrum representation. Then, based on the first and second target second-largest spectral lines, a correction direction is determined. Finally, the frequency of the signal sequence is estimated based on the correction direction.
[0139] The method of this embodiment can mine more detailed information in the target spectrum representation and estimate the frequency of the signal sequence based on this detailed information. Compared with simply relying on the maximum spectral line in the initial spectrum representation, a frequency closer to the true value can be obtained.
[0140] As another possible scenario in this embodiment, when the corrected deviation is not less than the preset deviation threshold, the electronic device directly determines the frequency of the signal sequence based on the corrected deviation. Specifically, the electronic device calculates the frequency of the signal sequence based on the second frequency calculation formula described above, with the difference being that δ specifically represents the corrected deviation. The remaining components are the same and are not further described here.
[0141] It is understandable that for another possible situation in the first method embodiment, that is, when the difference in the amplitude of the first large spectral line and the second large spectral line is not less than the preset threshold, the electronic device will determine the frequency of the signal sequence based on the current spectrum representation. Specifically, the electronic device estimates the frequency by executing step S403 in the aforementioned embodiment. It should be understood that the difference from the aforementioned embodiment in which the frequency of the signal sequence is determined based on the target spectrum representation is that the correction direction in this case is determined based on the first large spectral line and the second large spectral line, and since no frequency shift operation is performed when determining the correction direction, the value of a is zero. The remaining processes can be specifically referred to in the aforementioned embodiment and will not be repeated here.
[0142] As an example, Figure 5 This is a flowchart of a frequency estimation method provided in an embodiment of the present application. Figure 5 As shown, assuming that the signal sequence of the signal to be estimated is x(n), when performing frequency estimation on it using the method of the present application, the following process may be specifically included:
[0143] First, obtain the signal sequence x(n) and use the Fast Fourier Transform to calculate the corresponding spectrum representation X(k). Then traverse X(k) to obtain the maximum spectrum line, the first large spectrum line, and the second large spectrum line. The index of the frequency point corresponding to the maximum spectrum line is recorded as k0, the index of the frequency point corresponding to the first large spectrum line is k0-1, and the index of the frequency point corresponding to the second large spectrum line is k0+1.
[0144] Furthermore, it is determined whether the ratio of the second large spectrum line |X(k0+1)| to the first large spectrum line |X(k0-1)| falls within the preset range. If so, the correction deviation of the first Rife interpolation is directly calculated according to the target formula. If not, the signal sequence is frequency-shifted to the right by 0.5Δf, the first and second major spectral lines are re-determined, and the correction deviation of the first Rife interpolation is calculated. Specifically, according to the target formula calculation in the aforementioned embodiment, X(k1) in the target formula should be specifically substituted with X(k0+1) or X(k0-1), which will not be repeated here.
[0145] After obtaining the corrected deviation from the first Rife interpolation, a determination is made as to whether the corrected deviation is less than a preset deviation threshold. If so, the signal sequence is frequency shifted again, specifically by 0.35Δf in the preset frequency shift direction. Rife interpolation is then performed again to obtain a new corrected deviation. The absolute values of the new corrected deviation and the first corrected deviation are compared, and the larger one is used as the final corrected deviation. Finally, the frequency is calculated based on the final corrected deviation.
[0146] If the first correction deviation is not less than the preset deviation threshold, the correction deviation is directly used as the final correction deviation, and the frequency is calculated based on the final correction deviation.
[0147] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.
[0148] It should be further noted that, although the various steps in the flowchart are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps may be performed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times. The execution order of these sub-steps or stages is not necessarily to be performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0149] The above embodiments introduce a frequency estimation method from the perspective of method flow. The following embodiments introduce a frequency estimation device from the perspective of a virtual module or a virtual unit. Please refer to the following embodiments for details.
[0150] The embodiment of the present application further provides a frequency estimation device for implementing the method in the above method embodiment. Figure 6 A schematic diagram of the structure of a frequency estimation device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, in this embodiment, the frequency estimation device may include:
[0151] A frequency shift module 61 is configured to perform a frequency shift on a signal sequence to be estimated when the difference in amplitude between the first and second major spectral lines is less than a preset threshold, thereby obtaining a target signal sequence after frequency shifting. The first and second major spectral lines are located on either side of the maximum spectral line, respectively, and are determined based on the spectrum representation corresponding to the signal sequence.
[0152] The determination module 62 is configured to determine the frequency of the signal sequence according to the target frequency spectrum representation corresponding to the target signal sequence.
[0153] In a possible implementation of the embodiment of the present application, the frequency shift module 61 is specifically configured to:
[0154] A frequency shift operation is performed on the signal sequence according to a first preset frequency shift amount to obtain a frequency-shifted target signal sequence; the first preset frequency shift amount is related to the frequency resolution corresponding to the spectrum representation.
[0155] In a possible implementation of the embodiment of the present application, the first preset frequency shift amount is any value within the range of 0.3Δf-0.5Δf, where Δf is the frequency resolution.
[0156] In a possible implementation of the embodiment of the present application, the determination module 62 is specifically configured to:
[0157] Determine, according to the target spectrum representation corresponding to the target signal sequence, a first target second largest spectrum line and a second target second largest spectrum line located on both sides of the target maximum spectrum line;
[0158] A correction direction is determined according to the first target second largest spectral line and the second target second largest spectral line, and the frequency of the signal sequence is estimated according to the correction direction.
[0159] In a possible implementation of the embodiment of the present application, the determination module 62 is specifically configured to:
[0160] When the modulus of the amplitude corresponding to the first target second largest spectral line is greater than the modulus of the amplitude corresponding to the second target second largest spectral line, a correction direction is determined to indicate correction from the target maximum spectral line to the first target second largest spectral line.
[0161] In a possible implementation of the embodiment of the present application, the determination module 62 is specifically configured to:
[0162] When the correction direction is used to indicate correction from the target maximum spectral line to any target second largest spectral line, the frequency of the signal sequence is determined according to the amplitude corresponding to any target second largest spectral line and the amplitude corresponding to the target maximum spectral line.
[0163] In a possible implementation of the embodiment of the present application, the determination module 62 is specifically configured to:
[0164] Calculate the interpolation correction deviation based on the amplitude corresponding to any target second largest spectral line and the amplitude corresponding to the target largest spectral line;
[0165] The frequency of the signal sequence is determined based on the corrected deviation.
[0166] In a possible implementation of the embodiment of the present application, the determination module 62 is specifically configured to:
[0167] The corrected deviation is calculated according to the target formula; the target formula is expressed as: Among them, |X(k1)| is used to represent the modulus of the amplitude corresponding to any target second-largest spectrum line, |X(k0)| is used to represent the modulus of the amplitude corresponding to the target maximum spectrum line, k1 is used to represent the index of the frequency point corresponding to any target second-largest spectrum line, k0 is used to represent the index of the frequency point corresponding to the target maximum spectrum line, and n is related to the correction direction.
[0168] In a possible implementation of the embodiment of the present application, the determination module 62 is specifically configured to:
[0169] When the corrected deviation is less than a preset deviation threshold, a frequency shift operation is performed on the target signal sequence to obtain an updated signal sequence;
[0170] The frequency of the signal sequence is determined according to the updated frequency spectrum representation corresponding to the updated signal sequence.
[0171] In a possible implementation of the embodiment of the present application, the determination module 62 is specifically configured to:
[0172] The target signal sequence is subjected to a frequency shift operation according to a second preset frequency shift amount; the second preset frequency shift amount is any value within the range of 0-0.5Δf, where Δf is the frequency resolution.
[0173] In a possible implementation of the embodiment of the present application, the preset deviation threshold is any value within the range of 0.2-0.4.
[0174] In a possible implementation of the embodiment of the present application, the determination module 62 is specifically configured to:
[0175] A frequency shift operation is performed on the target signal sequence according to a preset frequency shift direction, where the preset frequency shift direction is consistent with the correction direction.
[0176] In a possible implementation of the embodiment of the present application, the determination module 62 is specifically configured to:
[0177] Determine an updated maximum spectrum line and a first updated second largest spectrum line and a second updated second largest spectrum line located on both sides of the updated maximum spectrum line according to the updated spectrum representation;
[0178] Calculate the updated correction deviation according to the updated maximum spectrum line, the first updated second largest spectrum line, and the second updated second largest spectrum line;
[0179] When the updated correction deviation is not less than the correction deviation, the frequency of the signal sequence is determined according to the updated correction deviation.
[0180] In a possible implementation of the embodiment of the present application, the determination module 62 is specifically configured to:
[0181] The frequency of the signal sequence is determined according to the updated correction deviation, the updated signal sequence, the first preset frequency shift amount and the second preset frequency shift amount.
[0182] In a possible implementation of the embodiment of the present application, the determination module 62 is specifically configured to:
[0183] The frequency of the signal sequence is determined according to the first frequency calculation formula; the first frequency calculation formula is expressed as: f m =(k x +δ)Δf-a·Δf-b·Δf, Δf=f s / N, where f m Used to represent the frequency of the signal sequence, k x It is used to indicate the index of the frequency point corresponding to the updated maximum spectrum line, δ is used to indicate the updated correction deviation, Δf is used to indicate the frequency resolution of the discrete Fourier transform with a length of N, and f s It is used to represent the sampling frequency, N is used to represent the number of discrete Fourier transform points, a·Δf is used to represent the first preset frequency shift amount, and b·Δf is used to represent the second preset frequency shift amount.
[0184] In a possible implementation of the embodiment of the present application, the determining module 62 is further configured to:
[0185] When the updated correction deviation is smaller than the correction deviation, the frequency of the signal sequence is determined according to the correction deviation, the target signal sequence, and the first preset frequency shift amount.
[0186] In a possible implementation of the embodiment of the present application, the determining module 62 is further configured to:
[0187] When the updated correction deviation is less than the correction deviation, the frequency of the signal sequence is determined according to the second frequency calculation formula; the second frequency calculation formula is expressed as: f m =(k y +δ)Δf-a·Δf, where f m Used to represent the frequency of the signal sequence, k y It is used to indicate the index of the frequency point corresponding to the maximum spectrum line of the target, δ is used to indicate the correction deviation, Δf is used to indicate the frequency resolution of the discrete Fourier transform with a length of N, and f sis used to represent the sampling frequency, N is used to represent the number of discrete Fourier transform points, and a·Δf is used to represent the first preset frequency shift amount.
[0188] It should be understood that the above-described device embodiments are merely illustrative, and the device of the present application may also be implemented in other ways. For example, the division of units / modules in the above-described embodiments is merely a logical functional division, and actual implementations may employ other division methods. For example, multiple units, modules, or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0189] An electronic device is provided in an embodiment of the present application. Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, Figure 7 The electronic device shown includes: a processor 71 and a memory 72. The processor 71 and the memory 72 are connected, for example, via a bus 73. Optionally, the electronic device may further include a transceiver 74. It should be noted that in actual applications, the number of transceivers 74 is not limited to one, and the structure of the electronic device does not constitute a limitation on the embodiments of the present application.
[0190] The processor 71 can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor 71 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0191] The bus 73 may include a path for transmitting information between the above components. The bus 73 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus 73 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0192] The memory 72 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.
[0193] The memory 72 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 71. The processor 71 is used to execute the application code stored in the memory 72 to implement the content shown in the above method embodiment.
[0194] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores program instructions, and the program instructions are used to implement the service message processing methods in the above-mentioned embodiments.
[0195] A computer program product is also provided in an embodiment of the present application, including a computer program. When the computer program is executed by a processor, the technical solution of the above-mentioned method embodiment is implemented. Its implementation principle and technical effect are similar and will not be repeated here.
[0196] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a particular embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined in any way. To keep the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0197] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0198] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A frequency estimation method, characterized in that: The method comprises: For a signal sequence to be estimated, when the difference in amplitude between the first large spectral line and the second large spectral line is less than a preset threshold, a frequency shift operation is performed on the signal sequence to obtain a target signal sequence after frequency shift; the first large spectral line and the second large spectral line are respectively located on either side of the maximum spectral line and are determined based on the frequency spectrum representation corresponding to the signal sequence; The frequency of the signal sequence is determined according to a target frequency spectrum representation corresponding to the target signal sequence.
2. The method according to claim 1, characterized in that The performing a frequency shift operation on the signal sequence to obtain a frequency-shifted target signal sequence includes: A frequency shift operation is performed on the signal sequence according to a first preset frequency shift amount to obtain a frequency-shifted target signal sequence; the first preset frequency shift amount is related to a frequency resolution corresponding to the frequency spectrum representation.
3. The method according to claim 2, characterized in that The first preset frequency shift amount is any value in the range of [0.3Δf, 0.5Δf], where Δf is the frequency resolution.
4. The method according to any one of claims 1 to 3, characterized in that The determining the frequency of the signal sequence according to the target frequency spectrum representation corresponding to the target signal sequence includes: Determine, according to the target spectrum representation corresponding to the target signal sequence, a first target second largest spectrum line and a second target second largest spectrum line located on both sides of the target maximum spectrum line; A correction direction is determined according to the first target second largest spectral line and the second target second largest spectral line, and the frequency of the signal sequence is estimated according to the correction direction.
5. The method according to claim 4, characterized in that The determining of the correction direction according to the first target second largest spectral line and the second target second largest spectral line includes: When the modulus of the amplitude corresponding to the first target second largest spectral line is greater than the modulus of the amplitude corresponding to the second target second largest spectral line, the correction direction is determined to indicate correction from the target maximum spectral line to the first target second largest spectral line.
6. The method according to claim 4, characterized in that The estimating the frequency of the signal sequence according to the correction direction includes: When the correction direction is used to indicate correction from the target maximum spectral line to any target second largest spectral line, the frequency of the signal sequence is determined according to the amplitude corresponding to any target second largest spectral line and the amplitude corresponding to the target maximum spectral line.
7. The method according to claim 6, characterized in that The determining the frequency of the signal sequence according to the amplitude corresponding to any target second largest spectral line and the amplitude corresponding to the target largest spectral line includes: Calculating a correction deviation of the interpolation according to the amplitude corresponding to any target second largest spectral line and the amplitude corresponding to the target largest spectral line; The frequency of the signal sequence is determined based on the corrected deviation.
8. The method according to claim 7, characterized in that Calculating the interpolation correction deviation according to the amplitude corresponding to any target second largest spectral line and the amplitude corresponding to the target largest spectral line includes: The correction deviation is calculated according to the target formula; the target formula is expressed as: Among them, |X(k1)| is used to represent the modulus of the amplitude corresponding to any target second largest spectrum line, |X(k0)| is used to represent the modulus of the amplitude corresponding to the target maximum spectrum line, k1 is used to represent the index of the frequency point corresponding to any target second largest spectrum line, k0 is used to represent the index of the frequency point corresponding to the target maximum spectrum line, and n is related to the correction direction.
9. The method according to claim 7, characterized in that The determining the frequency of the signal sequence according to the corrected deviation includes: When the corrected deviation is less than a preset deviation threshold, performing a frequency shift operation on the target signal sequence to obtain an updated signal sequence; The frequency of the signal sequence is determined according to the updated frequency spectrum representation corresponding to the updated signal sequence.
10. The method according to claim 9, characterized in that The performing a frequency shift operation on the target signal sequence to obtain an updated signal sequence includes: The target signal sequence is subjected to a frequency shift operation according to a second preset frequency shift amount; the second preset frequency shift amount is any value within a range of 0-0.5Δf, where Δf is the frequency resolution.
11. The method according to claim 9, characterized in that The preset deviation threshold is any value within the range of 0.2Δf-0.4Δf.
12. The method according to claim 9, characterized in that The performing a frequency shift operation on the target signal sequence to obtain an updated signal sequence includes: A frequency shift operation is performed on the target signal sequence according to a preset frequency shift direction, where the preset frequency shift direction is consistent with the correction direction.
13. The method according to claim 9, characterized in that The determining the frequency of the signal sequence according to the updated frequency spectrum representation corresponding to the updated signal sequence includes: Determine an updated maximum spectrum line and a first updated second largest spectrum line and a second updated second largest spectrum line located on both sides of the updated maximum spectrum line according to the updated spectrum representation; Calculating an updated correction deviation according to the updated maximum spectrum line, the first updated second largest spectrum line, and the second updated second largest spectrum line; When the updated correction deviation is not less than the correction deviation, the frequency of the signal sequence is determined according to the updated correction deviation.
14. The method according to claim 13, characterized in that Determining the frequency of the signal sequence according to the updated corrected deviation includes: The frequency of the signal sequence is determined according to the updated correction deviation, the updated signal sequence, a first preset frequency shift amount, and a second preset frequency shift amount.
15. The method according to claim 13, characterized in that Determining the frequency of the signal sequence according to the updated corrected deviation includes: The frequency of the signal sequence is determined according to a first frequency calculation formula; the first frequency calculation formula is expressed as: m =(k x +δ)Δf-a·Δf-b·Δf, Δf=f s / N, where f m Used to represent the frequency of the signal sequence, k x It is used to indicate the index of the frequency point corresponding to the updated maximum spectrum line, δ is used to indicate the updated correction deviation, Δf is used to indicate the frequency resolution of the discrete Fourier transform with a length of N, and f s It is used to represent the sampling frequency, N is used to represent the number of discrete Fourier transform points, a·Δf is used to represent the first preset frequency shift amount, and b·Δf is used to represent the second preset frequency shift amount.
16. The method according to claim 13, characterized in that The method further comprises: When the updated correction deviation is smaller than the correction deviation, the frequency of the signal sequence is determined according to the correction deviation, the target signal sequence, and a first preset frequency shift.
17. The method according to claim 13, wherein The method further comprises: When the updated correction deviation is less than the correction deviation, the frequency of the signal sequence is determined according to a second frequency calculation formula; the second frequency calculation formula is expressed as: f m =(k y +δ)Δf-a·Δf, where f m Used to represent the frequency of the signal sequence, k y It is used to indicate the index of the frequency point corresponding to the target maximum spectrum line, δ is used to indicate the correction deviation, Δf is used to indicate the frequency resolution of the discrete Fourier transform with a length of N, and f s is used to represent the sampling frequency, N is used to represent the number of discrete Fourier transform points, and a·Δf is used to represent the first preset frequency shift amount.
18. A frequency estimation device, characterized in that: The device comprises: a frequency shift module configured to perform a frequency shift on a signal sequence to be estimated when the difference in amplitude between the first large spectral line and the second large spectral line is less than a preset threshold, thereby obtaining a target signal sequence after frequency shift; wherein the first large spectral line and the second large spectral line are located on either side of the maximum spectral line, respectively, and are determined based on a spectral representation corresponding to the signal sequence; The determination module is configured to determine the frequency of the signal sequence according to a target frequency spectrum representation corresponding to the target signal sequence.
19. An electronic device, characterized in that: The electronic device includes a processor and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 17.
20. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 17 when executed by a processor.
21. A computer program product, characterized in that The method comprises a computer program, which implements the method according to any one of claims 1 to 17 when the computer program is executed by a processor.
Citation Information
Cited By
Radar ranging method and device and radar level meter
CN121559534A