Frequency offset determination method and device, storage medium and electronic equipment

By mixing and processing the received signal, initial frequency offset information is obtained and frequency compensation is performed, achieving fast and accurate frequency offset calibration of the crystal oscillator. This solves the problem of low efficiency in frequency offset determination in existing technologies and improves the efficiency of frequency offset calibration.

CN121841910APending Publication Date: 2026-04-10SHANGHAI CYGNUS SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing methods for determining the frequency offset of digitally controlled crystal oscillators are inefficient, leading to increased complexity and cost in production line calibration and failing to meet the requirements of high-precision communication systems.

Method used

By receiving single-tone signals, mixing and processing them, initial frequency offset information is obtained. Accurate frequency offset is obtained using frequency compensation. A two-step frequency offset estimation method is used to achieve fast and accurate frequency offset calibration.

Benefits of technology

It improves the efficiency of frequency offset determination, reduces signal processing complexity, achieves fast and accurate crystal oscillator frequency offset calibration, and solves the problem of low efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121841910A_ABST
    Figure CN121841910A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a frequency offset determination method and device, a storage medium and electronic equipment, and the method comprises the steps: carrying out the frequency mixing of a first single-tone signal through employing a local oscillator signal in response to a received first single-tone signal, obtaining a first frequency mixing signal, carrying out the signal processing and sampling processing of the first frequency mixing signal, and obtaining a second frequency mixing signal; the method comprises the steps of obtaining a first single-tone signal, obtaining a first sampling signal corresponding to the first single-tone signal, carrying out specified feature point statistics on the first sampling signal to determine initial frequency offset information of the crystal oscillator, obtaining a second sampling signal, and determining the frequency offset of the crystal oscillator based on the second sampling signal and the initial frequency offset information. Through the frequency offset calibration method and device, the frequency offset calibration of the crystal oscillator is realized quickly and accurately, the problem of low efficiency caused by piece-by-piece traversal configuration of a frequency offset determination method in the related technology is solved, and the frequency offset determination efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of communication, in particular to a frequency offset determination method and device, a storage medium and an electronic device. BACKGROUND

[0002] In the field of calibration and testing of communication equipment, the frequency accuracy and stability of a digital controlled crystal oscillator (DCXO) are crucial, as they can directly affect the reliability and performance of a communication system. As cellular communication frequencies become increasingly high, the requirement for clock accuracy also becomes increasingly high, especially in the case of 5G NR in the 5G communication system, FR1 needs to support up to 6GHz. When the frequency offset introduced by the crystal oscillator is 0.1ppm, a frequency offset of 600Hz will be introduced, which greatly affects the communication quality and increases the bit error rate. Therefore, it is particularly important to accurately estimate and calibrate the frequency offset of the crystal oscillator.

[0003] In related technologies, due to the process deviation of the digital controlled crystal oscillator and the clock accuracy requirement, the golden value in the laboratory cannot meet the requirement, and the best frequency compensation value is found by traversing multiple configuration points to correct the digital controlled crystal oscillator. This not only consumes a lot of time, but also increases the complexity and cost of the production line calibration. Therefore, the process of determining the frequency offset of the digital controlled crystal oscillator is complicated, which leads to the technical problem of low efficiency of the frequency offset determination method in related technologies. SUMMARY

[0004] Embodiments of the present application provide a frequency offset determination method and device, a storage medium and an electronic device to at least solve the technical problem of low efficiency of the frequency offset determination method in related technologies.

[0005] According to an aspect of the embodiments of the present application, a method for determining frequency offset is provided. The method comprises: mixing a first single-tone signal with a local oscillator signal to obtain a first mixed signal, in response to the received first single-tone signal, wherein the signal frequency of the local oscillator signal is the output frequency of a crystal oscillator; performing signal processing and sampling processing on the first mixed signal to obtain a first sampling signal corresponding to the first single-tone signal, wherein the first sampling signal is a digital signal with a signal frequency lower than a first preset frequency; determining initial frequency offset information of the crystal oscillator by performing specified feature point statistics on the first sampling signal, wherein the specified feature point is a feature point with a sign change between adjacent sampling points; obtaining a second sampling signal, wherein the second sampling signal is obtained by performing frequency compensation on the first sampling signal or the local oscillator signal using the initial frequency offset information; and determining the frequency offset of the crystal oscillator based on the second sampling signal and the initial frequency offset information, wherein the frequency offset of the crystal oscillator is the difference between the output frequency of the crystal oscillator and the design frequency of the crystal oscillator.

[0006] According to another aspect of the embodiments of the present application, a device for determining frequency offset is also provided. The device comprises: a first mixing unit configured to mix a first single-tone signal with a local oscillator signal to obtain a first mixed signal, in response to the received first single-tone signal, wherein the signal frequency of the local oscillator signal is the output frequency of a crystal oscillator; a first performing unit configured to perform signal processing and sampling processing on the first mixed signal to obtain a first sampling signal corresponding to the first single-tone signal, wherein the first sampling signal is a digital signal with a signal frequency lower than a first preset frequency; a first determining unit configured to determine initial frequency offset information of the crystal oscillator by performing specified feature point statistics on the first sampling signal, wherein the specified feature point is a feature point with a sign change between adjacent sampling points; a first obtaining unit configured to obtain a second sampling signal, wherein the second sampling signal is obtained by performing frequency compensation on the first sampling signal or the local oscillator signal using the initial frequency offset information; and a second determining unit configured to determine the frequency offset of the crystal oscillator based on the second sampling signal and the initial frequency offset information, wherein the frequency offset of the crystal oscillator is the difference between the output frequency of the crystal oscillator and the design frequency of the crystal oscillator.

[0007] In one exemplary embodiment, the first mixing unit comprises: a first mixing module configured to mix the first single-tone signal with the local oscillator signal generated by an oscillator to obtain the first mixed signal, in response to the first single-tone signal sent by a test instrument, wherein the signal frequency of the first single-tone signal is a first specified frequency, and the signal frequency of the local oscillator signal is a second specified frequency, and the first specified frequency is greater than the second specified frequency.

[0008] In one example embodiment, the first execution unit comprises: a first filtering module configured to perform low-pass filtering on the first mixed signal to obtain a low-pass filtered first mixed signal; and a first sampling module configured to perform sampling processing on the low-pass filtered first mixed signal to obtain the first sampling signal corresponding to the first single-tone signal.

[0009] In one example embodiment, the first determination unit comprises: a first determination module configured to perform specified feature point statistics on the first sampling signal to determine the number of specified feature points corresponding to the first sampling signal; a first calculation module configured to calculate the signal frequency of the first sampling signal based on the number of specified feature points corresponding to the first sampling signal and the sampling duration of the first sampling signal; a first acquisition module configured to acquire a third sampling signal, wherein the third sampling signal is obtained by frequency compensation using the signal frequency of the first sampling signal, and the sampling duration of the third sampling signal is the same as the sampling duration of the first sampling signal; and a second determination module configured to determine the frequency deviation direction of the crystal oscillator based on the third sampling signal, wherein the initial frequency deviation information comprises the signal frequency of the first sampling signal and the frequency deviation direction.

