Abstract:
Device and method for temperature compensation in a clock oscillator using quartz crystals, which integrates dual crystal oscillators. The minimal power consumption is achieved through an efficient use of a processor in charge of the synchronisation of the two oscillators. The invention is particularly adapted for the provision of a precise reference clock in portable radiolocalization devices

Description:
REFERENCE DATA 
       [0001]    The present application claims priority from European patent application EP06120455 filed on Sep. 11, 2006. 
       FIELD OF THE INVENTION 
       [0002]    The current invention relates to a low-power management system addressing the problem of providing high stability frequency references despite temperature variations. This invention is meant to be integrated in GPS (Global Positioning System) devices which requires both clock precision for better performance and a long lifetime for commodity and ease of use in combination with other applications (e.g. so-called Assisted-GPS applications). 
         [0003]    More specifically, the described invention relates to a method for temperature compensation in a clock oscillator using quartz crystals, which integrates dual crystal oscillators. The minimal power consumption is achieved through an efficient use of a processor in charge of the synchronisation of the two oscillators. 
       DESCRIPTION OF RELATED ART 
       [0004]    For devices requiring a highly accurate clock precision like GPS devices or satellite radiolocalization devices in general, effective temperature compensation must be achieved. To this end, TCXO (Temperature compensated Crystal Oscillator) are often employed. The cost and power consumption of available TCXO devices, however, are high. Thus, there is a need for an alternative way of providing a highly accurate clock which is less expensive and has lower power demands. 
         [0005]    Devices providing an accurate time base are known, which use two thermally linked quartz crystals having different temperature coefficients. In such devices one crystal, cut in a manner that minimizes the temperature coefficient, is usually used as the “reference” oscillator while the other crystal is regarded as a “temperature oscillator”, in that it has a temperature coefficient which is quite linear with the temperature. In this way, the difference of the frequency generated by the two crystals univocally determines the common crystals&#39; temperature, and can be used to correct the reference frequency, according to a known correction function. 
         [0006]    An example of such quartz oscillators is known as CDXO (Calibrated Dual Crystal Oscillator). The appeal of such device reside in the fact that they comprise a memory which is factory programmed with an individual calibration function, coded for example as coefficients of a high order polynomial function, expressing the deviation of the “reference” oscillator as a function of the frequency difference between the two oscillators. 
         [0007]    Usually the compensation for frequency deviation according to temperature is carried out by a Digital Signal Processor (DSP) that measures the frequency deviation of the “reference” oscillator based on the calibration function and on the inputs of the second oscillator. It communicates this frequency deviation to a numerically controlled oscillator (NCO) that numerically generates the reference frequency, for example 1 KHz for a 1 mS precise clock. 
         [0008]    The correction function is, by nature, highly non-linear. These systems, therefore, may be difficult to integrate in portable GPS receiver, that require a very precise correction, in real-time, over a large temperature span, and in which the computing power is limited. 
         [0009]    It is an object of the present invention to provide minimal processing power consumption while performing the compensation for the reference oscillator frequency drift depending on the temperature. 
         [0010]    It is a further object of the invention to provide an optimised computer program carrying out the steps of the frequency compensation method. 
       BRIEF SUMMARY OF THE INVENTION 
       [0011]    The above objects are attained by employing an architecture using no temperature, but solely a frequency related calibration function that is stored in a memory means and assessed with a stepwise linear estimation in order to correct the reference oscillator frequency according to the temperature variation. This requires fewer cycles of the Digital Signal Processor (DSP) in charge of determining the temperature dependent frequency drift; and hence allows for a lower processing power to carry out the correction. This is a very useful feature for GPS devices that precisely need low power management characteristics. 
     
    
     
       BRIEF SUMMARY OF THE DRAWINGS 
         [0012]    The invention will be better understood with the drawing illustrated in 
           [0013]      FIG. 1 , which diagrammatically shows a radiolocalization device including a frequency reference according to the present invention, and in 
           [0014]      FIG. 2 , which shows, in flowchart format, an example of frequency correction method according to the invention. 
           [0015]      FIG. 3  represents, in a flowchart format, an alternative embodiment of the invention involving a additional processor in order to carry out the calculate the interpolation tables. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0016]    With reference to  FIG. 1 , the invention employs a two crystal oscillators:
       A first reference oscillator  14  which provides the main reference frequency. The reference oscillator is, for example a quartz crystal cut in order to resonate at the desired frequency. Typically this resonator will be a standard AT-cut crystal oscillator exhibiting a known 5 th  order frequency versus temperature characteristics, and a temperature coefficient of around 15 ppm/degree, strongly variable in the operating range.   A second temperature sensitive oscillator  16 , thermally coupled to the reference oscillator. This crystal may for example be a Y-cut quartz crystal with a temperature coefficient of 90 ppm/degree, approximately constant in the operating range of temperatures.       
 
         [0019]    The resonators  14  and  16  are contained and thermally linked in the same device  10 . It can then be assumed that both crystal have a common temperature. The device  10  contains also a memory area  12 , for example a EEPROM or a ROM, programmed with a correction function, for example the coefficients of a 5 th  order polynomial expressing the frequency deviation of the reference oscillator  14 , as a function of the frequency difference between the reference oscillator  14  and the temperature sensitive oscillator  16 . The calibration coefficients are stored in the device by the manufacturer. The content of the memory  12  is readable through an appropriate bus  13 , for example a serial bus. 
         [0020]    Optionally, if the memory area  12  should be user-writable (for example a flash memory), the calibration coefficients may be updated by the host system  40 , for example to accommodate aging of the quartz crystals. This may be useful in radiolocalization devices in which the temperature calibration of the resonators  14  and  16  can be precisely verified, by comparison with the GPS time reference. 
         [0021]    The two outputs of the two oscillators  14  and  16  are compared in the frequency comparator  80 , in order to obtain a beat frequency which is temperature dependent, and whose characteristics with respect to temperature are stored in the memory means  12 . 
         [0022]    The radiolocalization receiver also comprises a GPS core, for performing known radiolocalization function together with a digital processor  40 . According to the described example, the same digital processor  40  is also used to obtain a precise frequency reference from the dual crystal device  10 . It will be understood, however, that the present invention also includes the case in which the frequency reference is provided by a separate processor, or by a dedicated circuit. 
         [0023]    The signal generated by the reference oscillator  14  is used as time base for the numerically controlled oscillator  60  which delivers at its output a clock signal  65 . An increment value  62 , provided by the DSP unit  40  has to be set in order to have the desired frequency of the clock signal, typically 1 kHz in the case of a GPS unit. 
         [0024]    The clock signal  65  is also applied to the frequency comparison circuit  80 , which generates a control signal  85  indicative of the relationship between the frequencies of the two oscillators  14  and  16 . It will be understood that the frequency comparison circuit  80  could operate in several ways, within the framework of the invention. For example the comparison circuit  80  may include a mixer and possibly a low-pass filter, in order to extract a beat frequency equal to the difference of the frequencies  14  and  16 , and a counter, to count the beats of the two oscillators in one millisecond: In alternative, the comparison circuit  80  may simply count the output of the temperature oscillator  16  in a time interval determined by the clock signal  65 , from which the beat frequency fan be derived by software in the DSP  40 . We will assume, to fix the ideas, that the control signal  85  expresses the beat frequency between the reference oscillator  14  and the temperature oscillator  16 , it being understood that the invention also comprises other variants in which the control signal carries, say, the ratio between the same frequencies. 
         [0025]    Based on the control signal  85  the DSP  40 , which as read beforehand the calibration coefficients from the memory  12  compute, periodically and in real-time, the increment value  62  for the NCO  60 , in order to obtain a clock signal  65  having precisely the desired frequency, for all possible temperatures of the device  10 . 
         [0026]    Such a dual crystal system can provide a very fine resolution while employing an only frequency-related calibration function. Yet in order to achieve this with very frequent sampling times, the digital processor  40  can be quickly overloaded. It is therefore preferable to compute the instantaneous correction coefficients as an interpolation of the calibration polynomial. To this effect, for example, the DSP divides the expected range of the control signal  85  in a finite number of steps and fills in advance an interpolation table with the appropriate values to quickly calculate the interpolation function for each value of the control signal  85 . The interpolation technique may be varied, according to the need. Preferably a piecewise linear interpolation is used. 
         [0027]    In a preferred embodiment, a software program will carry out the described frequency control method with a scaling function, so that integers and no floating numbers will be manipulated, depending on the size of the registers used, in order to comply with the low power management policy of the invention in order to fit in with the requirements of GPS devices which are precisely characterised by low power characteristics. 
         [0028]      FIG. 2  represents, in a flowchart, the steps carried out by the DSP unit  40  for the frequency control method of the invention. In step  101 , the DSP obtains the calibration coefficients from the memory area  12  of the device  10 . Step  102  corresponds to the pre-calculation of the tables needed for the computation of the interpolated increment value  62 . 
         [0029]    In an alternative embodiment of the invention whose flowchart is represented in  FIG. 3 , an additional processor could be used to calculate the interpolation tables. In this case, the additional processor would be connected to the DSP by means of a serial connection link or any other communication method. This would require the introduction of new steps  101   a  and  102   a , where step  101   a  would pass the coefficient data from the DSP to the additional processor and step  102   a  would pass the data for the pre-calculated tables as obtained in step  102  from the additional processor to the DSP. In this case, step  102  would then be performed by the additional processor and not the DSP. 
         [0030]    In step  103  the DSP reads the beat frequency or the control signal  85  from the comparison unit  80 , and in step  104 , the DSP  40  updates the increment value  62  for the NCO  60  based on the control signal  85  and on the values pre-calculated in step  102 . Steps  103  and  104  repeat as long as needed, for example according to a periodic interrupt of the DSP  40 . 
         [0031]    We will now work out, in further mathematical detail, an example of the present invention. 
         [0032]    To obtain an accurate indication of the deviation of the F ref  frequency generated from the reference oscillator  14  from its nominal value, a 5th order polynomial is applied: 
         [0000]      Δ F   ref   =C   0   +C   1   ·ΔF   beat   +C   2   ·ΔF   beat   2   +C   3   ·ΔF   beat   3   +C   4   ·ΔF   beat   4   +C   5   ·ΔF   beat   5   (1) 
         [0033]    C n  are the coefficients of the polynomial calibration function obtained from the EEPROM  12 , opportunely adjusted and scaled, if needed. ΔF beat  is the deviation of the beat frequency  85  from the expected beat frequency F Beat     —     nom  at the nominal frequency F ref  and at the standard operating temperature, say 25° C., normalized over 1 second. 
         [0000]      Δ F   beat =( F   beat −F Beat     —     nom )·1000/Gatems  (2) 
         [0034]    Gatems is the period in ms over which the measurements are made. 
         [0000]        F   Beat     —     nom   =F   TempCount     —     nom   −F   RefCount     —     nom   (3) 
         [0035]    F TempCount     —     Nom  is the predicted count of the X Temp  signal generated by the temperature-dependent oscillator  16  at the nominal frequency and 25° C. F RefCount     —     Nom  is the predicted count of X Ref  signal generated by the reference oscillator  14  at the nominal frequency and 25° C. 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           F 
                           TempCount_nom 
                         
                         = 
                         
                           GateCount 
                           · 
                           
                             
                               ( 
                               
                                 
                                   FX 
                                   Temp 
                                 
                                 + 
                                 
                                   F 
                                   offset 
                                 
                               
                               ) 
                             
                             / 
                             
                               FX 
                               Ref 
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                         
                           
                             ( 
                             
                               
                                 FX 
                                 Temp 
                               
                               + 
                               
                                 F 
                                 offset 
                               
                             
                             ) 
                           
                           · 
                           
                             Gatems 
                             / 
                             1000 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0036]    FX Temp  is the nominal frequency of the X Temp  oscillator (in Hz) at 25° C. F offset  is an offset frequency adjustment to X Temp  obtained from the data in EEPROM  12 . GateCount is the number of counts of X Ref  in the measurement period. 
         [0000]      GateCount=Gatems· FX   Ref /1000  (5) 
         [0037]    FX Ref  is the nominal frequency of the X Ref  oscillator (in Hz) at 25° C., but note that the term FX Ref /1000 is actually the factor applied to obtain the 1 mS clock signal. 
         [0000]      F RefCount     —     nom =GateCount  (6) 
         [0038]    Hence restating equation 3 
         [0000]        F   Beat     —     nom =GateCount·( FX   Temp   +F   offset )/ FX   Ref −GateCount  (7) 
         [0039]    There are two options for F Beat  depending whether the system is configured to measure a Beat frequency-count, or to measure the count from X Temp . 
         [0040]    If the Beat frequency is being counted, then 
         [0000]      F beat =MeasuredCount  (8) 
         [0041]    Otherwise, if the count from X temp  is measured, then 
         [0000]        F   beat =MeasuredCount−GateCount  (9) 
         [0042]    In the presented example, The NCO uses a 39-bit counter and a 28-bit increment register. It is clear, however, that other arrangements are possible. 
         [0000]        F   req =(Incr· F   ref )/2 39   (10) 
         [0043]    F req  is the desired frequency 
         [0044]    F ref  is the input frequency 
         [0045]    Incr is the Increment value. 
         [0046]    By rearranging we obtain 
         [0000]      Incr=(Freq·2 39 )/ F   ref   (11) 
         [0047]    Initially, and by default the NCO will be programmed with an nominal Incr nom  value obtained from the nominal frequency of X Ref  (X Ref     —     nom ) to produce a one KHz signal by applying Equation 11. 
         [0048]    When the control loop is active, periodically the system provides a frequency error for X Ref . The NCO  60  must be adjusted to correct for any drift in the frequency of X Ref . This will be done by applying Equation 11 where F ref  is the nominal frequency of X Ref , plus the change in frequency ΔF ref  obtained from Equation 1. Thus: 
         [0000]        F   ref   =X   Ref     —     nom   +ΔF   ref   (12) 
         [0049]    To reduce the scale of the calculation required to obtain the updated Incr value, it is possible to scale the Incr value based on the ΔF Ref  value. Hence 
         [0000]      Incr=Incr nom +(ΔF Ref ·Slope 256   /X   Ref     —     nom ·256))  (13) 
         [0050]    Incr nom  is the Incr value calculated using the nominal frequency of X Ref . 
         [0051]    Slope 256  is a pre-calculated Slope factor across the range of variation in X Ref , scaled by  256 . 
         [0052]    Slope 256  is calculated by the following equation: 
         [0000]      Slope 256 =256·(Incr Xrefmax −Incr Xrefmin )/( X   ref     —     max   −X   ref     —     min )  (14) 
         [0053]    Where 
         [0054]    Incr Xrefmax  is the Incr value calculated using X ref     —     max    
         [0055]    Incr Xrefmin  is the Incr value calculated using X ref     —     min    
         [0056]    X ref     —     max  is the maximum allowed frequency of X ref    
         [0057]    X ref     —     min  is the minimum allowed frequency of X ref