Automatic test system for temperature compensation of crystal oscillator

By combining the temperature-compensation chip and microcontroller in the crystal oscillator taming system, and using Kalman filtering and PID control algorithms, the precise taming of the crystal oscillator frequencies is achieved, solving the problem that the temperature-compensation chip alone cannot meet the requirements of high frequency accuracy in the existing technology, and significantly improving the frequency stability and system adaptability.

CN119995521AInactive Publication Date: 2025-05-13BEIJING INST OF RADIO METROLOGY & MEASUREMENT

Patent Information

Application Number
CN202411968214.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the temperature compensation chip is simply reliant on the temperature compensation chip for cannot meet the high requirements of frequency accuracy.

Method used

A crystal oscillator taming system based on a temperature-compensation chip is adopted, which includes a crystal oscillator, a temperature-compensation chip, a frequency division circuit, a phase measurement module, a microcontroller and a digital-to-analog converter. The crystal oscillator is compensated through the temperature compensation chip, and the phase difference is processed using the microcontroller and Kalman filtering algorithm, and the crystal oscillator frequency is accurately adjusted with the PID control algorithm.

Benefits of technology

It significantly improves the stability and accuracy of the crystal oscillator frequency, can effectively overcome the frequency drift problems caused by factors such as temperature changes and crystal oscillator aging, reduces hardware costs, and is suitable for miniaturized and low-power electronic devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119995521A_ABST
    Figure CN119995521A_ABST
Patent Text Reader

Abstract

The invention provides a crystal oscillator taming system based on a temperature compensation chip, which comprises a crystal oscillator, the temperature compensation chip, a frequency dividing circuit, a phase measurement module, a microcontroller and a digital-to-analog converter, and is characterized in that the temperature compensation chip is used for performing temperature compensation on the crystal oscillator; the frequency dividing circuit is used for performing frequency dividing processing on an output signal of the crystal oscillator; the phase measurement module is used for measuring the phase difference between the frequency division signal and the reference signal; the microcontroller is used for storing and periodically updating frequency compensation values of the crystal oscillator at different temperatures; the processing module is also used for processing the phase difference based on a Kalman filtering algorithm when the reference signal is valid, and processing the filtered phase difference based on a PID control algorithm when the filtered phase difference is greater than or equal to a preset threshold value; the digital-to-analog converter is used for converting the adjusted phase difference into an analog signal. The invention provides a crystal oscillator taming system based on a temperature compensation chip. The system is used for solving the problem that in the prior art, temperature compensation only depends on the temperature compensation chip, and the occasion with the high frequency precision requirement cannot be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of crystal oscillator taming, and in particular to a crystal oscillator taming system based on a temperature compensation chip. Background Art

[0002] As a critical basic component in electronic systems, the crystal oscillator generates a stable frequency signal that provides a clock reference for the operation of the entire system. For example, in communication equipment, accurate frequency signals can ensure the correct synchronization of data transmission; in high-precision timing devices, such as the auxiliary circuit of atomic clocks, the stability of the crystal oscillator frequency directly determines the timing accuracy. However, the frequency of the crystal oscillator is easily affected by external environmental factors, especially as the ambient temperature changes, the resonant frequency of the crystal oscillator will drift, which in turn affects the performance of the entire electronic system.

[0003] Traditional crystal oscillators use constant temperature control to create a constant temperature environment for the crystal oscillator to reduce the impact of temperature on its frequency, but this method is costly, and constant temperature equipment has disadvantages such as large size and high power consumption, which is not conducive to application in some miniaturized, low-power electronic devices. In addition, there are also some methods based on software compensation algorithms, which pre-measure the deviation data of the crystal oscillator frequency at different temperatures, and then use the algorithm to compensate in actual operation, but the compensation accuracy of this type of method is often limited, and it is difficult to cope with the combined effects of complex and changeable actual ambient temperature conditions and long-term aging of the crystal oscillator itself.

[0004] Temperature Compensated Crystal Oscillator (TCXO) is a chip that can compensate for the frequency drift caused by temperature. It uses its built-in temperature sensor and corresponding compensation circuit to adjust the output signal according to the detected temperature change to maintain a relatively stable frequency. However, currently, relying solely on the compensation function of the temperature compensation chip itself, in some occasions with extremely high frequency accuracy requirements, it still cannot fully meet the system's stringent requirements for crystal frequency stability. Summary of the invention

