An improved frequency measurement algorithm and device based on FPGA

By improving the frequency measurement algorithm on the FPGA platform, using channel energy and phase difference calculations, the frequency measurement errors and resource waste caused by channel overlap are solved, and efficient and accurate frequency measurement is achieved.

CN118534190BActive Publication Date: 2024-11-15YANTAI BEIFANG XINGKONG SELF-CONTROL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411008059.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-15
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

The existing FPGA-based frequency measurement technology is prone to frequent switching and phase errors at channel overlap, resulting in inaccurate frequency measurement and high resource consumption.

Method used

Using an improved frequency measurement algorithm based on FPGA, the input broadband digital signal is divided into channels, the energy of each channel is calculated and the channel with the largest energy is selected for switching, the phase difference between two adjacent points of the signal is calculated, and the phase difference and channel are based on the phase difference and channel. The frequency is calculated to avoid switching channel data directly.

Benefits of technology

The accuracy of frequency measurement and resource saving are achieved, ensuring the accuracy of frequency calculation and reducing the consumption of channel resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118534190B_ABST
    Figure CN118534190B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of frequency measurement technology, and discloses an improved frequency measurement algorithm and device based on FPGA, the algorithm comprising: dividing the input broadband digital signal into channels and outputting a complex signal; calculating the energy of each channel and outputting the channel number with the highest energy value as the basis for channel switching; calculating the phase difference between two adjacent points of each channel signal; at the same time, outputting the channel number of the corresponding channel according to the channel number output by the channel switching module; calculating the frequency according to the phase difference and the channel number, and outputting the frequency value. The device applies the algorithm, and comprises: a digital signal channelization module, a channel switching module, a phase difference calculation module and a frequency calculation module. The present invention is based on the traditional FPGA channelization frequency measurement method and is improved, so as to ensure the accuracy of the final frequency calculation and effectively save resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of frequency measurement, and in particular to an improved frequency measurement algorithm and device based on FPGA. Background Art

[0002] At present, the mainstream frequency measurement method based on FPGA is to use channelized frequency measurement technology. The basic principle of channelized frequency measurement technology is: divide the broadband signal evenly into multiple narrowband signals, each narrowband is called a channel; if the signal frequency falls within the channel, the signal output power is large, if the signal does not fall within the channel, the channel has no output signal or the signal is small.

[0003] There are two conventional methods for processing the signals output by the channels: the first method is to perform frequency measurement and power measurement on each channel separately, and select the channel with large channel signal power as the frequency measurement result. This method has accurate frequency measurement results and fast speed, but consumes more resources; the second method is to calculate the power of each channel separately, switch the channel data according to the channel power, and use the switched data to measure the frequency. This method has the advantage of fast frequency measurement speed, but the signals at the overlapping channels will frequently switch the channel data, which will lead to errors in calculating the phase difference using adjacent points, and ultimately lead to frequency measurement errors. Summary of the invention

[0004] In order to overcome the defects of the prior art, the technical problem to be solved by the present invention is: how to perform accurate frequency measurement without wasting channel resources.

[0005] To solve the above technical problems, firstly, the present invention provides an improved frequency measurement algorithm based on FPGA, comprising the following steps:

[0006] S1: divide the input broadband digital signal into channels and output complex signals;

[0007] S2: Calculate the energy of each channel and output the channel number with the highest energy value as the basis for channel switching;

[0008] S3: Calculate the phase difference between two adjacent points of each channel signal; at the same time, output the channel number of the corresponding channel according to the channel number output by the channel switching module;

[0009] S4: Calculate the frequency according to the phase difference and the channel number, and output the frequency value.

[0010] Based on the above technical solution, the present invention can also be improved as follows.

[0011] Preferably, in step S1, the complex signal is a plurality of narrowband signals with equal bandwidth, and the calculation formula is as follows:

[0012] Where i is the channel number, A is the signal amplitude, is the initial phase, fs is the sampling frequency, f is the signal frequency, n is the sampling point number, is Gaussian white noise.

[0013] Preferably, in step S2, the energy calculation formula of the i-th channel is as follows:

[0014] .