[0010] In one example embodiment, the second determination module is further configured to: perform specified feature point statistics on the third sampling signal to determine the number of specified feature points corresponding to the third sampling signal; in the case that the number of specified feature points corresponding to the third sampling signal is a multiple of the number of specified feature points corresponding to the first sampling signal, determine that the frequency deviation direction of the crystal oscillator indicates that the signal frequency of the first sampling signal is positive; and in the case that the number of specified feature points corresponding to the third sampling signal is not a multiple of the number of specified feature points corresponding to the first sampling signal, determine that the frequency deviation direction of the crystal oscillator indicates that the signal frequency of the first sampling signal is negative.

[0011] In one example embodiment, the first acquisition unit comprises: a first compensation module configured to perform frequency compensation on the first sampling signal using the initial frequency deviation information to obtain the second sampling signal, or a second compensation module configured to receive a second single-tone signal and perform frequency deviation compensation on the local oscillator signal using the initial frequency deviation information to obtain a compensated local oscillator signal; a second mixing module configured to mix the compensated local oscillator signal with the second single-tone signal to obtain a second mixed signal; and a first processing module configured to perform signal processing and sampling processing on the second mixed signal to obtain a second sampling signal corresponding to the second single-tone signal, wherein the second sampling signal is a digital signal with a signal frequency lower than a first preset frequency, and the signal frequency of the second single-tone signal is the same as the signal frequency of the first single-tone signal.

[0012] In an example embodiment, the second determining unit comprises: a second processing module, configured to perform sampling processing on the second sampling signal according to a specified sampling manner to obtain a fourth sampling signal and a fifth sampling signal, wherein the specified sampling manner is sampling according to a period of the second sampling signal, the fourth sampling signal and the fifth sampling signal belong to signals of the second sampling signal in the same period, a number of sampling points of the fourth sampling signal and the fifth sampling signal is a specified number, and the specified number is less than one half of a number of sampling points of the second sampling signal in one period; a second calculating module, configured to calculate a frequency offset compensation value of the crystal oscillator based on the fourth sampling signal, the fifth sampling signal, the specified number, a specified time difference, and a sampling rate, wherein the specified time difference is a sampling time difference between the fourth sampling signal and the fifth sampling signal; and a third calculating module, configured to calculate a frequency offset of the crystal oscillator based on the frequency offset compensation value, the initial frequency offset information, and a design frequency of the crystal oscillator.

[0013] According to another aspect of the embodiments of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. The computer program is configured to be executed by a processor to perform the steps in any of the method embodiments.

[0014] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, and the computer program product or the computer program comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the steps in any of the method embodiments.

[0015] According to another aspect of the embodiments of the present application, an electronic device is provided, and the electronic device comprises a memory and a processor. The memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any of the method embodiments.

[0016] Through the present application, in response to the received first single-tone signal, the first single-tone signal is mixed with the local oscillator signal to obtain a first mixed signal, and then the first mixed signal is processed and sampled to obtain a first sampling signal with a lower frequency, which realizes the conversion of the to-be-measured signal into a digital signal format suitable for subsequent analysis, reduces the complexity of signal processing, and performs specified feature point statistics on the first sampling signal to obtain initial frequency offset information of the crystal oscillator. The initial frequency offset information obtained by preliminary estimation is used to compensate the frequency of the first sampling signal to obtain a second sampling signal. Based on the second sampling signal and the initial frequency offset information, the accurate frequency offset of the crystal oscillator can be determined. Through real-time signal processing and two-step frequency offset estimation (preliminary estimation and accurate compensation), fast and accurate frequency offset calibration of the crystal oscillator is realized, and the problem of low efficiency caused by slice-by-slice traversal configuration in the related art is solved, and the efficiency of frequency offset determination is improved. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 is an application scenario of a frequency offset determination method according to an embodiment of the present application;

[0018] Figure 2 is a flowchart of an optional frequency offset determination method according to an embodiment of the present application;

[0019] Figure 3 is a schematic diagram of an optional first sampling signal according to an embodiment of the present application;

[0020] Figure 4 is a schematic diagram of an optional fourth sampling signal and a fifth sampling signal according to an embodiment of the present application;

[0021] Figure 5 is a schematic diagram of an optional frequency offset determination method according to an embodiment of the present application;

[0022] Figure 6 is a structural block diagram of an optional frequency offset determination device according to an embodiment of the present application;

[0023] Figure 7 is a computer system structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application, so that those skilled in the art can better understand the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to include only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0026] According to an aspect of the embodiments of the present application, a frequency offset determination method is provided. Optionally, in the present embodiment, the above-mentioned frequency offset determination method can be applied in, but is not limited to, a hardware environment as shown in the figure comprising a terminal device 102 and a server 104. The server 104 can be connected with the terminal device 102 through a network, and can be used to provide services (for example, application services, etc.) for the terminal device 102 or a client installed on the terminal device 102, and a database can be set on the server 104 or independently of the server 104, to provide data storage services for the server 104. Figure 1

[0027] The above-mentioned network can include, but is not limited to, at least one of the following: wired network, wireless network. The above-mentioned wired network can include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network, and the above-mentioned wireless network can include, but is not limited to, at least one of the following: Wireless Fidelity (WIFI), Bluetooth. The terminal device 102 can be, but is not limited to, a personal computer (PC), a mobile phone, a tablet computer, etc. The server 104 can be, but is not limited to, a cloud server, a server cluster or other server types.

[0028] ​The frequency offset determination method of the embodiments of the present application can be executed by the server 104, or by the terminal device 102, or by the server 104 and the terminal device 102 jointly. The terminal device 102 executing the frequency offset determination method of the embodiments of the present application can also be executed by a client installed thereon.

[0029] Taking the terminal device 102 executing the frequency offset determination method in the embodiments as an example, Figure 2 is a flow diagram of an optional frequency offset determination method according to the embodiments of the present application, as shown in the figure, the flow of the method can include the following steps: Figure 2

[0030] Step S202, in response to the received first single-tone signal, mixing the first single-tone signal using the local oscillator signal to obtain a first mixed signal, wherein the signal frequency of the local oscillator signal is the output frequency of the crystal oscillator;

[0031] Step S204, performing signal processing and sampling processing on the first mixed signal to obtain a first sampling signal corresponding to the first single-tone signal, wherein the first sampling signal is a digital signal with a signal frequency lower than a first preset frequency;

[0032] Step S206, performing specified feature point statistics on the first sampling signal to determine the initial frequency offset information of the crystal oscillator, wherein the specified feature point is a feature point where the signal values of adjacent sampling points change in sign;