[0005] The present invention provides a crystal oscillator taming system based on a temperature compensation chip, which is used to solve the problem in the prior art that temperature compensation by simply relying on the temperature compensation chip cannot meet the requirements of high frequency accuracy.

[0006] The present invention provides a crystal oscillator taming system based on a temperature compensation chip, comprising a crystal oscillator, a temperature compensation chip, a frequency division circuit, a phase measurement module, a microcontroller and a digital-to-analog converter, wherein:

[0007] The temperature compensation chip is used to perform temperature compensation on the crystal oscillator;

[0008] The frequency division circuit is used to perform frequency division processing on the output signal of the crystal oscillator to obtain a frequency division signal;

[0009] The phase measurement module is used to measure the phase difference between the frequency-divided signal and the reference signal;

[0010] The microcontroller is used to store and periodically update the frequency compensation value of the crystal oscillator at different temperatures; it is also used to process the phase difference based on the Kalman filter algorithm when the reference signal is valid, and to process the filtered phase difference based on the PID control algorithm when the filtered phase difference is greater than or equal to a preset threshold, and the PID control algorithm is adjusted accordingly according to the periodically updated frequency compensation value of the crystal oscillator at different temperatures;

[0011] The digital-to-analog converter is used to convert the controlled phase difference into an analog signal, and the analog signal is used to control the output frequency of the crystal oscillator.

[0012] Optionally, the temperature compensation chip includes a temperature sensor and a temperature compensation circuit, wherein:

[0013] The temperature sensor is used to measure the ambient temperature;

[0014] The temperature compensation circuit extracts a frequency compensation value corresponding to the ambient temperature from the microcontroller, and performs temperature compensation on the crystal oscillator according to the extracted frequency compensation value.

[0015] Optionally, the reference signal includes a standard clock signal preset by the system and a clock signal provided by a high-precision clock source.

[0016] Optionally, the reference signal is 1PPS.

[0017] Optionally, the periodic update is achieved by setting a timer inside the MCU.

[0018] Optionally, the period of the timer is one week.

[0019] Optionally, the frequency compensation values ​​of the crystal oscillator at different temperatures are coefficients calculated using a polynomial fitting algorithm based on the frequency deviations of the crystal oscillator at different temperatures.

[0020] Optionally, the processing the phase difference based on a Kalman filter algorithm when the reference signal is valid includes:

[0021] Determining whether the reference signal is valid;

[0022] If valid, processing the phase difference based on the Kalman filter algorithm;

[0023] If invalid, keep the current running state.

[0024] Optionally, when the filtered phase difference is greater than or equal to a preset threshold, processing the filtered phase difference based on a PID control algorithm includes:

[0025] Determining whether the filtered phase difference is greater than or equal to a preset threshold;

[0026] If yes, processing the filtered phase difference based on the PID control algorithm;

[0027] If not, keep the current running state.

[0028] Optionally, the microcontroller is also used to coordinate the working timing of the temperature compensation chip, the frequency division circuit, the phase measurement module and the digital-to-analog converter.

[0029] The present invention can accurately tame the crystal oscillator frequency by cooperating with the temperature compensation chip and the microcontroller, effectively overcoming the frequency drift problem caused by temperature changes, crystal oscillator aging and other factors in the prior art, significantly improving the stability and accuracy of the crystal oscillator frequency, and has the advantages of low cost, low power consumption and easy integration and application in various electronic devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 A schematic structural diagram of a crystal oscillator taming system based on a temperature compensation chip provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] Figure 1 The structure of a crystal oscillator taming system based on a temperature compensation chip provided by an embodiment of the present invention is shown, including a crystal oscillator, a temperature compensation chip, a frequency division circuit, a phase measurement module, a microcontroller and a digital-to-analog converter.

[0034] The temperature compensation chip is used to perform temperature compensation on the crystal oscillator.

[0035] In one example, the temperature compensation chip includes a temperature sensor and a temperature compensation circuit, wherein:

[0036] The temperature sensor is used to measure the ambient temperature;

[0037] The temperature compensation circuit extracts a frequency compensation value corresponding to the ambient temperature from the microcontroller, and performs temperature compensation on the crystal oscillator according to the extracted frequency compensation value.

[0038] The temperature sensor monitors the temperature changes of the crystal oscillator's environment in real time, and converts the temperature information into an electrical signal and transmits it to the temperature compensation circuit. The temperature compensation circuit performs preliminary temperature compensation on the crystal oscillator's oscillation frequency based on the received temperature signal to reduce the frequency drift caused by temperature fluctuations and try to maintain the relative stability of the crystal oscillator's output frequency within a certain range.

[0039] The frequency division circuit is used to perform frequency division processing on the output signal of the crystal oscillator to obtain a frequency division signal.

[0040] The main function of the frequency division circuit is to divide the high-frequency signal output by the crystal oscillator, and divide the higher-frequency signal according to a certain frequency division coefficient to obtain a signal with a relatively low frequency that is more convenient for subsequent processing and measurement. For example, if the output frequency of the crystal oscillator is 10MHz, it can be divided into lower frequency signals such as 1MHz by setting a suitable frequency division coefficient. The divided signal still retains key characteristics such as the phase relationship with the original crystal oscillator frequency, providing a suitable intermediate signal for the entire taming process.

[0041] The phase measurement module is used to measure the phase difference between the frequency-divided signal and the reference signal.

[0042] In one example, the reference signal includes a standard clock signal preset by the system and a clock signal provided by a high-precision clock source.

[0043] Furthermore, the reference signal is 1PPS, which is provided by a high-precision clock source. The high precision and stability of 1PPS ensure that there is a reliable reference standard for the entire crystal oscillator training process, which helps to achieve high-precision training of the crystal oscillator frequency, so that the frequency of the final output of the crystal oscillator can be highly consistent with the high-precision reference signal.

[0044] The phase difference is closely related to the frequency deviation, which can help to further accurately determine the accuracy of the crystal frequency. For example, if the phase of the frequency-divided signal measured by the phase measurement module is ahead of 1PPS, it means that the crystal frequency may be too high; if the phase lags, the crystal frequency may be too low. Feeding back the phase difference to the microcontroller (MCU) provides an important basis for the microcontroller to make more accurate frequency deviation calculations and control decisions.

[0045] The microcontroller is used to store and periodically update the frequency compensation values ​​of the crystal oscillator at different temperatures; it is also used to process the phase difference based on the Kalman filter algorithm when the reference signal is valid, and to process the filtered phase difference based on the PID (proportional-integral-differential) control algorithm when the filtered phase difference is greater than or equal to a preset threshold. The PID control algorithm is adjusted accordingly based on the regularly updated frequency compensation values ​​of the crystal oscillator at different temperatures.

[0046] Although the temperature compensation chip can try its best to maintain the relative stability of the crystal oscillator output frequency within a certain range, it is difficult to completely eliminate the impact of temperature. A certain degree of frequency deviation will still occur within a wide temperature range (for example: -40℃ to 85℃). The temperature compensation chip works in conjunction with the MCU to form a refined taming mechanism, providing a reliable clock reference for application scenarios with strict requirements on frequency stability, such as high-precision timing and communication synchronization.

[0047] In one example, the periodic update is achieved by setting a timer inside the MCU.

[0048] Furthermore, the period of the timer is one week.

[0049] Some existing crystal taming methods do not fully consider the aging of the crystal itself during long-term use and the changes in the performance of related compensation components. As time goes by, the frequency stability will gradually deteriorate. By regularly updating the frequency compensation value and PID control algorithm of the crystal at different temperatures, the effects of crystal aging and changes in the characteristics of the temperature compensation chip can be effectively overcome, ensuring that a high frequency stability is maintained throughout the service life cycle, and always ensuring the accuracy of the operation of the electronic system.

[0050] In one example, the frequency compensation values ​​of the crystal oscillator at different temperatures are coefficients calculated using a polynomial fitting algorithm according to the frequency deviations of the crystal oscillator at different temperatures.

[0051] In one example, when the reference signal is valid, processing the phase difference based on the Kalman filter algorithm includes:

[0052] Determine whether the reference signal is valid;

[0053] If effective, the phase difference is processed based on the Kalman filter algorithm;

[0054] If invalid, keep the current running state.

[0055] If 1PPS is in an invalid state, the entire system will maintain the current operating state and no adjustment will be performed to ensure the stability and reliability of the system operation. When it is detected that 1PPS is in a valid state, the MCU will immediately collect the corresponding phase difference and filter the phase difference based on the Kalman filter algorithm. With the advantages of the Kalman filter algorithm, it can effectively filter out the noise interference and other error factors that may exist in the phase difference, thereby obtaining a more accurate and reliable phase difference.

[0056] The Kalman filter algorithm has the following advantages over hardware filters:

[0057] Filters usually use fixed circuit structures and parameters to achieve filtering functions. Once the hardware circuit design is completed, its filtering characteristics are basically fixed and difficult to flexibly adjust according to actual conditions. The Kalman filter algorithm can adjust and optimize the filtering parameters according to different system models and noise characteristics, which is more flexible.

[0058] The filtering characteristics of the filter are mainly determined by the parameters of the hardware circuit, and the adaptability to changes in system parameters and noise characteristics is poor. When the working environment or system characteristics change significantly, the hardware filter needs to be redesigned or replaced to meet the new filtering requirements. The Kalman filter can adjust the filter estimation in real time according to the new measurement data and system state changes, and can adapt to the dynamic changes of the system model and noise statistical characteristics. During the operation of the system, even if the noise characteristics change or there is a certain uncertainty in the system model, it can maintain good filtering performance by updating the relevant parameters, with higher accuracy.

[0059] For high-frequency signals or rapidly changing signals, hardware filters may have certain delays and phase distortions, which will affect the filtering effect and the real-time performance of the system. The Kalman filter only needs to use the current measurement value and the state estimate value of the previous moment to calculate the current state estimate. The computational complexity is relatively low. When processing large amounts of data and high-frequency sampling data, it can quickly process data and update the state. The data processing efficiency is higher and can meet the needs of applications with higher real-time requirements.

[0060] In one example, when the filtered phase difference is greater than or equal to a preset threshold, processing the filtered phase difference based on a PID control algorithm includes:

[0061] Determine whether the filtered phase difference is greater than or equal to a preset threshold;

[0062] If yes, the filtered phase difference is processed based on the PID control algorithm;

[0063] If not, keep the current running state.

[0064] In one example, the microcontroller is also used to coordinate the working timing of the temperature compensation chip, the frequency division circuit, the phase measurement module and the digital-to-analog converter to ensure that the entire taming process is carried out in an orderly and efficient manner.

[0065] The digital-to-analog converter is used to convert the controlled phase difference into an analog signal, and the analog signal is used to control the output frequency of the crystal oscillator.

[0066] The analog signal acts on the voltage-controlled end of the crystal oscillator to achieve effective control of the crystal oscillator frequency, making it gradually approach the ideal state, thereby ensuring that the entire system can operate stably and accurately.

[0067] In order to ensure that the crystal frequency is not affected by temperature, the traditional constant temperature control method requires complex and expensive constant temperature equipment, such as high-precision constant temperature boxes, temperature controllers, and corresponding thermal insulation devices, which not only greatly increases the cost of the entire system, but also has a large volume and is not suitable for miniaturized and portable electronic devices. By combining conventional temperature compensation chips and microcontrollers to achieve crystal oscillator taming, there is no need for expensive constant temperature hardware, which greatly reduces hardware costs, allowing more cost-sensitive electronic devices to apply high-precision crystal oscillator taming technology, thereby improving the market competitiveness of products.

[0068] In practical applications, the temperature changes in the environment where electronic equipment is located are often complex and difficult to accurately predict. There may also be other environmental factors such as humidity and electromagnetic interference. Some existing crystal oscillator control technologies based on fixed compensation algorithms or single temperature compensation chips are difficult to ensure stable taming effects in the face of complex and changeable actual environments. The above solution can monitor the crystal oscillator frequency deviation in real time to ensure that the crystal oscillator frequency is always as close to the ideal value as possible, thereby improving the reliability and adaptability of the system in complex environments.

[0069] There may be some differences in initial frequency accuracy, temperature sensitivity, etc. between crystal oscillators from different batches or even the same batch. The existing general compensation method is difficult to fully consider these individual differences, which may result in the failure to achieve the ideal taming effect on some crystal oscillators. The above solution maximizes the performance of each crystal oscillator, achieves accurate frequency taming, and reduces system performance fluctuations caused by individual differences in crystal oscillators.