[0015] Preferably, in step S3, the instantaneous autocorrelation method is used for calculation, and the calculation formula is as follows:

[0016] Among them, take m=1.

[0017] Preferably, in step S4, based on the channel center being frequency 0, the instantaneous frequency of channel i with the maximum energy value is calculated; the calculation formula is as follows:

[0018] Among them, fs is the sampling signal, and m=1.

[0019] Further preferably, in step S4, the final frequency is calculated according to the instantaneous frequency; the calculation formula is as follows:

[0020] fo = Bi + f, where B is the channel bandwidth, i is the channel number, and f is the instantaneous frequency of the channel.

[0021] Based on the above algorithm, the present invention also provides an improved frequency measurement device based on FPGA, the device applies the above algorithm, and the device includes: a digital signal channelization module, a channel switching module, a phase difference calculation module and a frequency calculation module.

[0022] Preferably, the digital signal channelization module is used to divide the input broadband digital signal into channels and output complex signals to the channel switching module and the phase difference calculation module.

[0023] Preferably, the channel switching module is used to calculate the energy of each channel, and output the channel number with the highest energy value to the phase difference calculation module and the frequency calculation module as a basis for channel switching;

[0024] The phase difference calculation module is used to calculate the phase difference between two adjacent points of each channel signal; at the same time, according to the channel number output by the channel switching module, the channel number of the corresponding channel is output; the phase difference and the channel number are both sent to the frequency calculation module.

[0025] Preferably, the frequency calculation module is used to calculate the frequency according to the phase difference and the channel number, and output the frequency value.

[0026] Compared with the prior art, the present invention can produce the following beneficial technical effects:

[0027] 1. In the present invention, the phase difference is calculated for each channel respectively, and the phase difference calculation frequency of the channel signal power with the largest power is selected according to the channel power;

[0028] 2. In the present invention, the phase difference is switched according to the channel energy instead of directly switching the channel data, which ensures the accuracy of the final frequency calculation;

[0029] 3. In the present invention, single-channel frequency calculation is performed, which can effectively save resources compared with the existing full channel calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 It is a flow chart of the steps of the improved frequency measurement algorithm based on FPGA of the present invention;

[0032] Figure 2 It is a structural schematic diagram of the improved frequency measurement device based on FPGA of the present invention.

[0033] In the accompanying drawings, the component names represented by the reference numerals are listed as follows:

[0034] 100: digital signal channelization module, 200: channel switching module, 300: phase difference calculation module, 400: frequency calculation module. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 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 are within the scope of protection of the present invention.

[0036] Please refer to Figure 1 As shown, it is a flow chart of the steps of the improved frequency measurement algorithm based on FPGA of the present invention; the method comprises the following steps:

[0037] S1: divide the input broadband digital signal into channels and output a complex signal; the complex signal is a plurality of narrowband signals with equal bandwidth, and the calculation formula is as follows:

[0038] Where i is the channel number, A is the signal amplitude, is the initial phase, fs is the sampling frequency, f is the signal frequency, n is the sampling point number, is Gaussian white noise;

[0039] It is known that the higher the frequency, the worse the FPGA frequency measurement accuracy. By dividing the channel, the original broadband digital signal is converted into multiple narrowband signals with equal bandwidth, which reduces the signal frequency and improves the frequency measurement accuracy.

[0040] S2: Calculate the energy of each channel and output the channel number with the highest energy value as the basis for channel switching; the energy calculation formula for the i-th channel is: .

[0041] S3: Calculate the phase difference between two adjacent points of each channel signal; at the same time, output the channel number of the corresponding channel according to the channel number output by the channel switching module; use the instantaneous autocorrelation method for calculation, and the calculation formula is: ; To avoid phase ambiguity, take m=1.

[0042] S4: Calculate the frequency according to the phase difference and the channel number, and output the frequency value; specifically,

[0043] First, the instantaneous frequency is calculated, that is, based on the channel center being 0 frequency, the instantaneous frequency of channel i with the largest energy value is calculated according to the obtained channel energy; the calculation formula is as follows:

[0044] Where, fs is the sampling signal, and to avoid phase ambiguity, m=1;