[0033] Step S208, obtaining a second sampling signal, wherein the second sampling signal is obtained by frequency compensation on the first sampling signal or the local oscillator signal using the initial frequency offset information;

[0034] Step S210, determining the frequency offset of the crystal oscillator based on the second sampling signal and the initial frequency offset information, wherein the frequency offset of the crystal oscillator is the difference between the output frequency of the crystal oscillator and the design frequency of the crystal oscillator.

[0035] The frequency offset determination method in the embodiments can be applied to the field of communication technology and is suitable for devices in the field of communication technology that require high-precision and stable clock signals, such as 5G base stations, mobile communication terminals, satellite communication systems, etc. In the frequency offset determination method of the embodiments, it is mainly applied to scenarios that require estimation and correction of the frequency deviation of the crystal oscillator (DCXO) to ensure the reliability and accuracy of signal transmission in the communication system. In the communication system, the crystal oscillator serves as the reference for signal frequency, and its accuracy and stability directly affect the performance of the system. In particular, in the 5G communication system, the frequency requirements for signals are more stringent, and the frequency deviation may affect the rate and quality of data transmission, resulting in an increase in the bit error rate. Therefore, it is particularly important to accurately estimate and calibrate the frequency deviation of the crystal oscillator.​

[0036] In the related art, due to the process deviation of the digitally controlled crystal oscillator and the clock accuracy requirement, the golden value of the laboratory cannot meet the requirement, and the best frequency compensation value is found by piece-by-piece calibration and traversal of multiple configuration points to correct the digitally controlled crystal oscillator, which not only consumes a large amount of time, but also increases the complexity and cost of the production line calibration. Therefore, the process of determining the frequency deviation of the digitally controlled crystal oscillator is complicated, which leads to the technical problem of low efficiency of the frequency deviation determination method in the related art.

[0037] In order to at least partially solve the above technical problems, in the embodiment, the first single-tone signal is mixed with the local oscillator signal to obtain a first mixed signal, and then the first mixed signal is processed and sampled to obtain a first sampled signal with a lower frequency, which converts the to-be-tested signal into a digital signal format suitable for subsequent analysis, reduces the complexity of signal processing, and obtains the initial frequency deviation information of the crystal oscillator by performing specified feature point statistics on the first sampled signal. The initial frequency deviation information obtained by preliminary estimation is used to compensate the frequency of the first sampled signal to obtain a second sampled signal. Based on the second sampled signal and the initial frequency deviation information, the accurate frequency deviation of the crystal oscillator can be determined. Through real-time signal processing and two-step frequency deviation estimation (preliminary estimation and accurate compensation), fast and accurate frequency deviation calibration of the crystal oscillator is realized, the problem of low efficiency of the frequency deviation determination method in the related art due to the traversal of the configuration is solved, and the efficiency of the frequency deviation determination is improved.

[0038] It should be noted that the first single-tone signal can refer to a continuous wave signal of a specific frequency emitted by a signal source or a spectrum analyzer, which is used to test the frequency response and frequency deviation of the receiving channel of the receiver. The local oscillator signal can refer to the signal generated by the local oscillator in the receiver, which can be used for mixing with the received signal in the down-conversion process. The frequency accuracy and stability of the local oscillator signal directly affect the quality of the received signal. The received signal, i.e., the first single-tone signal, is mixed with the local oscillator signal in the mixer to obtain a first mixed signal. The signal frequency of the first mixed signal is determined based on the difference between the signal frequencies of the first single-tone signal and the local oscillator signal.

[0039] The crystal oscillator can be included in the receiver, and the crystal oscillator can be an electronic oscillator using the piezoelectric effect of a quartz crystal to generate a stable frequency, serving as a clock reference in the receiver, and its performance directly affects the clock synchronization and signal processing of the communication system. The output frequency of the crystal oscillator is the signal frequency of the local oscillator. After obtaining the first mixed frequency signal, the first mixed frequency signal is processed and sampled to obtain a first sampling signal, wherein the signal frequency of the processed first mixed frequency signal is less than a first preset frequency. The first sampling signal is obtained by digitizing the processed first mixed frequency signal, and the number of samples and the sampling rate determine the accuracy and range of frequency estimation. The first sampling signal is a digital signal that can be represented by a series of discrete values, facilitating subsequent digital signal processing and analysis. The first sampling signal is processed to obtain the number of specified feature points corresponding to the first sampling signal. The specified feature point can refer to a point with characteristic properties selected in the signal processing. In this embodiment, the specified feature point is a feature point where the signal values of adjacent sampling points change in sign, which can be used to assist frequency estimation and signal analysis. The specified feature point can be a zero point. The change in sign of the signal values of adjacent sampling points can refer to the process of the signal changing from positive to negative or from negative to positive, such as zero crossing detection, to estimate the signal frequency. The initial frequency offset information is the initial difference between the actual frequency of the crystal oscillator of the receiver before calibration and the design frequency, which is the starting parameter of the calibration process.

[0040] The second sampling signal can refer to the first sampling signal after frequency compensation, which is used for more accurate frequency offset estimation. Of course, the second sampling signal can also be a sampling signal obtained after the local oscillator signal is supplemented using the initial frequency offset information, and the received signal is adjusted according to the preliminary frequency offset estimation to reduce the residual frequency offset in the subsequent phase estimation.

[0041] The design frequency of the crystal oscillator can refer to the frequency that should be output under ideal conditions, which is the target reference for frequency accuracy and calibration. The output frequency of the crystal oscillator can refer to the actual frequency generated by the crystal oscillator, which may deviate from the design frequency due to environmental factors, aging, or manufacturing errors. The frequency offset of the crystal oscillator can refer to the difference between the design frequency of the crystal oscillator and the output frequency of the crystal oscillator.

[0042] Optionally, the first mixed frequency signal can be processed to obtain a processed first mixed frequency signal. Specifically, the signal processing can at least include filtering processing and signal conversion processing, the filtering processing can be implemented by a filter in the receiver, and the signal conversion processing can be processed by a signal conversion module in the receiver.

[0043] Optionally, the first sampling signal is processed to analyze the number of specified feature points in the first sampling signal. Specifically, the first sampling signal can be processed by using an NCO (Numerically Controlled Oscillator) to determine the number of specified feature points in the first sampling signal. For example, if the signal duration of the first sampling signal is 1 second, and there are 1000 zero-crossing points in the signal within 1 second, then the signal frequency is 500 Hz. In combination with the known frequency of the local oscillator signal, the frequency deviation direction and approximate value of the crystal oscillator can be preliminarily estimated, laying a foundation for subsequent accurate compensation.

[0044] Optionally, the initial frequency deviation information can include an initial frequency deviation and a frequency deviation direction, and the first sampling signal is adjusted using the initial frequency deviation and the frequency deviation direction to obtain a second sampling signal, or the local oscillator signal is adjusted using the initial frequency deviation and the frequency deviation direction to obtain the second sampling signal based on the adjusted local oscillator signal.

