CN106330134A - Crystal oscillator circuit and tuning method thereof - Google Patents

Crystal oscillator circuit and tuning method thereof Download PDF

Info

Publication number
CN106330134A
CN106330134A CN201510369109.7A CN201510369109A CN106330134A CN 106330134 A CN106330134 A CN 106330134A CN 201510369109 A CN201510369109 A CN 201510369109A CN 106330134 A CN106330134 A CN 106330134A
Authority
CN
China
Prior art keywords
control word
temperature
compensation
crystal oscillator
oscillator circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510369109.7A
Other languages
Chinese (zh)
Other versions
CN106330134B (en
Inventor
李超
谢豪律
张鹏北
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen ZTE Microelectronics Technology Co Ltd
Original Assignee
Shenzhen ZTE Microelectronics Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen ZTE Microelectronics Technology Co Ltd filed Critical Shenzhen ZTE Microelectronics Technology Co Ltd
Priority to CN201510369109.7A priority Critical patent/CN106330134B/en
Priority to PCT/CN2016/074685 priority patent/WO2017000571A1/en
Publication of CN106330134A publication Critical patent/CN106330134A/en
Application granted granted Critical
Publication of CN106330134B publication Critical patent/CN106330134B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03JTUNING RESONANT CIRCUITS; SELECTING RESONANT CIRCUITS
    • H03J7/00Automatic frequency control; Automatic scanning over a band of frequencies
    • H03J7/02Automatic frequency control
    • H03J7/04Automatic frequency control where the frequency control is accomplished by varying the electrical characteristics of a non-mechanically adjustable element or where the nature of the frequency controlling element is not significant

Landscapes

  • Oscillators With Electromechanical Resonators (AREA)

Abstract

The invention discloses a tuning method of a crystal oscillator circuit. The method comprises the steps of obtaining a first control word according to a current digital voltage signal and a temperature compensation table; obtaining a second control word according to a current automatic frequency control AFC word and a nonlinear compensation table; and adjusting a capacitor array according to the first control word and the second control word, thereby tuning the frequency of the crystal oscillator circuit. The invention also discloses the crystal oscillator circuit.

Description

Crystal oscillator circuit and tuning method thereof
Technical Field
The invention relates to the technical field of crystal oscillators, in particular to a crystal oscillator circuit and a tuning method thereof.
Background
Digital Compensated Crystal Oscillator (DCXO) circuits are widely used in modern wireless communication chip systems, and generally consist of: the oscillator amplifier provides negative resistance required by oscillation, ensures an amplitude detection and control circuit of oscillation starting, and has a design that a temperature compensation circuit is added to correct the drift of oscillation frequency caused by temperature change.
Most methods for realizing circuit tuning of the crystal oscillator in the prior art are large and complex in circuit, low in frequency accuracy and high in realization cost; therefore, it is desirable to provide a crystal oscillator circuit and a tuning method thereof, which can improve the frequency accuracy of the crystal oscillator circuit, and have high reliability and low cost.
Disclosure of Invention
In view of this, embodiments of the present invention are expected to provide a crystal oscillator circuit and a tuning method thereof, which can improve the frequency accuracy of the crystal oscillator circuit, enhance the user experience, and have high reliability and low cost.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
the embodiment of the invention provides a tuning method of a crystal oscillator circuit, which comprises the following steps:
acquiring a first control word according to the current digital voltage signal and a temperature compensation table;
acquiring a second Control word according to a current Automatic Frequency Control (AFC) Control word and a nonlinear compensation table;
and adjusting the capacitor array according to the first control word and the second control word to realize the tuning of the frequency of the crystal oscillator circuit.
In the above scheme, the current digital voltage signal is obtained by converting an input analog voltage signal and is related to temperature.
In the foregoing solution, before the obtaining the first control word according to the current digital voltage signal and the temperature compensation table, the method further includes:
and determining the temperature coefficient of the crystal, and acquiring a temperature compensation table corresponding to the crystal according to the determined temperature coefficient.
In the foregoing solution, the obtaining the first control word according to the current digital voltage signal and the temperature compensation table includes:
determining a corresponding temperature value according to the current digital voltage signal, acquiring a first compensation capacitor corresponding to the temperature value in a temperature compensation table in a lookup table mode according to the temperature value, and generating a first control word according to the first compensation capacitor.
In the foregoing solution, the obtaining a second control word according to a current AFC control word and a non-linear compensation table includes:
and acquiring a second compensation capacitor corresponding to the AFC control word in a nonlinear compensation table in a lookup table mode according to the current AFC control word, and generating a second control word according to the second compensation capacitor.
In the foregoing solution, the adjusting the capacitor array according to the first control word and the second control word to tune the frequency of the crystal oscillator circuit includes:
and adding the first control word and the second control word to obtain a third control word, and adjusting the size of the capacitor array according to the third control word to realize the tuning of the frequency of the crystal oscillator circuit.
An embodiment of the present invention further provides a crystal oscillator circuit, where the crystal oscillator circuit includes: the temperature compensation circuit, the nonlinear compensation circuit and the tuning circuit; wherein,
the temperature compensation circuit is used for acquiring a first control word according to the current digital voltage signal and the temperature compensation table;
the nonlinear compensation circuit is used for acquiring a second control word according to the current AFC control word and the nonlinear compensation table;
and the tuning circuit is used for adjusting the capacitor array according to the first control word and the second control word so as to tune the frequency of the crystal oscillator circuit.
In the above scheme, the current digital voltage signal is obtained by converting an input analog voltage signal and is related to temperature;
correspondingly, the crystal oscillator circuit further comprises an analog-to-digital converter for converting the input analog voltage signal into a corresponding digital voltage signal.
In the above scheme, the crystal oscillator circuit further includes a processor configured to determine a temperature coefficient of the crystal, and obtain a temperature compensation table corresponding to the crystal according to the determined temperature coefficient.
In the above scheme, the temperature compensation circuit is specifically configured to determine a corresponding temperature value according to a current digital voltage signal, obtain a first compensation capacitor corresponding to the temperature value in a temperature compensation table by using a lookup table according to the temperature value, and generate a first control word according to the first compensation capacitor.
In the foregoing solution, the nonlinear compensation circuit is specifically configured to obtain a second compensation capacitor corresponding to an AFC control word in a nonlinear compensation table by using a lookup table according to the current AFC control word, and generate a second control word according to the second compensation capacitor.
In the foregoing scheme, the tuning circuit is specifically configured to add the first control word and the second control word to obtain a third control word, and adjust the size of the capacitor array according to the third control word, so as to tune the frequency of the crystal oscillator circuit.
According to the crystal oscillator circuit and the tuning method thereof provided by the embodiment of the invention, a first control word is obtained according to a current digital voltage signal and a temperature compensation table; acquiring a second control word according to the current AFC control word and the nonlinear compensation table; and adjusting the capacitor array according to the first control word and the second control word to realize the tuning of the frequency of the crystal oscillator circuit. Therefore, the tuning of the crystal oscillator circuit is realized according to the current digital voltage signal and the control word generated by the current AFC control word, the frequency accuracy and the temperature characteristic of the crystal oscillator circuit can be improved, the user experience is enhanced, and the crystal oscillator circuit is high in reliability and low in cost.
Drawings
FIG. 1 is a flow chart of a tuning method of a crystal oscillator circuit according to an embodiment of the invention;
FIG. 2 is a flow chart illustrating a tuning method of a two-crystal oscillator circuit according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a circuit structure of a crystal oscillator according to an embodiment of the present invention.
Detailed Description
In the embodiment of the invention, a first control word is obtained according to a current digital voltage signal and a temperature compensation table; acquiring a second control word according to the current AFC control word and the nonlinear compensation table; and adjusting the capacitor array according to the first control word and the second control word to realize the tuning of the frequency of the crystal oscillator circuit.
Example one
Fig. 1 is a schematic flow chart illustrating a tuning method of a crystal oscillator circuit according to an embodiment of the present invention, and as shown in fig. 1, the tuning method of the crystal oscillator circuit according to the embodiment of the present invention includes:
step 101: acquiring a first control word according to the current digital voltage signal and a temperature compensation table;
this step can be implemented by a temperature compensation circuit in the crystal oscillator circuit;
the method specifically comprises the following steps: determining a corresponding temperature value according to a current digital voltage signal, acquiring a first compensation capacitor corresponding to the temperature value in a temperature compensation table in a lookup table mode according to the temperature value, and generating a first control word according to the first compensation capacitor; the first control word is used for representing the size of a compensation capacitor required by the corresponding current digital voltage signal; the first compensation capacitor corresponding to the temperature value is the minimum unit capacitor number corresponding to the temperature value, namely the first compensation capacitor is represented by the minimum unit capacitor number.
Here, the current digital voltage signal is obtained by converting an analog voltage signal input by the temperature sensing circuit through an analog-to-digital converter and inputting the analog voltage signal to the temperature compensation circuit; the analog voltage signal is generated by the temperature sensing circuit and changes along with the temperature change, namely the analog voltage signal is related to the temperature, namely the digital voltage signal is related to the temperature, and the specific relation is determined according to the currently adopted temperature sensor, for example, when the current temperature sensor is realized by adopting a thermistor, the digital voltage signal is approximately in a linear relation with the temperature;
determining the corresponding temperature value according to the current digital voltage signal includes: and determining a corresponding temperature value according to the current digital voltage signal and the corresponding relation between the digital voltage signal and the temperature value.
Further, before the obtaining the first control word according to the current digital voltage signal and the temperature compensation table, the method further includes:
determining the temperature coefficient of the crystal, and acquiring a temperature compensation table corresponding to the crystal according to the determined temperature coefficient; the operation can be completed in an automatic test before the terminal containing the crystal oscillator circuit leaves a factory, particularly in a frequency coarse adjustment process of the automatic test;
wherein the temperature coefficient of the crystal comprises: first temperature coefficient a1A second temperature coefficient a2And a third temperature coefficient a3
The frequency-temperature characteristic of the crystal can be expressed as: Δ fc(T)=a3(T-T0)3+a2(T-T0)2+a1(T-T0);
Wherein, T0Being crystallineInflection temperature, about 25 °; the crystal may be AT cut;
Δfc(T) represents the amount of change in frequency at a temperature T.
Further, the determining the temperature coefficient of the crystal comprises:
obtaining the frequency difference delta f (T) when the crystal temperature is T1 and T33)-f(T1) Obtaining the temperature coefficient of the crystal according to the corresponding relation between the frequency difference delta f and the temperature coefficient; wherein, (T2-Delta T)<T1<T2,T2<T3<(T2+ΔT),T1About 25 ° for the inflection temperature of the crystal; the corresponding relation between the frequency difference deltaf and the temperature coefficient can be obtained by looking up a table.
In a crystal oscillator circuit, the input resistance of an amplifier needs to be matched with the series resonance impedance of a crystal, but the input impedance of the amplifier is usually high, so that the impedance of the amplifier and the impedance of the crystal may be mismatched during series resonance0The frequency response is worse than the series resonance, so a capacitor is usually connected in parallel across the crystal to lower C0The effect on the parallel resonant frequency; in parallel connection with a capacitor CLThe resonant frequency of the circuit can then be expressed as:
f L = 1 2 &pi; C S + ( C 0 + C L ) L S C S ( C 0 + C L ) = f p C S + ( C 0 + C L ) L S C S ( C 0 + C L ) / C S + C 0 L S C S C 0 ;
wherein, CSIs the dynamic capacitance of the crystal; l isSA dynamic inductance that is a crystal; c0Is a static capacitance; from series resonance frequency f q = 1 2 &pi; L s C s ,
Parallel resonant frequency f p = 1 2 &pi; C s + C 0 L s C s C 0 = f q C s + C 0 C 0 &ap; f q ( 1 + C s 2 C 0 ) ; It is possible to obtain,
f L = f q 1 + C S C 0 + C L &ap; f q ( 1 + C S 2 ( C 0 + C L ) ) ;
according to the above formula, the load capacitance C can be adjustedLTo realize the change of the oscillation frequency of the crystal oscillator, i.e. to compensate the frequency caused by the temperature change of the crystalRate change, which requires a synchronous change of load capacitance at the time of temperature change; suppose load CLIs changed into CxWhen the frequency variation caused by the temperature variation of the crystal is just offset, the frequency variation has f x = f q 1 + C S C 0 + C x &ap; f q ( 1 + C S 2 ( C 0 + C x ) ) ;
From fL-fx=ΔfcCan obtain the product &Delta;f c f q &ap; C S 2 ( C 0 + C L ) - C S 2 ( C 0 + C x ) , Namely, it is C x &ap; 1 1 C 0 + C L - &Delta;f c f q &CenterDot; 2 C S - C 0 ;
Further, the relationship between the compensation capacitance and the temperature can be obtained as follows:
C x &ap; 1 1 C 0 + C L - a 3 ( T - T 0 ) 3 + a 2 ( T - T 0 ) 2 + a 1 ( T - T 0 ) f q &CenterDot; 2 C S - C 0 ;
thus, by the above formula, it is possible to obtain a temperature coefficient a based on a certain value1、a2、a3And the required compensation capacitor C can be obtained at the current temperature Tx
Let the minimum unit capacitance be CunitThe number of capacitors to be compensated is num _ CunitThe following can be obtained:
n u m _ C u n i t = C x - C x _ m i n C u n i t ;
wherein, Cx_minThe minimum value of the compensation capacitance required by the crystal due to temperature change is a constant;
according to the formula, after the temperature coefficient of a determined crystal is obtained, the size of the required compensation capacitor and the number of the required minimum unit capacitors can be obtained corresponding to each temperature value;
in summary, obtaining a temperature compensation table corresponding to the crystal according to the determined temperature coefficient includes:
obtaining the number of minimum unit capacitors required by the crystal at each temperature value according to the relationship between the determined temperature and the compensation capacitor required by the crystal, and further obtaining a temperature compensation table of the crystal; here, the temperature interval between each of the temperature values may be set as required, for example, the temperature interval may be 0.5 °; after the temperature compensation table is obtained in the automatic testing process before the terminal leaves a factory, the temperature compensation table can be directly applied in frequency fine adjustment in the subsequent terminal using process, namely, the terminal can directly obtain the corresponding required minimum unit capacitance number through the temperature compensation table according to the current temperature.
Further, before determining the temperature coefficient of the crystal, the method further comprises:
coarse tuning (Coarse tuning) a frequency of a crystal oscillator circuit to calibrate an initial frequency of the crystal oscillator circuit; the operation can be completed in an automatic test before the terminal containing the crystal oscillator circuit leaves a factory, particularly in a frequency coarse adjustment process of the automatic test;
wherein coarsely adjusting the frequency of the crystal oscillator circuit comprises:
calculating a reference clock error according to a carrier signal transmitted by a current transmitter TX, and calibrating the frequency of the crystal oscillator circuit by adjusting the size of a coarse tuning capacitor array to obtain a calibrated control word; preferably, it can be calibrated to an error of less than 1 ppm;
here, the method further includes: obtaining a correction coefficient k according to the ratio of the value of the calibrated control word to the value of the reference control word, namely the value of the calibrated control word/the value of the reference control word; the k is used as a correction coefficient when a nonlinear compensation table is obtained; the value of the reference control word can be set according to actual needs.
Further, after determining the temperature coefficient of the crystal and obtaining the temperature compensation table corresponding to the crystal according to the determined temperature coefficient, the method further includes:
initializing a digital baseband DBB AFC, calibrating the frequency to 26MHz, and acquiring an AFC control word initial value and a slope; and the AFC control word initial value and slope are used for rapidly searching the frequency when the terminal is started.
Step 102: acquiring a second control word according to the current AFC control word and the nonlinear compensation table;
this step can be implemented by a non-linear compensation circuit in the crystal oscillator circuit;
before this step, the method further comprises: acquiring the nonlinear compensation table according to the relationship between the AFC control word and the compensation capacitor required by the correction frequency-AFC control word curve;
if the value of the AFC control word is y and the pre-distorted control word is z, then:
f x = f q 1 + C S C 0 + C x &ap; f q ( 1 + C S 2 ( C 0 + C x ) ) ;
if the f-y curve is linear, then fyAy + b; wherein a and b are constants which can be set according to actual conditionsDetermining;
let fz=fyThe following can be obtained:after being corrected by the correction coefficient k, the following results are obtained:
C z &prime; &ap; k &CenterDot; f q &CenterDot; C s 2 ( a y + b - f q ) - C 0 ;
according to the formula, the actually required compensation capacitor C 'can be obtained according to the determined AFC control word and the correction coefficient k'z
Let the minimum unit capacitance be CunitAnd the number of capacitors needing to be compensated is z, and the following can be obtained:
z = C z &prime; - C z _ m i n C u n i t ,
wherein, Cz_minComprises the following steps: the minimum value of the compensation capacitor required for compensating the nonlinearity of the frequency-AFC control word curve is a constant;
in summary, the obtaining the nonlinear compensation table according to the relationship between the AFC control word and the compensation capacitor required for correcting the frequency-AFC control word curve includes:
determining the number of the minimum unit capacitors required corresponding to the values of different AFC control words in the crystal oscillator circuit according to the determined correction coefficient k, and further obtaining the nonlinear compensation table; the nonlinear compensation table can be directly applied to frequency fine adjustment in the subsequent terminal using process after being obtained in the automatic testing process before the terminal leaves a factory;
further, the obtaining a second control word according to the current AFC control word and the non-linear compensation table includes:
acquiring a second compensation capacitor corresponding to the AFC control word in a nonlinear compensation table in a lookup table mode according to the current AFC control word, and generating a second control word according to the second compensation capacitor;
the second control word is used for representing the number of minimum unit capacitances required by a corresponding AFC control word; the second compensation capacitance is represented by a minimum number of unit capacitances.
Further, the method further comprises: acquiring a second control word according to the current AFC control word and the relation between the AFC control word and a compensation capacitor required by correcting a frequency-AFC control word curve;
here, the relationship between the AFC control word and the compensation capacitance required to correct the frequency-AFC control word curve is: C z &prime; &ap; k &CenterDot; f q &CenterDot; C s 2 ( a y + b - f q ) - C 0 ;
the obtaining a second control word according to the current AFC control word and the relationship between the AFC control word and the compensation capacitor required for correcting the frequency-AFC control word curve includes:
according to the current AFC control word andobtaining a compensation capacitance C 'required for correcting a frequency-AFC control word curve'zAccording to the compensation capacitor C'zAnd acquiring the number of the corresponding minimum unit capacitors, and generating a second control word according to the acquired number of the minimum unit capacitors.
It should be noted that the operation sequences of step 101 and step 102 are not sequential, and may be processed in parallel.
Step 103: adjusting the capacitor array according to the first control word and the second control word to realize tuning of the frequency of the crystal oscillator circuit;
this step can be implemented by a tuning circuit in the crystal oscillator circuit;
the method specifically comprises the following steps: adding the first control word and the second control word to obtain a third control word, and adjusting the size of the capacitor array according to the third control word to realize tuning of the frequency of the crystal oscillator circuit; here, the third control word is used to characterize the number of minimum unit capacitances required to tune the crystal oscillator circuit.
Example two
FIG. 2 is a flow chart illustrating a tuning method of a two-crystal oscillator circuit according to an embodiment of the present invention; as shown in fig. 2, the tuning method of the crystal oscillator circuit according to the embodiment of the present invention includes:
step 201: acquiring a nonlinear compensation table according to the relationship between the AFC control word and a compensation capacitor required by a correction frequency-AFC control word curve;
determining a correction coefficient k, and determining the number of the required minimum unit capacitors corresponding to different AFC control word values in the crystal oscillator circuit according to the determined correction coefficient k to further obtain the nonlinear compensation table;
wherein the determining the correction coefficient k includes:
roughly calibrating the frequency of the crystal oscillator circuit by adjusting the size of the rough tuning capacitor array, and obtaining a calibrated control word; preferably, it can be calibrated to an error of less than 1 ppm;
here, the method further includes: obtaining a correction coefficient k according to the ratio of the value of the calibrated control word to the value of the reference control word; the value of the reference control word can be set according to actual needs; for certain radio frequency processing circuits/terminals, k is a constant.
Determining a number of required minimum unit capacitances for values of different AFC control words in a crystal oscillator circuit, comprising:
according toDetermining in a crystal oscillator circuitOf the AFC control word, the magnitude C 'of the required compensation capacitance corresponding to the value of the AFC control word'zAnd according toObtaining a corresponding number of required minimum unit capacitances;
wherein y is an AFC control word;is the series resonant frequency; cSIs the dynamic capacitance of the crystal; c0Is a static capacitance; c'zThe size of the compensation capacitance required for the corresponding AFC control word y; a. b is a constant which can be set according to actual conditions; cz_minComprises the following steps: the minimum value of the compensation capacitor required for compensating the nonlinearity of the frequency-AFC control word curve is a constant; cunitIs the minimum unit capacitance.
It should be noted that the operation corresponding to the nonlinear compensation table obtained in this step is only required to be performed when the tuning method of the crystal oscillator circuit of the present invention is performed for the first time or to be completed in an automatic test before the terminal including the crystal oscillator circuit leaves the factory, and the operation can be directly used subsequently.
Step 202: acquiring a temperature compensation table corresponding to the crystal according to the temperature coefficient of the current crystal;
here, the temperature coefficient of the crystal includes: first temperature coefficient a1A second temperature coefficient a2And a third temperature coefficient a3
The frequency-temperature characteristic of the crystal can be expressed as: Δ fc(T)=a3(T-T0)3+a2(T-T0)2+a1(T-T0);
Wherein, T0Is the inflection temperature of the crystal, about 25 °; the crystal may be AT cut;
Δfc(T) represents the amount of change in frequency at a temperature T.
Before this step, the method further comprises: determining the temperature coefficient of the crystal; it should be noted that the operation is only executed in the automatic test before the terminal leaves the factory;
the determining the temperature coefficient of the crystal comprises:
obtaining the frequency difference delta f (T) when the crystal temperature is T1 and T33)-f(T1) Obtaining the temperature coefficient of the crystal according to the corresponding relation between the frequency difference delta f and the temperature coefficient; wherein, (T2-Delta T)<T1<T2,T2<T3<(T2+ΔT),T1About 25 ° for the inflection temperature of the crystal; the corresponding relation between the frequency difference delta f and the temperature coefficient can be obtained by table lookup; for a given crystal, the corresponding temperature coefficient is constant.
In a crystal oscillator circuit, the input resistance of an amplifier needs to be matched with the series resonance impedance of a crystal, but the input impedance of the amplifier is usually high, so that the impedance of the amplifier and the impedance of the crystal may be mismatched during series resonance0The frequency response is worse than the series resonance, so a capacitor is usually connected in parallel across the crystal to lower C0The effect on the parallel resonant frequency; in parallel connection with a capacitor CLThe resonant frequency of the circuit can then be expressed as:
f L = 1 2 &pi; C S + ( C 0 + C L ) L S C S ( C 0 + C L ) = f p C S + ( C 0 + C L ) L S C S ( C 0 + C L ) / C S + C 0 L S C S C 0 ;
wherein, CSIs the dynamic capacitance of the crystal; l isSA dynamic inductance that is a crystal; c0Is a static capacitance; from series resonance frequency f q = 1 2 &pi; L s C s ,
Parallel resonant frequency f p = 1 2 &pi; C s + C 0 L s C s C 0 = f q C s + C 0 C 0 &ap; f q ( 1 + C s 2 C 0 ) ; It is possible to obtain,
f L = f q 1 + C S C 0 + C L &ap; f q ( 1 + C S 2 ( C 0 + C L ) ) ;
according to the above formula, the load capacitance C can be adjustedLTo realize the crystallizationThe change of the oscillation frequency, namely to compensate the frequency change caused by the temperature change of the crystal, the load capacitance needs to be synchronously changed when the temperature changes; suppose load CLIs changed into CxWhen the frequency variation caused by the temperature variation of the crystal is just offset, the frequency variation has f x = f q 1 + C S C 0 + C x &ap; f q ( 1 + C S 2 ( C 0 + C x ) ) ;
From fL-fx=ΔfcCan obtain the product &Delta;f c f q &ap; C S 2 ( C 0 + C L ) - C S 2 ( C 0 + C x ) , Namely, it is C x &ap; 1 1 C 0 + C L - &Delta;f c f q &CenterDot; 2 C S - C 0 ;
Further, the relationship between the compensation capacitance and the temperature can be obtained as follows:
C x &ap; 1 1 C 0 + C L - a 3 ( T - T 0 ) 3 + a 2 ( T - T 0 ) 2 + a 1 ( T - T 0 ) f q &CenterDot; 2 C S - C 0 ;
thus, by the above formula, it is possible to obtain a temperature coefficient a based on a certain value1、a2、a3And the required compensation capacitor C can be obtained at the current temperature Tx
Let the minimum unit capacitance be CunitThe number of capacitors to be compensated is num _ CunitThe following can be obtained:
n u m _ C u n i t = C x - C x _ m i n C u n i t ;
wherein, Cx_minThe minimum value of the compensation capacitance required by the crystal due to temperature change is a constant;
according to the formula, after the temperature coefficient of a determined crystal is obtained, the size of the required compensation capacitor and the number of the required minimum unit capacitors can be obtained corresponding to each temperature value;
in summary, obtaining the temperature compensation table corresponding to the crystal according to the temperature coefficient of the current crystal includes:
according to C x &ap; 1 1 C 0 + C L - a 3 ( T - T 0 ) 3 + a 2 ( T - T 0 ) 2 + a 1 ( T - T 0 ) f q &CenterDot; 2 C S - C 0 , Obtaining the size C of the compensation capacitor needed by the crystal at each temperature valuexAnd according toObtaining the number of corresponding minimum unit capacitors, and further obtaining a temperature compensation table of the crystal; here, the temperature interval between each of the temperature values may be set as needed, for example, the temperature interval may be 0.5 °.
It should be noted that the operation corresponding to the temperature compensation table obtained in this step is only required to be performed when the tuning method of the crystal oscillator circuit of the present invention is performed for the first time or to be completed in an automatic test before the terminal including the crystal oscillator circuit leaves the factory, and the operation can be directly applied subsequently.
Further, after this step, the method further comprises:
initializing a DBB AFC, calibrating the frequency to 26MHz, and acquiring an initial value of an AFC control word and a slope; the AFC control word initial value and slope are used for rapidly searching frequency when the terminal is started; note that this operation is only performed in an automated test before the terminal is shipped from the factory.
Step 203: acquiring a first control word according to the current digital voltage signal and a temperature compensation table;
here, the current digital voltage signal is obtained by converting an analog voltage signal input by the temperature sensing circuit through an analog-to-digital converter and inputting the analog voltage signal to the temperature compensation circuit; the analog voltage signal is generated by the temperature sensing circuit and changes along with the temperature change, namely the analog voltage signal is related to the temperature, namely the digital voltage signal is related to the temperature.
The method specifically comprises the following steps: determining a corresponding temperature value according to a current digital voltage signal, acquiring a first compensation capacitor corresponding to the temperature value in a temperature compensation table in a lookup table mode according to the temperature value, and generating a first control word according to the first compensation capacitor; the first control word is used for representing the size of a compensation capacitor required by the corresponding current digital voltage signal; the first compensation capacitor corresponding to the temperature value is the minimum unit capacitor number corresponding to the temperature value, namely the first compensation capacitor is represented by the minimum unit capacitor number.
Step 204: acquiring a second control word according to the current AFC control word and the nonlinear compensation table;
the method specifically comprises the following steps: acquiring a second compensation capacitor corresponding to the AFC control word in a nonlinear compensation table in a lookup table mode according to the current AFC control word, and generating a second control word according to the second compensation capacitor;
the second control word is used for representing the number of minimum unit capacitances required by a corresponding AFC control word; the second compensation capacitance is represented by a minimum number of unit capacitances.
It should be noted that the operation sequences of step 203 and step 204 are not sequential, and may be processed in parallel.
Step 205: adjusting the capacitor array according to the first control word and the second control word to realize tuning of the frequency of the crystal oscillator circuit;
the method specifically comprises the following steps: adding the first control word and the second control word to obtain a third control word, and adjusting the size of the capacitor array according to the third control word to realize tuning of the frequency of the crystal oscillator circuit; here, the third control word is used to characterize the number of minimum unit capacitances required to tune the crystal oscillator circuit.
EXAMPLE III
FIG. 3 is a schematic diagram of a circuit configuration of a crystal oscillator according to an embodiment of the present invention; as shown in fig. 3, the crystal oscillator circuit according to the embodiment of the present invention includes: a temperature compensation circuit 31, a nonlinear compensation circuit 32, and a tuning circuit 33; wherein,
the temperature compensation circuit 31 is configured to obtain a first control word according to the current digital voltage signal and the temperature compensation table;
the nonlinear compensation circuit 32 is configured to obtain a second control word according to the current AFC control word and the nonlinear compensation table;
the tuning circuit 33 is configured to adjust the capacitor array according to the first control word and the second control word, so as to tune the frequency of the crystal oscillator circuit.
Further, the current digital voltage signal is obtained by converting an input analog voltage signal and is related to temperature;
correspondingly, the crystal oscillator circuit further comprises an analog-to-digital converter 34 for converting the input analog voltage signal into a corresponding digital voltage signal.
Further, the crystal oscillator circuit further includes a processor 35, configured to determine a temperature coefficient of the crystal, and obtain a temperature compensation table corresponding to the crystal according to the determined temperature coefficient;
wherein the temperature coefficient of the crystal comprises: first temperature coefficient a1A second temperature coefficient a2And a third temperature coefficient a3
The frequency-temperature characteristic of the crystal can be expressed as: Δ fc(T)=a3(T-T0)3+a2(T-T0)2+a1(T-T0);
Wherein, T0Is the inflection temperature of the crystal, about 25 °; the crystal may be AT cut;
Δfc(T) represents the amount of change in frequency at a temperature T.
Further, the processor 35 is specifically configured to obtain a frequency difference Δ f ═ f (T3) when the crystal temperatures are T1 and T33)-f(T1) Obtaining the temperature coefficient of the crystal according to the corresponding relation between the frequency difference delta f and the temperature coefficient; wherein, (T2-Delta T)<T1<T2,T2<T3<(T2+ΔT),T1About 25 ° for the inflection temperature of the crystal; the corresponding relation between the frequency difference deltaf and the temperature coefficient can be obtained by looking up a table.
In a crystal oscillator circuit, the input resistance of an amplifier needs to be matched with the series resonance impedance of a crystal, but the input impedance of the amplifier is usually high, so that the impedance of the amplifier and the impedance of the crystal may be mismatched during series resonance0The frequency response is worse than the series resonance, so a capacitor is usually connected in parallel across the crystal to lower C0The effect on the parallel resonant frequency; in parallel connection with a capacitor CLThe resonant frequency of the circuit can then be expressed as:
f L = 1 2 &pi; C S + ( C 0 + C L ) L S C S ( C 0 + C L ) = f p C S + ( C 0 + C L ) L S C S ( C 0 + C L ) / C S + C 0 L S C S C 0 ;
wherein, CSIs the dynamic capacitance of the crystal; l isSA dynamic inductance that is a crystal; c0Is a static capacitance; from series resonance frequency f q = 1 2 &pi; L s C s ,
Parallel resonant frequency f p = 1 2 &pi; C s + C 0 L s C s C 0 = f q C s + C 0 C 0 &ap; f q ( 1 + C s 2 C 0 ) ; It is possible to obtain,
f L = f q 1 + C S C 0 + C L &ap; f q ( 1 + C S 2 ( C 0 + C L ) ) ;
according to the above formula, the load capacitance C can be adjustedLTo realize the change of the oscillation frequency of the crystal oscillator, namely to compensate the frequency change caused by the temperature change of the crystal, the load capacitance needs to be synchronously changed when the temperature changes; suppose load CLIs changed into CxWhen the frequency variation caused by the temperature variation of the crystal is just offset, the frequency variation has f x = f q 1 + C S C 0 + C x &ap; f q ( 1 + C S 2 ( C 0 + C x ) ) ;
From fL-fx=ΔfcCan obtain the product &Delta;f c f q &ap; C S 2 ( C 0 + C L ) - C S 2 ( C 0 + C x ) , Namely, it is C x &ap; 1 1 C 0 + C L - &Delta;f c f q &CenterDot; 2 C S - C 0 ;
Further, the relationship between the compensation capacitance and the temperature can be obtained as follows:
C x &ap; 1 1 C 0 + C L - a 3 ( T - T 0 ) 3 + a 2 ( T - T 0 ) 2 + a 1 ( T - T 0 ) f q &CenterDot; 2 C S - C 0 ;
thus, by the above formula, it is possible to obtain a temperature coefficient a based on a certain value1、a2、a3And the required compensation capacitor C can be obtained at the current temperature Tx
Let the minimum unit capacitance be CunitThe number of capacitors to be compensated is num _ CunitThe following can be obtained:
n u m _ C u n i t = C x - C x _ m i n C u n i t ;
wherein, Cx_minThe minimum value of the compensation capacitance required by the crystal due to temperature change is a constant;
according to the formula, after the temperature coefficient of a determined crystal is obtained, the size of the required compensation capacitor and the number of the required minimum unit capacitors can be obtained corresponding to each temperature value;
in summary, the obtaining, by the processor 35, a temperature compensation table corresponding to the crystal according to the determined temperature coefficient includes:
the processor 35 obtains the number of the minimum unit capacitance required by the crystal at each temperature value according to the relationship between the determined temperature and the compensation capacitance required by the crystal, and further obtains a temperature compensation table of the crystal; here, the temperature interval between each of the temperature values may be set as required, for example, the temperature interval may be 0.5 °; after the temperature compensation table is obtained in the automatic testing process before the terminal leaves a factory, the temperature compensation table can be directly applied in frequency fine adjustment in the subsequent terminal using process, namely, the terminal can directly obtain the corresponding required minimum unit capacitance number through the temperature compensation table according to the current temperature.
Further, the crystal oscillator circuit further includes a frequency coarse tuning circuit 36 for coarse tuning the frequency of the crystal oscillator circuit to calibrate the initial frequency of the crystal oscillator circuit; specifically, the method is used for calculating a reference clock error according to a carrier signal transmitted by a current transmitter TX, and calibrating the frequency of the crystal oscillator circuit by adjusting the size of an ATE Calibration SC array (coarse tuning capacitor array) to obtain a calibrated control word; preferably, the error is calibrated to less than 1 ppm.
Further, the frequency coarse tuning circuit 36 is further configured to obtain a correction coefficient k according to a ratio of the value of the calibrated control word to the value of the reference control word, that is, the value of the calibrated control word/the value of the reference control word; the k is used as a correction coefficient when a nonlinear compensation table is obtained; the value of the reference control word can be set according to actual needs.
Further, the temperature compensation circuit 31 is specifically configured to determine a corresponding temperature value according to the current digital voltage signal, obtain a first compensation capacitor corresponding to the temperature value in a temperature compensation table by using a lookup table according to the temperature value, and generate a first control word according to the first compensation capacitor; the first control word is used for representing the size of a compensation capacitor required by the corresponding current digital voltage signal; the first compensation capacitor corresponding to the temperature value is the minimum unit capacitor number corresponding to the temperature value, namely the first compensation capacitor is represented by the minimum unit capacitor number.
Further, the nonlinear compensation circuit 32 is specifically configured to obtain a second compensation capacitor corresponding to the AFC control word in a nonlinear compensation table by using a lookup table according to the current AFC control word, and generate a second control word according to the second compensation capacitor;
the second control word is used for representing the number of minimum unit capacitances required by a corresponding AFC control word; the second compensation capacitance is represented by a minimum number of unit capacitances.
Further, the processor 35 is further configured to obtain the non-linear compensation table according to a relationship between an AFC control word and a compensation capacitor required for correcting a frequency-AFC control word curve;
if the value of the AFC control word is y and the pre-distorted control word is z, then:
f x = f q 1 + C S C 0 + C x &ap; f q ( 1 + C S 2 ( C 0 + C x ) ) ;
if the f-y curve is linear, then fyAy + b; wherein a and b are constants which can be set according to actual conditions;
let fz=fyThe following can be obtained:after being corrected by the correction coefficient k, the following results are obtained:
C z &prime; &ap; k &CenterDot; f q &CenterDot; C s 2 ( a y + b - f q ) - C 0 ;
according to the formula, the actually required compensation capacitor C 'can be obtained according to the determined AFC control word and the correction coefficient k'z
Let the minimum unit capacitance be CunitAnd the number of capacitors needing to be compensated is z, and the following can be obtained:
z = C z &prime; - C z _ m i n C u n i t ,
wherein, Cz_minComprises the following steps: the minimum value of the compensation capacitor required for compensating the nonlinearity of the frequency-AFC control word curve is a constant;
in summary, the obtaining, by the processor 35, the nonlinear compensation table according to the relationship between the AFC control word and the compensation capacitor required for correcting the frequency-AFC control word curve includes:
the processor 35 determines the number of the minimum unit capacitors required corresponding to the values of different AFC control words in the crystal oscillator circuit according to the determined correction coefficient k, and further obtains the nonlinear compensation table; the nonlinear compensation table can be directly applied to frequency fine adjustment in the subsequent terminal using process after being obtained in the automatic testing process before the terminal leaves the factory.
Further, the nonlinear compensation circuit 32 is further configured to obtain a second control word according to the current AFC control word and a relationship between the AFC control word and a compensation capacitor required for correcting the frequency-AFC control word curve;
here, the relationship between the AFC control word and the compensation capacitance required to correct the frequency-AFC control word curve is: C z &prime; &ap; k &CenterDot; f q &CenterDot; C s 2 ( a y + b - f q ) - C 0 ;
the nonlinear compensation circuit 32 obtains a second control word according to the current AFC control word and a relationship between the AFC control word and a compensation capacitor required for correcting a frequency-AFC control word curve, and includes:
the non-linear compensation circuit 32 is based on the current AFC control word andobtaining a compensation capacitance C 'required for correcting a frequency-AFC control word curve'zAccording to the compensation capacitor C'zAnd acquiring the number of the corresponding minimum unit capacitors, and generating a second control word according to the acquired number of the minimum unit capacitors.
Further, the tuning circuit 33 is specifically configured to add the first control word and the second control word to obtain a third control word, and adjust the size of the capacitor array according to the third control word to tune the frequency of the crystal oscillator circuit;
here, the third control word is used to characterize the number of minimum unit capacitances required to tune the crystal oscillator circuit.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention.