[0045] Then, the final frequency is calculated according to the instantaneous frequency; the calculation formula is as follows:

[0046] fo = Bi + f, where B is the channel bandwidth, i is the channel number, and f is the instantaneous frequency of the channel.

[0047] Please refer to Figure 2 As shown, it is a structural schematic diagram of the improved frequency measurement device based on FPGA of the present invention; in the present invention, the device applies the algorithm, which includes: a digital signal channelization module 100, a channel switching module 200, a phase difference calculation module 300 and a frequency calculation module 400; wherein,

[0048] The digital signal channelization module 100 is used to divide the input broadband digital signal into channels and output complex signals to the channel switching module 200 and the phase difference calculation module 300;

[0049] The channel switching module 200 is used to calculate the energy of each channel and output the channel number with the highest energy value to the phase difference calculation module 300 and the frequency calculation module 400 as a basis for channel switching;

[0050] The phase difference calculation module 300 is used to calculate the phase difference between two adjacent points of each channel signal; at the same time, according to the channel number output by the channel switching module, the channel number of the corresponding channel is output; the phase difference and the channel number are sent to the frequency calculation module 400;

[0051] The frequency calculation module 400 is used to calculate the frequency according to the phase difference and the channel number, and output the frequency value.

[0052] In summary, the present invention is based on the improvement of the traditional FPGA channelized frequency measurement method. The multi-channel data output by the digital signal channelization module enters the phase difference calculation module to calculate the phase difference between two adjacent points of each channel signal, and enters the channel switching module to calculate the channel with the largest power and output the channel number. The phase difference calculation module switches data according to the channel number output by the channel switching module, and the frequency calculation module calculates the frequency according to the phase difference output by the phase difference calculation module and the channel number output by the channel switching module.

[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An improved frequency measurement algorithm based on FPGA, characterized in that: The steps include: S1: divide the input broadband digital signal into channels and output complex signals; In step S1, the complex signal is a plurality of narrowband signals with equal bandwidth, and the calculation formula is as follows: Where i is the channel number, A is the signal amplitude, is the initial phase, fs is the sampling frequency, f is the instantaneous frequency of the channel, n is the sampling point number, is Gaussian white noise; S2: Calculate the energy of each channel and output the channel number with the highest energy value as the basis for channel switching; in step S2, the energy calculation formula of the i-th channel is as follows: S3: Calculate the phase difference between two adjacent points of each channel signal; at the same time, output the channel number of the corresponding channel according to the channel number output by the channel switching module; In step S3, the instantaneous autocorrelation method is used for calculation, and the calculation formula is as follows: Among them, take m=1; S4: Calculate the frequency according to the phase difference and the channel number, and output the frequency value; In step S4, based on the channel center being 0 frequency, the instantaneous frequency of channel i with the maximum energy value is calculated; the calculation formula is as follows: Where, fs is the sampling signal, and m=1; In step S4, the final frequency is calculated according to the instantaneous frequency; the calculation formula is as follows: fo = Bi + f Where B is the channel bandwidth, i is the channel number, and f is the instantaneous frequency of the channel.

2. An improved frequency measurement device based on FPGA, characterized in that: The device applies the algorithm described in claim 1, and the device includes: a digital signal channelization module, a channel switching module, a phase difference calculation module and a frequency calculation module.

3. The improved frequency measurement device based on FPGA according to claim 2, characterized in that: The digital signal channelization module is used to divide the input broadband digital signal into channels and output complex signals to the channel switching module and the phase difference calculation module.

4. The improved frequency measurement device based on FPGA according to claim 3, characterized in that: The channel switching module is used to calculate the energy of each channel, and output the channel number with the highest energy value to the phase difference calculation module and the frequency calculation module as a basis for channel switching; The phase difference calculation module is used to calculate the phase difference between two adjacent points of each channel signal; at the same time, according to the channel number output by the channel switching module, the channel number of the corresponding channel is output; the phase difference and the channel number are both sent to the frequency calculation module.

5. The improved frequency measurement device based on FPGA according to claim 4, characterized in that: The frequency calculation module is used to calculate the frequency according to the phase difference and the channel number, and output the frequency value.