[0045] Optionally, the second sampling signal can be used to accurately calculate the small difference between the output frequency of the crystal oscillator and the design frequency through more precise measurement means such as phase difference.

[0046] Through the embodiments provided in the present application, in response to the received first single-tone signal, the first single-tone signal is mixed with the local oscillator signal to obtain a first mixed signal, and then the first mixed signal is processed and sampled to obtain a first sampling signal with a lower frequency, which realizes the conversion of the to-be-tested signal into a digital signal format suitable for subsequent analysis, reduces the complexity of signal processing, and performs specified feature point statistics on the first sampling signal to obtain initial frequency deviation information of the crystal oscillator. The initial frequency deviation information preliminarily estimated is used to compensate the frequency of the first sampling signal to obtain a second sampling signal. Based on the second sampling signal and the initial frequency deviation information, the accurate frequency deviation of the crystal oscillator can be determined. Through real-time signal processing and two-step frequency deviation estimation (preliminary estimation and accurate compensation), fast and accurate frequency deviation calibration of the crystal oscillator is realized, and the low efficiency problem of the frequency deviation determination method in the related art caused by the slice-by-slice traversal configuration is solved, and the efficiency of frequency deviation determination is improved.

[0047] In one example embodiment, in response to the received first single-tone signal, the first single-tone signal is mixed with the local oscillator signal to obtain a first mixed signal, including: in response to the first single-tone signal sent by the test instrument, the first single-tone signal is mixed with the local oscillator signal generated by the oscillator to obtain a first mixed signal, wherein the signal frequency of the first single-tone signal is a first specified frequency, the signal frequency of the local oscillator signal is a second specified frequency, and the first specified frequency is greater than the second specified frequency.

[0048] It should be noted that the first single-tone signal can be a signal with a specific frequency sent by a test instrument, which can be used to test the frequency deviation of the receiving channel of the receiver. The test instrument can refer to a single-tone signal with an accurate frequency generated and sent for testing and calibrating the frequency deviation of the receiver. The test instrument can use CMW100 or CMW500. The local oscillator (LO) signal in the receiving channel is a key signal for frequency down-conversion in the receiver, and the frequency of the local oscillator signal is affected by the frequency deviation of the crystal oscillator. The first specified frequency can be the frequency of the first single-tone signal sent by the test instrument, which is usually set to be higher than the frequency of the local oscillator signal of the receiver to facilitate the observation of the effect after the frequency deviation. The second specified frequency can refer to the actual frequency of the local oscillator signal, which is affected by the frequency deviation of the crystal oscillator and is the basis for estimating the frequency of the first mixed signal.

[0049] Optionally, in response to the test instruction, the test instrument is controlled to send the first single-tone signal based on the test instruction, and the receiving channel of the receiver is controlled to receive the first single-tone signal. Specifically, the signal frequency of the first single-tone signal is greater than the signal frequency of the local oscillator. Specifically, the first single-tone signal can be set according to the following formula (1), and the frequency of the local oscillator of the receiving channel can be as shown in the following formula (2):

[0050] (1)

[0051] (2)

[0052] wherein, is the signal frequency of the first single-tone signal, is the design frequency of the local oscillator, is a preset frequency difference;

[0053] Specifically, the first single-tone signal sent by the test instrument can be as shown in the following formula (3), the signal frequency of the local oscillator of the receiver can be as shown in the following formula (4), and the first mixed signal obtained by frequency down-conversion through the receiver can be as shown in the following formula (5):

[0054] (3)

[0055] (4)

[0056] (5)

[0057] wherein, is the first single-tone signal, is the amplitude of the first single-tone signal, is the frequency of the first single-tone signal, is a time variable, a signal frequency of the local oscillator signal, a frequency offset ratio, a first mixed signal, a complex unit, representing phase information of a signal.

[0058] Through the embodiment, by using the first single-tone signal sent by the test instrument to perform preliminary frequency offset estimation, the estimation range can be quickly narrowed, the time of traversal control can be reduced, and thus the total time of the calibration process can be significantly reduced.

[0059] In one example embodiment, the first mixed signal is subjected to signal processing and sampling processing to obtain a first sampling signal corresponding to the first single-tone signal, including: performing low-pass filtering on the first mixed signal to obtain a low-pass filtered first mixed signal; and performing sampling processing on the low-pass filtered first mixed signal to obtain the first sampling signal corresponding to the first single-tone signal.

[0060] It should be noted that the low-pass filter (LPF) can be an electronic filter capable of allowing low-frequency components in a signal to pass through while suppressing high-frequency components. In the embodiment, the role of low-pass filtering is to remove unwanted high-frequency noise and spurs caused by mixing from the first mixed signal and retain information of the target frequency. In signal processing, sampling is a process of converting a continuous-time signal into a discrete-time signal. Here, the low-pass filtered first mixed signal is subjected to sampling processing to generate the first sampling signal.

[0061] Specifically, a low-pass filter can be used to perform low-pass filtering on the first mixed signal to obtain a low-pass filtered first mixed signal, which can be as shown in the following formula (6):

[0062] (6)

[0063] wherein, a frequency deviation of the crystal oscillator, in units of ppm (parts per million), the low-pass filtered first mixed signal.

[0064] Specifically, the first sampling signal obtained by ADC sampling can be as shown in the following formula (7):

[0065] (7)

[0066] wherein, the first sampling signal, a sampling rate of the ADC, a serial number of a sampling point, representing discretization of time.

[0067] Specifically, the first sampling signal can be further processed by the NCO to obtain the following formula (8):

[0068] (8)

[0069] Through the embodiment, the low-pass filtering can effectively eliminate the high-frequency noise that may be generated in the mixing process, the analog signal is converted into a digital signal through the sampling digitalization process, the accuracy and reliability of the frequency offset measurement are improved, the difficulty of subsequent signal processing is simplified through the combination of low-pass filtering and sampling, the calibration time is reduced, and the entire calibration process is more efficient.

[0070] In one example embodiment, the initial frequency offset information of the crystal oscillator is determined by performing specified feature point statistics on the first sampling signal, including: performing specified feature point statistics on the first sampling signal to determine the number of specified feature points corresponding to the first sampling signal; calculating the signal frequency of the first sampling signal based on the number of specified feature points corresponding to the first sampling signal and the sampling duration of the first sampling signal; obtaining a third sampling signal, wherein the third sampling signal is obtained by frequency compensation using the signal frequency of the first sampling signal, and the sampling duration of the third sampling signal is the same as the sampling duration of the first sampling signal; determining the frequency offset direction of the crystal oscillator based on the third sampling signal, wherein the initial frequency offset information includes the signal frequency of the first sampling signal and the frequency offset direction.

[0071] It should be noted that the third sampling signal can be obtained by frequency compensation using the signal frequency of the first sampling signal. In the compensation process, the frequency of the DCXO is adjusted according to the signal frequency of the first sampling signal to attempt to initially eliminate the frequency offset and obtain a signal closer to the ideal frequency. After the initial elimination of the frequency offset, the single-tone signal can be received again, and the single-tone signal is mixed with the compensated local oscillator signal, low-pass filtered, and sampled to obtain the third sampling signal. The sampling duration of the third sampling signal is the same as that of the first sampling signal, and the frequency offset direction of the crystal oscillator is obtained based on the third sampling signal. Since the difference between the actual output frequency of the crystal oscillator and the design frequency is positive or negative, the frequency offset direction refers to the positive or negative nature of the difference. By comparing the signal changes before and after frequency compensation, the direction of the frequency offset can be determined.

[0072] Alternatively, the I (In-phase) or Q (Quadrature) signal of the first sampling signal can be subjected to specified feature point statistics. Specifically, as shown in FIG. 6, the I or Q signal of the first sampling signal is subjected to specified feature point statistics to determine the number of specified feature points corresponding to the I or Q signal of the first sampling signal. Figure 3As shown, a schematic diagram of the first sampling signal is shown, and the display of the specified feature points at the statistical time t is shown. Since there can be two specified feature points (such as zero points) in one sine wave period, the determination process of the signal frequency of the first sampling signal can refer to formula (9) as shown below:

[0073] (9)

[0074] wherein, the number of zero-crossing points in the statistical time, the statistical time length, in seconds, the signal frequency of the first sampling signal, in Hz.

[0075] Through the method of directly performing frequency offset estimation at the signal receiving end, the frequency deviation of the crystal oscillator can be quickly and accurately fed back, and the time consumption of frequent interaction in the related art is avoided. For frequency calibration work in a batch production environment, the efficiency is significantly improved.

[0076] In one example embodiment, based on the third sampling signal, the frequency offset direction of the crystal oscillator is determined, including: performing specified feature point statistics on the third sampling signal to determine the number of specified feature points corresponding to the third sampling signal; in the case that the number of specified feature points corresponding to the third sampling signal is a multiple of the number of specified feature points corresponding to the first sampling signal, it is determined that the frequency offset direction of the crystal oscillator indicates that the signal frequency of the first sampling signal is a positive value; in the case that the number of specified feature points corresponding to the third sampling signal is not a multiple of the number of specified feature points corresponding to the first sampling signal, it is determined that the frequency offset direction of the crystal oscillator indicates that the signal frequency of the first sampling signal is a negative value.

[0077] It should be noted that the third sampling signal can refer to the sampling signal obtained after the receiver is processed by the NCO (Numerically Controlled Oscillator) or the corresponding frequency adjustment mechanism. In the frequency offset calibration process, the third sampling signal is a signal after the preliminary estimated frequency offset is compensated.

[0078] Optionally, in the case that the number of specified feature points corresponding to the third sampling signal is a specified multiple of the number of specified feature points corresponding to the first sampling signal, it is determined that the initial frequency offset value is a positive value; in the case that the number of specified feature points corresponding to the third sampling signal is not a specified multiple of the number of specified feature points corresponding to the first sampling signal, it is determined that the initial frequency offset value is a negative value. Optionally, the specified multiple can be 2.

[0079] Optionally, in order to determine the frequency deviation direction of the crystal oscillator, i.e. determine the positive or negative value of the frequency deviation of the crystal oscillator, it is necessary to attempt to perform preliminary compensation, and then perform the number estimation of the specified feature points in the specified time period, specifically, the attempted preliminary compensation can be compensation using the positive value of the signal frequency of the first sampling signal or the negative value of the signal frequency of the first sampling signal to obtain the third sampling signal. Specifically, the attempted preliminary compensation can refer to the following formulas (10) to (12):

[0080] (10)

[0081] (11)

[0082] (12)

[0083] Wherein, is the compensation value, is the number of specified feature points in the third sampling signal. In the case that the number of specified feature points in the third sampling signal is approximately equal to twice the number of specified feature points in the first sampling signal (considering statistical deviation), it indicates that the compensation direction is opposite to the actual frequency deviation direction, because the compensation value amplifies the original frequency deviation, so that the signal frequency is accelerated, and the zero-crossing point number increases to about twice the original value (considering the actual statistical deviation), and the corresponding coarse frequency deviation estimation value is ; in the case that the number of specified feature points in the third sampling signal is approximately 0, it indicates that the compensation direction is correct, i.e. it is consistent with the actual frequency deviation direction, because the compensation attempts to reduce or eliminate the original deviation, so that the signal frequency approaches its theoretical value, and the corresponding coarse frequency deviation estimation value is .

[0084] In one example, in the case that the frequency of the first sampling signal is 1khz, by using +1kz to perform preliminary compensation of the frequency deviation, the third sampling signal is obtained, and the frequency deviation estimation of the third sampling signal is further performed, in the case that the obtained frequency deviation estimation result is 2khz, it is determined that the compensation direction of the preliminary compensation is reversed, i.e. the frequency deviation value used for the preliminary compensation should be -1kz. In the case that the obtained frequency deviation estimation result is about 0khz, it is proved that the frequency deviation value used for the preliminary compensation is 1kHz (at this time the frequency deviation is not compensated).

[0085] Through the embodiment, by comparing the number of specified feature points of different sampling signals, the frequency deviation direction of the crystal oscillator can be efficiently judged, not only the detection of the frequency deviation direction can be quickly completed, but also the subsequent fine frequency deviation estimation can be performed on this basis, and the efficiency and accuracy of the entire calibration process are significantly improved.

[0086] In an example embodiment, the acquiring the second sampling signal comprises: performing frequency compensation on the first sampling signal to obtain the second sampling signal using the initial frequency offset information, or receiving the second single-tone signal, performing frequency offset compensation on the local oscillator signal to obtain a compensated local oscillator signal using the initial frequency offset information; mixing the second single-tone signal with the compensated local oscillator signal to obtain a second mixed signal; and performing signal processing and sampling processing on the second mixed signal to obtain the second sampling signal corresponding to the second single-tone signal, wherein the second sampling signal is a digital signal with a signal frequency lower than a first preset frequency, and the signal frequency of the second single-tone signal is the same as the signal frequency of the first single-tone signal.

[0087] It should be noted that the second sampling signal can refer to a signal on the signal processing link after frequency adjustment in the frequency offset compensation process. The second sampling signal is usually obtained after compensation of the first sampling signal, or is obtained after mixing the compensated local oscillator signal with an external single-tone signal (such as the second single-tone signal). The signal frequency corresponding to the second sampling signal is lower than a preset threshold (the first preset frequency), so that subsequent accurate frequency offset estimation is easier. The first preset frequency is set based on a low-pass filter in the receiver. The first sampling signal and the second sampling signal are both lower than the first preset frequency, and the signal frequency of the second single-tone signal is the same as the signal frequency of the first single-tone signal. Specifically, the test instrument can continuously emit a single-tone signal with the same signal frequency.