Claims (12)

1. A method of tuning a crystal oscillator circuit, the method comprising:
acquiring a first control word according to the current digital voltage signal and a temperature compensation table;
acquiring a second control word according to the current Automatic Frequency Control (AFC) control word and a nonlinear compensation table;
and adjusting the capacitor array according to the first control word and the second control word to realize the tuning of the frequency of the crystal oscillator circuit.
2. The method of claim 1, wherein the current digital voltage signal is converted from an input analog voltage signal and is temperature dependent.
3. The method according to claim 1 or 2, wherein before the obtaining the first control word according to the current digital voltage signal and the temperature compensation table, the method further comprises:
and determining the temperature coefficient of the crystal, and acquiring a temperature compensation table corresponding to the crystal according to the determined temperature coefficient.
4. The method according to claim 1 or 2, wherein the obtaining the first control word according to the current digital voltage signal and the temperature compensation table comprises:
determining a corresponding temperature value according to the current digital voltage signal, acquiring a first compensation capacitor corresponding to the temperature value in a temperature compensation table in a lookup table mode according to the temperature value, and generating a first control word according to the first compensation capacitor.
5. The method of claim 1 or 2, wherein obtaining the second control word according to the current AFC control word and the non-linear compensation table comprises:
and acquiring a second compensation capacitor corresponding to the AFC control word in a nonlinear compensation table in a lookup table mode according to the current AFC control word, and generating a second control word according to the second compensation capacitor.
6. The method of claim 1 or 2, wherein the adjusting the capacitor array according to the first control word and the second control word to achieve the tuning of the frequency of the crystal oscillator circuit comprises:
and adding the first control word and the second control word to obtain a third control word, and adjusting the size of the capacitor array according to the third control word to realize the tuning of the frequency of the crystal oscillator circuit.
7. A crystal oscillator circuit, comprising: the temperature compensation circuit, the nonlinear compensation circuit and the tuning circuit; wherein,
the temperature compensation circuit is used for acquiring a first control word according to the current digital voltage signal and the temperature compensation table;
the nonlinear compensation circuit is used for acquiring a second control word according to the current AFC control word and the nonlinear compensation table;
and the tuning circuit is used for adjusting the capacitor array according to the first control word and the second control word so as to tune the frequency of the crystal oscillator circuit.
8. The crystal oscillator circuit of claim 7, wherein the current digital voltage signal is converted from an input analog voltage signal and is temperature dependent;
correspondingly, the crystal oscillator circuit further comprises an analog-to-digital converter for converting the input analog voltage signal into a corresponding digital voltage signal.
9. The crystal oscillator circuit of claim 7 or 8, further comprising a processor configured to determine a temperature coefficient of the crystal and obtain a temperature compensation table corresponding to the crystal based on the determined temperature coefficient.
10. The crystal oscillator circuit according to claim 7 or 8, wherein the temperature compensation circuit is specifically configured to determine a corresponding temperature value according to the current digital voltage signal, obtain a first compensation capacitor corresponding to the temperature value in a temperature compensation table by using a lookup table according to the temperature value, and generate the first control word according to the first compensation capacitor.
11. The crystal oscillator circuit of claim 10, wherein the non-linear compensation circuit is configured to obtain a second compensation capacitor corresponding to the AFC control word in a non-linear compensation table by using a look-up table according to a current AFC control word, and generate the second control word according to the second compensation capacitor.
12. The crystal oscillator circuit of claim 8, wherein the tuning circuit is configured to add the first control word and the second control word to obtain a third control word, and adjust a size of the capacitor array according to the third control word to tune a frequency of the crystal oscillator circuit.
CN201510369109.7A 2015-06-29 2015-06-29 A kind of crystal-oscillator circuit and its tuning methods Active CN106330134B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510369109.7A CN106330134B (en) 2015-06-29 2015-06-29 A kind of crystal-oscillator circuit and its tuning methods
PCT/CN2016/074685 WO2017000571A1 (en) 2015-06-29 2016-02-26 Crystal oscillator circuit and method for controlling output signal amplitude thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510369109.7A CN106330134B (en) 2015-06-29 2015-06-29 A kind of crystal-oscillator circuit and its tuning methods

