Frequency measurement method, device and equipment
By using the phase difference method and the CORDIC algorithm to calculate frequency measurements, the problem of low efficiency in zero-crossing frequency measurement in spectrum analyzers is solved, and high-efficiency and high-precision frequency measurement is achieved.
Patent Information
- Application Number
- CN202510763689.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-11-14
AI Technical Summary
The zero-crossing frequency measurement method in existing spectrum analyzers requires extending the time window to improve frequency resolution and accuracy, resulting in low testing efficiency and making it unacceptable in most applications.
The phase difference method is used to measure the frequency of radio frequency signals. By determining the phase change of the target baseband signal within a time window and combining it with the CORDIC algorithm to calculate the phase angle, efficient and accurate frequency measurement is achieved.
It achieves high-resolution and high-precision frequency measurement in a shorter time, improving the efficiency and accuracy of frequency measurement and solving the problem of low test efficiency caused by the extended time window in zero-crossing frequency measurement.
Smart Images

Figure CN120948875A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of test and measurement technology, and in particular to a frequency measurement method, apparatus, and device. Background Technology
[0002] A spectrum analyzer is an instrument used to measure the spectral characteristics of electrical signals, such as signal distortion, frequency stability, and intermodulation distortion.
[0003] In related technologies, the zero-crossing method is used in spectrum analyzers for frequency measurement. The advantage of the zero-crossing method is its ease of implementation. However, when the frequency counter performs forward or reverse zero-crossing statistics on the measured signal, the maximum error of its statistical value N is ±1. If the effective time window is 1 second, the resolution of the calculated frequency measurement value is 1 Hz. To achieve higher frequency resolution and higher precision frequency measurements, the time window length needs to be increased. However, a long measurement time will severely impact testing efficiency, which is unacceptable in most applications. Summary of the Invention
[0004] This invention provides a frequency measurement method, apparatus, and device. After determining the phase change of the target baseband signal converted from the measured radio frequency signal within a time window, the phase change of the target baseband signal per unit time is further determined, thus accurately obtaining the frequency of the target baseband signal. Furthermore, based on the frequency transformation relationship of the system, the frequency of the measured radio frequency signal can be calculated efficiently and accurately, effectively improving the accuracy and resolution of frequency measurement and greatly enhancing the efficiency of frequency measurement.
[0005] This invention provides a frequency measurement method, comprising the following steps.
[0006] Determine the phase change of the target baseband signal within a time window; the target baseband signal is converted from the radio frequency signal to be measured. The frequency of the target baseband signal is determined based on the phase change amount; The frequency of the radio frequency signal corresponding to the baseband signal is determined based on the frequency of the target baseband signal.
[0007] According to a frequency measurement method provided by the present invention, determining the phase change of a target baseband signal within a time window includes: Determine the phase angle of the target baseband signal; Based on the phase angle of the target baseband signal, determine the phase change of the target baseband signal within the time window.
[0008] According to a frequency measurement method provided by the present invention, determining the phase angle of the target baseband signal includes: The phase angle of the target baseband signal is determined based on the CORDIC (Coordinate Rotation Digital Calculation) method.
[0009] According to a frequency measurement method provided by the present invention, determining the phase change of the target baseband signal within a time window based on the phase angle of the target baseband signal includes: The phase change of the target baseband signal within the time window is determined based on the following method: in Indicates the amount of phase change; The phase angle of the target baseband signal at the end of the time window; The phase angle of the target baseband signal at the start of the time window is indicated.
[0010] According to a frequency measurement method provided by the present invention, determining the frequency of the target baseband signal based on the phase change includes: The frequency of the target baseband signal is determined based on the following method: in, Indicates the frequency of the target baseband signal; Indicates the frequency of the clock; This represents the amount of phase change of the target baseband signal within the time window; Indicates the duration of the time window.
[0011] The present invention also provides a frequency measuring device, comprising the following modules: The first determining module is used to determine the phase change of the target baseband signal within a time window; the target baseband signal is converted from the radio frequency signal to be measured. The second determining module is used to determine the frequency of the target baseband signal based on the phase change amount; The measurement module is used to determine the frequency of the radio frequency signal corresponding to the baseband signal based on the frequency of the target baseband signal.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the frequency measurement method as described above.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the frequency measurement method as described above.
[0014] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the frequency measurement method as described above.
[0015] The frequency measurement method, apparatus, and device provided by this invention, after determining the phase change of the target baseband signal converted by the measured radio frequency signal within a time window, further determine the phase change of the target baseband signal per unit time, thus accurately obtaining the frequency of the target baseband signal; and further, based on the frequency transformation relationship of the system, the frequency of the measured radio frequency signal can be calculated efficiently and accurately, effectively improving the accuracy and resolution of frequency measurement and greatly enhancing the efficiency of frequency measurement. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a block diagram illustrating the working principle of the spectrum analyzer provided by the present invention.
[0018] Figure 2 This is one of the schematic diagrams of the zero-crossing frequency counter for measuring frequency provided by the present invention.
[0019] Figure 3 This is the second schematic diagram of the zero-crossing frequency counter for measuring frequency provided by the present invention.
[0020] Figure 4 This is a schematic diagram illustrating the implementation process of frequency measurement using a zero-crossing frequency counter provided by the present invention.
[0021] Figure 5 This is one of the schematic diagrams of the phase difference method frequency measurement process provided by the present invention.
[0022] Figure 6 This is the second schematic diagram of the phase difference method frequency measurement process provided by the present invention.
[0023] Figure 7 This is a schematic diagram illustrating the working principle of the digital down-converter provided by the present invention.
[0024] Figure 8 This is a schematic diagram of the frequency measuring device provided by the present invention.
[0025] Figure 9 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0027] The following is combined with Figures 1-9 The frequency measurement method, apparatus, and device of the present invention are described.
[0028] To facilitate a clearer understanding of the technical solutions of the various embodiments of this application, some technical content related to the various embodiments of this application will be introduced first.
[0029] Figure 1 A simplified block diagram of the working principle of a typical spectrum analyzer: The input radio frequency signal under test F RF The signal is mixed with the local oscillator signal LO generated by the local oscillator and then filtered by an intermediate frequency bandpass filter to generate an intermediate frequency signal F. IF The reference oscillator provides a precise reference clock, the ADC (Analog-to-Digital Converter) performs analog-to-digital conversion on the intermediate frequency signal, and then performs digital spectrum analysis, processing, and display. The scan generator generates the local oscillator scan and synchronizes the scanning, sampling, and analog-to-digital conversion. Spectrum analyzers typically use frequency counters for high-resolution frequency measurements. Traditional spectrum analyzers use the zero-crossing method for frequency measurement. The principle of the zero-crossing method for frequency measurement is very simple: the frequency counter statistically analyzes a specified time window T. S The frequency F of the intermediate frequency signal can be measured by the number of times N the intermediate frequency signal crosses zero upwards or downwards. IF .
[0030] Relationship based on frequency transformation The frequency of the radio frequency signal being measured can then be obtained.
[0031] Figure 2 The basic working principle of the zero-crossing frequency counter for frequency measurement is as follows: The frequency counter is reset to zero and starts counting at the rising edge of the time window signal. During the valid period of the time window signal, the measured signal is detected for either positive or negative zero crossing. When a valid positive or negative zero crossing is detected (only one of positive or negative zero crossing is selected), the frequency counter increments by 1 until the falling edge of the time window stops counting. The count value N of the frequency counter at this moment is recorded. The frequency measurement result is then calculated. The time window signal is generated by a precise reference clock to ensure high accuracy and stability of frequency measurement. When implementing the zero-crossing frequency counter digitally, to avoid false zero-crossings caused by noise or interference signals, two threshold values, positive and negative, should be set appropriately. The amplitudes of the positive and negative thresholds should not be set too small. Taking positive zero-crossing as an example, if the measured signal is affected by strong noise or glitches, and the amplitudes of the positive and negative thresholds are set too small, false positive zero-crossings may occur at time points 1 and 3. Simultaneously, positive zero-crossings may also be triggered at time points 2 and 4. The frequency counter will be triggered to count at points 1, 2, 3, and 4, leading to abnormal operation of the frequency counter and an overestimation of the measured frequency value. If the positive and negative thresholds are set appropriately, such as... Figure 3 As shown, only the frequency counter will be triggered to count the valid positive zero crossings at time points 1 and 2, and the frequency measurement results will be valid.
[0032] The implementation process of frequency measurement using a zero-crossing frequency counter is as follows: Figure 4 As shown: The digital implementation process of frequency measurement using a zero-crossing frequency counter in a typical spectrum analyzer is as follows: First, a clock window signal of a specified time length TS is generated from a precise clock reference provided internally or externally. The clock window signal is active high. Second, the frequency counter is cleared and frequency counting begins at the rising edge of the time window signal. Third, based on set positive and negative thresholds and other parameters, during the effective period of the time window, positive or negative zero-crossing detection is performed on the intermediate frequency signal sampled by the ADC in the digital domain. Once a valid zero-crossing is detected, the frequency counter increments by 1. Fourth, the frequency counter stops counting at the falling edge of the time window signal, and the frequency count value N is recorded. Fifth, the frequency count is calculated using the statistical value N, the time window length TS, and the formula... The frequency measurement value is calculated. Generally, the processing clock of the frequency counter is consistent with the sampling clock of the ADC (Analog-to-Digital Converter). These clocks are generated by a precise reference clock and maintain a fixed multiple relationship with it.
[0033] The advantage of a zero-crossing frequency counter is its ease of implementation. However, when the frequency counter performs positive or negative zero-crossing statistics on the measured signal, the maximum error of its statistical value N is ±1. If the effective time window is 1 second, then according to... The calculated frequency measurement has a resolution of 1 Hz. To achieve a higher frequency resolution and higher accuracy, such as a frequency measurement result with a resolution of 0.01 Hz, the time window needs to be increased to 100 s. The long measurement time will seriously affect the test efficiency, which is unacceptable in most applications.
[0034] Figure 5 This is one of the flowcharts of the frequency measurement method provided by the present invention, which includes the following: Step 501: Determine the phase change of the target baseband signal within the time window; the target baseband signal is converted from the radio frequency signal to be measured.
[0035] Specifically, zero-crossing frequency measurement is easy to implement, but if higher frequency resolution and higher accuracy frequency measurement are desired, the time window needs to be lengthened. The long measurement time will seriously affect the test efficiency, which is unacceptable in most applications.
[0036] To address the aforementioned issues, this embodiment first acquires the radio frequency signal to be measured, converts it into an intermediate frequency signal, then performs a down-conversion to obtain the target baseband signal, and determines the phase change of the target baseband signal within a preset time window.
[0037] Step 502: Determine the frequency of the target baseband signal based on the phase change.
[0038] Specifically, after determining the phase change of the target baseband signal within the time window, the phase change of the target baseband signal per unit time is further determined, which can accurately obtain the frequency of the target baseband signal.
[0039] Step 503: Determine the frequency of the radio frequency signal corresponding to the baseband signal based on the frequency of the target baseband signal.
[0040] Specifically, after determining the frequency of the target baseband signal, the frequency of the measured radio frequency signal can be calculated based on the frequency transformation relationship of the system. It should be noted that the phase difference method used in this embodiment to measure the frequency of the radio frequency signal can record the phase change of the measured signal within a specified time. This allows for accurate frequency measurement and high frequency resolution within a relatively short measurement time, capable of resolving frequency changes on the order of 0.01 Hz within 0.1 s. With this design, the ability to resolve frequency changes is no longer limited by the spectrum analyzer but is determined by the noise level of the measured signal, i.e., the signal-to-noise ratio (SNR). Compared to a zero-crossing frequency counter, the phase difference frequency counter takes one-tenth of the measurement time, but its frequency resolution performance is improved by two orders of magnitude. The former can resolve a 1 Hz frequency change in 1 s, while the latter only requires 0.1 s of measurement time to achieve a frequency resolution on the order of 0.01 Hz. Therefore, using the phase difference method for high-resolution frequency measurement in a spectrum analyzer can improve the accuracy and resolution of frequency measurement and significantly increase testing efficiency. Optionally, the frequency measurement method in this application embodiment can also be used in other applications of high-resolution, accurate frequency measurement of wired or radio signals, and no specific limitations are imposed in this application embodiment.
[0041] The method in the above embodiments, after determining the phase change of the target baseband signal converted by the measured radio frequency signal within the time window, further determines the phase change of the target baseband signal per unit time, which can accurately obtain the frequency of the target baseband signal; then, based on the frequency transformation relationship of the system, the frequency of the measured radio frequency signal can be calculated efficiently and accurately, effectively improving the accuracy and resolution of frequency measurement and greatly improving the efficiency of frequency measurement.
[0042] In some embodiments, determining the phase change of the target baseband signal within a time window includes: Determine the phase angle of the target baseband signal; Based on the phase angle of the target baseband signal, determine the phase change of the target baseband signal within the time window.
[0043] Specifically, the complex representation of the baseband signal after the RF signal to be tested is as follows: The I-path represents the real part of the complex signal, and the Q-path represents the imaginary part of the complex signal.
[0044] The exponential representation of the baseband signal is: , where r is the modulus of the complex number and θ is the phase angle of the complex number.
[0045] That is, the magnitude of a complex signal is the square root of the sum of the squares of the real part of the I-channel and the imaginary part of the Q-channel, while the phase angle of a complex signal is the arctangent of the ratio of the baseband signal I-channel to the baseband signal Q-channel.
[0046] The phase angle calculation module implemented using the CORDIC (Coordinate Rotation Digital Computer) algorithm in this embodiment can calculate the phase angle of the baseband signal. Optionally, the CORDIC coordinate rotation digital calculation method can be used for mutual conversion between rectangular and polar coordinate systems, solving trigonometric / inverse trigonometric functions, solving hyperbolic / inverse hyperbolic functions, and calculating square roots, exponents, and logarithms. The core idea of the CORDIC algorithm is to use an iterative method to make the sum of the cumulative rotation angles infinitely close to the target angle. It is a numerical approximation method that uses shift and addition / subtraction operations to replace multiplication operations, effectively solving various complex mathematical operations. The more iterations, the higher the calculation accuracy and the smaller the quantization error.
[0047] Optionally, after determining the phase angle of the target baseband signal, the phase change of the target baseband signal within the time window can be determined based on the difference between the phase angle of the target baseband signal at the end of the time window and the phase angle of the target baseband signal at the beginning of the time window. Furthermore, based on the phase change, the frequency of the target baseband signal and the frequency of the radio frequency signal can be accurately determined, effectively improving the accuracy and resolution of frequency measurement and increasing the efficiency of frequency measurement.
[0048] The method described in the above embodiments, after calculating the phase angle of the baseband signal based on the CORDIC algorithm, can determine the phase change of the target baseband signal within the time window based on the difference between the phase angle of the target baseband signal at the end of the time window and the phase angle of the target baseband signal at the beginning of the time window, thereby effectively improving the accuracy and resolution of frequency measurement and increasing the efficiency of frequency measurement.
[0049] In some embodiments, determining the phase change of the target baseband signal within a time window includes: The phase change of the target baseband signal within the time window is determined based on the following method: in Indicates the amount of phase change; The phase angle of the target baseband signal at the end of the time window; The phase angle of the target baseband signal at the start of the time window.
[0050] Specifically, in order to achieve high frequency resolution when using the phase difference method to measure the frequency of the signal under test in this embodiment, the phase difference statistics must have sufficient accuracy. Optionally, the phase angle θ output by the baseband signal phase angle calculation module implemented by the CORDIC algorithm has a range of... If the phase of the baseband signal at the start of the time window is... The phase of the baseband signal at the end of the time window is... ,but The range of values is Obviously and The difference cannot represent the change in phase of the measured signal within a specified time window because phase changes of several integer periods within the measurement time window are not accounted for, resulting in phase ambiguity. The actual phase difference... for: in The integer part of the phase difference represents an integer number of cycles (the phase change in each cycle is...). The phase change of ), where N is an integer; The fractional part of the phase difference represents the phase change over one period. It can be positive or negative; when it is positive, its range of values is... When it is negative, the range of values is .
[0051] Phase difference methods require statistical analysis of the phase changes of the baseband signal over an integer number of cycles, necessitating the resolution of phase ambiguity issues. This application's phase difference method uses the ADC sampling clock as the processing clock, assuming that the phase of the signal at the previous sampling point within the time window is... The phase of the signal at the current sampling point is The frequency range of the baseband signal under test is: Therefore, the absolute value of the phase change between two samples will not exceed half a period, and the corresponding phase difference in radians is π. If... or In this case, it indicates that phase ambiguity has occurred, therefore the actual phase difference between the two samples is... as follows: This application uses the phase difference method. Statistical analysis is performed on the integer part of the phase difference. The time window is reset to zero at its start; if phase ambiguity occurs, Subtract or add , Subtract when greater than π , When it is less than -π, add At the end of the time window The value of represents the integer part of the phase difference of the measured baseband signal within a specified time window. Obviously: N can be positive or negative because the frequency value of the baseband signal can be positive or negative; of course, when the frequency value is very small, N may also be equal to 0. At the end of the time window, by This allows us to obtain the actual phase change value of the baseband signal under test within a specified time window.
[0052] The method in the above embodiments, when it is determined that phase ambiguity has occurred, Subtract or add ,Right now Subtract when greater than π , When it is less than -π, add This effectively solves the phase difference problem, ensuring that the phase difference statistics have sufficient accuracy, and effectively improving the accuracy and resolution of frequency measurement.
[0053] In some embodiments, determining the frequency of the target baseband signal based on the amount of phase change includes: The frequency of the target baseband signal is determined based on the following method: in, Indicates the frequency of the target baseband signal; Indicates the frequency of the clock; This represents the amount of phase change of the target baseband signal within the time window; Indicates the duration of the time window.
[0054] Specifically, after determining the phase change of the target baseband signal within the time window, the phase change of the target baseband signal per unit time can also be determined, thereby accurately determining the frequency of the target baseband signal. Optionally, the frequency of the target baseband signal can be determined based on the following method: in, Indicates the frequency of the target baseband signal; Indicates the frequency of the clock; This represents the amount of phase change of the target baseband signal within the time window; Indicates the duration of the time window.
[0055] Optionally, if the time window If the design time is 0.1 s, then The resolution of frequency measurement of baseband signals is determined by the precision of the fractional part of the phase difference, i.e., by... The accuracy is determined by the number of iterations. If the number of iterations reaches 14 or more, the accuracy of the phase angle θ obtained using the CORDIC algorithm can reach [percentage missing]. That is, 1 / 8192 of an integer period, from which the resolution of the frequency measurement can be calculated as: This is on the order of two-thousandths of a Hertz. In fact, the frequency measurement error introduced by the noise level of the signal being measured can reach the order of one-hundredth of a Hertz or higher, so the phase difference method is sufficient to resolve frequencies. The ability of a frequency counter implemented using the phase difference method to resolve frequency changes is no longer limited by the spectrum analyzer, but is determined by the noise level of the signal being measured. In addition, the statistical processing of phase ambiguity by the phase difference method in this application is essentially equivalent to recording the number of zero-crossings of the baseband signal being measured, that is, the phase change of the baseband signal over an integer number of cycles. At the same time, it can accurately measure the amount of phase change within one cycle, which is the fundamental reason why the phase difference method can achieve higher frequency measurement resolution in a shorter measurement time.
[0056] The method described in the above embodiments uses the phase difference method to measure the frequency of radio frequency signals. It can record the phase change of the signal under test within a specified time. It can complete accurate frequency measurement and obtain high frequency resolution in a relatively short measurement time, thereby improving the accuracy and resolution of frequency measurement and increasing the efficiency of testing.
[0057] In some embodiments, determining the frequency of the radio frequency signal corresponding to the baseband signal based on the frequency of the target baseband signal includes: The frequency of the radio frequency signal corresponding to the baseband signal is determined based on the following method: in, Indicates the frequency of the radio frequency signal; Indicates the frequency of the local oscillator signal; This indicates the frequency of the target baseband signal.
[0058] Specifically, after determining the frequency of the baseband signal, since the frequency of the intermediate frequency signal has been eliminated during the digital down-conversion stage, the frequency conversion formula of the system becomes: This allows the frequency of the measured radio frequency signal to be calculated, effectively improving the accuracy and resolution of frequency measurement and increasing its efficiency.
[0059] For example, such as Figure 6 As shown in the embodiment of this application, a frequency measurement method is provided. First, the intermediate frequency analog signal F after the radio frequency signal under test is converted is used. IFThe signal is converted into a digital intermediate frequency (IF) signal by an ADC (Analog-to-Digital Converter). The DDC (Digital DownConverter) module shifts the signal spectrum, converting the digital IF signal to zero IF, generating I and Q baseband signals. The DDC module uses DDS (Direct Digital Synthesis) technology to generate a digital local oscillator (NCO) with a frequency matching the intermediate frequency (IF) signal. Two orthogonal NCO digital local oscillator signals are digitally mixed (i.e., multiplied) with the digital IF signal, and then low-pass filtered to obtain the IQ baseband signal. Optionally, the working principle block diagram of the digital down-converter is as follows: Figure 7 As shown: The digital downconverter consists of modules such as NCO digital local oscillator, digital mixer (multiplier), and LPF (Low Pass Filter).
[0060] The NCO (Number Coulomb Oscillator) is a digital frequency synthesis technology that directly synthesizes the desired waveform from the phase. It can output sine and cosine signals of different frequencies by setting different FCW (Frequency Control Word) frequencies. The NCO mainly consists of a phase accumulator and a sine / cosine lookup table.
[0061] The phase accumulator outputs different phase values according to the corresponding FCW parameters, where FCW is the step value of the phase change.
[0062] The bit width N of the phase accumulator is the same as the bit width of the frequency control word FCW, and the operating clock of NCO is... If the sampling rate is consistent with the signal, then the phase offset per clock cycle is: Therefore, the frequencies of the sinusoidal and cosine digital local oscillator signals generated by the NCO can be derived as follows: Set appropriate FCW frequency control word parameters so that By matching the intermediate frequency (IF) frequency, the IF signal spectrum can be shifted to zero IF to obtain the IQ baseband signal.
[0063] The output of the phase accumulator serves as the address of the sine and cosine lookup table, which outputs two mutually orthogonal digital local oscillator signals. These two NCO digital local oscillator signals are multiplied by the intermediate frequency sampling data, and then filtered by a low-pass filter to remove high-frequency components, yielding the in-phase branch I and the quadrature branch Q baseband signals.
[0064] The frequency resolution (i.e., the granularity of the frequency) of the digital local oscillator signal is: To achieve high accuracy in frequency measurement using a phase difference method frequency counter, the digital local oscillator signal must possess sufficient precision and resolution. The processing clock of a DDC digital downconverter... These clocks are generated from a precise reference clock and maintain a fixed proportional relationship with the reference clock, consistent with the sampling clock of the ADC analog-to-digital converter. Typically in the range of hundreds of megahertz, if the bit width N of the phase accumulator is designed to be 48 bits, then the frequency resolution of the digital local oscillator signal can be calculated to be in the range of one millionth of a hertz. The frequency measurement error introduced by the digital local oscillator signal can be ignored.
[0065] The use of digital synthesis local oscillator technology effectively ensures that the frequency measurement of the phase difference method frequency counter has sufficient frequency resolution and stability. Starting from the phase, it directly synthesizes the required waveform in a fully digital manner, unaffected by temperature and voltage changes, effectively avoiding the problems of temperature drift and component aging affecting the frequency measurement accuracy.
[0066] The complex representation of the baseband signal is: The I-path represents the real part of the complex signal, and the Q-path represents the imaginary part of the complex signal.
[0067] The phase angle calculation module, implemented using the CORDIC (Coordinate Rotation Digital Computer) algorithm, can calculate and process the phase angle of baseband signals.
[0068] The phase difference statistics module acts as a frequency counter, counting the measured signal within a specified time window TS. The change in internal phase, Δθ, is the phase difference, and the unit of phase difference is radians.
[0069] The frequency calculation module calculates according to the formula. The frequency of the baseband signal under test can then be calculated. In the formula... To handle the clock frequency, The duration of the time window.
[0070] Note that the signal frequency measured by the phase difference method frequency counter is the baseband signal frequency, while the intermediate frequency signal frequency has been eliminated during the digital down-conversion stage. Therefore, the frequency transformation formula of the system becomes: The frequency of the measured radio frequency signal can then be calculated.
[0071] The frequency measuring device provided by the present invention is described below. The frequency measuring device described below can be referred to in correspondence with the frequency measuring method described above. The frequency measuring device of the embodiments of this application is as follows: Figure 8 As shown, it includes: The first determining module 810 is used to determine the phase change of the target baseband signal within a time window; the target baseband signal is converted from the radio frequency signal to be measured. The second determining module 820 is used to determine the frequency of the target baseband signal based on the phase change amount; The measurement module 830 is used to determine the frequency of the radio frequency signal corresponding to the baseband signal based on the frequency of the target baseband signal.
[0072] Figure 9 A schematic diagram of the physical structure of an electronic device is provided. This electronic device may include a processor 910, a communications interface 920, a memory 930, and a communication bus 940. The processor 910, communications interface 920, and memory 930 communicate with each other via the communication bus 940. The processor 910 can call logical instructions in the memory 930 to execute a frequency measurement method. This method includes: determining the phase change of a target baseband signal within a time window; the target baseband signal being converted from a radio frequency signal to be measured; determining the frequency of the target baseband signal based on the phase change; and determining the frequency of the radio frequency signal corresponding to the baseband signal based on the frequency of the target baseband signal.
[0073] Furthermore, the logical instructions in the aforementioned memory 930 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0074] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the frequency measurement method provided by the above methods. The method includes: determining the phase change of a target baseband signal within a time window; the target baseband signal being converted from a radio frequency signal to be measured; determining the frequency of the target baseband signal based on the phase change; and determining the frequency of the radio frequency signal corresponding to the baseband signal based on the frequency of the target baseband signal.
[0075] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the frequency measurement method provided by the methods described above, the method comprising: determining the phase change of a target baseband signal within a time window; the target baseband signal being converted from a radio frequency signal to be measured; determining the frequency of the target baseband signal based on the phase change; and determining the frequency of the radio frequency signal corresponding to the baseband signal based on the frequency of the target baseband signal.
[0076] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0077] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A frequency measurement method, characterized in that, include: Determine the phase change of the target baseband signal within the time window; The target baseband signal is converted from the radio frequency signal to be measured; The frequency of the target baseband signal is determined based on the phase change. The frequency of the radio frequency signal corresponding to the baseband signal is determined based on the frequency of the target baseband signal.
2. The frequency measurement method according to claim 1, characterized in that, Determining the phase change of the target baseband signal within the time window includes: Determine the phase angle of the target baseband signal; Based on the phase angle of the target baseband signal, determine the phase change of the target baseband signal within the time window.
3. The frequency measurement method according to claim 2, characterized in that, Determining the phase angle of the target baseband signal includes: The phase angle of the target baseband signal is determined based on the CORDIC (Coordinate Rotation Digital Calculation) method.
4. The frequency measurement method according to claim 2, characterized in that, Determining the phase change of the target baseband signal within a time window based on the phase angle of the target baseband signal includes: The phase change of the target baseband signal within the time window is determined based on the following method: in Indicates the amount of phase change; The phase angle of the target baseband signal at the end of the time window; The phase angle of the target baseband signal at the start of the time window is indicated.
5. The frequency measurement method according to any one of claims 1-4, characterized in that, Determining the frequency of the target baseband signal based on the phase change includes: The frequency of the target baseband signal is determined based on the following method: in, Indicates the frequency of the target baseband signal; Indicates the frequency of the clock; This represents the amount of phase change of the target baseband signal within the time window; Indicates the duration of the time window.
6. The frequency measurement method according to claim 5, characterized in that, The step of determining the frequency of the radio frequency signal corresponding to the baseband signal based on the frequency of the target baseband signal includes: The frequency of the radio frequency signal corresponding to the baseband signal is determined based on the following method: in, Indicates the frequency of the radio frequency signal; Indicates the frequency of the local oscillator signal; This indicates the frequency of the target baseband signal.
7. A frequency measuring device, characterized in that, include: The first determining module is used to determine the phase change of the target baseband signal within a time window; The target baseband signal is converted from the radio frequency signal to be measured; The second determining module is used to determine the frequency of the target baseband signal based on the phase change amount; The measurement module is used to determine the frequency of the radio frequency signal corresponding to the baseband signal based on the frequency of the target baseband signal.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the frequency measurement method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the frequency measurement method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the frequency measurement method as described in any one of claims 1 to 6.