[0088] Through the embodiment, the frequency of the second sampling signal is closer to the target frequency by using the initial frequency offset information to compensate the signal, the frequency offset is reduced, the signal quality is improved, and the compensated signal is closer to the ideal state, which helps to improve the final calibration accuracy.

[0089] In an example embodiment, the determining the frequency offset of the crystal oscillator based on the second sampling signal and the initial frequency offset information comprises: performing sampling processing on the second sampling signal according to a specified sampling manner to obtain a fourth sampling signal and a fifth sampling signal, wherein the specified sampling manner is to sample according to a period of the second sampling signal, the fourth sampling signal and the fifth sampling signal belong to signals of the second sampling signal in the same period, the number of sampling points of the fourth sampling signal and the fifth sampling signal is a specified number, and the specified number is less than one-half of the number of sampling points of the second sampling signal in one period; calculating a frequency offset compensation value of the crystal oscillator based on the fourth sampling signal, the fifth sampling signal, the specified number, a specified time difference, and a sampling rate, wherein the specified time difference is a sampling time difference between the fourth sampling signal and the fifth sampling signal; and calculating the frequency offset of the crystal oscillator based on the frequency offset compensation value, the initial frequency offset information, and a design frequency of the crystal oscillator.

[0090] It should be noted that the fourth sampling signal and the fifth sampling signal can refer to two groups of sample sequences extracted from the second sampling signal according to a specific sampling mode. The fourth sampling signal and the fifth sampling signal are both selected from the same period of the second sampling signal, but are independent of each other and have a smaller number of sampling points, usually less than half the number of sampling points in a period. The number of points in a sinusoidal period of the second sampling signal can be determined by the sampling rate and the signal frequency of the second sampling signal, and the signal frequency of the second sampling signal can be determined based on the signal frequency of the first sampling signal.

[0091] Specifically, the frequency of the second sampling signal can be determined based on the number of specified statistical points corresponding to the second sampling signal to determine the period of the second sampling signal.

[0092] The specified sampling mode is a sampling strategy that aims to obtain more information about the frequency deviation of the crystal oscillator while reducing the amount of data processing and speeding up the algorithm execution. Specifically, the specified sampling mode is used to control the acquisition of the fourth sampling signal and the fifth sampling signal in a period from the second sampling signal. The second sampling signal is obtained by performing preliminary frequency deviation compensation on the first sampling signal. By comparing the fourth sampling signal and the fifth sampling signal extracted from the second sampling signal, the phase difference can be measured, and the frequency deviation can be calculated.

[0093] Specifically, as shown in Figure 4 , Figure 4 is a schematic diagram of the fourth sampling signal and the fifth sampling signal. The fourth sampling signal and the fifth sampling signal are and , i = 1, 2,..., L, and the interval sample number of the two signals is . Specifically, based on the fourth sampling signal, the fifth sampling signal, the specified number, the specified time difference, and the sampling rate, the frequency deviation compensation value of the crystal oscillator can be calculated as shown in the following formula (13), and based on the frequency deviation compensation value, the initial frequency deviation information, and the design frequency of the crystal oscillator, the frequency deviation of the crystal oscillator can be calculated as shown in the following formula (14),

[0094] (13)

[0095] (14)

[0096] wherein, is the fourth sampling signal, is the sampling number corresponding to the fourth sampling signal and the fifth sampling signal, is the fifth sampling signal, is the difference in the number of sampling points between the fourth sampling signal and the fifth sampling signal, is the frequency deviation compensation value of the crystal oscillator; a design frequency of the crystal oscillator, a frequency offset of the crystal oscillator.

[0097] Through the embodiment, the first sampling signal is processed to compensate to obtain the second sampling signal, the fourth and fifth sampling signals are extracted from the second sampling signal to calculate the frequency offset compensation value, and a closed-loop calibration system is formed, which can efficiently and correctly correct the frequency deviation of the crystal oscillator.

[0098] In specific practice, the test instrument sends a single tone signal to the device to be calibrated (corresponding to the receiver), preliminary calibration is determined in combination with specified feature points, and secondary sampling is performed on the preliminary calibrated signal to realize efficient and accurate measurement and adjustment of the DCXO frequency offset. The scheme first uses specified feature points for coarse frequency offset estimation, so that even if the initial frequency offset is as high as ± 30ppm, it can be quickly locked within the accuracy range of 0.05ppm; then, fine adjustment is performed using phase estimation technology, and the accuracy is further improved to 0.00006ppm, specifically, as shown in the following table, so that the entire process greatly reduces the production line test time, shortens the single calibration cycle from 50ms to less than 5ms, and significantly improves the calibration efficiency. Figure 5

[0099] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.

[0100] From the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as a read-only memory (Read-Only Memory, ROM) / random access memory (Random Access Memory, RAM), a magnetic disk, an optical disk), and includes a plurality of instructions for causing an end device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in each embodiment of the present application.

[0101] ​According to another aspect of the embodiments of the present application, there is also provided a frequency offset determination apparatus, which can be used to implement the frequency offset determination method provided in the above-described embodiments, and which has been described above. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.

[0102] Figure 6 is a structural block diagram of an optional frequency offset determination apparatus according to the embodiments of the present application, as shown in Figure 6 The frequency offset determination apparatus comprises:

[0103] A first mixing unit 602 is configured to mix the received first single-tone signal with a local oscillation signal to obtain a first mixed signal, in response to the received first single-tone signal, wherein the signal frequency of the local oscillation signal is the output frequency of the crystal oscillator.

[0104] A first execution unit 604 is configured to perform signal processing and sampling processing on the first mixed signal to obtain a first sampling signal corresponding to the first single-tone signal, wherein the first sampling signal is a digital signal with a signal frequency lower than a first preset frequency.

[0105] A first determination unit 606 is configured to perform specified feature point statistics on the first sampling signal to determine initial frequency offset information of the crystal oscillator, wherein the specified feature point is a feature point in which the signal values of adjacent sampling points change in sign.

[0106] A first acquisition unit 608 is configured to acquire a second sampling signal, wherein the second sampling signal is obtained by performing frequency compensation on the first sampling signal or the local oscillation signal using the initial frequency offset information.

[0107] A second determination unit 610 is configured to determine the frequency offset of the crystal oscillator based on the second sampling signal and the initial frequency offset information, wherein the frequency offset of the crystal oscillator is the difference between the output frequency of the crystal oscillator and the design frequency of the crystal oscillator.

[0108] It should be noted that the first mixing unit 602 in this embodiment can be used to perform the above-described step S202, the first execution unit 604 in this embodiment can be used to perform the above-described step S204, the first determination unit 606 in this embodiment can be used to perform the above-described step S206, the first acquisition unit 608 in this embodiment can be used to perform the above-described step S208, and the second determination unit 610 in this embodiment can be used to perform the above-described step S210.

[0109] Through the embodiments provided in the present application, in response to the received first single-tone signal, the first single-tone signal is mixed with the local oscillator signal to obtain a first mixed signal, and then the first mixed signal is processed and sampled to obtain a first sampling signal with a lower frequency, which realizes the conversion of the to-be-tested signal into a digital signal format suitable for subsequent analysis, reduces the complexity of signal processing, and performs specified feature point statistics on the first sampling signal to obtain initial frequency offset information of the crystal oscillator. The initial frequency offset information obtained through preliminary estimation is used to compensate the frequency of the first sampling signal to obtain a second sampling signal. Based on the second sampling signal and the initial frequency offset information, the accurate frequency offset of the crystal oscillator can be determined. Through real-time signal processing and two-step frequency offset estimation (preliminary estimation and accurate compensation), fast and accurate frequency offset calibration of the crystal oscillator is realized, and the low efficiency problem of the frequency offset determination method in the related art caused by piece-by-piece traversal configuration is solved, and the efficiency of frequency offset determination is improved.

[0110] In one example embodiment, the first mixing unit 602 includes: a first mixing module configured to, in response to receiving a first single-tone signal sent by a test instrument, mix the first single-tone signal with a local oscillator signal generated by an oscillator to obtain a first mixed signal, wherein the signal frequency of the first single-tone signal is a first specified frequency, and the signal frequency of the local oscillator signal is a second specified frequency, and the first specified frequency is greater than the second specified frequency.

[0111] In one example embodiment, the first execution unit 604 includes:

[0112] a first filtering module configured to perform low-pass filtering on the first mixed signal to obtain a low-pass filtered first mixed signal;

[0113] a first sampling module configured to perform sampling processing on the low-pass filtered first mixed signal to obtain a first sampling signal corresponding to the first single-tone signal.

[0114] In one example embodiment, the first determination unit 606 includes:

[0115] a first determination module configured to perform specified feature point statistics on the first sampling signal to determine the number of specified feature points corresponding to the first sampling signal;

[0116] a first calculation module configured to calculate the signal frequency of the first sampling signal based on the number of specified feature points corresponding to the first sampling signal and the sampling duration of the first sampling signal;

[0117] a first acquisition module configured to acquire a third sampling signal, wherein the third sampling signal is obtained by frequency compensation using the signal frequency of the first sampling signal, and the sampling duration of the third sampling signal is the same as the sampling duration of the first sampling signal;

[0118] The second determining module is configured to determine the frequency deviation direction of the crystal oscillator based on the third sampling signal, wherein the initial frequency deviation information comprises the signal frequency of the first sampling signal and the frequency deviation direction.

[0119] In an example embodiment, the second determining module is further configured to: perform specified feature point statistics on the third sampling signal to determine the number of specified feature points corresponding to the third sampling signal; in a case where the number of specified feature points corresponding to the third sampling signal is a multiple of the number of specified feature points corresponding to the first sampling signal, determine that the frequency deviation direction of the crystal oscillator indicates that the signal frequency of the first sampling signal is a positive value; and in a case where the number of specified feature points corresponding to the third sampling signal is not a multiple of the number of specified feature points corresponding to the first sampling signal, determine that the frequency deviation direction of the crystal oscillator indicates that the signal frequency of the first sampling signal is a negative value.

[0120] In an example embodiment, the first obtaining unit 608 comprises:

[0121] The first compensating module is configured to perform frequency compensation on the first sampling signal using the initial frequency deviation information to obtain a second sampling signal, or

[0122] The second compensating module is configured to receive the second single-tone signal, and perform frequency deviation compensation on the local oscillator signal using the initial frequency deviation information to obtain a compensated local oscillator signal.

[0123] The second mixing module is configured to mix the compensated local oscillator signal with the second single-tone signal to obtain a second mixed signal.

[0124] The first processing module is configured to perform signal processing and sampling processing on the second mixed signal to obtain a second sampling signal corresponding to the second single-tone signal, wherein the second sampling signal is a digital signal with a signal frequency lower than the first preset frequency, and the signal frequency of the second single-tone signal is the same as the signal frequency of the first single-tone signal.

[0125] In an example embodiment, the second determining unit 610 comprises:

[0126] The second processing module is configured to perform sampling processing on the second sampling signal according to a specified sampling manner to obtain a fourth sampling signal and a fifth sampling signal, wherein the specified sampling manner is to sample according to the period of the second sampling signal, the fourth sampling signal and the fifth sampling signal belong to signals of the second sampling signal in the same period, the number of sampling points of the fourth sampling signal and the fifth sampling signal is a specified number, and the specified number is less than one-half of the number of sampling points of the second sampling signal in one period.

[0127] The second calculation module is configured to calculate a frequency offset compensation value of the crystal oscillator based on the fourth sampling signal, the fifth sampling signal, the specified number, the specified time difference, and a sampling rate, wherein the specified time difference is a sampling time difference between the fourth sampling signal and the fifth sampling signal.

[0128] The third calculation module is configured to calculate a frequency offset of the crystal oscillator based on the frequency offset compensation value, the initial frequency offset information, and a design frequency of the crystal oscillator.

[0129] It should be noted that the above modules can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: the above modules are located in the same processor; or the above modules are located in different processors in any combination.

[0130] According to another aspect of the embodiments of the present application, a computer readable storage medium is provided, which includes a stored program, wherein the program performs the steps in any of the above method embodiments when executed.

[0131] In an example embodiment, the above computer readable storage medium can include, but is not limited to, a U disk, a ROM, a RAM, a mobile hard disk, a magnetic disk or an optical disk, and various computer program storage media.

[0132] According to another aspect of the embodiments of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor is configured to perform the steps in any of the above method embodiments by the computer program. In an example embodiment, the electronic device can further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0133] The specific examples in the embodiments can refer to the examples described in the above embodiments and example implementations, and will not be described herein.

[0134] According to another aspect of the embodiments of the present application, a computer program product is also provided, which includes a computer program / instruction containing program codes for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network by the communication part 709, and / or installed from the detachable medium 711. When the computer program is executed by the central processing unit 701, various functions provided by the embodiments of the present application are executed. The above serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0135] Figure 7A computer system structure block diagram of an electronic device for implementing embodiments of the present application is schematically shown. As shown in Figure 7 The computer system 700 includes a central processing unit (CPU) 701 which can perform various appropriate actions and processes in accordance with a program stored in a ROM 702 or a program loaded into a RAM 703 from a storage section 708. Various programs and data required for the operation of the system are also stored in the random access memory 703. The central processing unit 701, the read only memory 702, and the random access memory 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0136] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a local area network card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output interface 705 as necessary. A removable recording medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 710 as necessary, so that a computer program read therefrom is installed into the storage section 708 as necessary.

[0137] In particular, according to embodiments of the present application, the processes described in the various method flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from the removable recording medium 711. When the computer program is executed by the central processing unit 701, various functions defined in the system of the present application are performed.

