Signal frequency correction, device, readable storage medium and electronic device
By performing windowing and Fourier analysis on the time domain signal sequence, combined with the threshold of the energy leakage ratio, precise frequency correction of non-stationary signals is achieved, which solves the problem of large frequency correction errors in the existing technology and improves measurement accuracy. .
Patent Information
- Application Number
- CN202410840875.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-27
AI Technical Summary
In the frequency domain analysis of non-stationary dynamic signals, the existing technology has large frequency correction errors, especially the spectrum leakage problem caused by non-integer multiple sampling, which cannot be effectively solved.
After obtaining the time domain signal sequence for window processing, Fourier operation is performed to find the frequency and power of the target spectrum line and the left and right sides, calculate the energy leakage ratio, and perform signal frequency correction according to different energy leakage ratio thresholds, using specific The formula is frequency corrected to reduce the error.
It achieves precise frequency correction of the narrow-band modulation effect and energy leakage of non-integer multiples of non-stationary signals when sampling at integer multiples, and improves data measurement accuracy.
Smart Images

Figure CN118395096B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data, and in particular to a signal frequency correction device, a readable storage medium and an electronic device. Background Art
[0002] At present, the dynamic characteristics of buildings and structures are evaluated by using a dynamic signal acquisition system. According to the design requirements, vibration sensors are installed at appropriate locations of the structure, and data sampling and analysis are performed through dynamic signal acquisition equipment. By sampling the dynamic data samples, combined with time domain and frequency domain correlation analysis methods, the natural frequency, modal vibration shape, dynamic deflection, impact coefficient, cable force and other information of the structure can be obtained.
[0003] The main problem in dynamic signal analysis is that the frequency domain analysis of dynamic signals currently mostly uses traditional Fourier transform. For example, in practice, FFT is used to convert time domain samples into frequency domain. However, FFT is suitable for processing stationary signals because FFT outputs the statistical average of the signal. In engineering, most signals are non-stationary signals, that is, the mean, variance, and covariance of the signal do not change with time. For example, after the structure is excited, a free vibration signal with damping attenuation will generally be generated, and its variance will change with time. The performance of this signal in the frequency domain is similar to narrowband modulation near the natural frequency. Since the resolution of the spectrum is limited by the sampling rate and the number of analysis points ( ), after performing FFT, when solving the target frequency, a correction algorithm must be used to obtain the correct frequency value (especially the spectrum leakage caused by non-integer sampling), and this narrowband modulation phenomenon will introduce additional energy, resulting in large errors when using the frequency correction algorithm at the target frequency point.
[0004] Therefore, how to reduce the frequency correction error in the analysis of non-stationary dynamic signals has become an urgent problem to be solved. Summary of the invention
[0005] In view of the above situation, it is necessary to provide a signal frequency correction device, a readable storage medium and an electronic device to solve the problem of how to reduce the signal frequency correction error in the prior art.
[0006] The present invention provides a signal frequency correction method, comprising:
[0007] Acquire the original time domain signal sequence, and perform windowing processing on the original time domain signal sequence;
[0008] Perform Fourier operation on the windowed time domain signal sequence to obtain the amplitude spectrum of the time domain signal;
[0009] Finding a target spectrum line corresponding to a peak value of a target signal in the amplitude spectrum;
[0010] In the amplitude spectrum, the amplitudes and frequencies of the target spectrum line and the two spectrum lines immediately adjacent to the target spectrum line on the left and right sides are searched, and the searched frequencies are recorded as FL1, FL2, Fm, FR1, and FR2 from left to right;
[0011] Calculate the power of the target spectral line and two spectral lines adjacent to the target spectral line on the left and right sides according to the amplitude, and the obtained power values are recorded as PL1, PL2, Pm, PR1 and PR2 from left to right;
[0012] Calculating an energy leakage ratio according to the obtained power value, and comparing the energy leakage ratio with a threshold value;
[0013] When the energy leakage ratio is less than the threshold, the target signal frequency is modified according to the power values PL1, FL1, Pm, Fm, PR1 and FR1;
[0014] When the energy leakage ratio is greater than or equal to the threshold value, and PL1 is greater than or equal to PR1, the target signal frequency is modified according to PL2, FL2, PL1, FL1, Pm, Fm, PR1 and FR1;
[0015] When the energy leakage ratio is greater than or equal to the threshold and PL1 is less than PR1, the target signal frequency is corrected according to PL1, FL1, Pm, Fm, PR1, FR1, PR2 and FR2.
[0016] Furthermore, in the above signal frequency correction method, the formula for correcting the target signal frequency f according to the power values PL1, FL1, Pm, Fm, PR1 and FR1 is:
[0017] ;
[0018] The formula for correcting the target signal frequency f according to PL2, FL2, PL1, FL1, Pm, Fm, PR1 and FR1 is:
[0019] ;
[0020] The formula for correcting the target signal frequency f according to PL1, FL1, Pm, Fm, PR1, FR1, PR2 and FR2 is:
[0021] .
[0022] Furthermore, in the above signal frequency correction method, the calculation formula of the energy leakage ratio β is:
[0023] β=(PL2+PL1+PR1+PR2) / (PL2+PL1+Pm+PR1+PR2).
[0024] Furthermore, in the above signal frequency correction method, the energy leakage ratio β is 15.5%.
[0025] Furthermore, in the above signal frequency correction method, the step of searching for a target spectrum line corresponding to a target signal peak in the amplitude spectrum comprises:
[0026] The spectral line corresponding to the point with the largest spectral value in the amplitude spectrum is searched and used as the target spectral line, or the target spectral line corresponding to the peak value of the target signal in the amplitude spectrum is searched through a peak search algorithm.
[0027] The present invention also discloses a signal frequency correction device, comprising:
[0028] A signal processing module, used for acquiring an original time domain signal sequence and performing windowing processing on the original time domain signal sequence;
[0029] The Fourier operation module is used to perform Fourier operation on the windowed time domain signal sequence to obtain the amplitude spectrum of the time domain signal;
[0030] A first search module is used to search for a target spectrum line corresponding to a peak value of a target signal in the amplitude spectrum;
[0031] The second search module is used to search the amplitude and frequency of the target spectrum line and two spectrum lines adjacent to the target spectrum line on the left and right sides in the amplitude spectrum, and the searched frequencies are recorded as FL1, FL2, Fm, FR1, and FR2 from left to right;
[0032] A calculation module, used for calculating the power of the target spectral line and two spectral lines adjacent to the left and right sides of the target spectral line according to the amplitude, and the obtained power values are recorded as PL1, PL2, Pm, PR1 and PR2 from left to right;
[0033] A comparison module, used for calculating an energy leakage ratio according to the obtained power value, and comparing the energy leakage ratio with a threshold value;
[0034] A first correction module, used for correcting the target signal frequency according to the power values PL1, FL1, Pm, Fm, PR1 and FR1 when the energy leakage ratio is less than the threshold;
[0035] a second correction module, for correcting the target signal frequency according to PL2, FL2, PL1, FL1, Pm, Fm, PR1 and FR1 when the energy leakage ratio is greater than or equal to the threshold and PL1 is greater than or equal to PR1;
[0036] The third correction module is used to correct the target signal frequency according to PL1, FL1, Pm, Fm, PR1, FR1, PR2 and FR2 when the energy leakage ratio is greater than or equal to the threshold and PL1 is less than PR1.
[0037] Furthermore, in the above-mentioned signal frequency correction device, the formula for correcting the target signal frequency f according to the power values PL1, FL1, Pm, Fm, PR1 and FR1 is:
[0038] ;
[0039] The formula for correcting the target signal frequency f according to PL2, FL2, PL1, FL1, Pm, Fm, PR1 and FR1 is:
[0040] ;
[0041] The formula for correcting the target signal frequency f according to PL1, FL1, Pm, Fm, PR1, FR1, PR2 and FR2 is:
[0042] .
[0043] Furthermore, in the above-mentioned signal frequency correction device, the step of searching for the target spectrum line corresponding to the peak value of the target signal in the amplitude spectrum comprises:
[0044] The spectral line corresponding to the point with the largest spectral value in the amplitude spectrum is searched and used as the target spectral line, or the target spectral line corresponding to the peak value of the target signal in the amplitude spectrum is searched through a peak search algorithm.
[0045] The present invention also discloses an electronic device, comprising a memory and a processor, wherein the memory stores a program, and when the program is executed by the processor, any of the above-mentioned methods is implemented.
[0046] The present invention also discloses a computer-readable storage medium on which a program is stored. When the program is executed by a processor, any of the above-mentioned methods is implemented.
[0047] The present invention uses a dynamic signal recognition algorithm without using a special non-stationary signal dedicated analysis method, and realizes that FFT can accurately correct the frequency of the entire interval for the narrowband modulation effect of the non-stationary signal when it is sampled at integer multiples and the non-integer multiple energy leakage, thereby improving the data measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 is a flow chart of a signal frequency correction method in a first embodiment of the present invention;
[0049] Figure 2 It is a structural diagram of a dynamic data acquisition device;
[0050] Figure 3 is the target signal amplitude spectrum;
[0051] Figure 4 It is a structural block diagram of a signal frequency correction device in a second embodiment of the present invention;
[0052] Figure 5 Schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0054] With reference to the following description and accompanying drawings, embodiments of the present invention will be clear. In these descriptions and accompanying drawings, some specific implementations of the embodiments of the present invention are specifically disclosed to represent some ways of implementing the principles of the embodiments of the present invention, but it should be understood that the scope of the embodiments of the present invention is not limited thereto. On the contrary, embodiments of the present invention include all changes, modifications and equivalents that fall within the spirit and connotation of the appended claims.
[0055] See also Figure 1 , is a signal frequency correction method in the first embodiment of the present invention, comprising steps S11 to S19.
[0056] Step S11, obtaining an original time domain signal sequence, and performing windowing processing on the original time domain signal sequence.
[0057] The method in this embodiment can be applied to electronic devices for calculation and analysis, such as computers, tablets, mobile phones, etc. When the original time domain signal sequence is obtained, the signal sequence is windowed. In this embodiment, the original time domain signal sequence x(n) can be collected by dynamic signal measurement equipment and reasonable sampling parameters, where the sampling rate is Fs, the number of sampling points is N, and the frequency resolution is .
[0058] Specifically, in one implementation of the present invention, the dynamic data acquisition device is, for example, Figure 2As shown, it includes a vibration sensor 1, a signal amplification circuit 2, an anti-aliasing filter 3, an ADC driving circuit 4, an analog-to-digital converter 5, and an FPGA controller 6. This configuration is a common hardware system for dynamic signal measurement equipment. The vibration sensor 1 is responsible for sensing and outputting dynamic signals (steady or non-steady); the signal amplification circuit 2 is controlled by the FPGA controller 6 (or other processors with certain calculation and logic control capabilities), and selects a suitable amplification factor according to the strength of the signal to improve the signal-to-noise ratio of the signal; the anti-aliasing filter 3 mainly filters out the aliasing signal outside the maximum bandwidth of the sampling signal to prevent the aliasing signal from crosstalking into the effective bandwidth and interfering with the original signal; the ADC driving circuit 4 and the analog-to-digital converter 5 together realize the discrete sampling of the analog continuous signal and transmit the data to the FPGA controller 6; the FPGA controller 6 performs strict equal-interval sampling through the hardware time base according to the configuration sampling parameters, and obtains the original time domain sample x(n), which is packaged through the protocol and sent to the host computer (such as a computer, tablet and other electronic devices) for spectrum analysis. Some portable devices can also directly connect the display screen and design the UI on the hardware to realize the spectrum analysis of the local device.
[0059] Add a window to the time domain signal sequence x(n), and assume that the selected window function is w(n). Then the windowed time domain signal sequence is: y(n) = x(n)* w(n). In order to reduce spectrum leakage, it is recommended to select a window function with a large main lobe width, such as the Hanning window, Hamming window, triangular window, Blackman window, etc.
[0060] Step S12, performing Fourier operation on the windowed time domain signal sequence to obtain an amplitude spectrum of the time domain signal.
[0061] Step S13, searching for a target spectrum line corresponding to a target signal peak in the amplitude spectrum.
[0062] Perform FFT operation on the windowed time domain signal sequence y(n) to obtain the amplitude spectrum of the time domain signal.
[0063] It can be understood that the maximum value search algorithm can be used to find the spectrum line with the largest amplitude, or the peak value search algorithm can be used to find the target signal spectrum value of interest among multiple peaks. The maximum value search algorithm is suitable for single-frequency signals, such as signals whose main vibration frequency of the structure is the fundamental frequency. The peak value search algorithm is suitable for multi-frequency signals, such as structures with obvious multi-order natural frequencies, and the main vibration frequency is not necessarily the fundamental frequency, which is often encountered in the measurement of cable tension.
[0064] Step S14, in the amplitude spectrum, searching for the amplitudes and frequencies of the target spectrum line and two spectrum lines immediately adjacent to the target spectrum line on the left and right sides, respectively, and recording the found frequencies FL1, FL2, Fm, FR1, FR2 from left to right.
[0065] After finding the target spectrum line Am, find the two spectrum lines on the left and right sides of the Am spectrum line in the amplitude spectrum (see Figure 3 ), the spectral values of the five spectral lines from left to right are recorded as: AL1, AL2, Am, AR1, AR2; the frequencies are recorded as FL1, FL2, Fm, FR1, FR2; because the amplitudes of the spectral lines on both sides of the main frequency Am also represent its energy distribution.
[0066] As long as the spectral line with the largest amplitude is located, the four spectral lines adjacent to it on both sides will also be located at the same time. The positions of these five spectral lines on the spectrum diagram, that is, the corresponding N values, are recorded separately. N*△f is its frequency value; the amplitudes of these five spectral lines are also recorded at the same time.
[0067] Step S15, calculating the power of the target spectral line and two spectral lines adjacent to the target spectral line on the left and right sides according to the amplitude, and the obtained power values are recorded as PL1, PL2, Pm, PR1 and PR2 from left to right.
[0068] The power value is obtained by squaring the amplitude A, that is, according to , calculate the power values of the above five spectral lines AL1, AL2, Am, AR1, and AR2, and record them as: PL1, PL2, Pm, PR1, and PR2 respectively.
[0069] Step S16, calculating the energy leakage ratio according to the obtained power value, and comparing the energy leakage ratio with a threshold value.
[0070] The size of the energy leakage ratio β indicates the frequency energy leakage of the target signal. The larger the β is, the more serious the spectrum leakage of the signal is. The calculation formula is:
[0071] β=(PL2+PL1+PR1+PR2) / (PL2+PL1+Pm+PR1+PR2).
[0072] The threshold of the energy leakage ratio is a boundary value obtained by frequency sweeping a single-frequency signal under noise-free conditions. In practical applications, it may be mixed with some weak electrical noise. As long as the hardware design is reasonable and the noise is suppressed to a certain extent, this threshold is stable and meets engineering needs.
[0073] Selecting an appropriate energy leakage ratio threshold as the judgment limit can determine the energy leakage situation. Assuming the sampling rate Fs = 8192Hz and the number of sampling points is 1024 points, then , that is, the signal frequency is an integer multiple of 8Hz When the signal frequency is When the signal leakage is the most serious; 1000Hz, 1001Hz, 1002Hz, 1003Hz, and 1004Hz are used as test signals. After FFT operation, the amplitude spectrum data, power spectrum data, and energy leakage ratio are calculated respectively. The data are shown in Table 1, Table 2, and Table 3. It can be seen that when the energy leakage ratio is 15.5%, the corresponding frequency is 1002Hz, and this frequency point is exactly an integer multiple sampling point ( ) and the location with the most severe energy leakage ( ) is the midpoint ( ), that is, in ( )arrive( ) interval is the area with serious energy leakage, and the remaining intervals are the intervals with less serious leakage (including integer multiples). This conclusion is also applicable to other different sampling rates, sampling points and input signal frequencies. Therefore, according to data analysis, the threshold of energy leakage ratio is selected as 15.5% in this embodiment;
[0074] Table 1 Amplitude spectrum data
[0075]
[0076] Table 2 Power spectrum data
[0077]
[0078] Table 3 Energy leakage ratio β
[0079]
[0080] Step S17, when the energy leakage ratio is less than the threshold, the target signal frequency is corrected according to the power values PL1, FL1, Pm, Fm, PR1 and FR1.
[0081] Specifically, when the energy leakage ratio β is less than 15%, the following frequency correction formula is performed on the target signal frequency:
[0082] .
[0083] Step S18, when the energy leakage ratio is greater than or equal to the threshold and PL1 is greater than or equal to PR1, the target signal frequency is corrected according to PL2, FL2, PL1, FL1, Pm, Fm, PR1 and FR1.
[0084] Step S19, when the energy leakage ratio is greater than or equal to the threshold and PL1 is less than PR1, the target signal frequency is corrected according to PL1, FL1, Pm, Fm, PR1, FR1, PR2 and FR2.
[0085] When the energy leakage ratio β≥15%, it is determined whether PL1≥PR1. If so, the following correction formula is applied to the target signal frequency:
[0086] .
[0087] Otherwise, execute the following correction formula:
[0088] .
[0089] This embodiment obtains the distribution of the frequency of the target signal under test and its leakage energy from the power spectrum, and determines the position area on the target signal spectrum, that is, whether the target frequency under test is near the integer multiple sampling point ( ), or near the location where the energy leakage is the most serious ( ), and finally, based on the target signal frequency region, the corresponding frequency correction algorithm is used to obtain a high-precision frequency correction value in the entire frequency measurement range.
[0090] In order to verify the method of the embodiment of the present invention, the embodiment of the present invention also sets up a test experiment. The sampling rate of the dynamic signal measurement equipment is 8192Hz, the number of FFT analysis points is 1024 points (number of sampling points), the window function selects the Hanning window, and a single-frequency sine wave signal (non-stationary) with damping attenuation is simulated by software, and the execution algorithm in the embodiment of the present invention is used for frequency correction. The test results are shown in Table 4. It can be seen that the absolute measurement error is within 0.01Hz. This accuracy has met the requirements of most structural safety monitoring.
[0091] Table 4 Test data
[0092]
[0093] The present invention uses a dynamic signal recognition algorithm without using a special non-stationary signal dedicated analysis method, and realizes that FFT can accurately correct the frequency of the entire interval for the narrowband modulation effect of the non-stationary signal when it is sampled at integer multiples and the non-integer multiple energy leakage, thereby improving the data measurement accuracy.
[0094] See also Figure 4 , is a signal frequency correction device in a second embodiment of the present invention, comprising:
[0095] The signal processing module 21 is used to obtain the original time domain signal sequence and perform windowing processing on the original time domain signal sequence to obtain time domain signal sequence fragments;
[0096] The Fourier operation module 22 is used to perform Fourier operation on the windowed time domain signal sequence to obtain an amplitude spectrum of the time domain signal;
[0097] A first search module 23 is used to search for a target spectrum line corresponding to a peak value of a target signal in the amplitude spectrum;
[0098] A second search module 24 is used to search the amplitude and frequency of the target spectrum line and two spectrum lines adjacent to the target spectrum line on the left and right sides in the amplitude spectrum, and the searched frequencies are recorded as FL1, FL2, Fm, FR1, and FR2 from left to right;
[0099] A calculation module 25 is used to calculate the power of the target spectral line and two spectral lines adjacent to the target spectral line on the left and right sides according to the amplitude, and the obtained power values are recorded as PL1, PL2, Pm, PR1 and PR2 from left to right;
[0100] A comparison module 26, configured to calculate an energy leakage ratio according to the obtained power value, and compare the energy leakage ratio with a threshold value;
[0101] A first correction module 27, configured to correct the target signal frequency according to the power values PL1, FL1, Pm, Fm, PR1 and FR1 when the energy leakage ratio is less than the threshold;
[0102] A second correction module 28, configured to correct the target signal frequency according to PL2, FL2, PL1, FL1, Pm, Fm, PR1 and FR1 when the energy leakage ratio is greater than or equal to the threshold and PL1 is greater than or equal to PR1;
[0103] The third correction module 29 is used to correct the target signal frequency according to PL1, FL1, Pm, Fm, PR1, FR1, PR2 and FR2 when the energy leakage ratio is greater than or equal to the threshold and PL1 is less than PR1.
[0104] Furthermore, the signal frequency correction device corrects the target signal frequency f according to the power values PL1, FL1, Pm, Fm, PR1 and FR1 using the following formula:
[0105] ;
[0106] The formula for correcting the target signal frequency f according to PL2, FL2, PL1, FL1, Pm, Fm, PR1 and FR1 is:
[0107] ;
[0108] The formula for correcting the target signal frequency f according to PL1, FL1, Pm, Fm, PR1, FR1, PR2 and FR2 is:
[0109] .
[0110] Furthermore, in the above-mentioned signal frequency correction device, the step of searching for the target spectrum line corresponding to the peak value of the target signal in the amplitude spectrum comprises:
[0111] The signal frequency correction device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0112] Another aspect of the present invention provides an electronic device, see Figure 5 , shown is an electronic device in an embodiment of the present invention, including a processor 10, a memory 20, and a computer program 30 stored in the memory and executable on the processor, and when the processor 10 executes the computer program 30, the signal frequency correction method as described above is implemented.
[0113] The electronic device may be, but is not limited to, a computer device such as a personal computer, a mobile phone, etc. In some embodiments, the processor 10 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip, for running program codes stored in the memory 20 or processing data.
[0114] Among them, the memory 20 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 20 can be an internal storage unit of an electronic device, such as a hard disk of the electronic device. In other embodiments, the memory 20 can also be an external storage device of an electronic device, such as a plug-in hard disk equipped on the electronic device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Further, the memory 20 can also include both an internal storage unit of the electronic device and an external storage device. The memory 20 can not only be used to store application software and various types of data installed in the electronic device, but also can be used to temporarily store data that has been output or is to be output.
[0115] Optionally, the electronic device may also include a user interface, a network interface, a communication bus, etc. The user interface may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface), which is usually used to establish a communication connection between the device and other electronic devices. The communication bus is used to realize the connection and communication between these components.
[0116] It should be pointed out that Figure 5 The structure shown does not constitute a limitation on the electronic device. In other embodiments, the electronic device may include fewer or more components than those shown in the figure, or combine certain components, or arrange the components differently.
[0117] The present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the signal frequency correction method as described above is implemented.
[0118] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable medium for use by an instruction execution system or device (such as a computer-based system, a system including a processor, or other system that can obtain instructions from an instruction execution system or device and execute instructions), or in combination with such instruction execution systems or devices. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate, or transmit a program for use by an instruction execution system or device, or in combination with such instruction execution systems or devices.
[0119] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0120] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0121] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0122] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A signal frequency correction method, characterized in that: include: Acquire the original time domain signal sequence, and perform windowing processing on the original time domain signal sequence; Perform Fourier operation on the windowed time domain signal sequence to obtain the amplitude spectrum of the time domain signal; Finding a target spectrum line corresponding to a peak value of a target signal in the amplitude spectrum; In the amplitude spectrum, the amplitudes and frequencies of the target spectrum line and the two spectrum lines immediately adjacent to the target spectrum line on the left and right sides are searched, and the searched frequencies are recorded as FL1, FL2, Fm, FR1, and FR2 from left to right; Calculate the power of the target spectral line and two spectral lines adjacent to the target spectral line on the left and right sides according to the amplitude, and the obtained power values are recorded as PL1, PL2, Pm, PR1 and PR2 from left to right; The energy leakage ratio is calculated according to the obtained power value, and the energy leakage ratio is compared with the threshold value. The calculation formula of the energy leakage ratio β is: β=(PL2+PL1+PR1+PR2) / (PL2+PL1+Pm+PR1+PR2); When the energy leakage ratio is less than the threshold, the target signal frequency is modified according to the power values PL1, FL1, Pm, Fm, PR1 and FR1; When the energy leakage ratio is greater than or equal to the threshold value, and PL1 is greater than or equal to PR1, the target signal frequency is modified according to PL2, FL2, PL1, FL1, Pm, Fm, PR1 and FR1; When the energy leakage ratio is greater than or equal to the threshold value and PL1 is less than PR1, the target signal frequency is modified according to PL1, FL1, Pm, Fm, PR1, FR1, PR2 and FR2; The formula for correcting the target signal frequency f according to the power values PL1, FL1, Pm, Fm, PR1 and FR1 is: ; The formula for correcting the target signal frequency f according to PL2, FL2, PL1, FL1, Pm, Fm, PR1 and FR1 is: ; The formula for correcting the target signal frequency f according to PL1, FL1, Pm, Fm, PR1, FR1, PR2 and FR2 is: 。 2. The signal frequency correction method according to claim 1, characterized in that: The threshold value of the energy leakage ratio β is 15.5%.
3. The signal frequency correction method according to claim 1, characterized in that: The step of searching for a target spectrum line corresponding to a target signal peak in the amplitude spectrum comprises: The spectral line corresponding to the point with the largest spectral value in the amplitude spectrum is searched and used as the target spectral line, or the target spectral line corresponding to the peak value of the target signal in the amplitude spectrum is searched through a peak search algorithm.
4. A signal frequency correction device, characterized in that: include: A signal processing module, used for acquiring an original time domain signal sequence and performing windowing processing on the original time domain signal sequence; The Fourier operation module is used to perform Fourier operation on the windowed time domain signal sequence to obtain the amplitude spectrum of the time domain signal; A first search module is used to search for a target spectrum line corresponding to a peak value of a target signal in the amplitude spectrum; The second search module is used to search the amplitude and frequency of the target spectrum line and two spectrum lines adjacent to the target spectrum line on the left and right sides in the amplitude spectrum, and the searched frequencies are recorded as FL1, FL2, Fm, FR1, and FR2 from left to right; A calculation module, used for calculating the power of the target spectral line and two spectral lines adjacent to the left and right sides of the target spectral line according to the amplitude, and the obtained power values are recorded as PL1, PL2, Pm, PR1 and PR2 from left to right; The comparison module is used to calculate the energy leakage ratio according to the obtained power value, and compare the energy leakage ratio with the threshold value. The calculation formula of the energy leakage ratio β is: β=(PL2+PL1+PR1+PR2) / (PL2+PL1+Pm+PR1+PR2); A first correction module, used for correcting the target signal frequency according to the power values PL1, FL1, Pm, Fm, PR1 and FR1 when the energy leakage ratio is less than the threshold; a second correction module, for correcting the target signal frequency according to PL2, FL2, PL1, FL1, Pm, Fm, PR1 and FR1 when the energy leakage ratio is greater than or equal to the threshold and PL1 is greater than or equal to PR1; A third correction module, for correcting the target signal frequency according to PL1, FL1, Pm, Fm, PR1, FR1, PR2 and FR2 when the energy leakage ratio is greater than or equal to the threshold and PL1 is less than PR1; The formula for correcting the target signal frequency f according to the power values PL1, FL1, Pm, Fm, PR1 and FR1 is: ; The formula for correcting the target signal frequency f according to PL2, FL2, PL1, FL1, Pm, Fm, PR1 and FR1 is: ; The formula for correcting the target signal frequency f according to PL1, FL1, Pm, Fm, PR1, FR1, PR2 and FR2 is: 。 5. The signal frequency correction device according to claim 4, characterized in that: The step of searching for a target spectrum line corresponding to a target signal peak in the amplitude spectrum comprises: The spectral line corresponding to the point with the largest spectral value in the amplitude spectrum is searched and used as the target spectral line, or the target spectral line corresponding to the peak value of the target signal in the amplitude spectrum is searched through a peak search algorithm.
6. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a program, and when the program is executed by the processor, the method according to any one of claims 1 to 3 is implemented.
7. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