[0070] Since the above solution is mainly based on conventional electronic components and circuit modules, each part has a compact structure and a small size. Compared with traditional large and complex crystal oscillator taming methods such as constant temperature control, it is easier to integrate into various electronic equipment circuit boards of different sizes and functional requirements, and will not occupy too much precious board space, which is convenient for miniaturized design and production of products.

[0071] The above solution is based on the core control of the microcontroller, which makes it easy to expand the functions through software upgrades. For example, it is possible to further increase the communication interface with external devices to realize remote monitoring of the crystal frequency status; or to flexibly adjust the control algorithm parameters according to different application scenario requirements to adapt to more types of crystals and more complex frequency accuracy requirements, providing convenient conditions for product function expansion and upgrading.

[0072] In summary, compared with the existing technology, the above scheme has shown significant advantages in frequency stability, cost and power consumption, adaptability, and integrated scalability in terms of crystal oscillator frequency taming, and can better meet the needs of modern electronic equipment for high-precision and high-reliability crystal oscillator frequency control.

[0073] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0074] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A crystal oscillator taming system based on a temperature compensation chip, characterized in that: It includes a crystal oscillator, a temperature compensation chip, a frequency division circuit, a phase measurement module, a microcontroller and a digital-to-analog converter, among which: The temperature compensation chip is used to perform temperature compensation on the crystal oscillator; The frequency division circuit is used to perform frequency division processing on the output signal of the crystal oscillator to obtain a frequency division signal; The phase measurement module is used to measure the phase difference between the frequency-divided signal and the reference signal; The microcontroller is used to store and periodically update the frequency compensation value of the crystal oscillator at different temperatures; it is also used to process the phase difference based on the Kalman filter algorithm when the reference signal is valid, and to process the filtered phase difference based on the PID control algorithm when the filtered phase difference is greater than or equal to a preset threshold, and the PID control algorithm is adjusted accordingly according to the periodically updated frequency compensation value of the crystal oscillator at different temperatures; The digital-to-analog converter is used to convert the controlled phase difference into an analog signal, and the analog signal is used to control the output frequency of the crystal oscillator.

2. The system according to claim 1, characterized in that: The temperature compensation chip includes a temperature sensor and a temperature compensation circuit, wherein: The temperature sensor is used to measure the ambient temperature; The temperature compensation circuit extracts a frequency compensation value corresponding to the ambient temperature from the microcontroller, and performs temperature compensation on the crystal oscillator according to the extracted frequency compensation value.

3. The system according to claim 1, characterized in that: The reference signal includes a standard clock signal preset by the system and a clock signal provided by a high-precision clock source.

4. The system according to claim 3, characterized in that: The reference signal is 1PPS.

5. The system according to claim 1, characterized in that: The periodic update is achieved by setting a timer inside the MCU.

6. The system according to claim 5, characterized in that: The period of the timer is one week.

7. The system according to claim 1, characterized in that: The frequency compensation values ​​of the crystal oscillator at different temperatures are coefficients calculated using a polynomial fitting algorithm based on the frequency deviations of the crystal oscillator at different temperatures.

8. The system according to claim 1, characterized in that: The processing of the phase difference based on the Kalman filter algorithm when the reference signal is valid includes: Determining whether the reference signal is valid; If valid, processing the phase difference based on the Kalman filter algorithm; If invalid, keep the current running state.

9. The system according to claim 1, characterized in that: The processing of the filtered phase difference based on the PID control algorithm when the filtered phase difference is greater than or equal to a preset threshold comprises: Determining whether the filtered phase difference is greater than or equal to a preset threshold; If yes, processing the filtered phase difference based on the PID control algorithm; If not, keep the current running state.

10. The system according to claim 1, characterized in that: The microcontroller is also used to coordinate the working timing of the temperature compensation chip, the frequency division circuit, the phase measurement module and the digital-to-analog converter.

Citation Information

Patent Citations

  • Crystal oscillator taming method and crystal oscillator taming system based on SOPC technology

    CN105790714A

  • Crystal oscillator automatic temperature compensation system and compensation method

    CN115065323A

  • Constant-temperature crystal oscillator time keeping system and method based on BP neural network

    CN116400578A

  • Crystal oscillator taming system

    CN219018779U

  • Temperature compensation method, device and access point

    WO2009062446A1

Cited By

  • Multipath timer circuit equipment and system

    CN120415390A