[0138] It should be noted that, Figure 7 The computer system 700 of the electronic device shown is merely an example and should not impose any limitation on the functions and the range of use of embodiments of the present application.

[0139] It is apparent that those skilled in the art can modify and / or change the above-described modules or steps of the present application with general computing devices, which can be centralized on a single computing device or distributed on a network composed of multiple computing devices, which can be implemented by program codes executable by the computing devices, so that they can be stored in storage devices and executed by the computing devices, and in some cases, the steps shown or described can be executed in different orders, or they can be made into individual integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.

[0140] The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for determining frequency offset, characterized in that, include: In response to the received first single-tone signal, the first single-tone signal is mixed using a local oscillator signal to obtain a first mixed signal, wherein the signal frequency of the local oscillator signal is the output frequency of the crystal oscillator; The first mixing signal is subjected to signal processing and sampling processing to obtain the first sampled signal corresponding to the first single tone signal, wherein the first sampled signal is a digital signal with a signal frequency lower than a first preset frequency; The first sampled signal is statistically analyzed using specified feature points to determine the initial frequency offset information of the crystal oscillator. The specified feature points are those where the signal values ​​of adjacent sampled points exhibit a sign change. Acquire a second sampling signal, wherein the second sampling signal is obtained by frequency compensation of the first sampling signal or the local oscillator signal using the initial frequency offset information; Based on the second sampling signal and the initial frequency offset information, the frequency offset of the crystal oscillator is determined, wherein the frequency offset of the crystal oscillator is the difference between the output frequency of the crystal oscillator and the design frequency of the crystal oscillator.

2. The method according to claim 1, characterized in that, The step of mixing the first single-tone signal with a local oscillator signal in response to the received first single-tone signal to obtain a first mixed signal includes: In response to receiving the first single-tone signal sent by the test instrument, the first single-tone signal is mixed with the local oscillator signal generated by the oscillator to obtain the first mixed signal, wherein the signal frequency of the first single-tone signal is a first specified frequency, the signal frequency of the local oscillator signal is a second specified frequency, and the first specified frequency is greater than the second specified frequency.

3. The method according to claim 1, characterized in that, The step of performing signal processing and sampling on the first mixing signal to obtain the first sampled signal corresponding to the first single-tone signal includes: The first mixing signal is low-pass filtered to obtain the first mixing signal after low-pass filtering; The first mixed signal after low-pass filtering is sampled to obtain the first sampled signal corresponding to the first single-tone signal.

4. The method according to claim 1, characterized in that, The step of performing statistical analysis on specified feature points of the first sampled signal to determine the initial frequency offset information of the crystal oscillator includes: Perform statistical analysis on the first sampled signal to determine the number of specified feature points corresponding to the first sampled signal; The signal frequency of the first sampled signal is calculated based on the number of specified feature points corresponding to the first sampled signal and the sampling duration of the first sampled signal. A third sampling signal is obtained, wherein the third sampling signal is obtained by frequency compensation using the signal frequency of the first sampling signal, and the sampling duration of the third sampling signal is the same as that of the first sampling signal; Based on the third sampled signal, the frequency offset direction of the crystal oscillator is determined, wherein the initial frequency offset information includes the signal frequency of the first sampled signal and the frequency offset direction.

5. The method according to claim 4, characterized in that, Determining the frequency offset direction of the crystal oscillator based on the third sampled signal includes: Perform statistical analysis on the third sampled signal to determine the number of specified feature points corresponding to the third sampled signal; When the number of specified feature points corresponding to the third sampling signal is a multiple of the number of specified feature points corresponding to the first sampling signal, the frequency offset direction of the crystal oscillator indicating the signal frequency of the first sampling signal is determined to be positive. If the number of specified feature points corresponding to the third sampling signal is not a multiple of the number of specified feature points corresponding to the first sampling signal, the frequency offset direction of the crystal oscillator indicating the frequency of the first sampling signal is determined to be negative.

6. The method according to claim 1, characterized in that, The acquisition of the second sampling signal includes: Using the initial frequency offset information, frequency compensation is performed on the first sampled signal to obtain the second sampled signal, or... The system receives a second single-tone signal, uses the initial frequency offset information to compensate the local oscillator signal for frequency offset, and obtains the compensated local oscillator signal; it mixes the compensated local oscillator signal with the second single-tone signal to obtain a second mixed signal; it performs signal processing and sampling processing on the second mixed signal to obtain a second sampled signal corresponding to the second single-tone signal, wherein the second sampled signal is a digital signal with a signal frequency lower than a first preset frequency, and the signal frequency of the second single-tone signal is the same as the signal frequency of the first single-tone signal.

7. The method according to any one of claims 1 to 6, characterized in that, Determining the frequency offset of the crystal oscillator based on the second sampled signal and the initial frequency offset information includes: The second sampled signal is sampled according to a specified sampling method to obtain a fourth sampled signal and a fifth sampled signal. The specified sampling method is to sample according to the period of the second sampled signal. The fourth sampled signal and the fifth sampled signal are signals that are in the same period of the second sampled signal. The number of sampling points of the fourth sampled signal and the fifth sampled signal is a specified number, which is less than half the number of sampling points of the second sampled signal in one period. Based on the fourth sampled signal, the fifth sampled signal, the specified quantity, the specified time difference, and the sampling rate, the frequency offset compensation value of the crystal oscillator is calculated, wherein the specified time difference is the sampling time difference between the fourth sampled signal and the fifth sampled signal; The frequency offset of the crystal oscillator is calculated based on the frequency offset compensation value, the initial frequency offset information, and the design frequency of the crystal oscillator.

8. A frequency offset determination device, characterized in that, include: The first mixing unit is configured to, in response to the received first single-tone signal, use a local oscillator signal to mix the first single-tone signal to obtain a first mixed signal, wherein the signal frequency of the local oscillator signal is the output frequency of the crystal oscillator; The first execution unit is configured to perform signal processing and sampling processing on the first mixing signal to obtain a first sampled signal corresponding to the first single-tone signal, wherein the first sampled signal is a digital signal with a signal frequency lower than a first preset frequency; The first determining unit is used to perform specified feature point statistics on the first sampled signal to determine the initial frequency offset information of the crystal oscillator, wherein the specified feature point is a feature point where the signal values ​​of adjacent sample points have a sign change. The first acquisition unit is used to acquire a second sampling signal, wherein the second sampling signal is obtained by frequency compensation of the first sampling signal or the local oscillator signal using the initial frequency offset information; The second determining unit is used to determine the frequency offset of the crystal oscillator based on the second sampled signal and the initial frequency offset information, wherein the frequency offset of the crystal oscillator is the difference between the output frequency of the crystal oscillator and the design frequency of the crystal oscillator.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.

10. 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 steps of the method according to any one of claims 1 to 7.