A crystal oscillator frequency calibration circuit and a crystal oscillator frequency deviation determination method
By using the crystal oscillator frequency calibration circuit in the wireless communication system, the crystal oscillator frequency deviation is directly calculated using the proportional relationship, which solves the problem of low crystal oscillator frequency calibration efficiency and achieves more efficient frequency acquisition and calibration.
Patent Information
- Application Number
- CN202410701485.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-05-31
AI Technical Summary
In wireless communication systems, the crystal oscillator frequency calibration efficiency is low, especially when the system is powered on for the first time or when the interval is long, the frequency deviation is large, resulting in a long search time.
A crystal oscillator frequency calibration circuit is provided, through the first single tone signal acquisition module and the second single tone signal acquisition module, respectively, and the crystal oscillator frequency deviation is directly calculated using the proportional relationship of these signals.
Improves the efficiency of crystal oscillator frequency acquisition and calibration, reduces circuit area and implementation costs, and eliminates the need to set up a large number of correlators.
Smart Images

Figure CN118694361B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a crystal oscillator frequency calibration circuit and a crystal oscillator frequency deviation determination method. Background Art
[0002] At present, wireless communication technology has greatly promoted the development of society, and the crystal oscillator (referred to as crystal oscillator) responsible for providing the reference clock is an indispensable key component in the wireless communication system. However, due to the cost of the crystal oscillator device itself, hardware aging, temperature changes, batch consistency and other reasons, the crystal oscillator may have a large frequency deviation when the wireless communication system is turned on for the first time or after a long interval. Therefore, the crystal oscillator frequency deviation needs to be calibrated.
[0003] In the related art, the calibration of crystal oscillator frequency deviation is mostly performed by using frequency deviation assumption during the network search phase of the wireless communication system. However, this scheme has certain requirements on the number of assumed frequency deviations. Often, the large number of assumed frequency deviations leads to a long network search time and low crystal oscillator frequency calibration efficiency. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a crystal oscillator frequency calibration circuit and a crystal oscillator frequency deviation determination method, so as to improve the efficiency of obtaining the crystal oscillator frequency deviation, and further improve the efficiency of crystal oscillator frequency calibration.
[0005] In a first aspect, an embodiment of the present application provides a crystal oscillator frequency calibration circuit, comprising: a first single-tone signal acquisition module, a second single-tone signal acquisition module and a frequency deviation determination module; the input end of the first single-tone signal acquisition module is connected to the crystal oscillator to be calibrated; the output end of the first single-tone signal acquisition module and the output end of the second single-tone signal acquisition module are respectively connected to the frequency deviation determination module; wherein: the first single-tone signal acquisition module is used to acquire a first single-tone signal with a first frequency, and send the first single-tone signal to the frequency deviation determination module; wherein the first frequency is equal to the crystal oscillator frequency of the crystal oscillator to be calibrated. In a first proportional relationship; the second single-tone signal acquisition module is used to obtain a second single-tone signal with a second frequency, and send the second single-tone signal to the frequency deviation determination module; wherein the second frequency is in a second proportional relationship with the design frequency of the crystal oscillator to be calibrated; the first proportional relationship and the second proportional relationship are proportional relationships with the same proportional coefficient; the frequency deviation determination module is used to obtain a mixing signal with a third frequency, and obtain the frequency deviation between the crystal oscillator frequency and the design frequency according to the mixing signal; wherein the third frequency is the frequency difference between the first frequency and the second frequency.
[0006] In the implementation process of the above scheme, the calibration circuit obtains a first single-tone signal with a first frequency and a second single-tone signal with a second frequency through a first single-tone signal acquisition module and a second single-tone signal acquisition module respectively. The first frequency is in a first proportional relationship with the crystal oscillator frequency of the crystal oscillator to be calibrated, and the second frequency is in a second proportional relationship with the design frequency of the crystal oscillator to be calibrated, and the first proportional relationship and the second proportional relationship are proportional relationships with the same proportional coefficient, so that the frequency deviation determination module can directly obtain the crystal oscillator frequency deviation according to the first single-tone signal and the second single-tone signal. The calibration circuit in this scheme can obtain the frequency deviation between the crystal oscillator frequency of the crystal oscillator to be calibrated and the design frequency by obtaining and processing the single-tone signal. On the one hand, it is conducive to improving the acquisition efficiency of the crystal oscillator frequency, and then improving the calibration efficiency of the crystal oscillator frequency; on the other hand, there is no need to set a large number of correlators, so that the circuit area of the crystal oscillator frequency calibration circuit is small and the implementation cost is also low.
[0007] In an implementation of the first aspect, the frequency deviation determination module includes:
[0008] A mixing processing unit, used for performing difference mixing processing on the first single-tone signal and the second single-tone signal to obtain a mixed signal;
[0009] A mixing feature point acquisition unit, configured to calculate, for each N consecutive sample points of the mixing signal, a cumulative mean of the N consecutive sample points, and acquire a mixing feature point corresponding to the N consecutive sample points;
[0010] A frequency deviation calculation unit is used to determine the frequency deviation between the crystal oscillator frequency and the design frequency according to the phase difference between two adjacent mixing characteristic points and the first proportional relationship or the second proportional relationship.
[0011] In the implementation process of the above scheme, after the first single-tone signal and the second single-tone signal are subjected to differential mixing processing to obtain a mixed signal, a plurality of mixing feature points in the mixed signal are obtained through a mixing feature point acquisition unit, and then the frequency deviation between the crystal oscillator frequency of the crystal oscillator to be calibrated and the design frequency can be determined through the phase difference between two adjacent mixing feature points and the first proportional relationship and the second proportional relationship, which is beneficial to improving the efficiency of obtaining the crystal oscillator frequency and thus improving the calibration efficiency of the crystal oscillator frequency.
[0012] In an implementation of the first aspect, the frequency deviation calculation unit is specifically used to: calculate multiple third frequency estimation values of the mixing signal based on multiple groups of phase differences between two adjacent mixing feature points; perform cumulative averaging calculation on the multiple third frequency estimation values at least once to determine the third frequency; determine the frequency deviation based on the third frequency and the first proportional relationship or the second proportional relationship.
[0013] In the implementation process of the above scheme, multiple third frequency estimation values of the mixing signal are calculated by the phase difference between multiple groups of adjacent mixing characteristic points, and then the estimation values are cumulatively averaged at least once to obtain a third frequency value with higher accuracy, and then the frequency deviation is obtained through the third frequency, which is beneficial to improve the accuracy of the frequency deviation obtained by the above crystal oscillator frequency calibration circuit, and then improve the frequency calibration accuracy of the above crystal oscillator frequency calibration circuit.
[0014] In an implementation of the first aspect, the first single-tone signal acquisition module includes a first frequency multiplier and a first analog-to-digital converter, and the first frequency multiplier is connected to the first analog-to-digital converter, wherein:
[0015] The first frequency multiplier is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a first frequency multiplication ratio, obtain a first frequency multiplied signal, and input the first frequency multiplied signal to the analog-to-digital converter;
[0016] The first analog-to-digital converter is used to perform analog-to-digital conversion on the first frequency-multiplied signal, obtain a first single-tone signal having a first frequency, and input the first single-tone signal into the crystal oscillator accuracy estimation module;
[0017] or,
[0018] The first single tone signal acquisition module includes a second frequency multiplier, a third frequency multiplier, a first mixer and a second analog-to-digital converter; wherein,
[0019] The second frequency multiplier is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a second frequency multiplication ratio, obtain a second frequency multiplied signal, and input the second frequency multiplied signal to the first mixer;
[0020] The third frequency multiplier is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a third frequency multiplication ratio, obtain a third frequency multiplication signal, and input the third frequency multiplication signal to the first mixer; wherein the third frequency multiplication ratio is a frequency multiplication ratio different from the second frequency multiplication ratio;
[0021] The first mixer is used to mix the second frequency-multiplied signal and the third frequency-multiplied signal to obtain a first single-tone signal having a first frequency, and input the first single-tone signal to the second analog-to-digital converter;
[0022] The second analog-to-digital converter is used to convert the first single-tone signal into a digital signal and then input the digital signal into the frequency deviation determination module;
[0023] or,
[0024] The first single tone signal acquisition module includes: an orthogonal modulator, a fourth frequency multiplier, a fifth frequency multiplier, a third analog-to-digital converter, a fourth analog-to-digital converter, a second mixer and a third mixer, wherein:
[0025] The fourth frequency multiplier is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a fourth frequency multiplication ratio, obtain a fourth frequency multiplied signal, and input the fourth frequency multiplied signal to the orthogonal modulator;
[0026] The quadrature modulator is used to perform quadrature modulation on the fourth frequency multiplied signal, obtain an in-phase signal component and a quadrature-phase signal component of the fourth frequency multiplied signal, and input the in-phase signal component of the fourth frequency multiplied signal and the quadrature-phase signal component of the fourth frequency multiplied signal to the second mixer and the third mixer respectively;
[0027] The fifth frequency multiplier is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a fifth frequency multiplication ratio, obtain a fifth frequency multiplication signal, and input the fifth frequency multiplication signal to the second mixer and the third mixer respectively; the fifth frequency multiplication ratio is a frequency multiplication ratio different from the fourth frequency multiplication ratio;
[0028] The second mixer is used to mix the in-phase signal component of the fourth frequency-multiplied signal with the fifth frequency-multiplied signal to obtain the in-phase signal component of the first single-tone signal with the first frequency, and input the in-phase signal component of the first single-tone signal into a third analog-to-digital converter;
[0029] The third mixer is used to mix the quadrature phase signal component of the fourth frequency multiplication signal with the fifth frequency multiplication signal to obtain the quadrature phase signal component of the first single tone signal, and input the quadrature phase signal component of the first single tone signal into a fourth analog-to-digital converter;
[0030] The third analog-to-digital converter is used to convert the in-phase signal component of the first single-tone signal into a digital signal and then input the digital signal into the frequency deviation determination module;
[0031] The fourth analog-to-digital converter is used to convert the quadrature phase signal component of the first single-tone signal into a digital signal and then input the digital signal into the frequency deviation determination module.
[0032] In the implementation process of the above scheme, the first single-tone signal acquisition module can directly use the frequency multiplier to obtain the first single-tone signal, or use one signal processing circuit in the radio frequency circuit to obtain the first single-tone signal, or use two signal processing circuits in the radio frequency circuit to obtain the first single-tone signal, thereby making the above-mentioned crystal oscillator frequency calibration circuit applicable to more application scenarios, which is conducive to improving the adaptability of the above-mentioned crystal oscillator frequency calibration circuit.
[0033] In an implementation manner of the first aspect, the second single-tone signal acquisition module includes: a digitally controlled oscillator, configured to generate the second single-tone signal having the second frequency.
[0034] In the implementation process of the above scheme, a second single-tone signal with a second frequency is directly generated by a numerically controlled oscillator. On the one hand, the frequency of the numerically controlled oscillator is a controllable frequency, which can make the above-mentioned crystal oscillator frequency calibration circuit 100 suitable for more application scenarios, which is beneficial to improving the adaptability of the above-mentioned crystal oscillator frequency calibration circuit; on the other hand, the second single-tone signal can be obtained by only one numerically controlled oscillator, which is beneficial to reducing the circuit area and thus reducing the circuit implementation cost; on the other hand, the second single-tone signal is quickly obtained by the numerically controlled oscillator, which is beneficial to improving the crystal oscillator frequency calibration efficiency of the above-mentioned crystal oscillator frequency calibration circuit.
[0035] In a second aspect, an embodiment of the present application provides a method for determining a crystal oscillator frequency deviation, comprising: obtaining a first single-tone signal having a first frequency and a second single-tone signal having a second frequency; wherein the first frequency is in a first proportional relationship with the crystal oscillator frequency of the crystal oscillator to be calibrated; the second frequency is in a second proportional relationship with the design frequency of the crystal oscillator to be calibrated; the first proportional relationship and the second proportional relationship are proportional relationships with the same proportional coefficient; mixing the first single-tone signal and the second single-tone signal to obtain a mixed signal having a third frequency; wherein the third frequency is the frequency difference between the first frequency and the second frequency; and obtaining a frequency deviation between the crystal oscillator frequency and the design frequency according to the mixed signal.
[0036] In an implementation manner of the second aspect, obtaining the frequency deviation between the crystal oscillator frequency and the design frequency based on the mixing signal includes: calculating, for each N consecutive sample points of the mixing signal, a cumulative mean of the N consecutive sample points, and obtaining a mixing feature point of the N consecutive sample points; and determining the frequency deviation between the crystal oscillator frequency and the design frequency based on a phase difference between two adjacent mixing feature points and the first proportional relationship or the second proportional relationship.
[0037] In an implementation of the second aspect, determining the frequency deviation between the crystal oscillator frequency and the design frequency according to the phase difference between two adjacent frequency mixing feature points and the first proportional relationship or the second proportional relationship includes:
[0038] Calculating a plurality of third frequency estimation values of the mixing signal according to a plurality of groups of phase differences between two adjacent mixing characteristic points;
[0039] Performing at least one cumulative average calculation on a plurality of the third frequency estimation values to determine the third frequency;
[0040] The frequency deviation is determined according to the third frequency and the first proportional relationship or the second proportional relationship.
[0041] In an implementation of the second aspect, acquiring a first single tone signal having a first frequency includes:
[0042] Performing frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a first frequency multiplication ratio to obtain a first frequency multiplication signal;
[0043] Convert the first frequency-multiplied signal into a digital signal to obtain a first single-tone signal having a first frequency;
[0044] or,
[0045] The step of acquiring a first single tone signal having a first frequency includes:
[0046] Performing frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a second frequency multiplication ratio and a third frequency multiplication ratio respectively, to obtain a second frequency multiplication signal and a third frequency multiplication signal; wherein the third frequency multiplication ratio is a frequency multiplication ratio different from the second frequency multiplication ratio;
[0047] Performing mixing processing on the second frequency-multiplied signal and the third frequency-multiplied signal, and converting the mixed signal into a digital signal, to obtain a first single-tone signal having a first frequency;
[0048] or,
[0049] The step of acquiring a first single tone signal having a first frequency includes:
[0050] Performing frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a fourth frequency multiplication ratio and a fifth frequency multiplication ratio respectively, to obtain a fourth frequency multiplication signal and a fifth frequency multiplication signal; wherein the fifth frequency multiplication ratio is a frequency multiplication ratio different from the fourth frequency multiplication ratio;
[0051] Performing quadrature modulation on the fourth frequency-doubled signal to obtain an in-phase signal component and a quadrature-phase signal component of the fourth frequency-doubled signal;
[0052] Performing mixing processing on the in-phase signal component of the fourth frequency-multiplied signal and the fifth frequency-multiplied signal to obtain the in-phase signal component of the first single-tone signal having a first frequency;
[0053] Performing mixing processing on the quadrature phase signal component of the fourth frequency multiplication signal and the fifth frequency multiplication signal to obtain the quadrature phase signal component of the first single tone signal;
[0054] The in-phase signal component and the quadrature-phase signal component of the first single-tone signal are respectively converted into digital signals to obtain the first single-tone signal.
[0055] In an implementation manner of the second aspect, obtaining the second single-tone signal includes: generating a second single-tone signal with a second frequency.
[0056] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0058] Figure 1 A schematic diagram of the structure of a crystal oscillator frequency calibration circuit provided in an embodiment of the present application;
[0059] Figure 2 A schematic structural diagram of a crystal oscillator frequency calibration circuit in which a first single-tone signal acquisition module in a crystal oscillator frequency calibration circuit provided in an embodiment of the present application adopts a first implementation mode;
[0060] Figure 3 A schematic diagram of the structure of a crystal oscillator frequency calibration circuit in which the first single-tone signal acquisition module in the crystal oscillator frequency calibration circuit provided in an embodiment of the present application adopts a second implementation mode;
[0061] Figure 4 A schematic diagram of the structure of a crystal oscillator frequency calibration circuit in which the first single-tone signal acquisition module in the crystal oscillator frequency calibration circuit provided in an embodiment of the present application adopts a third implementation mode;
[0062] Figure 5 A flow chart of a crystal oscillator frequency calibration method provided in an embodiment of the present application;
[0063] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" in the specification and claims of the present application and the above-mentioned description of the drawings and any variations thereof are intended to cover non-exclusive inclusions.
[0065] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0066] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0067] At present, both digital circuits and analog RF circuits rely on the clock directly provided by the crystal oscillator or the high-speed clock multiplied by the PLL (Phase-locked loop) to work properly. However, due to the material of the crystal oscillator itself and the environment in which it is located, the crystal oscillator may have a large frequency deviation when the wireless communication system is turned on for the first time or after a long interval. For example, the frequency deviation of a crystal oscillator after being stored for a period of time may reach ±10ppm (part per million), or even larger.
[0068] Taking the 5G NR (5G New Radio) system in the wireless communication system as an example, the frequency range supported by its low-frequency band FR1 (Frequency Range 1) is 450MHz to 6GHz, which is also called Sub6G. The frequency range indicated by the millimeter wave band FR2 (Frequency Range 2) is 24GHz to 52GHz, which is also called mmWave. If the above 5G NR system uses the crystal oscillator with the above frequency deviation of ±10ppm, the maximum frequency deviation may reach ±60kHz.
[0069] In general, it is believed that the clock accuracy of the base station is relatively high, and its accuracy can reach 0.01ppm or even higher. When the user terminal UE (User Equipment) deployed with the above-mentioned 5G NR system searches the network, it is necessary to align its own clock with the base station clock before normal business processes can be carried out. For the 256QAM highest bit rate scenario supported by the 5GNR system, the frequency deviation needs to reach the order of tens of Hz. If only FR1 is considered, the crystal oscillator output is also required to achieve an accuracy of 0.01PPM. Obviously, the above-mentioned crystal oscillator with a frequency deviation of ±10ppm cannot meet the requirements of the wireless communication system, so the crystal oscillator frequency needs to be calibrated.
[0070] At present, most of the related technologies make frequency offset assumptions and other operations during the network search phase of the user terminal UE, correlate the received signal with the locally known synchronization sequence, obtain the correlation peaks at different frequency positions, and obtain the actual frequency offset, which is then compensated on the crystal oscillator or PLL. For easy understanding, the following scenarios are provided to introduce the frequency offset compensation solutions in related technologies:
[0071] The center frequency of a transmitting base station is 5.9GHz, 30k scs (sub-carrier space, sub-carrier spacing), and the frequency deviation of the crystal oscillator in the user terminal UE is ±10ppm, so the actual maximum frequency deviation is ±59kHz. Generally speaking, if the frequency deviation exceeds half a sub-carrier, the correlation will be significantly reduced. Therefore, half a sub-carrier is assumed as the frequency deviation spacing, and the number of frequency deviations is assumed to be 8. In addition, 3 primary synchronization sequences PSS need to be considered. Therefore, 24 groups of correlators need to be made at the same time. The correlators need to use a large number of multipliers, which have a large area and low network search efficiency. In addition, it is also possible to consider using time division to complete all related processing, but the network search efficiency will be further reduced.
[0072] Based on this, an embodiment of the present application provides a crystal oscillator frequency calibration circuit, which obtains a first single-tone signal with a first frequency and a second single-tone signal with a second frequency through a first single-tone signal acquisition module and a second single-tone signal acquisition module respectively. The first frequency is in a first proportional relationship with the crystal oscillator frequency of the crystal oscillator to be calibrated, and the second frequency is in a second proportional relationship with the design frequency of the crystal oscillator to be calibrated, and the first proportional relationship and the second proportional relationship are proportional relationships with the same proportional coefficient, so that the frequency deviation determination module can directly obtain the crystal oscillator frequency deviation according to the first single-tone signal and the second single-tone signal. The calibration circuit in this scheme can obtain the frequency deviation between the crystal oscillator frequency of the crystal oscillator to be calibrated and the design frequency by acquiring and processing the single-tone signal. On the one hand, it is beneficial to improve the acquisition efficiency of the crystal oscillator frequency; on the other hand, there is no need to set a large number of correlators, so that the circuit area of the crystal oscillator frequency calibration circuit is small and the implementation cost is also low.
[0073] The following is a detailed description of the above crystal oscillator frequency calibration circuit:
[0074] See also Figure 1 The embodiment of the present application provides a crystal oscillator frequency calibration circuit 100, which includes: a first single-tone signal acquisition module 110, a second single-tone signal acquisition module 120 and a frequency deviation determination module 130, wherein the input end of the first single-tone signal acquisition module 110 is connected to the crystal oscillator to be calibrated 140, and the output end of the first single-tone signal acquisition module 110 and the output end of the second single-tone signal acquisition module 120 are respectively connected to the frequency deviation determination module 130, wherein:
[0075] The first single-tone signal acquisition module 110 is used to acquire a first single-tone signal having a first frequency, and send the first single-tone signal to the frequency deviation determination module 130. The first frequency is in a first proportional relationship with the crystal oscillator frequency of the crystal oscillator 140 to be calibrated;
[0076] The second single-tone signal acquisition module 120 is used to acquire a second single-tone signal with a second frequency, and send the second single-tone signal to the frequency deviation determination module 130. The second frequency is in a second proportional relationship with the design frequency of the crystal oscillator 140 to be calibrated, and the first proportional relationship and the second proportional relationship are proportional relationships with the same proportional coefficient;
[0077] The frequency deviation determination module 130 is used to obtain a mixing signal with a third frequency, and obtain the frequency deviation between the crystal oscillator frequency and the design frequency of the crystal oscillator to be calibrated 140 according to the mixing signal. The third frequency is the frequency difference between the first frequency and the second frequency.
[0078] It should be noted that the design frequency of the crystal oscillator 140 to be calibrated is its nominal frequency. The design frequency of the crystal oscillator 140 to be calibrated is set to f X0 The crystal frequency of the crystal oscillator 140 to be calibrated is f X0 ′, according to experience, the crystal frequency f X0 ′ can be expressed as f′ X0 =f X0 (1+δ), where δ is the frequency deviation, δf X0 That is the crystal frequency f X0 ′ and the design frequency f X0 frequency deviation.
[0079] The first frequency and the crystal frequency f of the crystal to be calibrated X0 ′ is in a first proportional relationship, and the second frequency is in direct proportion to the design frequency f of the crystal oscillator to be calibrated. X0 It is a second proportional relationship, and the first proportional relationship and the second proportional relationship have the same proportional coefficient, that is:
[0080] f1=KfX0 '
[0081] f2=Kf X0
[0082] Wherein, f1 and f2 are the first frequency and the second frequency respectively; K is the proportional coefficient of the first proportional relationship and also the proportional coefficient of the second proportional relationship;
[0083] Then the crystal frequency f X0 ′ and the design frequency f X0 The frequency deviation can be expressed as:
[0084]
[0085] Therefore, the frequency deviation determination module 130 can obtain the crystal oscillator frequency f of the crystal oscillator to be calibrated 140 through the first single-tone signal, the second single-tone signal and the first proportional relationship or the second proportional relationship. X0 ′ and the design frequency f X0 The frequency deviation δf X0 .
[0086] When calibrating the crystal oscillator frequency of the calibrated crystal oscillator 140, the frequency deviation δ may be used for calibration, for example, the frequency deviation δ is converted into the frequency control word of the calibrated crystal oscillator 140 for frequency deviation compensation. It is understandable that the frequency deviation δ and the frequency deviation δf X0 They are two related but different parameters. The unit of frequency deviation is Hz, while the unit of frequency offset is ppm. That is, frequency deviation is the difference between two frequencies, and frequency offset represents the degree to which the crystal oscillator frequency deviates from its design frequency.
[0087] The specific implementation of the frequency deviation determination module 130 is introduced below:
[0088] As an optional implementation of the above-mentioned crystal oscillator frequency calibration circuit, the above-mentioned frequency deviation determination module 130 includes:
[0089] A mixing processing unit, used for performing difference mixing processing on the first single tone signal and the second single tone signal to obtain a mixed signal;
[0090] A mixing characteristic point acquisition unit, used for calculating the cumulative mean of N consecutive sample points among the consecutive sample points of the mixing signal, and obtaining a mixing characteristic point corresponding to the N consecutive sample points;
[0091] The frequency deviation calculation unit is used to determine the frequency deviation between the crystal oscillator frequency and the design frequency according to the phase difference between two adjacent frequency mixing characteristic points and the first proportional relationship or the second proportional relationship.
[0092] The above implementation is for example:
[0093] The mixing processing unit processes the first single tone signal X sig and the second tone signal X nco Perform difference mixing processing to obtain a mixed signal. The difference mixing method can be: directly convert the first single tone signal X sig and the second tone signal X nco It can be understood that when mixing is performed by multiplying the expressions, two frequency component signals are obtained, namely the difference frequency component signal and the sum frequency component signal. The sum frequency component signal can be filtered out by a filter.
[0094] The mixing feature point acquisition unit performs the first single tone signal X sig and the second tone signal X nco The samples after difference mixing are accumulated, and the accumulated result R is output every time N samples are accumulated. n :
[0095]
[0096] It can be understood that the above-mentioned mixing feature points can be understood as feature points used to characterize N consecutive sample points. In addition to accumulating and calculating the average, the feature points can also be determined by taking the median or other methods, which will not be described in detail in the embodiments of the present application.
[0097] The frequency deviation calculation unit can calculate the frequency difference Kδf between the first frequency f1 and the second frequency f2 according to the phase difference between two adjacent mixing characteristic points. X0 , that is, the third frequency f3 of the mixing signal, can be calculated as:
[0098]
[0099] The angle(·) function is used to calculate the complex phase angle;
[0100] After obtaining the third frequency f3, the crystal oscillator frequency f can be determined by the first proportional relationship or the second proportional relationship. X0 ′ and the design frequency f X0 The frequency deviation δf X0 .
[0101] Wherein, K is the first proportional relationship or the second proportional relationship.
[0102] In the above scheme, after performing differential mixing processing on the first single-tone signal and the second single-tone signal to obtain a mixed signal, a plurality of mixing characteristic points in the mixed signal are obtained by a mixing characteristic point acquisition unit, and then the crystal oscillator frequency f of the crystal oscillator 140 to be calibrated can be determined by the phase difference between two adjacent mixing characteristic points and the first proportional relationship and the second proportional relationship. X0 ′ and the design frequency fX0 The frequency deviation δf X0 , which is beneficial to improving the acquisition efficiency of the crystal oscillator frequency, and then improving the calibration efficiency of the crystal oscillator frequency.
[0103] The specific implementation of the frequency deviation calculation unit is introduced below:
[0104] As an optional implementation of the above-mentioned crystal oscillator frequency calibration circuit, the above-mentioned frequency deviation calculation unit is specifically used to: calculate multiple third frequency estimation values of the mixing signal according to the phase difference between multiple groups of two adjacent mixing characteristic points; perform cumulative average calculation on the multiple third frequency estimation values at least once to determine the third frequency; determine the frequency deviation according to the third frequency and the first proportional relationship or the second proportional relationship. This implementation is for example:
[0105] After obtaining multiple estimated values of the third frequency f3, the third frequency f3 of the mixed signal may be determined by accumulating and averaging the estimated values. The calculation method may be:
[0106]
[0107] Wherein, M-1 is the number of frequency deviation estimation values; M is the number of sample point groups, each group contains N sample points.
[0108] After obtaining the third frequency f3, the crystal oscillator frequency f can be determined by the first proportional relationship or the second proportional relationship. X0 ′ and the design frequency f X0 The frequency deviation δf X0 , the calculation method can be:
[0109]
[0110] Wherein, K is the first proportional relationship or the second proportional relationship.
[0111] The above scheme calculates multiple third frequency estimation values of the mixing signal through the phase difference between multiple groups of adjacent mixing characteristic points, and then obtains a third frequency value with higher accuracy by performing at least one cumulative averaging calculation on the estimation value, and then obtains the frequency deviation through the third frequency, which is beneficial to improve the accuracy of the frequency deviation obtained by the above crystal oscillator frequency calibration circuit 100, and then improves the frequency calibration accuracy of the above crystal oscillator frequency calibration circuit 100.
[0112] It is understandable that the first single tone signal acquisition module 110 can be implemented by a digital circuit, that is, the first single tone signal acquisition module 110 can be a logic processing module in a digital circuit board. Of course, it can also be implemented by a digital-analog hybrid circuit. In this case, the first single tone signal acquisition module 110 has the following three implementations:
[0113] A first implementation mode: using a frequency multiplier to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated 140, thereby obtaining a first single-tone signal;
[0114] See also Figure 2 In this implementation, the first single tone signal acquisition module 110 includes: a first frequency multiplier 111-1 and a first analog-to-digital converter 112-1, the first frequency multiplier 111-1 is connected to the first analog-to-digital converter 112-1, wherein:
[0115] A first frequency multiplier 111 - 1 is used for performing frequency multiplication processing on a crystal oscillator signal of the crystal oscillator to be calibrated at a first frequency multiplication ratio, obtaining a first frequency multiplied signal, and inputting the first frequency multiplied signal to an analog-to-digital converter;
[0116] The first analog-to-digital converter 112 - 1 is used to perform analog-to-digital conversion on the first frequency-multiplied signal, obtain a first single-tone signal with a first frequency, and input the first single-tone signal to the crystal oscillator accuracy estimation module.
[0117] It can be understood that the frequency multiplier in the embodiment of the present application refers to an analog circuit structure for amplifying the frequency of an input signal by a preset multiple. For the implementation method of the frequency multiplier, please refer to the relevant technology and the embodiment of the present application will not be repeated.
[0118] It can be understood that, if the first frequency multiplication ratio is assumed to be m1, the first frequency of the first single tone signal is equal to the frequency of the first frequency multiplication signal, that is, f1=m1f X0 ′, at this time, the second frequency of the second single tone signal can be set to f2 = m1f X0 Of course, in this embodiment, the proportionality coefficients of the first proportional relationship and the second proportional relationship are both m1.
[0119] In addition, it can be understood that the first analog-to-digital converter 112-1 can use an existing analog-to-digital converter in the wireless communication system, and the first frequency multiplier 111-1 can also use an existing frequency multiplier in the wireless communication system, for example, a frequency multiplier in an existing radio frequency circuit can be used.
[0120] The above scheme can achieve the acquisition of the first single-tone signal through a frequency multiplier and an analog-to-digital converter. On the one hand, it reduces the circuit area of the crystal oscillator frequency calibration circuit, which is beneficial to reducing the implementation cost of the above crystal oscillator frequency calibration circuit; on the other hand, it can quickly acquire the first single-tone signal, which is beneficial to improving the efficiency of acquiring frequency deviation, and thus improving the crystal oscillator frequency calibration efficiency.
[0121] A second implementation method: using an I path or a Q path in a radio frequency circuit to obtain a first single tone signal;
[0122] Take the example of using the I path in the RF circuit to obtain the first single tone signal, see Figure 3 The first single tone signal acquisition module 110 includes: a second frequency multiplier 111-2, a third frequency multiplier 111-3, a first mixer 113-1 and a second analog-to-digital converter 112-2; wherein,
[0123] The second frequency multiplier 111 - 2 is used for performing frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated 140 at a second frequency multiplication ratio, obtaining a second frequency multiplied signal, and inputting the second frequency multiplied signal to the first mixer 113 - 1;
[0124] The third frequency multiplier 111-3 is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated 140 with a third frequency multiplication ratio, obtain a third frequency multiplication signal, and input the third frequency multiplication signal to the first mixer 113-1; wherein the third frequency multiplication ratio is a frequency multiplication ratio different from the second frequency multiplication ratio;
[0125] The first mixer 113-1 is used to mix the second frequency-multiplied signal and the third frequency-multiplied signal to obtain a first single-tone signal having a first frequency, and input the first single-tone signal to the second analog-to-digital converter 112-2;
[0126] The second analog-to-digital converter 112 - 2 is used to convert the first single-tone signal into a digital signal and then input the digital signal into the frequency deviation determination module 130 .
[0127] It can be understood that if the second multiplication ratio and the third multiplication ratio are assumed to be m2 and m3 respectively, the frequency of the second multiplication signal is: m2f X0 ′, the frequency of the third-multiplied signal is: m3f X0 ', the first frequency of the first single tone signal obtained by the first mixer 113-1 may be (m2-m3)f X0 ', of course, since the mixer can also adopt the sum frequency mixing method, the first frequency of the first single tone signal can also be (m2+m3)f X0 ′.
[0128] It is understandable that the above-mentioned radio frequency circuit can adopt the existing radio frequency circuit in the relevant technology.
[0129] The above scheme obtains the first single-tone signal through the I path or Q path in the RF circuit, so that the above crystal oscillator frequency calibration circuit 100 can use the existing RF circuit to obtain the first single-tone signal, which is beneficial to reduce the implementation cost of the above crystal oscillator frequency calibration circuit 100.
[0130] A third implementation method: using the I path and Q path in the radio frequency circuit to obtain a first single tone signal;
[0131] See also Figure 4In this implementation, the first single tone signal acquisition module 110 includes: an orthogonal modulator 114, a fourth frequency multiplier 111-4, a fifth frequency multiplier 111-5, a third analog-to-digital converter 112-3, a fourth analog-to-digital converter 112-4, a second mixer 113-2 and a third mixer 113-3, wherein:
[0132] The fourth frequency multiplier 111 - 4 is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated 140 at a fourth frequency multiplication ratio, obtain a fourth frequency multiplied signal, and input the fourth frequency multiplied signal to the orthogonal modulator 114;
[0133] The quadrature modulator 114 is used to perform quadrature modulation on the fourth frequency multiplied signal, obtain an in-phase signal component and a quadrature-phase signal component of the fourth frequency multiplied signal, and input the in-phase signal component and the quadrature-phase signal component of the fourth frequency multiplied signal to the second mixer 113-2 and the third mixer 113-3 respectively;
[0134] The fifth frequency multiplier 111-5 is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated 140 at a fifth frequency multiplication ratio, obtain a fifth frequency multiplication signal, and input the fifth frequency multiplication signal to the second mixer 113-2 and the third mixer 113-3 respectively; the fifth frequency multiplication ratio is a frequency multiplication ratio different from the fourth frequency multiplication ratio;
[0135] The second mixer 113-2 is used to mix the in-phase signal component of the fourth frequency multiplication signal with the fifth frequency multiplication signal to obtain the in-phase signal component of the first single tone signal with the first frequency, and input the in-phase signal component of the first single tone signal into the third analog-to-digital converter 112-3;
[0136] The third mixer 113-3 is used to mix the quadrature phase signal component of the fourth frequency multiplication signal with the fifth frequency multiplication signal to obtain the quadrature phase signal component of the first single tone signal, and input the quadrature phase signal component of the first single tone signal into the fourth analog-to-digital converter;
[0137] A third analog-to-digital converter 112-3, configured to convert the in-phase signal component of the first single-tone signal into a digital signal and then input the digital signal into the frequency deviation determination module 130;
[0138] The fourth analog-to-digital converter 112 - 4 is used to convert the quadrature-phase signal component of the first single-tone signal into a digital signal and input the digital signal into the frequency deviation determination module 130 .
[0139] It is understandable that the RF signal can process the in-phase component (In-phase component) and the quadrature component (Quadrature component) of the signal respectively through two signal processing circuits, namely, the I path and the Q path. The RF circuit can perform orthogonal modulation on the input signal through the orthogonal modulator 114, thereby obtaining the in-phase signal component and the quadrature signal component of the input signal, and then input the in-phase signal component and the quadrature signal component into the I path and the Q path of the RF circuit respectively, thereby realizing the separate processing of the in-phase signal component and the quadrature signal component. For the implementation of the orthogonal modulator, please refer to the relevant technology, and the embodiments of the present application will not be repeated.
[0140] It can be understood that if the fourth and fifth multiplication ratios are assumed to be m4 and m5 respectively, the frequency of the fourth multiplication signal is: m4f X0 ′, the frequency of the fifth-multiplied signal is: m5f X0 '. The first frequency of the first single tone signal may be (m4-m5)f X0 ', of course, since the mixer can also adopt the sum frequency mixing method, the first frequency of the first single tone signal can also be (m4+m5)f X0 ′.
[0141] The above scheme obtains the fourth multiplied signal and the fifth multiplied signal as the input signals of the RF circuit respectively through two multipliers in the RF circuit, thereby utilizing the I path and Q path in the RF circuit to respectively obtain the orthogonal phase signal component and the in-phase signal component of the first single-tone signal, so that the first single-tone signal acquisition module can use the existing RF circuit in the wireless communication system to obtain the first single-tone signal, which is beneficial to reducing the implementation cost of the above-mentioned crystal oscillator frequency calibration circuit.
[0142] The first single-tone signal acquisition module in the above scheme can directly use a frequency multiplier to obtain the first single-tone signal, or use a signal processing circuit in the radio frequency circuit to obtain the first single-tone signal, or use two signal processing circuits in the radio frequency circuit to obtain the first single-tone signal, thereby making the above-mentioned crystal oscillator frequency calibration circuit applicable to more application scenarios, which is conducive to improving the adaptability of the above-mentioned crystal oscillator frequency calibration circuit.
[0143] It can be understood that when using the first frequency multiplier 111 in the existing RF circuit, a multiplexer MUX can be set so that the frequency multiplier in the RF circuit can be used in the above-mentioned crystal oscillator frequency calibration circuit to calibrate the crystal oscillator frequency, and can also be used in other circuits to achieve other functions.
[0144] The implementation of the second tone signal acquisition module 120 is introduced below:
[0145] As an optional implementation of the above-mentioned crystal oscillator frequency calibration circuit, the above-mentioned second single-tone signal acquisition module 120 includes:
[0146] The digitally controlled oscillator is used to generate a second single-tone signal with a second frequency.
[0147] It is understandable that a numerically controlled oscillator (NCO) can be used to generate a controllable sine wave or cosine wave. In the embodiment of the present application, the numerically controlled oscillator can be directly used to generate a second single tone signal with a second frequency.
[0148] In addition, it can be understood that the digitally controlled oscillator used by the second single-tone acquisition module 120 can be a digitally controlled oscillator in an existing radio frequency circuit in a wireless communication system.
[0149] The above scheme can directly generate a second single-tone signal with a second frequency through a numerically controlled oscillator. On the one hand, the frequency of the numerically controlled oscillator is a controllable frequency, which can make the above-mentioned crystal oscillator frequency calibration circuit 100 suitable for more application scenarios, which is beneficial to improving the adaptability of the above-mentioned crystal oscillator frequency calibration circuit; on the other hand, the second single-tone signal can be obtained through only one numerically controlled oscillator, which is beneficial to reducing the circuit area and thus reducing the circuit implementation cost; on the other hand, the second single-tone signal can be quickly obtained through the numerically controlled oscillator, which is beneficial to improving the crystal oscillator frequency calibration efficiency of the above-mentioned crystal oscillator frequency calibration circuit.
[0150] For the above-mentioned crystal oscillator frequency calibration circuit 100, a specific implementation method of the embodiment of the present application is provided, in which the crystal oscillator frequency calibration circuit is set in a digital-analog hybrid circuit mode, wherein the first single-tone signal acquisition module 110 adopts two-way signal processing circuits of an existing radio frequency circuit to obtain the first single-tone signal, and the second single-tone signal acquisition module 120 adopts a numerically controlled oscillator NCO to obtain the second single-tone signal, and the fourth frequency multiplier 111-4 and the fifth frequency multiplier 111-5 in the first single-tone signal acquisition module 110 adopt the frequency multiplier in the radio frequency circuit, and the radio frequency circuit can adopt the existing radio frequency circuit in the wireless communication system. The working principle of the crystal oscillator frequency calibration circuit 100 is described in detail below:
[0151] The input signals of the fourth frequency multiplier 111-4 and the fifth frequency multiplier 111-5 are both the crystal oscillator signal f of the crystal oscillator 140 to be calibrated. X0 ', the frequency of the fourth frequency multiplier signal output by the fourth frequency multiplier 111-4 is: m4f X0 ', the frequency of the fifth frequency multiplier signal output by the fifth frequency multiplier 111-5 is: m5f X0 ′;
[0152] The radio frequency circuit is used to perform orthogonal modulation on the fourth frequency multiplication signal and the fifth frequency multiplication signal as its input signal. The frequency of the first single tone signal input to the frequency deviation determination module 130 by the radio frequency circuit is X sig =(m4-m5)f X0 ′;
[0153] The expression of the second single tone signal output by the second single tone signal acquisition module 120, that is, the NCO, is: Among them, f s is the sampling rate; f3 is the third frequency; n is the sampling point number, n = 0, 1, 2, 3 ... It can be understood that the third frequency f3 = m4-m5.
[0154] The detailed working principle of the frequency deviation determination module 130 in the above case is introduced below:
[0155] The frequency deviation determination module 130 first performs a frequency deviation determination on the first single tone signal X input thereto. sig and the second tone signal X nco Performing mixing processing to obtain a mixed signal;
[0156] The mixing processing method is: the first single tone signal X sig and the second tone signal X nco multiply;
[0157] The method for obtaining the mixed signal after mixing is: sig and the second tone signal X nco The multiplied samples are accumulated, and the accumulated result R is output every time N samples are accumulated. n :
[0158]
[0159] According to R n The accumulated result of can get the third frequency:
[0160]
[0161] The angle(·) function is used to calculate the complex phase angle;
[0162] After obtaining multiple third frequency estimates, the frequency deviation is obtained by accumulating and averaging, for example:
[0163]
[0164] Wherein, M-1 is the number of frequency deviation estimates; M is the number of sample point groups, each group contains N sample points;
[0165] After the frequency deviation is obtained, the frequency deviation can be converted into a frequency offset, and then the frequency offset is converted into a control word to achieve frequency offset compensation for the crystal oscillator frequency.
[0166] Taking N=1000 as an example, the estimation process of the third frequency is introduced:
[0167] The first accumulation process accumulates the sample points 0 to 999, the second accumulation process accumulates the sample points 1000 to 1999, and so on. Then the phase difference between each two adjacent accumulation results is Therefore, the third frequency f3 can be inferred from the phase difference between the two accumulated results, so that the second frequency deviation can be calculated based on the third frequency f3, and then the frequency deviation can be calculated; and the phase difference between the two adjacent accumulated results can be calculated by calculate.
[0168] The frequency deviation can be calculated, for example:
[0169] Assuming that the frequency deviation of the crystal oscillator is δ, and the design frequency of the crystal oscillator is 38.4MHz, the single-tone signal output by the crystal oscillator can be converted into a digital signal through the ADC. Assuming that the ADC sampling rate is 122.88M, the first single-tone signal is recorded as X sig , the actual frequency is f1 = 38.4M·(1+δ), the clock of the second single tone signal also comes from the same crystal oscillator, the second single tone signal is recorded as X nco It can be understood that although there is a sampling deviation, the sampling deviation has little effect on the second single tone signal, so it can be considered that the frequency of the second single tone signal is also 38.4 MHz, that is, f2 = 38.4 Hz, and the frequency of the mixed signal obtained by mixing the first single tone signal and the second single tone signal is f3 = 38.4M·δ;
[0170] The mixed signal generated by the mixing is accumulated multiple times continuously, and the first accumulated amount is:
[0171]
[0172] The second cumulative amount is:
[0173]
[0174] And so on to get R n ,n=0,1,2...10, a total of 11 estimates;
[0175] The estimated value of the third frequency can be calculated by:
[0176]
[0177] A total of 10 frequency deviation estimates are obtained, and the 10 frequency deviation estimates are averaged to obtain the final estimate:
[0178]
[0179] Since the first and second proportional coefficients are both 1 in this case, the estimated value of the third frequency is That is 38.4M·δ, The ratio of this frequency to 38.4M is the frequency deviation δ.
[0180] It can be understood that the above-mentioned third frequency estimation value is calculated based on two adjacent sample point groups, and of course it can also be calculated based on any two sample point groups. The number of third frequency estimation values can also be greater than 1 and be other numbers, such as two, three, etc., which can be flexibly set here according to the preset crystal oscillator estimation accuracy.
[0181] See also Figure 5 Based on the same inventive concept, the embodiment of the present application further provides a method for determining a crystal oscillator frequency deviation, the method comprising:
[0182] Step S210: acquiring a first single-tone signal having a first frequency and a second single-tone signal having a second frequency; wherein the first frequency is in a first proportional relationship with the crystal oscillator frequency of the crystal oscillator to be calibrated; and the second frequency is in a second proportional relationship with the design frequency of the crystal oscillator to be calibrated; and the first proportional relationship and the second proportional relationship are proportional relationships with the same proportional coefficient;
[0183] Step S220: performing mixing processing on the first single tone signal and the second single tone signal to obtain a mixed signal having a third frequency; wherein the third frequency is a frequency difference between the first frequency and the second frequency;
[0184] Step S230: Obtaining a frequency deviation between the crystal oscillator frequency and the design frequency according to the mixing signal.
[0185] It can be understood that the first single-tone signal and the second single-tone signal in the above step S210 can be obtained by the first single-tone signal acquisition module 110 and the second single-tone signal acquisition module 120 in the above-mentioned crystal oscillator frequency calibration circuit 100, and the first single-tone signal can also be obtained by multiplying the crystal oscillator signal by methods such as Matlab software.
[0186] As an optional implementation of the above-mentioned crystal oscillator frequency deviation determination method, the above-mentioned step S230 includes: for every N consecutive sample points in the continuous sample points of the mixing signal, calculating the cumulative mean of the N consecutive sample points, and obtaining a mixing characteristic point of the N consecutive sample points; determining the frequency deviation between the crystal oscillator frequency and the design frequency based on the phase difference between two adjacent mixing characteristic points and the first proportional relationship or the second proportional relationship.
[0187] As an optional implementation of the above-mentioned crystal oscillator frequency deviation determination method, the frequency deviation between the crystal oscillator frequency and the design frequency is determined according to the phase difference between two adjacent mixing characteristic points and the first proportional relationship or the second proportional relationship, including: calculating multiple third frequency estimation values of the mixing signal according to multiple groups of phase differences between two adjacent mixing characteristic points; performing cumulative averaging calculation on the multiple third frequency estimation values at least once to determine the third frequency; and determining the frequency deviation according to the third frequency and the first proportional relationship or the second proportional relationship.
[0188] As an optional implementation of the above-mentioned method for determining the crystal oscillator frequency deviation, the above-mentioned step S210 of acquiring a first single-tone signal with a first frequency includes:
[0189] Performing frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated at a first frequency multiplication ratio to obtain a first frequency multiplication signal;
[0190] Convert the first frequency-multiplied signal into a digital signal to obtain a first single-tone signal having a first frequency;
[0191] Alternatively, step S210 acquires a first single tone signal having a first frequency, including:
[0192] Performing frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a second frequency multiplication ratio and a third frequency multiplication ratio respectively to obtain a second frequency multiplication signal and a third frequency multiplication signal; wherein the third frequency multiplication ratio is a frequency multiplication ratio different from the second frequency multiplication ratio;
[0193] Performing mixing processing on the second frequency-multiplied signal and the third frequency-multiplied signal, and converting the mixed signal into a digital signal, to obtain a first single-tone signal having a first frequency;
[0194] Alternatively, step S210 acquires a first single tone signal having a first frequency, including:
[0195] Performing frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a fourth frequency multiplication ratio and a fifth frequency multiplication ratio respectively to obtain a fourth frequency multiplication signal and a fifth frequency multiplication signal; wherein the fifth frequency multiplication ratio is a frequency multiplication ratio different from the fourth frequency multiplication ratio;
[0196] Performing quadrature modulation on the fourth frequency-multiplied signal to obtain an in-phase signal component and a quadrature-phase signal component of the fourth frequency-multiplied signal;
[0197] Performing mixing processing on the in-phase signal component of the fourth frequency multiplication signal and the fifth frequency multiplication signal to obtain the in-phase signal component of the first single tone signal having the first frequency;
[0198] Performing mixing processing on the quadrature phase signal component of the fourth frequency multiplication signal and the fifth frequency multiplication signal to obtain the quadrature phase signal component of the first single tone signal;
[0199] The in-phase signal component and the quadrature-phase signal component of the first single-tone signal are respectively converted into digital signals to obtain the first single-tone signal.
[0200] As an optional implementation of the above-mentioned method for determining the crystal oscillator frequency deviation, the above-mentioned step S210 of obtaining the second single-tone signal includes: generating a second single-tone signal with a second frequency.
[0201] It is understandable that the above-mentioned crystal oscillator frequency calibration method can be executed by an electronic device, which includes: a processor, a memory and a communication bus, wherein the processor and the memory communicate with each other through the communication bus; the memory stores computer program instructions that can be executed by the processor, and when the computer program instructions are read and run by the processor, the method provided by the first aspect or any possible implementation of the first aspect is executed. Specifically:
[0202] See also Figure 6 The electronic device 300 includes: a processor 310, a memory 320 and a communication interface 330. These components are interconnected and communicate with each other through a communication bus 340 and / or other forms of connection mechanisms (not shown).
[0203] The memory 320 includes one or more (only one is shown in the figure), which may be, but not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The processor 310 and other possible components may access the memory 320 and read and / or write data therein.
[0204] The processor 310 includes one or more (only one is shown in the figure), which can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 310 can be a general-purpose processor, including a central processing unit (CPU), a microcontroller unit (MCU), a network processor (NP) or other conventional processors; it can also be a special-purpose processor, including a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0205] The communication interface 330 includes one or more (only one is shown in the figure), which can be used to communicate directly or indirectly with other devices to exchange data. For example, the communication interface 330 can be an Ethernet interface; it can be a mobile communication network interface, such as an interface of a 3G, 4G, or 5G network; or it can be other types of interfaces with data transceiving functions.
[0206] One or more computer program instructions may be stored in the memory 320 , and the processor 310 may read and execute these computer program instructions to implement the crystal oscillator frequency calibration method and other desired functions provided in the embodiments of the present application.
[0207] Understandably, Figure 6 The structure shown is for illustration only. The electronic device 300 may also include Figure 6 More or fewer components as shown, or with Figure 6 Different configurations shown. Figure 6 Each component shown in the figure can be implemented by hardware, software or a combination thereof. For example, the electronic device 300 can be a single server (or other device with computing processing capabilities), a combination of multiple servers, a cluster of a large number of servers, etc., and can be both a physical device and a virtual device.
[0208] The present application also provides a computer-readable storage medium, which stores computer program instructions. When the computer program instructions are read and executed by a computer processor, the crystal oscillator frequency calibration method provided by the present application is executed. For example, the computer-readable storage medium can be implemented as Figure 6 The memory 320 in the electronic device 300.
[0209] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0210] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0211] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0212] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A crystal oscillator frequency calibration circuit, characterized in that: include: A first single-tone signal acquisition module, a second single-tone signal acquisition module and a frequency deviation determination module; the input end of the first single-tone signal acquisition module is connected to the crystal oscillator to be calibrated; the output end of the first single-tone signal acquisition module and the output end of the second single-tone signal acquisition module are respectively connected to the frequency deviation determination module; wherein: The first single-tone signal acquisition module is used to acquire a first single-tone signal having a first frequency, and send the first single-tone signal to the frequency deviation determination module; wherein the first frequency is in a first proportional relationship with the crystal oscillator frequency of the crystal oscillator to be calibrated; The second single-tone signal acquisition module is used to acquire a second single-tone signal with a second frequency, and send the second single-tone signal to the frequency deviation determination module; wherein the second frequency is in a second proportional relationship with the design frequency of the crystal oscillator to be calibrated; the first proportional relationship and the second proportional relationship are proportional relationships with the same proportional coefficient; The frequency deviation determination module is used to obtain a mixing signal with a third frequency, and obtain a frequency deviation between the crystal oscillator frequency and the design frequency according to the mixing signal; wherein the third frequency is a frequency difference between the first frequency and the second frequency; The frequency deviation determination module comprises: A mixing processing unit, used for performing difference mixing processing on the first single-tone signal and the second single-tone signal to obtain a mixed signal; A mixing feature point acquisition unit, configured to calculate, for each N consecutive sample points of the mixing signal, a cumulative mean of the N consecutive sample points, and acquire a mixing feature point corresponding to the N consecutive sample points; A frequency deviation calculation unit is used to determine the frequency deviation between the crystal oscillator frequency and the design frequency according to the phase difference between two adjacent mixing characteristic points and the first proportional relationship or the second proportional relationship.
2. The crystal oscillator frequency calibration circuit according to claim 1, characterized in that: The frequency deviation calculation unit is specifically used for: Calculating a plurality of third frequency estimation values of the mixing signal according to a plurality of groups of phase differences between two adjacent mixing characteristic points; Performing at least one cumulative average calculation on a plurality of the third frequency estimation values to determine the third frequency; The frequency deviation is determined according to the third frequency and the first proportional relationship or the second proportional relationship.
3. The crystal oscillator frequency calibration circuit according to claim 1, characterized in that: The first single tone signal acquisition module includes a first frequency multiplier and a first analog-to-digital converter, wherein the first frequency multiplier is connected to the first analog-to-digital converter, wherein: The first frequency multiplier is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a first frequency multiplication ratio, obtain a first frequency multiplied signal, and input the first frequency multiplied signal to the analog-to-digital converter; The first analog-to-digital converter is used to perform analog-to-digital conversion on the first frequency-multiplied signal, obtain a first single-tone signal having a first frequency, and input the first single-tone signal into the frequency deviation determination module; or, The first single tone signal acquisition module includes a second frequency multiplier, a third frequency multiplier, a first mixer and a second analog-to-digital converter; wherein, The second frequency multiplier is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a second frequency multiplication ratio, obtain a second frequency multiplied signal, and input the second frequency multiplied signal to the first mixer; The third frequency multiplier is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a third frequency multiplication ratio, obtain a third frequency multiplication signal, and input the third frequency multiplication signal to the first mixer; wherein the third frequency multiplication ratio is a frequency multiplication ratio different from the second frequency multiplication ratio; The first mixer is used to mix the second frequency-multiplied signal and the third frequency-multiplied signal to obtain a first single-tone signal having a first frequency, and input the first single-tone signal to the second analog-to-digital converter; The second analog-to-digital converter is used to convert the first single-tone signal into a digital signal and then input the digital signal into the frequency deviation determination module; or, The first single tone signal acquisition module includes: an orthogonal modulator, a fourth frequency multiplier, a fifth frequency multiplier, a third analog-to-digital converter, a fourth analog-to-digital converter, a second mixer and a third mixer, wherein: The fourth frequency multiplier is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a fourth frequency multiplication ratio, obtain a fourth frequency multiplied signal, and input the fourth frequency multiplied signal to the orthogonal modulator; The quadrature modulator is used to perform quadrature modulation on the fourth frequency multiplied signal, obtain an in-phase signal component and a quadrature-phase signal component of the fourth frequency multiplied signal, and input the in-phase signal component of the fourth frequency multiplied signal and the quadrature-phase signal component of the fourth frequency multiplied signal to the second mixer and the third mixer respectively; The fifth frequency multiplier is used to perform frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a fifth frequency multiplication ratio, obtain a fifth frequency multiplication signal, and input the fifth frequency multiplication signal to the second mixer and the third mixer respectively; the fifth frequency multiplication ratio is a frequency multiplication ratio different from the fourth frequency multiplication ratio; The second mixer is used to mix the in-phase signal component of the fourth frequency-multiplied signal with the fifth frequency-multiplied signal to obtain the in-phase signal component of the first single-tone signal with the first frequency, and input the in-phase signal component of the first single-tone signal into a third analog-to-digital converter; The third mixer is used to mix the quadrature phase signal component of the fourth frequency multiplication signal with the fifth frequency multiplication signal to obtain the quadrature phase signal component of the first single tone signal, and input the quadrature phase signal component of the first single tone signal into a fourth analog-to-digital converter; The third analog-to-digital converter is used to convert the in-phase signal component of the first single-tone signal into a digital signal and then input the digital signal into the frequency deviation determination module; The fourth analog-to-digital converter is used to convert the quadrature phase signal component of the first single-tone signal into a digital signal and then input the digital signal into the frequency deviation determination module.
4. The crystal oscillator frequency calibration circuit according to any one of claims 1 to 3, characterized in that: The second single tone signal acquisition module includes: A digitally controlled oscillator is used to generate the second single-tone signal with the second frequency.
5. A method for determining a crystal oscillator frequency deviation, characterized in that: The method comprises: Acquire a first single-tone signal having a first frequency and a second single-tone signal having a second frequency; wherein the first frequency is in a first proportional relationship with the crystal oscillator frequency of the crystal oscillator to be calibrated; the second frequency is in a second proportional relationship with the design frequency of the crystal oscillator to be calibrated; the first proportional relationship and the second proportional relationship are proportional relationships with the same proportional coefficient; Performing mixing processing on the first single-tone signal and the second single-tone signal to obtain a mixed signal with a third frequency; wherein the third frequency is a frequency difference between the first frequency and the second frequency; According to the mixing signal, obtaining a frequency deviation between the crystal oscillator frequency and the design frequency; The step of obtaining a frequency deviation between the crystal oscillator frequency and the design frequency according to the mixing signal includes: For every N consecutive sample points of the mixing signal, calculate the cumulative mean of the N consecutive sample points to obtain a mixing feature point of the N consecutive sample points; The frequency deviation between the crystal oscillator frequency and the design frequency is determined according to the phase difference between two adjacent frequency mixing characteristic points and the first proportional relationship or the second proportional relationship.
6. The method for determining the crystal oscillator frequency deviation according to claim 5, characterized in that: Determining the frequency deviation between the crystal oscillator frequency and the design frequency according to the phase difference between two adjacent frequency mixing characteristic points and the first proportional relationship or the second proportional relationship includes: Calculating a plurality of third frequency estimation values of the mixing signal according to a plurality of groups of phase differences between two adjacent mixing characteristic points; Performing at least one cumulative average calculation on a plurality of the third frequency estimation values to determine the third frequency; The frequency deviation is determined according to the third frequency and the first proportional relationship or the second proportional relationship.
7. The method for determining the crystal oscillator frequency deviation according to claim 5, characterized in that: The step of acquiring a first single tone signal having a first frequency includes: Performing frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a first frequency multiplication ratio to obtain a first frequency multiplication signal; Convert the first frequency-multiplied signal into a digital signal to obtain a first single-tone signal having a first frequency; or, The step of acquiring a first single tone signal having a first frequency includes: Performing frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a second frequency multiplication ratio and a third frequency multiplication ratio respectively, to obtain a second frequency multiplication signal and a third frequency multiplication signal; wherein the third frequency multiplication ratio is a frequency multiplication ratio different from the second frequency multiplication ratio; Performing mixing processing on the second frequency-multiplied signal and the third frequency-multiplied signal, and converting the mixed signal into a digital signal, to obtain a first single-tone signal having a first frequency; or, The step of acquiring a first single tone signal having a first frequency includes: Performing frequency multiplication processing on the crystal oscillator signal of the crystal oscillator to be calibrated with a fourth frequency multiplication ratio and a fifth frequency multiplication ratio respectively, to obtain a fourth frequency multiplication signal and a fifth frequency multiplication signal; wherein the fifth frequency multiplication ratio is a frequency multiplication ratio different from the fourth frequency multiplication ratio; Performing quadrature modulation on the fourth frequency-doubled signal to obtain an in-phase signal component and a quadrature-phase signal component of the fourth frequency-doubled signal; Performing mixing processing on the in-phase signal component of the fourth frequency-multiplied signal and the fifth frequency-multiplied signal to obtain the in-phase signal component of the first single-tone signal having a first frequency; Performing mixing processing on the quadrature phase signal component of the fourth frequency multiplication signal and the fifth frequency multiplication signal to obtain the quadrature phase signal component of the first single tone signal; The in-phase signal component and the quadrature-phase signal component of the first single-tone signal are respectively converted into digital signals to obtain the first single-tone signal.
8. The method for determining the crystal oscillator frequency deviation according to any one of claims 5 to 7, characterized in that: Acquiring the second single tone signal includes: A second single tone signal having a second frequency is generated.
Citation Information
Patent Citations
Source difference measurement method, module and device for frequency signal
CN115047245A