Publications (2)

Publication Number Publication Date
CN106330134A true CN106330134A (en) 2017-01-11
CN106330134B CN106330134B (en) 2019-10-22

Family

ID=57607752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510369109.7A Active CN106330134B (en) 2015-06-29 2015-06-29 A kind of crystal-oscillator circuit and its tuning methods

Country Status (2)

Country Link
CN (1) CN106330134B (en)
WO (1) WO2017000571A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109617528A (en) * 2018-12-05 2019-04-12 深圳忆联信息系统有限公司 It is a kind of for correcting the method and its system of active oscillator frequency
CN110401611A (en) * 2019-06-29 2019-11-01 西南电子技术研究所(中国电子科技集团公司第十研究所) The quickly method of detection CPFSK signal

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108092625B (en) * 2016-11-22 2020-06-09 深圳市中兴微电子技术有限公司 Signal amplitude calibration method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1238074A (en) * 1996-12-17 1999-12-08 摩托罗拉公司 Temperature compensation circuit for crystal oscillator
US20100127787A1 (en) * 2008-11-26 2010-05-27 Epson Toyocom Corporation Voltage control type temperature compensation piezoelectric oscillator
CN103001583A (en) * 2012-12-17 2013-03-27 华为技术有限公司 Temperature compensation method and crystal oscillator

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2376142Y (en) * 1999-01-04 2000-04-26 向明 Capacitance-resistance network voltage controlled sine-wave oscillator
US7292114B2 (en) * 2005-08-01 2007-11-06 Marvell World Trade Ltd. Low-noise high-stability crystal oscillator
US8076913B2 (en) * 2008-12-22 2011-12-13 Mediatek Inc. Voltage converters and voltage generating methods for generating output voltage signals according to a pulse width modulation signal
CN103944514B (en) * 2014-04-28 2017-06-16 无锡中感微电子股份有限公司 Amplitude detection controls circuit and digitally controlled crystal oscillator system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1238074A (en) * 1996-12-17 1999-12-08 摩托罗拉公司 Temperature compensation circuit for crystal oscillator
US20100127787A1 (en) * 2008-11-26 2010-05-27 Epson Toyocom Corporation Voltage control type temperature compensation piezoelectric oscillator
CN103001583A (en) * 2012-12-17 2013-03-27 华为技术有限公司 Temperature compensation method and crystal oscillator

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109617528A (en) * 2018-12-05 2019-04-12 深圳忆联信息系统有限公司 It is a kind of for correcting the method and its system of active oscillator frequency
CN110401611A (en) * 2019-06-29 2019-11-01 西南电子技术研究所(中国电子科技集团公司第十研究所) The quickly method of detection CPFSK signal
CN110401611B (en) * 2019-06-29 2021-12-07 西南电子技术研究所(中国电子科技集团公司第十研究所) Method for rapidly detecting CPFSK signal

