Signal processing method, device, electronic device and medium
By using a combination of amplitude spectrum and phase spectrum in signal frequency estimation, the problem of low frequency estimation accuracy in the prior art is solved, and higher frequency estimation accuracy and lower errors are achieved.
Patent Information
- Application Number
- CN202210377038.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-11
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-04-11
AI Technical Summary
The existing signal frequency estimation method has low frequency estimation accuracy and large errors due to the grid effect of discrete Fourier transform.
The first frequency estimation graph is determined based on the amplitude spectrum of the M-frame signal, and combined with the phase spectrum, the estimated frequency of the signal is determined. This method is not limited to integer frequency points, and improves the accuracy of frequency estimation.
The accuracy of signal frequency estimation is improved, the error of frequency estimation is reduced, and the estimation of signal frequency is more accurate.
Smart Images

Figure CN114757229B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a signal processing method, device, electronic equipment and medium. Background Art
[0002] With the development of communication technology, various signals are widely used in people's production and life, and estimating signal frequency is one of the key tasks in the fields of voice communication, radar ranging, industrial detection, medical imaging, etc.
[0003] At present, the commonly used method for estimating the signal frequency is: perform Fourier transform on the signal to obtain the amplitude spectrum of the signal, and use the frequency point corresponding to the maximum amplitude in the amplitude spectrum as the frequency estimation value of the signal.
[0004] However, since discrete Fourier transform will produce grid effect problems, the above method can only use integer frequency points in the amplitude spectrum as estimated signal frequency, resulting in low accuracy of estimated signal frequency, that is, the error of the frequency estimation method is large. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a signal processing method, device, electronic device and medium, which can solve the problem of large errors in frequency estimation methods.
[0006] In a first aspect, an embodiment of the present application provides a signal processing method, the method comprising: determining a first frequency estimation graph of the M frame signal based on an amplitude spectrum graph of the M frame signal, the amplitude of a frequency point in the first frequency estimation graph being greater than or equal to an amplitude threshold value, and M being a positive integer; determining an estimated frequency of the M frame signal based on the first frequency estimation graph and a phase spectrum graph of the M frame signal, the estimated frequency being the frequency corresponding to the first frequency point in the first frequency estimation graph.
[0007] In a second aspect, an embodiment of the present application provides a signal processing device, the signal processing device comprising: a determination module. The determination module is used to determine a first frequency estimation graph of the M frame signal based on an amplitude spectrum graph of the M frame signal, wherein the amplitude of the frequency point in the first frequency estimation graph is greater than or equal to the amplitude threshold value, and M is a positive integer. The determination module is also used to determine an estimated frequency of the M frame signal based on the first frequency estimation graph and the phase spectrum graph of the M frame signal, wherein the estimated frequency is a frequency corresponding to the first frequency point in the first frequency estimation graph.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0012] In an embodiment of the present application, a first frequency estimation graph of the M-frame signal is determined based on an amplitude spectrum graph of the M-frame signal, the amplitude of the frequency point in the first frequency estimation graph is greater than or equal to the amplitude threshold value, and M is a positive integer; an estimated frequency of the M-frame signal is determined based on the first frequency estimation graph and the phase spectrum graph of the M-frame signal, and the estimated frequency is the frequency corresponding to the first frequency point in the first frequency estimation graph. Through this scheme, since the first frequency estimation graph of the signal can be determined based on the amplitude spectrum graph of the signal, and the estimated frequency of the signal can be determined based on the first frequency estimation graph and the phase spectrum graph of the signal, it is not limited to using the integer frequency points in the amplitude spectrum graph as the estimated frequency of the signal, but rather the estimated frequency of the signal is obtained by processing the amplitude spectrum graph and the phase spectrum graph, thereby improving the accuracy of frequency estimation and reducing the error of frequency estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A schematic diagram of a signal processing method provided in an embodiment of the present application;
[0014] Figure 2 One of the schematic diagrams of a process for processing a phase spectrum provided in an embodiment of the present application;
[0015] Figure 3 A second schematic diagram of a process for processing a phase spectrum provided in an embodiment of the present application;
[0016] Figure 4 A third schematic diagram of a process of processing a phase spectrum provided in an embodiment of the present application;
[0017] Figure 5 A fourth schematic diagram of a process of processing a phase spectrum provided in an embodiment of the present application;
[0018] Figure 6 A fifth schematic diagram of a process of processing a phase spectrum provided in an embodiment of the present application;
[0019] Figure 7 A schematic diagram of error estimation of time-frequency distribution provided in an embodiment of the present application;
[0020] Figure 8 A schematic diagram of the structure of a signal processing device provided in an embodiment of the present application;
[0021] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0022] Fig.10 A hardware schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0024] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0025] The signal processing method, device, electronic device and medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0026] like Figure 1 As shown, the signal processing method provided in the embodiment of the present application may include the following S101 and S102.
[0027] S101. A signal processing apparatus determines a first frequency estimation graph of the M frame signals according to an amplitude spectrum graph of the M frame signals.
[0028] The amplitude of the frequency point in the first frequency estimation graph is greater than or equal to the amplitude threshold, and M is a positive integer.
[0029] Optionally, the signal processing method provided in the embodiment of the present application can be applied not only to a medium-low signal-to-noise ratio environment below -15 decibels (dB), but also to a medium-high signal-to-noise ratio environment.
[0030] Optionally, in the embodiment of the present application, the M frame signals are non-dense frequency signals. For example, the M frame signals are voice signals.
[0031] Optionally, when M=1, that is, one frame signal, the phase spectrum diagram includes one phase-frequency curve; when M is greater than 1, that is, multiple frames of signal, the phase spectrum diagram includes multiple phase-frequency curves.
[0032] Optionally, before the above S101, the signal processing method provided in the embodiment of the present application may further include: the signal processing device performs Fourier transform on the time domain graph of the M frame signal to obtain an amplitude spectrum graph. In this way, the first frequency estimation graph of the M frame signal can be determined according to the amplitude spectrum graph.
[0033] Furthermore, the average amplitude and the maximum amplitude may be determined first according to the amplitude spectrum; and then, the amplitude threshold may be obtained according to the average amplitude and the maximum amplitude.
[0034] Optionally, the first frequency estimation graph is a set of at least one frequency point, and the amplitude of each frequency point in the at least one frequency point is greater than or equal to an amplitude threshold value.
[0035] S102: The signal processing apparatus determines the estimated frequency of the M frame signals according to the first frequency estimation graph and the phase spectrum graph of the M frame signals.
[0036] The estimated frequency is the frequency corresponding to the first frequency point in the first frequency estimation graph.
[0037] Optionally, the above phase spectrum diagram is a phase diagram of M frame signals in the frequency domain.
[0038] Specifically, the above phase spectrum can be a phase spectrum obtained by Fourier transforming the time domain diagram of the M frame signal, or a phase spectrum obtained after further processing the phase spectrum obtained after Fourier transforming. It is determined according to the actual situation, and the embodiment of the present application does not limit this.
[0039] Optionally, the first frequency point is any frequency point in the first frequency estimation graph. Since the first frequency estimation graph is a set of at least one frequency point, the amplitude of each frequency point in the at least one frequency point is greater than or equal to the amplitude threshold value. It can be understood that at this time, the estimated frequency is the first frequency point, so the frequency point in the first frequency estimation graph is used as a frequency candidate value of the estimated frequency of the M frame signal.
[0040] It should be noted that the estimated frequency of the M frame signal in the embodiment of the present application is an estimate of the frequency at the location with the strongest energy of the M frame signal.
[0041] Optionally, the phase spectrum diagram includes a first phase spectrum diagram; and the S102 may specifically include S102A and S102B.
[0042] S102A: The signal processing device performs reliability screening on the first phase spectrum diagram according to the first frequency estimation diagram to obtain a second frequency estimation diagram.
[0043] Exemplarily, an all-zero vector of length lenAmp is generated, denoted as iBinByJump (i.e., the second frequency estimation diagram), where lenAmp is equal to (lenFft / 2+1). First, traverse each frequency point (denoted as iBig) in the first frequency estimation diagram (denoted as iBingAmp), and perform the following operations: Calculate the difference between the first phase spectrum diagram (denoted as thetaJump) (iBig) divided by 2π and lenHop*(iBig-1) / lenFft, denoted as temp1, where lenHop represents the number of frame shift points, and lenFft represents the number of Fourier transform points; then take the remainder of temp1 with respect to 2π, and then multiply it by lenFft / lenHop to obtain temp2; then, add temp2 to iBig-1 to obtain iBinByJump(iBig). If iBig is the last frequency point in iBingAmp, the traversal ends.
[0044] For example, take M=3 as an example. Figure 2 As shown, Figure 2 There are 3 sub-graphs (a) to (c). Figure 2 (a) in the figure is the amplitude spectrum of three adjacent frames. Figure 2 (b) is the first phase spectrum of the three adjacent frames. Figure 2 (c) in FIG. 1 is a second frequency estimation diagram obtained by performing reliability screening on the first phase spectrum diagram according to the first frequency estimation diagram.
[0045] Further, based on the above Figure 2 Taking the example for analysis, in the area of the second frequency estimation graph corresponding to the sub-band area with stronger amplitude in the amplitude spectrum graph, the frequencies of the three frames of signals all converge around the frequency point of 100.
[0046] S102B: The signal processing apparatus determines the estimated frequency of the M frames of signal according to the second frequency estimation graph.
[0047] The estimated frequency is the frequency corresponding to the first frequency point in the second frequency estimation graph.
[0048] Optionally, the second frequency estimation graph includes multiple frequency points, each frequency point corresponds to a frequency in the second frequency estimation graph, that is, multiple estimated frequencies are obtained. Further, since the first frequency point is any frequency point among the multiple frequency points, the estimated frequency of the M frame signal is any frequency among the multiple estimated frequencies, that is, the multiple estimated frequencies are frequency candidate values of the estimated frequency of the M frame signal.
[0049] In an embodiment of the present application, the first phase spectrum graph can be subjected to reliability screening and a target frequency point set based on the first frequency estimation graph to obtain a second frequency estimation graph. Since the first frequency estimation graph can perform high-reliability screening on the first phase spectrum graph based on amplitude, a large number of interfering frequency estimation candidate values can be eliminated from the first phase spectrum graph, and the true frequency candidate values can be better protected from being omitted when the signal-to-noise ratio is low.
[0050] The embodiment of the present application provides a signal processing method. Since the first frequency estimation diagram of the signal can be determined according to the amplitude spectrum diagram of the signal, and the estimated frequency of the signal can be determined according to the first frequency estimation diagram and the phase spectrum diagram of the signal, the estimated frequency of the signal is not limited to the integer frequency points in the amplitude spectrum diagram as the estimated frequency of the signal, but the estimated frequency of the signal is obtained by processing the amplitude spectrum diagram and the phase spectrum diagram, thereby improving the accuracy of frequency estimation and reducing the error of frequency estimation. Optionally, before the above S102A, the signal processing method provided by the embodiment of the present application can also include the following S103 and S104.
[0051] S103: The signal processing device obtains a second phase spectrum of M frames of signals.
[0052] Optionally, the above S103 can be specifically implemented through the following S103A.
[0053] S103A: The signal processing device performs phase compensation on the third phase spectrum according to the phase compensation function to obtain a second phase spectrum.
[0054] The third phase spectrum is obtained by Fourier transforming the M-frame signal. The phase compensation function is determined according to the slope of the window function.
[0055] Optionally, the phase value of the third phase spectrum diagram changes according to the change of frequency.
[0056] Optionally, the above window function may be set by a developer or customized by a user. For example, the window function is a Hanning window.
[0057] Specifically, since the window function is a multi-segment continuous curve, its slope can be extracted to form a straight line with equal slope, that is, the straight line with equal slope is the phase compensation function.
[0058] For example, take M=3 as an example. Figure 3 As shown, Figure 3 There are three sub-graphs (a) to (c). Figure 3 (a) in the figure is the amplitude spectrum of three adjacent frames. Figure 3 (b) is the phase spectrum obtained by Fourier transforming the three adjacent frames, i.e., the third phase spectrum. Figure 3 (c) in FIG. 1 is a phase curve of the three adjacent frames after the phase compensation function is used to perform phase compensation on the third phase spectrum, that is, the second phase spectrum.
[0059] Furthermore, based on the analysis of the above examples, the area in the second phase spectrum corresponding to the sub-band area with stronger amplitude in the amplitude spectrum shows a good flatness feature, which shows that the phase compensation function has a good feature extraction effect.
[0060] Exemplarily, the difference between the third phase spectrum and the phase compensation function is calculated to obtain a phase after the initial phase with wraparound is compensated once; then the phase is divided by 2π to obtain the remainder to obtain another phase after the remainder, that is, the second phase spectrum.
[0061] In the embodiment of the present application, after the phase compensation function is used to perform phase compensation processing on the third phase spectrum to obtain the second phase spectrum, since the area corresponding to the sub-band area with a strong amplitude in the amplitude spectrum in the second phase spectrum shows a good flatness feature, the first phase compensation function can be used to extract the phase feature of the third phase spectrum. In this way, the warped phase spectrum can be unwound to achieve a flattening effect of the phase-frequency curve.
[0062] S104: The signal processing device performs inter-frame phase difference compensation on the second phase spectrum to obtain a first phase spectrum.
[0063] Specifically, the above S104 specifically includes: obtaining the difference between the phase values of any two adjacent frame signals in the M frame signals; and then dividing the difference by 2π to obtain the remainder.
[0064] For example, take M=3 as an example. Figure 3 ,like Figure 4 As shown, Figure 4 There are three sub-graphs (a) to (c). Figure 4 (a) in the figure is the amplitude spectrum of three adjacent frames. Figure 4 (c) in the second phase spectrum (i.e. Figure 3 Based on (c) in FIG. 1 , inter-frame phase difference compensation is performed to obtain the first phase spectrum.
[0065] Furthermore, based on the analysis of the above examples, the area in the first phase spectrum corresponding to the sub-band area with stronger amplitude in the amplitude spectrum shows good inter-frame consistency, indicating that the inter-frame phase difference compensation has a good feature extraction effect.
[0066] In the embodiment of the present application, after the third phase spectrum is phase compensated according to the target compensation function, the second phase spectrum is compensated for the inter-frame phase difference to obtain the first phase spectrum. Since the area corresponding to the sub-band area with a strong amplitude in the amplitude spectrum in the first phase spectrum shows good inter-frame consistency, that is, inter-frame phase difference compensation, it has a good feature extraction effect. In this way, further feature extraction can be performed on the phase spectrum.
[0067] Optionally, the above S102B can be specifically implemented through the following S102B1 and S102B2.
[0068] S102B1. The signal processing device performs frequency consistency screening on the second frequency estimation graph to obtain a third frequency estimation graph.
[0069] Optionally, the frequency consistency screening of the second frequency estimation graph in S102B1 specifically refers to: screening out some frequency points from the second frequency estimation graph, at which the M frame signals simultaneously have corresponding frequencies.
[0070] S102B2. The signal processing apparatus determines the estimated frequency of the M frame signals according to the third frequency estimation graph.
[0071] The estimated frequency is the frequency corresponding to the first frequency point in the third frequency estimation graph.
[0072] Optionally, the third frequency estimation graph includes multiple frequency points, and the first frequency point is a frequency point among the multiple frequency points. Since each frequency point among the multiple frequency points corresponds to a frequency in the second frequency estimation graph,
[0073] According to the second frequency estimation graph, multiple estimated frequencies can be obtained, so that the estimated frequency of the M frame signal is any one of the multiple estimated frequencies, that is, the multiple estimated frequencies are frequency candidate values of the estimated frequency of the M frame signal.
[0074] It should be noted that, since the third frequency estimation graph includes fewer frequency points than the second frequency estimation graph, the third frequency estimation graph includes fewer frequency candidate values, and thus the third frequency estimation graph includes fewer erroneous frequency candidate values. In this way, a relatively accurate estimated frequency can be obtained from the third frequency estimation graph.
[0075] For example, take M=3 as an example. Figure 2 ,like Figure 5 As shown, Figure 5There are three sub-graphs (a) to (c). Figure 5 (a) in the figure is the amplitude spectrum of three adjacent frames. Figure 5 (b) is the second frequency estimation diagram of the adjacent three frames (i.e. Figure 2 (c) in the above, Figure 5 (c) in FIG. 1 is a third frequency estimation graph of three adjacent frames obtained by performing frequency consistency screening on the second frequency estimation graph.
[0076] Further, based on the analysis of the above example, compared with the second frequency estimation graph, the frequencies in the third frequency estimation graph are more concentrated, that is, the third frequency estimation graph includes fewer erroneous frequency candidate values.
[0077] Exemplary, combined with the example content in the above embodiment. Traverse any integer frequency point greater than 0 and less than lenAmp+1 in the second frequency estimation diagram, and do the following operations: first read the matrix of the penultimate (width4JumpSmth+1) frame to the current frame signal, extract the iBinth row in the matrix, and obtain the vector temp3 of length width4JumpSmth; then, calculate the minimum value (denoted as temp4) and standard deviation (denoted as temp5) of temp3, and obtain and respectively; then, if temp4 is equal to 0 or temp5 is greater than 2, the frequency value corresponding to iBin is set to zero. In this way, the second frequency estimation diagram (denoted as iBinByJumpSmth(iBin)) is obtained.
[0078] In an embodiment of the present application, the second frequency estimation graph is screened for frequency consistency to obtain a third frequency estimation graph, and the estimated frequency of the M frame signal is determined based on the third frequency estimation graph. Since the third frequency estimation graph contains fewer erroneous frequency candidate values than the second frequency estimation graph, the probability of estimating a more accurate frequency is further improved.
[0079] Optionally, the above S102B2 can be specifically implemented through the following S102b1 to S102b3.
[0080] S102b1. The signal processing device rounds the frequencies in the third frequency estimation graph to obtain a fourth frequency estimation graph.
[0081] S102b2: The signal processing device counts the number of times the first estimated frequency appears in the fourth frequency estimation graph to obtain a frequency point counting graph.
[0082] Optionally, the first estimated frequency is a frequency that is not equal to the second estimated frequency, and the second estimated frequency is a frequency corresponding to the maximum amplitude in the amplitude spectrum.
[0083] S102b3. The signal processing device determines the estimated frequency of the M frame signal according to the frequency point counting diagram.
[0084] For example, take M=3 as an example. Figure 5 ,like Figure 6 As shown, Figure 6 There are three sub-graphs (a) to (c). Figure 6 (a) in the figure is the amplitude spectrum of three adjacent frames. Figure 6 (b) is the third frequency estimation diagram of the adjacent three frames (i.e. Figure 6 (c) in the above, Figure 6 (c) in the figure is a frequency point counting diagram obtained by rounding the frequencies in the third frequency estimation diagram to obtain a fourth frequency estimation diagram and counting the number of occurrences of the first estimated frequency in the fourth frequency estimation diagram.
[0085] Further, based on the analysis of the above examples, compared with the third frequency estimation graph, the frequency count graph is more convergent, that is, the frequency count graph includes fewer candidate frequencies, and thus the frequency count graph contains fewer erroneous frequency candidate values.
[0086] Exemplarily, in combination with the example content in the above embodiment, traversing any integer iBin in the third frequency estimation graph specifically includes: rounding iBinByJumpSmth(iBin) (i.e., the third frequency estimation graph) to obtain temp6; if temp6 is greater than 0 and temp6 is less than lenAmp+1, then calculating iBinByCnt(temp6)+1 to obtain a new iBinByCnt(iBin), i.e., a frequency point counting graph.
[0087] In an embodiment of the present application, the frequencies in the third frequency estimation graph are rounded to obtain a fourth frequency estimation graph, and the number of occurrences of the first estimated frequency in the fourth frequency estimation graph is counted to obtain a frequency point count graph. Since the frequency point count graph contains fewer erroneous frequency candidate values, the probability of estimating a more accurate frequency is further improved.
[0088] Optionally, after the above S102b2 and before the above S102b3, the signal processing method provided in the embodiment of the present application may further include the following S105: Accordingly, the above S102b3 may be specifically implemented by the following S102b4 and S102b5.
[0089] S105. The signal processing device calculates a second frequency point in the frequency point counting diagram whose frequency is greater than a preset number of times.
[0090] Optionally, the preset number of times may be set by a developer or customized by a user, for example, the preset number of times is 8 times.
[0091] S102b4. The signal processing device determines the second frequency point as the first frequency point.
[0092] S102b5. The signal processing apparatus determines the frequency corresponding to the first frequency point in the third frequency estimation graph as the estimated frequency of the M frame signal.
[0093] It should be noted that the first frequency point is a frequency point determined in the third frequency estimation map. Since the estimated frequency of the M frame signal is the frequency corresponding to the first frequency point in the third frequency estimation map, the M
[0094] The estimated frequency of the frame signal is a certain frequency, not a set of frequency candidate values. Thus, compared with the third frequency estimation diagram, the estimated frequency of the M frame signal can be accurately obtained through S105, S102b4 and S102b5, and the accuracy of the estimated frequency of the M frame signal can be improved to a greater extent.
[0095] Optionally, after the estimated frequency of the M frame signal can be accurately obtained through S105, S102b4 and S102b5, the estimated error of the estimated frequency is less than or equal to the first preset threshold, and the estimated error is the difference between the estimated frequency and the true frequency of the M frame signal.
[0096] Optionally, the first preset threshold is obtained by a person skilled in the art through a large number of experiments using the signal processing method provided by the present application. Specifically, under medium and high signal-to-noise ratio conditions, the first preset threshold is 5% to 25%; under low signal-to-noise ratio conditions, the first preset threshold is 5% to 30%.
[0097] For example, the sampling frequency fs is 16kHz, lenFrame is 512, lenFft is 2048, width4JumpSmth is 3, radius4binStd is 4, snr is 0dB, and the relative position of the true frequency to the Fourier frequency point iBinTrue is 100.63. In the scenario with medium signal-to-noise ratio, such as Figure 7 As shown, Figure 7 There are three sub-graphs (a) to (c). Figure 7 (a) in the figure is the amplitude spectrum of three adjacent frames. Figure 7 (b) is used to represent the difference between the estimated frequency of the signal obtained by the signal processing method provided by the present application and the true frequency of the signal. Figure 7 (c) in the figure is used to represent the difference between the peak frequency point obtained by the conventional amplitude spectrum peak estimation method and the true frequency of the signal.
[0098] Furthermore, based on the analysis of these three subgraphs, Figure 7 (b) in the figure can reduce the mean error from 0.37 to 0.028. Therefore, compared with the peak frequency obtained by the conventional amplitude spectrum peak estimation method, the accuracy of the estimated frequency obtained by the solution of the present application is significantly improved and statistically unbiased.
[0099] The signal processing method provided in the embodiment of the present application, after obtaining the third frequency estimation graph and the frequency point counting graph of the M-frame signal, can calculate the second frequency point in the frequency point counting graph whose frequency is greater than the preset number of times, and determine the second frequency point as the first frequency point, so the frequency corresponding to the first frequency point in the third frequency estimation graph is determined as the estimated frequency of the M-frame signal, so that the estimated frequency of the M-frame signal can be accurately obtained, and the accuracy of the estimated frequency of the M-frame signal can be improved to a greater extent, and thus the problem of using integer frequency points determined based on the amplitude spectrum graph as the estimated frequency of the signal in the related art will not occur. In this way, the error of the frequency estimation of the signal is reduced, and the accuracy of the frequency estimation of the signal is also improved.
[0100] It should be noted that, in the process of processing each frame of signal, there are only a small amount of four arithmetic operations and a very small amount of sliding standard deviation, which shows that the computational complexity of this method is very low.
[0101] In addition, for the computational complexity caused by the longer lenFft, since the computational cost actually also harvests an amplitude spectrum with denser information, the benefits are multi-faceted and not limited to the signal processing method provided in this application, so it can be not regarded as a computational cost.
[0102] The signal processing method provided in the embodiment of the present application can be executed by a signal processing device. In the embodiment of the present application, a method for a signal processing device to execute signal processing is taken as an example to illustrate the signal processing device provided in the embodiment of the present application.
[0103] like Figure 8 As shown, an embodiment of the present application provides a signal processing device 200, which may include a determination module 201. The determination module 201 is used to determine a first frequency estimation graph of the M frame signal based on an amplitude spectrum graph of the M frame signal, where the amplitude of the frequency point in the first frequency estimation graph is greater than an amplitude threshold, and M is a positive integer; the determination module 201 is also used to determine an estimated frequency of the M frame signal based on the first frequency estimation graph and a phase spectrum graph of the M frame signal, where the estimated frequency is a frequency corresponding to the first frequency point in the first frequency estimation graph.
[0104] Optionally, the phase spectrum includes a first phase spectrum; a determination module is specifically used to perform reliability screening on the first phase spectrum according to the first frequency estimation graph to obtain a second frequency estimation graph; according to the second frequency estimation graph, determine the estimated frequency of the M frame signal; wherein the estimated frequency is the frequency corresponding to the first frequency point in the second frequency estimation graph.
[0105] Optionally, the signal processing device also includes an acquisition module and a processing module; the acquisition module is used to acquire a second phase spectrum of the M frame signal; the processing module is used to compensate for the inter-frame phase difference of the second phase spectrum to obtain a first phase spectrum.
[0106] Optionally, the acquisition module is specifically used to perform phase compensation on the third phase spectrum according to a phase compensation function to obtain a second phase spectrum, and the phase compensation function is determined according to the slope of the window function; wherein the third phase spectrum is obtained by Fourier transforming the M frame signal.
[0107] Optionally, the signal processing device also includes a processing module; the processing module is used to perform frequency consistency screening on the second frequency estimation graph to obtain a third frequency estimation graph; a determination module is specifically used to determine the estimated frequency of the M frame signal based on the third frequency estimation graph; wherein the estimated frequency is the frequency corresponding to the first frequency point in the third frequency estimation graph.
[0108] Optionally, the determination module is specifically used to round the frequency in the third frequency estimation graph to obtain a fourth frequency estimation graph; and count the number of times the first estimated frequency appears in the fourth frequency estimation graph to obtain a frequency point counting graph; and determine the estimated frequency of the M frame signal based on the frequency point counting graph.
[0109] Optionally, a processing module is used to calculate a second frequency point in a frequency point counting diagram whose frequency is greater than a preset number of times; a determination module is specifically used to determine the second frequency point as the first frequency point; and determine the frequency corresponding to the first frequency point in a third frequency estimation diagram as the estimated frequency of the M frame signal.
[0110] An embodiment of the present application provides a signal processing device, and an embodiment of the present application provides a signal processing method. Since a first frequency estimation graph of the signal can be determined based on the amplitude spectrum of the signal, and the estimated frequency of the signal can be determined based on the first frequency estimation graph and the phase spectrum of the signal, it is not limited to using only integer frequency points in the amplitude spectrum as the estimated frequency of the signal, but rather obtains the estimated frequency of the signal by processing the amplitude spectrum and the phase spectrum, thereby improving the accuracy of frequency estimation and reducing the error of frequency estimation.
[0111] The signal processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0112] The signal processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0113] The signal processing device provided in the embodiment of the present application can achieve Figures 1 to 7 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0114] Alternatively, if Fig. 9 As shown, an embodiment of the present application also provides an electronic device 300, including a processor 301 and a memory 302, wherein the memory 302 stores programs or instructions that can be executed on the processor 301, and when the program or instructions are executed by the processor 301, the various steps of the above-mentioned signal processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0115] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0116] Fig.10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0117] The electronic device 400 includes but is not limited to components such as a radio frequency unit 401 , a network module 402 , an audio output unit 403 , an input unit 404 , a sensor 405 , a display unit 406 , a user input unit 407 , an interface unit 408 , a memory 409 , and a processor 410 .
[0118] Those skilled in the art will appreciate that the electronic device 400 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 410 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0119] Among them, the processor 410 is used to determine the first frequency estimation graph of the M frame signal based on the amplitude spectrum graph of the M frame signal, the amplitude of the frequency point in the first frequency estimation graph is greater than the amplitude threshold, and M is a positive integer; and is used to determine the estimated frequency of the M frame signal based on the first frequency estimation graph and the phase spectrum graph of the M frame signal, and the estimated frequency is the frequency corresponding to the first frequency point in the first frequency estimation graph.
[0120] Optionally, the phase spectrum diagram includes a first phase spectrum diagram; the processor 410 is specifically used to perform reliability screening on the first phase spectrum diagram according to the first frequency estimation diagram to obtain a second frequency estimation diagram; according to the second frequency estimation diagram, determine the estimated frequency of the M frame signal; wherein the estimated frequency is the frequency corresponding to the first frequency point in the second frequency estimation diagram.
[0121] Optionally, the processor 410 is used to obtain a second phase spectrum of the M frame signal; and perform inter-frame phase difference compensation on the second phase spectrum to obtain a first phase spectrum.
[0122] Optionally, the processor 410 is specifically used to perform phase compensation on the third phase spectrum according to a phase compensation function to obtain a second phase spectrum, and the phase compensation function is determined according to the slope of the window function; wherein the third phase spectrum is obtained by Fourier transforming the M frame signal.
[0123] Optionally, the processor 410 is used to perform frequency consistency screening on the second frequency estimation graph to obtain a third frequency estimation graph; and to determine the estimated frequency of the M frame signal based on the third frequency estimation graph; wherein the estimated frequency is the frequency corresponding to the first frequency point in the third frequency estimation graph.
[0124] Optionally, the processor 410 is specifically used to round the frequency in the third frequency estimation graph to obtain a fourth frequency estimation graph; and count the number of times the first estimated frequency appears in the fourth frequency estimation graph to obtain a frequency point counting graph; and determine the estimated frequency of the M frame signal based on the frequency point counting graph.
[0125] Optionally, the processor 410 is used to calculate a second frequency point in the frequency point counting diagram whose frequency is greater than a preset number of times; and to determine the second frequency point as the first frequency point; and to determine the frequency corresponding to the first frequency point in the third frequency estimation diagram as the estimated frequency of the M frame signal.
[0126] An embodiment of the present application provides an electronic device, and an embodiment of the present application provides a signal processing method. Since a first frequency estimation graph of the signal can be determined based on the amplitude spectrum of the signal, and the estimated frequency of the signal can be determined based on the first frequency estimation graph and the phase spectrum of the signal, it is not limited to using only integer frequency points in the amplitude spectrum as the estimated frequency of the signal, but rather obtains the estimated frequency of the signal by processing the amplitude spectrum and the phase spectrum, thereby improving the accuracy of frequency estimation and reducing the error of frequency estimation.
[0127] It should be understood that in the embodiment of the present application, the input unit 404 may include a graphics processing unit (GPU) 4041 and a microphone 4042, and the graphics processor 4041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 407 includes a touch panel 4071 and at least one of other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include two parts: a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0128] The memory 409 can be used to store software programs and various data. The memory 409 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 409 may include a volatile memory or a non-volatile memory, or the memory 409 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 409 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0129] The processor 410 may include one or more processing units; optionally, the processor 410 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 410.
[0130] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned signal processing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0131] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0132] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned signal processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0133] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0134] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned signal processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0135] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0137] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A signal processing method, characterized in that: The method comprises: Performing Fourier transform on the time domain graph of the M frame signal to obtain an amplitude spectrum graph of the M frame signal; Determine a first frequency estimation graph of the M frame signal according to the amplitude spectrum graph of the M frame signal, wherein the amplitude of the frequency point in the first frequency estimation graph is greater than or equal to the amplitude threshold value, and M is a positive integer; An estimated frequency of the M frame signal is determined according to the first frequency estimation graph and the phase spectrum graph of the M frame signal, where the estimated frequency is a frequency corresponding to a first frequency point in the first frequency estimation graph.
2. The method according to claim 1, characterized in that The phase spectrum includes a first phase spectrum; The step of determining the estimated frequency of the M frame signal according to the first frequency estimation graph and the phase spectrum graph of the M frame signal comprises: According to the first frequency estimation graph, performing reliability screening on the first phase spectrum graph to obtain a second frequency estimation graph; Determining an estimated frequency of the M frame signals according to the second frequency estimation graph; The estimated frequency is the frequency corresponding to the first frequency point in the second frequency estimation graph.
3. The method according to claim 2, characterized in that Before performing reliability screening on the first phase spectrum diagram according to the first frequency estimation diagram to obtain the second frequency estimation diagram, the method further includes: Acquire a second phase spectrum of the M frame signal; Inter-frame phase difference compensation is performed on the second phase spectrum to obtain the first phase spectrum.
4. The method according to claim 3, characterized in that: The obtaining of a second phase spectrum of the M frame signal comprises: performing phase compensation on the third phase spectrum according to a phase compensation function to obtain the second phase spectrum, wherein the phase compensation function is determined according to the slope of the window function; The third phase spectrum is obtained by performing Fourier transform on the M frame signals.
5. The method according to claim 2, characterized in that: Determining the estimated frequency of the M frame signal according to the second frequency estimation map includes: Performing frequency consistency screening on the second frequency estimation graph to obtain a third frequency estimation graph; Determining an estimated frequency of the M frame signal according to the third frequency estimation map; The estimated frequency is the frequency corresponding to the first frequency point in the third frequency estimation graph.
6. The method according to claim 5, characterized in that Determining the estimated frequency of the M frame signal according to the third frequency estimation map includes: Rounding the frequencies in the third frequency estimation graph to obtain a fourth frequency estimation graph; Counting the number of occurrences of the first estimated frequency in the fourth frequency estimation graph to obtain a frequency point counting graph; According to the frequency point counting diagram, an estimated frequency of the M frame signals is determined.
7. The method according to claim 6, characterized in that After obtaining the frequency count map, and before determining the estimated frequency of the M frame signals according to the frequency count map, the method further includes: Calculate a second frequency point in the frequency point counting graph whose frequency is greater than a preset number of times; The determining, according to the frequency count graph, the estimated frequency of the M frame signal comprises: Determine the second frequency point as the first frequency point; The frequency corresponding to the first frequency point in the third frequency estimation graph is determined as the estimated frequency of the M frame signal.
8. A signal processing device, characterized in that: The signal processing device comprises a determination module; The determination module is used to determine a first frequency estimation graph of the M frame signal according to an amplitude spectrum graph of the M frame signal obtained by Fourier transforming a time domain graph of the M frame signal, wherein the amplitude of a frequency point in the first frequency estimation graph is greater than or equal to an amplitude threshold value, and M is a positive integer; The determination module is further used to determine the estimated frequency of the M frame signal according to the first frequency estimation graph and the phase spectrum graph of the M frame signal, where the estimated frequency is the frequency corresponding to the first frequency point in the first frequency estimation graph.
9. The device according to claim 8, characterized in that The phase spectrum includes a first phase spectrum; The determination module is specifically configured to perform reliability screening on the first phase spectrum diagram according to the first frequency estimation diagram to obtain a second frequency estimation diagram; and determine the estimated frequency of the M frame signal according to the second frequency estimation diagram; The estimated frequency is the frequency corresponding to the first frequency point in the second frequency estimation graph.
10. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the signal processing method according to any one of claims 1 to 7 are implemented.
11. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the signal processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
High precision frequency measurement method and instrument at under-sampling rate
CN104007316A
Signal processing method and device, electronic equipment and medium
CN115295024A