Frequency measurement method and device, storage medium and electronic equipment
By performing two fast Fourier transforms and sampling downsampling of the signal to be measured, combined with crude measurement and precision measurement methods, the problems of frequency measurement delay and resource consumption in the existing technology are solved, and high-precision and low-latency measurement are achieved Frequency effect.
Patent Information
- Application Number
- CN202411588496.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-07
AI Technical Summary
Existing real-time digital frequency measurement methods lead to problems of frequency measurement delay and increased signal processor resource consumption.
The first N-point fast Fourier transform is used to obtain the first N-point fast Fourier transform of the first sampled signal obtained by modulo sampling of the signal to be measured at the first sampling rate to obtain the first frequency; and then the first sampled signal is sampled and reduced based on the preset sampling rate. Sampling, obtain the second sampling signal, and perform the second N-point fast Fourier transform to obtain the second frequency; judge whether frequency aliasing occurs based on the first frequency and the second sampling rate, and demix if necessary stack to determine the frequency measurement value of the signal to be measured.
Through the frequency measurement method combining rough measurement and precision measurement, the frequency measurement accuracy of the system is improved, the frequency measurement delay is shortened, and the hardware resources required for the system's frequency measurement are saved.
Smart Images

Figure CN119395371A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of frequency detection, and in particular to a frequency measurement method, device, storage medium and electronic equipment. Background Art
[0002] At present, the real-time digital frequency measurement method mainly estimates the signal frequency through Fourier transform. However, the evaluation accuracy of this frequency measurement method depends on the number of points for Fourier transform. The frequency measurement resolution is fs / N, where N is the number of points involved in Fourier transform and fs is the sampling rate. If the sampling rate is constant, if you want to improve the frequency resolution, you need to increase N. On the one hand, it will cause frequency measurement delays, and on the other hand, it will greatly increase the resource consumption of the signal processor. If N is not increased, complex signal processing algorithms are required. These algorithms have large computational complexity and are usually not suitable for real-time frequency estimation. In addition, the hardware programming implementation of the algorithm is also relatively complex, which increases the development cost. Summary of the invention
[0003] The present invention provides a frequency measurement method, device, storage medium and electronic equipment to solve the technical problems of the existing real-time digital frequency measurement method causing frequency measurement delay and increasing signal processor resource consumption.
[0004] According to one aspect of the present invention, there is provided a frequency measurement method, comprising:
[0005] Performing a first N-point fast Fourier transform on a first sampling signal obtained by analog-to-digital sampling of the signal to be measured at a first sampling rate to obtain a first frequency; wherein N is a positive integer;
[0006] Down-sampling the first sampling signal based on a preset sampling rate to obtain a second sampling signal sampled at a second sampling rate corresponding to the preset sampling rate;
[0007] Performing a second N-point fast Fourier transform on the second sampling signal to obtain a second frequency;
[0008] Determining whether frequency aliasing occurs according to the first frequency and the second sampling rate;
[0009] In the absence of frequency aliasing, determining a frequency measurement value of the signal to be measured according to the second frequency;
[0010] In the case of frequency aliasing, the de-aliasing is performed according to the second sampling rate and the first frequency to obtain a de-aliased frequency, and the frequency measurement value of the signal to be measured is determined according to the de-aliased frequency and the first frequency.
[0011] Optionally, determining whether frequency aliasing occurs according to the first frequency and the second sampling rate includes:
[0012] Determining whether the second sampling rate is greater than or equal to 2 times the first frequency;
[0013] If so, determine that frequency aliasing does not occur;
[0014] If not, it is determined that frequency aliasing occurs.
[0015] Optionally, when frequency aliasing does not occur, determining the frequency measurement value of the signal to be measured according to the second frequency includes:
[0016] In the case where frequency aliasing does not occur, the second frequency is determined as a frequency measurement value of the signal to be measured.
[0017] Optionally, in the case of frequency aliasing, de-aliasing according to the second sampling rate and the first frequency to obtain a de-aliased frequency, and determining a frequency measurement value of the signal to be measured according to the de-aliased frequency and the first frequency includes:
[0018] In the case of frequency aliasing, determining the frequency spectrum position of the signal to be measured after aliasing according to the aliased frequency; wherein the aliased frequency is equal to the product of a coefficient, the second sampling rate, and the first frequency, and the coefficient is positively correlated with the quotient of the first frequency and the second sampling rate;
[0019] Determine a third frequency obtained after the second fast Fourier transform according to the frequency spectrum position after aliasing, and use the third frequency as the frequency after de-aliasing;
[0020] A frequency measurement value of the signal to be measured is determined according to the third frequency and the first frequency.
[0021] Optionally, determining the frequency measurement value of the signal to be measured according to the third frequency and the first frequency includes:
[0022] Use the following formula to determine the frequency measurement value of the signal under test:
[0023] f 估 =[f 精1 +f 粗 ]; where festimate represents the frequency measurement value, ffine represents the third frequency, and fcoarse represents the first frequency.
[0024] Optionally, the coefficients should satisfy the following expression:
[0025] k=[f 粗 / fs / M]; wherein k represents a coefficient, f represents a first frequency, fs / M represents a second sampling rate, and [] represents an integer not less than k.
[0026] Optionally, the preset sampling rate is greater than 2.
[0027] According to another aspect of the present invention, there is provided a frequency measuring device, comprising:
[0028] A first frequency determination module, the first frequency determination module is used to perform a first N-point fast Fourier transform on a first sampling signal obtained by analog-to-digital sampling of the signal to be measured at a first sampling rate to obtain a first frequency; wherein N is a positive integer;
[0029] A second sampling signal determination module, the second sampling signal determination module is used to sample and downsample the first sampling signal based on a preset sampling rate to obtain a second sampling signal sampled at a second sampling rate corresponding to the preset sampling rate;
[0030] A second frequency determination module, the second frequency determination module is used to perform a second N-point fast Fourier transform on the second sampling signal to obtain a second frequency;
[0031] A judging module, configured to judge whether frequency aliasing occurs according to the first frequency and the second sampling rate;
[0032] A first determining module, the first determining module is used to determine the frequency measurement value of the signal to be measured according to the second frequency when no frequency aliasing occurs;
[0033] The second determination module is used for, when frequency aliasing occurs, de-aliasing according to the second sampling rate and the first frequency, and determining the frequency measurement value of the signal to be measured according to the aliased frequency and the first frequency.
[0034] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the frequency measurement method described in any embodiment of the present invention when executed.
[0035] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0036] at least one processor; and
[0037] a memory communicatively connected to the at least one processor; wherein,
[0038] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the high-precision frequency measurement method described in any embodiment of the present invention.
[0039] The technical solution provided by the embodiment of the present invention is to perform a first N-point fast Fourier transform on the first sampling signal obtained by analog-to-digital sampling of the signal to be measured at a first sampling rate to obtain a first frequency. The system can guide the radio frequency system to adjust the phase-locked loop according to the initial estimated frequency, that is, the first frequency, and adjust the frequency of the signal to be radiated to the vicinity of the first frequency, so that the time delay required by the system radio frequency system due to frequency adjustment can be reduced; by sampling and downsampling the first sampling signal, a second sampling signal sampled at a second sampling rate corresponding to a preset sampling rate is obtained, and then the second sampling signal is subjected to a second N-point fast Fourier transform to obtain a second frequency, thereby reducing the amount of data and reducing the computational complexity. Therefore, the technical solution provided by the embodiment of the present invention only needs to perform two N-point FFTs on the sampling signal. The first frequency obtained by performing the first N-point FFT on the first sampling signal is a rough measurement process, and the second N-point FFT on the signal after sampling and downsampling is a precise measurement process. Through the frequency measurement method combining rough measurement and precise measurement, the frequency measurement accuracy of the system can be effectively improved, the radiation delay time of the interference signal in the electronic warfare system can be reduced, and the hardware resources required for the system frequency measurement can be saved. The patent of the present invention is simple and practical, easy to implement in engineering, and has great engineering practical value.
[0040] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0042] Figure 1 A flow chart of a frequency measurement method provided by an embodiment of the present invention;
[0043] Figure 2 A flow chart of another frequency measurement method provided by an embodiment of the present invention;
[0044] Figure 3 A flow chart of another frequency measurement method provided by an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of the structure of a frequency measuring device provided by an embodiment of the present invention;
[0046] Figure 5 A schematic structural diagram of an electronic device for a frequency measurement method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0048] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0049] Figure 1 This is a flow chart of a frequency measurement method provided by an embodiment of the present invention. This embodiment can be applied to real-time detection of signal frequency. The method can be executed by a frequency measurement device. The frequency measurement device can be implemented in the form of hardware and / or software. The frequency measurement device can be configured in any electronic device with communication function. Figure 1 , the frequency measurement method includes:
[0050] S110 , performing a first N-point fast Fourier transform on a first sampling signal obtained by analog-to-digital sampling of the signal to be measured at a first sampling rate to obtain a first frequency.
[0051] Wherein, N is a positive integer; the first sampling rate can be preset according to the sampling requirements and application scenarios, and different sampling rates will have different effects on the acquisition and processing of signals. A higher sampling rate can restore the details of the signal more accurately, but will occupy more storage resources and computing resources; a lower sampling rate may cause signal distortion, but can reduce resource consumption. In the embodiment of the present invention, the real frequency of the signal to be measured is assumed to be f 0 , its operating frequency range is [f 1 ,f 2 ] In modern electronic warfare, the operating frequency range is very wide, usually hundreds of megahertz to several gigahertz. Different electronic equipment systems have different frequency bandwidths according to their different working tasks. Assume that the first sampling rate is fs, and fs≧2f2 , to ensure that the first sampled signal can be reconstructed without distortion. Fast Fourier Transform (FFT) is an algorithm for efficiently calculating Discrete Fourier Transform (DFT). Its main functions are spectrum analysis, filtering and signal processing. Spectrum analysis refers to converting time domain signals into frequency domain representations so that the frequency components of the signals can be analyzed. For example, in audio processing, the sound intensity of different frequencies can be determined; in communication systems, the bandwidth and frequency distribution of signals can be analyzed. The first frequency is the coarse measurement frequency.
[0052] Specifically, by performing an N-point FFT on the first sampling signal, the time domain signal is transformed into a frequency domain representation to obtain a set of complex numbers, each of which corresponds to a specific frequency component. The frequency axis is determined according to the first sampling rate. Assuming that the first sampling rate is fs and the number of FFT points is N, the frequency corresponding to each point on the frequency axis can be calculated by the following formula:
[0053] fn=n*fs / N, where n=0,1,2……N-1. For example, if the sampling rate fs=1000Hz and the number of FFT points N=1024, then the frequency corresponding to the first point of the frequency axis is 0*1000 / 1024=0Hz, and the frequency corresponding to the second point (n=1) is 1*1000 / 1024=0.977Hz. Find the peak frequency based on the frequency axis, and find the peak points in the amplitude spectrum by observing the amplitude spectrum of the frequency axis. The frequencies corresponding to these peak points are usually the main frequency components in the signal. The peak points can be found by traversing the amplitude spectrum or using the peak detection algorithm. The frequency corresponding to the peak point is the first frequency.
[0054] The purpose of determining the first frequency is to guide the radio frequency system of the interfering party in the electronic countermeasure to adjust the phase-locked loop by determining the first frequency of the roughly measured signal to be measured by the interfered party in the electronic countermeasure, so as to adjust the frequency of the signal to be radiated by the interfering party to the vicinity of the signal frequency of the interfered party, so as to reduce the time delay required by the system radio frequency system for adjusting the frequency. Therefore, the first sampling signal obtained by analog-to-digital sampling of the signal to be measured at the first sampling rate is subjected to the first N-point fast Fourier transform to obtain the first frequency, so that the system can guide the radio frequency system to adjust the phase-locked loop according to the initial estimated frequency, that is, the first frequency, and adjust the frequency of the signal to be radiated to the vicinity of the first frequency, so as to reduce the time delay required by the system radio frequency system for adjusting the frequency; on the other hand, the first frequency can be used as a basis for judging whether the frequency of subsequent sampling and downsampling satisfies the Nyquist sampling theorem and whether spectrum folding is required.
[0055] S120 , down-sample the first sampling signal based on a preset sampling rate to obtain a second sampling signal sampled at a second sampling rate corresponding to the preset sampling rate.
[0056] Among them, the preset sampling rate can be pre-set according to the signal characteristics and application requirements, and the preset sampling rate is greater than 2. Sampling downsampling is a signal processing technology, which mainly includes two processes: sampling and downsampling. Sampling is the process of extracting discrete samples from continuous-time signals. In digital signal processing, analog signals are usually measured periodically to obtain a series of discrete digital values. Continuous-time signals are converted into discrete-time signals for digital signal processing. Through sampling, continuous signals can be represented by a finite number of digital samples, thereby reducing the complexity and processing difficulty of the signal. Downsampling (also known as downsampling) is the process of reducing the sampling rate based on a discretized signal. That is, reducing the number of samples in a discrete signal. Downsampling is usually to reduce the amount of data, reduce computational complexity, or adapt to specific processing requirements. By removing some sample points, the sampling rate of the signal can be reduced while retaining the main features of the signal.
[0057] Exemplarily, the preset sampling rate is set to M, and the first sampling signal is downsampled by M times to obtain a second sampling signal sampled at a second sampling rate fs / M corresponding to the preset sampling rate.
[0058] S130 , performing a second N-point fast Fourier transform on the second sampling signal to obtain a second frequency.
[0059] Specifically, the process of performing a second N-point fast Fourier transform on the second sampling signal to obtain the second frequency is similar to the process of performing a first N-point fast Fourier transform on the first sampling signal in step S110 to obtain the first frequency, and will not be repeated here.
[0060] S140. Determine whether frequency aliasing occurs according to the first frequency and the second sampling rate.
[0061] In some optional embodiments of the present invention, whether frequency aliasing occurs is determined by determining whether the relationship between the first frequency and the second sampling rate satisfies the Nyquist sampling theorem. The purpose of determining whether frequency aliasing occurs is to ensure the accuracy of the signal, avoid signal distortion, and ensure that the sampled signal can be correctly restored; on the other hand, when designing a signal acquisition system, the appropriate sampling frequency can be determined by determining the aliasing phenomenon. This helps to reduce the sampling cost and data volume as much as possible while meeting the signal processing requirements; on the other hand, it helps to improve the signal processing effect.
[0062] S150. Determine a frequency measurement value of the signal to be measured according to the second frequency when frequency aliasing does not occur.
[0063] Specifically, in the absence of frequency aliasing, the result of the second N-point fast Fourier transform is determined as the frequency measurement value of the signal to be measured.
[0064] S160 . In the case of frequency aliasing, perform dealiasing according to the second sampling rate and the first frequency to obtain a dealiased frequency, and determine a frequency measurement value of the signal to be measured according to the dealiased frequency and the first frequency.
[0065] Specifically, in the event of frequency aliasing, the aliased frequency is calculated based on the second sampling rate and the first frequency, the aliased frequency spectrum position of the signal to be measured after aliasing can be determined based on the aliased frequency spectrum position, the frequency after the downsampled signal is de-aliased by a second fast Fourier transform can be obtained based on the de-aliased frequency and the first frequency, and the frequency measurement value of the signal to be measured is determined based on the de-aliased frequency and the first frequency.
[0066] The technical solution provided by the embodiment of the present invention is to perform a first N-point fast Fourier transform on the first sampling signal obtained by analog-to-digital sampling of the signal to be measured at a first sampling rate to obtain a first frequency. The system can guide the radio frequency system to adjust the phase-locked loop according to the initial estimated frequency, that is, the first frequency, and adjust the frequency of the signal to be radiated to the vicinity of the first frequency, so that the time delay required by the system radio frequency system due to frequency adjustment can be reduced; by sampling and downsampling the first sampling signal, a second sampling signal sampled at a second sampling rate corresponding to a preset sampling rate is obtained, and then the second sampling signal is subjected to a second N-point fast Fourier transform to obtain a second frequency, thereby reducing the amount of data and reducing the computational complexity. Therefore, the technical solution provided by the embodiment of the present invention only needs to perform two N-point FFTs on the sampling signal. The first frequency obtained by performing the first N-point FFT on the first sampling signal is a rough measurement process, and the second N-point FFT on the signal after sampling and downsampling is a precise measurement process. Through the frequency measurement method combining rough measurement and precise measurement, the frequency measurement accuracy of the system can be effectively improved, the radiation delay time of the interference signal in the electronic warfare system can be reduced, and the hardware resources required for the system frequency measurement can be saved. The patent of the present invention is simple and practical, easy to implement in engineering, and has great engineering practical value.
[0067] Figure 2 This is a flow chart of another frequency measurement method provided by an embodiment of the present invention. The embodiment of the present invention further refines the above embodiment on the basis of the above embodiment. Figure 2 , the frequency measurement method includes:
[0068] S210 , performing a first N-point fast Fourier transform on a first sampling signal obtained by analog-to-digital sampling of the signal to be measured at a first sampling rate to obtain a first frequency.
[0069] S220 , down-sample the first sampling signal based on a preset sampling rate to obtain a second sampling signal sampled at a second sampling rate corresponding to the preset sampling rate.
[0070] S230 , performing a second N-point fast Fourier transform on the second sampling signal to obtain a second frequency.
[0071] S240, determining whether the second sampling rate is greater than or equal to twice the first frequency; if so, executing S250; if not, executing S260.
[0072] Specifically, it is determined whether the second sampling rate is greater than or equal to 2 times the first frequency, that is, it is determined whether fs / M≧2f 粗 , f 粗 Indicates the first frequency. If fs / M≧2f 粗 , it means that the second frequency satisfies the Nyquist sampling theorem. When the downsampled signal is transformed by the second N-point FFT, there is no spectrum aliasing. Then the second frequency is determined as the frequency measurement value of the signal to be measured. At this time, the frequency resolution changes from fs / N to fs / MN, which can significantly improve the frequency measurement accuracy of the system. If fs / M<2f 粗 , it means that the downsampled signal has spectrum aliasing. When solving the signal frequency, it is necessary to perform de-aliasing according to the second sampling rate and the first frequency, and determine the frequency measurement value of the signal to be measured according to the aliased frequency and the first frequency.
[0073] S250: Determine that no frequency aliasing occurs.
[0074] S260: Determine whether frequency aliasing occurs.
[0075] S270. Determine a frequency measurement value of the signal to be measured according to the second frequency when frequency aliasing does not occur.
[0076] S280: In the case of frequency aliasing, perform de-aliasing according to the second sampling rate and the first frequency to obtain a de-aliased frequency, and determine a frequency measurement value of the signal to be measured according to the de-aliased frequency and the first frequency.
[0077] Figure 3 This is a flow chart of another frequency measurement method provided by an embodiment of the present invention. The embodiment of the present invention further refines the above embodiments based on the above embodiments. Figure 3 , the frequency measurement method includes:
[0078] S310 , performing a first N-point fast Fourier transform on a first sampling signal obtained by performing analog-to-digital sampling on the signal to be measured at a first sampling rate to obtain a first frequency.
[0079] S320 , down-sample the first sampling signal based on a preset sampling rate to obtain a second sampling signal sampled at a second sampling rate corresponding to the preset sampling rate.
[0080] S330 , performing a second N-point fast Fourier transform on the second sampling signal to obtain a second frequency.
[0081] S340: Determine whether frequency aliasing occurs according to the first frequency and the second sampling rate.
[0082] S350: When frequency aliasing does not occur, determine the second frequency as a frequency measurement value of the signal to be measured.
[0083] S360: When frequency aliasing occurs, determine a frequency spectrum position of the signal to be measured after aliasing according to the aliased frequency.
[0084] The aliased frequency is equal to the product of the coefficient, the second sampling rate, and the first frequency, and the coefficient is positively correlated with the quotient of the first frequency and the second sampling rate. Optionally, the coefficient should satisfy the following expression:
[0085] k=[f 粗 / fs / M]; where k represents the coefficient, f 粗 represents the first frequency, fs / M represents the second sampling rate, and [] represents an integer not less than k.
[0086] Specifically, the Nyquist frequency is calculated first. The Nyquist frequency is half of the sampling frequency. In the case of frequency aliasing, the aliased frequency will appear within the range bounded by the Nyquist frequency. If the aliased frequency is positive, it means it is on the positive half axis of the spectrum; if it is negative, it means it is on the negative half axis of the spectrum. For example, assuming that the second sampling rate fs / M=1000Hz, the original frequency of the signal to be measured fs=1200Hz, the Nyquist frequency ft=1000 / 2=500Hz is calculated, and the aliased frequency f=k·fs / M·fo=200Hz. In practical applications, fo can be replaced by f. Then the aliased frequency spectrum position is that the aliased frequency 200Hz is within the range bounded by the Nyquist frequency 500Hz, and is positive, located on the positive half axis of the spectrum.
[0087] S370: Determine a third frequency obtained after the second fast Fourier transform according to the frequency spectrum position after aliasing, and use the third frequency as the frequency after dealiasing.
[0088] Specifically, assuming that the second sampling rate is fs / M and the number of FFT points is N, then the frequency resolution is fs / MN. Assuming that the spectrum position after aliasing is at the 200th point in the spectrum diagram, the frequency after FFT = 200*fs / MN, and the third frequency is obtained.
[0089] S380: Determine a frequency measurement value of the signal to be measured according to the third frequency and the first frequency.
[0090] Optionally, determining the frequency measurement value of the signal to be measured according to the third frequency and the first frequency includes:
[0091] Use the following formula to determine the frequency measurement value of the signal under test:
[0092] f 估 =[f 精1 +f 粗 ]; where f 估 Represents the frequency measurement value, f 精1 represents the third frequency, f 粗 represents the first frequency, f 粗 Only the part with an order of magnitude higher than fs / N is taken, and the part with an order of magnitude lower than fs / N is taken from f 精1 supply.
[0093] The technical solution provided by the embodiment of the present invention effectively improves the system frequency measurement accuracy, shortens the frequency measurement delay, and saves the hardware resources required by the frequency measurement algorithm by adopting a frequency measurement method combining coarse frequency measurement and fine frequency measurement by using two fast Fourier transforms.
[0094] Figure 4 A schematic diagram of a frequency measuring device provided by an embodiment of the present invention is shown in FIG. Figure 4 The frequency measuring device includes: a first frequency determination module 410, a second sampling signal determination module 420, a second frequency determination module 430, a judgment module 440, a first determination module 450 and a second determination module 460.
[0095] The first frequency determination module 410 is used to perform a first N-point fast Fourier transform on a first sampling signal obtained by analog-to-digital sampling of the signal to be measured at a first sampling rate to obtain a first frequency, wherein N is a positive integer.
[0096] The second sampling signal determination module 420 is used to downsample the first sampling signal based on a preset sampling rate to obtain a second sampling signal sampled at a second sampling rate corresponding to the preset sampling rate.
[0097] The second frequency determination module 430 is used to perform a second N-point fast Fourier transform on the second sampling signal to obtain a second frequency.
[0098] The determination module 440 is used to determine whether frequency aliasing occurs according to the first frequency and the second sampling rate.
[0099] The first determination module 450 is used to determine the frequency measurement value of the signal to be measured according to the second frequency when frequency aliasing does not occur.
[0100] The second determination module 460 is used to perform de-aliasing according to the second sampling rate and the first frequency to obtain a de-aliased frequency when frequency aliasing occurs, and determine a frequency measurement value of the signal to be measured according to the de-aliased frequency and the first frequency.
[0101] The frequency measuring device provided in the embodiment of the present invention can execute the frequency measuring method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0102] Figure 5 A schematic diagram of the structure of an electronic device for a frequency measurement method provided by an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0103] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0104] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0105] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a frequency measurement method.
[0106] In some embodiments, a frequency measurement method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the frequency measurement method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the frequency measurement method in any other appropriate manner (e.g., by means of firmware).
[0107] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0108] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0109] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0110] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0111] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0112] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0113] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0114] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A frequency measurement method, characterized in that: include: Performing a first N-point fast Fourier transform on a first sampling signal obtained by analog-to-digital sampling of the signal to be measured at a first sampling rate to obtain a first frequency; wherein N is a positive integer; Down-sampling the first sampling signal based on a preset sampling rate to obtain a second sampling signal sampled at a second sampling rate corresponding to the preset sampling rate; Performing a second N-point fast Fourier transform on the second sampling signal to obtain a second frequency; Determining whether frequency aliasing occurs according to the first frequency and the second sampling rate; In the absence of frequency aliasing, determining a frequency measurement value of the signal to be measured according to the second frequency; In the case of frequency aliasing, the de-aliasing frequency is obtained according to the second sampling rate and the first frequency, and the frequency measurement value of the signal to be measured is determined according to the de-aliasing frequency and the first frequency.
2. The frequency measurement method according to claim 1, characterized in that: Determining whether frequency aliasing occurs according to the first frequency and the second sampling rate includes: Determining whether the second sampling rate is greater than or equal to 2 times the first frequency; If so, determine that frequency aliasing does not occur; If not, it is determined that frequency aliasing occurs.
3. The frequency measurement method according to claim 1, characterized in that: In the absence of frequency aliasing, determining a frequency measurement value of the signal to be measured according to the second frequency includes: In the case where frequency aliasing does not occur, the second frequency is determined as a frequency measurement value of the signal to be measured.
4. The frequency measurement method according to claim 1, characterized in that: In the case of frequency aliasing, performing de-aliasing according to the second sampling rate and the first frequency to obtain a de-aliased frequency, and determining a frequency measurement value of the signal to be measured according to the de-aliased frequency and the first frequency includes: In the case of frequency aliasing, determining the frequency spectrum position of the signal to be measured after aliasing according to the aliased frequency; wherein the aliased frequency is equal to the product of a coefficient, the second sampling rate, and the first frequency, and the coefficient is positively correlated with the quotient of the first frequency and the second sampling rate; Determine a third frequency obtained after the second fast Fourier transform according to the frequency spectrum position after aliasing, and use the third frequency as the frequency after de-aliasing; A frequency measurement value of the signal to be measured is determined according to the third frequency and the first frequency.
5. The frequency measurement method according to claim 4, characterized in that: Determining the frequency measurement value of the signal to be measured according to the third frequency and the first frequency includes: Use the following formula to determine the frequency measurement value of the signal under test: f 估 =[f 精1 +f 粗 ]; where f 估 Represents the frequency measurement value, f 精1 represents the third frequency, f 粗 Indicates the first frequency.
6. The frequency measurement method according to claim 4, characterized in that: The coefficients should satisfy the following expressions: k=[f 粗 / fs / M]; where k represents the coefficient, f 粗 represents the first frequency, fs / M represents the second sampling rate, and [] represents an integer not less than k.
7. The frequency measurement method according to claim 1, characterized in that: The preset sampling rate is greater than 2.
8. A frequency measuring device, characterized in that: include: A first frequency determination module, the first frequency determination module is used to perform a first N-point fast Fourier transform on a first sampling signal obtained by analog-to-digital sampling of the signal to be measured at a first sampling rate to obtain a first frequency; wherein N is a positive integer; A second sampling signal determination module, the second sampling signal determination module is used to sample and downsample the first sampling signal based on a preset sampling rate to obtain a second sampling signal sampled at a second sampling rate corresponding to the preset sampling rate; A second frequency determination module, the second frequency determination module is used to perform a second N-point fast Fourier transform on the second sampling signal to obtain a second frequency; A judging module, configured to judge whether frequency aliasing occurs according to the first frequency and the second sampling rate; A first determining module, the first determining module is used to determine the frequency measurement value of the signal to be measured according to the second frequency when no frequency aliasing occurs; The second determination module is used for, when frequency aliasing occurs, de-aliasing according to the second sampling rate and the first frequency, and determining the frequency measurement value of the signal to be measured according to the aliased frequency and the first frequency.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the frequency measurement method according to any one of claims 1 to 7 when executed.
10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the frequency measurement method according to any one of claims 1 to 7.