Also Published As

Publication number Publication date
CN106330134B (en) 2019-10-22
WO2017000571A1 (en) 2017-01-05

Similar Documents

Publication Publication Date Title
EP2552025B1 (en) System and method for reducing temperature-dependent and process-dependent frequency variation of a crystal oscillator circuit
WO2016206384A1 (en) Crystal oscillator circuit, crystal oscillator circuit tuning method, and storage medium
US7800457B2 (en) Self-calibrating temperature-compensated oscillator
US10763781B2 (en) System and method of crystal oscillator temperature compensation for operation in extended temperature range
US8248113B2 (en) Method and apparatus for accurate clock synthesis
US8896388B2 (en) Temperature-compensated crystal oscillator
JP2004531958A (en) Reference oscillator with automatic aging and temperature compensation
GB2482528A (en) Crystal reference oscillator for navigation applications
CN110034728B (en) System, apparatus and method for accurate measurement of off-chip temperature
EP2284988A1 (en) Oscillator
US20190052373A1 (en) Transceiver system supporting receiver self calibration and methods of performing the same
CN107257239B (en) Temperature compensation high-frequency crystal oscillator based on analog compensation
CN106330134B (en) A kind of crystal-oscillator circuit and its tuning methods
US20130314169A1 (en) Oscillating device, oscillating element and electronic apparatus
CN102185663B (en) Frequency calibration method and device
US20070075797A1 (en) Method of manufacturing crystal oscillator and the crystal oscillator manufactured by the method
US10333525B1 (en) Digitally-based temperature compensation for a crystal oscillator
US6549055B2 (en) Method and apparatus for generating an input signal for a parameter sensitive circuit
US7576621B2 (en) Film bulk acoustic resonator calibration
US20040108911A1 (en) Temperature compensated crystal oscillator
JP2004336374A (en) Temperature compensation piezoelectric oscillator
US20240248161A1 (en) Peak detector calibration
Shioda et al. High precision TCXO for rapid environmental temperature change
US9843331B2 (en) System and method for operating a mechanical resonator in an electronic oscillator
JP2011160038A (en) Method for manufacturing temperature compensation type oscillation circuit, and the temperature compensation type oscillation circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant