Frequency compensation method, device, equipment and storage medium based on crystal oscillator

By determining the current temperature change state and frequency compensation method of the crystal oscillator and calculating the target frequency compensation amount with the target variable data, the high cost problem caused by the complex hysteresis model in the existing technology is solved, and efficient frequency compensation and stability improvement is achieved.

CN115133924BActive Publication Date: 2025-05-16GUANGDONG DAPU TELECOM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210957012.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-10
Publication Date
2025-05-16
Estimated Expiration
2042-08-10

AI Technical Summary

Technical Problem

When the prior art performs frequency compensation for the rise and fall cooling and hysteresis characteristics of crystal oscillators, the product cost increases due to the complex hysteresis model and the calculation amount.

Method used

By obtaining temperature information and preset time information, the current temperature change state is determined, and the current frequency compensation method is determined based on the current and initial temperature change states. Then, the target variable data is obtained, the target frequency compensation amount is determined based on the current frequency compensation method and the target variable data, and finally the compensation target is frequency compensation.

Benefits of technology

It provides a simple and effective low-cost frequency compensation method, which can effectively improve the frequency stability of crystal oscillators, reduce product costs, and use it on existing digital compensation products without the need for additional equipment and devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115133924B_ABST
    Figure CN115133924B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of crystal oscillators, and discloses a frequency compensation method, device, equipment and storage medium based on a crystal oscillator. The method includes: obtaining temperature information according to preset time information, and determining the current temperature change state according to the temperature information; determining the current frequency compensation method according to the current temperature change state and the initial temperature change state; obtaining target variable data, and determining the target frequency compensation amount according to the target variable data and the current frequency compensation method; and performing frequency compensation on the target to be compensated according to the target frequency compensation amount. Through the above method, the frequency stability of the crystal oscillator can be effectively improved, and it can be used on existing digital compensation products without the need for additional equipment and devices, which greatly reduces the product cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of crystal oscillators, and in particular to a frequency compensation method, device, equipment and storage medium based on a crystal oscillator. Background Art

[0002] Crystal oscillators are frequency sources with relatively high frequency temperature stability and are widely used in high-tech electronic technologies such as satellite communications and radar systems. The stability of their frequency to temperature changes is one of the important performance indicators for measuring the performance of crystal oscillators.

[0003] During the application process, since the frequency drift of the crystal oscillator is different at different temperatures, different temperature change speeds, different temperature change accelerations, and different temperature starting points, it will show the characteristics of a hysteresis loop. Corresponding frequency compensation is required to ensure the frequency stability of the product. However, the hysteresis model is a very complex nonlinear model with many influencing variables. When compensating for the hysteresis characteristics of the crystal oscillator's temperature rise and fall, the amount of calculation is very large, and it is difficult to accurately obtain these variables. The implementation cost is high, which increases the product cost.

[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the present invention is to provide a frequency compensation method, device, equipment and storage medium based on a crystal oscillator, aiming to solve the technical problem that when the prior art performs frequency compensation for the temperature rise and fall hysteresis characteristics of the crystal oscillator, the product cost increases due to the complexity of the hysteresis model and the large amount of calculation.

[0006] To achieve the above object, the present invention provides a frequency compensation method based on a crystal oscillator, the method comprising the following steps:

[0007] Acquire temperature information according to preset time information, and determine the current temperature change state according to the temperature information;

[0008] Determining a current frequency compensation mode according to the current temperature change state and the initial temperature change state;

[0009] Obtaining target variable data, and determining a target frequency compensation amount according to the target variable data and a current frequency compensation method;

[0010] Frequency compensation is performed on the target to be compensated according to the target frequency compensation amount.

[0011] Optionally, determining a current frequency compensation mode according to the current temperature change state and the initial temperature change state includes:

[0012] Determining a current ambient temperature change state according to the current temperature change state and the initial temperature change state;

[0013] When the current ambient temperature change state meets the preset ambient temperature change state, a current frequency compensation mode is determined according to the current ambient temperature change state.

[0014] Optionally, the target variable data includes at least one of a current theoretical compensation amount, an initial theoretical compensation amount, an initial actual compensation amount, and a current hysteresis compensation amount;

[0015] The step of obtaining the target variable data and determining the target frequency compensation amount according to the target variable data and the corresponding relationship between the frequency compensation amount and the temperature also includes:

[0016] Determining a corresponding relationship between a target temperature and a frequency drift according to the current temperature change state;

[0017] According to the corresponding relationship between the current temperature and the target temperature and the frequency drift, the current frequency drift is obtained, and according to the current frequency drift, the current theoretical compensation amount is obtained;

[0018] According to the corresponding relationship between the initial temperature, the target temperature and the frequency drift, an initial frequency drift is obtained, and according to the initial frequency drift, an initial theoretical compensation amount is obtained;

[0019] Determining a current hysteresis compensation amount according to the temperature information and the preset time information;

[0020] Get the initial actual compensation amount;

[0021] The target variable data is determined according to the current theoretical compensation amount, the initial theoretical compensation amount, the initial actual compensation amount and the current hysteresis compensation amount.

[0022] Optionally, determining the corresponding relationship between the target temperature and the frequency drift according to the current temperature change state includes:

[0023] According to the current temperature change state, the correspondence between temperature and frequency drift is searched in a temperature and frequency drift correspondence database to obtain the correspondence between target temperature and frequency drift, wherein the temperature and frequency drift correspondence database stores various temperature change states and corresponding temperature and frequency drift correspondences.

[0024] Optionally, determining a current hysteresis compensation amount according to the temperature information and preset time information includes:

[0025] According to the temperature information and the preset time information, a current temperature change rate is obtained;

[0026] According to the current temperature change rate, a current compensation time interval is obtained;

[0027] A current hysteresis compensation amount is obtained according to the current compensation time interval.

[0028] Optionally, the acquiring of temperature information and time information, and before determining the current temperature change state according to the temperature information and time information, further comprises:

[0029] Determine the test temperature information according to the preset temperature change state;

[0030] Obtain frequency drift data corresponding to the test temperature information under each preset temperature change state;

[0031] According to the test temperature information and the frequency drift data, the corresponding relationship between the temperature and the frequency drift under each preset temperature change state is obtained;

[0032] According to the correspondence between temperature and frequency drift under the preset temperature change states, a temperature and frequency drift correspondence database is established, wherein the temperature and frequency drift correspondence database stores various temperature change states and corresponding temperature and frequency drift correspondences.

[0033] Optionally, acquiring temperature information according to preset time information, and determining a current temperature change state and a current temperature change speed according to the temperature information includes:

[0034] Get preset time information;

[0035] Acquire temperature data according to the preset time information, and record the number of acquisitions;

[0036] When the acquisition times is greater than or equal to a preset threshold, obtaining temperature information according to the temperature data;

[0037] According to the temperature information, obtaining the current temperature change;

[0038] The current temperature change state is determined according to the current temperature change amount.

[0039] In addition, to achieve the above-mentioned purpose, the present invention further proposes a frequency compensation device based on a crystal oscillator, the frequency compensation device based on the crystal oscillator comprising:

[0040] An acquisition module, used to acquire temperature information according to preset time information, and determine a current temperature change state according to the temperature information;

[0041] The acquisition module is further used to determine a current frequency compensation mode according to the current temperature change state and the initial temperature change state;

[0042] The acquisition module is further used to acquire target variable data, and determine a target frequency compensation amount according to the target variable data and a current frequency compensation method;

[0043] The compensation module is used to perform frequency compensation on a target to be compensated according to the target frequency compensation amount.

[0044] In addition, to achieve the above-mentioned purpose, the present invention also proposes a frequency compensation device based on a crystal oscillator, and the frequency compensation device based on a crystal oscillator includes: a memory, a processor, and a frequency compensation program based on a crystal oscillator stored in the memory and executable on the processor, and the frequency compensation program based on the crystal oscillator is configured to implement the steps of the frequency compensation method based on the crystal oscillator as described above.

[0045] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a frequency compensation program based on a crystal oscillator is stored. When the frequency compensation program based on the crystal oscillator is executed by a processor, the steps of the frequency compensation method based on the crystal oscillator as described above are implemented.

[0046] In the present invention, temperature information is obtained according to preset time information, and the current temperature change state is determined. The current frequency compensation method is determined according to the current temperature change state and the initial temperature change state, thereby determining the target frequency compensation amount according to the target variable data and the current frequency compensation method, and then frequency compensation is performed on the target to be compensated according to the obtained target frequency compensation amount. Compared with the prior art, it is difficult to accurately obtain all variables when performing frequency compensation for the temperature rise and fall hysteresis characteristics of the crystal oscillator. The present invention provides a simple, effective and low-cost compensation method, which overcomes the technical problems of complex hysteresis models, large calculation amount and high implementation cost, and can effectively improve the frequency stability of the crystal oscillator, and can be used on existing digital compensation products without the need for additional equipment and devices, greatly reducing product costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a structural schematic diagram of a frequency compensation device based on a crystal oscillator in a hardware operating environment involved in an embodiment of the present invention;

[0048] Figure 2 It is a flow chart of a first embodiment of a frequency compensation method based on a crystal oscillator of the present invention;

[0049] Figure 3 A schematic diagram of the temperature rise and fall hysteresis characteristics of a crystal oscillator according to an embodiment of a frequency compensation method based on a crystal oscillator of the present invention;

[0050] Figure 4 A schematic diagram of frequency compensation according to an embodiment of a frequency compensation method based on a crystal oscillator of the present invention;

[0051] Figure 5It is a schematic diagram of the overall flow of the working mode of an embodiment of a frequency compensation method based on a crystal oscillator of the present invention;

[0052] Figure 6 It is a flow chart of a second embodiment of a frequency compensation method based on a crystal oscillator of the present invention;

[0053] Figure 7 It is a schematic diagram of the overall flow of the test mode of an embodiment of the frequency compensation method based on the crystal oscillator of the present invention;

[0054] Figure 8 It is a structural block diagram of the first embodiment of the frequency compensation device based on the crystal oscillator of the present invention.

[0055] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0056] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0057] Reference Figure 1 , Figure 1 The present invention is a schematic diagram of the structure of a frequency compensation device based on a crystal oscillator in a hardware operating environment according to an embodiment of the present invention.

[0058] like Figure 1 As shown, the frequency compensation device based on the crystal oscillator may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0059] Those skilled in the art will understand that Figure 1The structure shown in the figure does not constitute a limitation on the frequency compensation device based on the crystal oscillator, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0060] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a frequency compensation program based on a crystal oscillator.

[0061] exist Figure 1 In the frequency compensation device based on the crystal oscillator shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the frequency compensation device based on the crystal oscillator of the present invention can be set in the frequency compensation device based on the crystal oscillator, and the frequency compensation device based on the crystal oscillator calls the frequency compensation program based on the crystal oscillator stored in the memory 1005 through the processor 1001, and executes the frequency compensation method based on the crystal oscillator provided in the embodiment of the present invention.

[0062] The embodiment of the present invention provides a frequency compensation method based on a crystal oscillator, referring to Figure 2 , Figure 2 The figure is a flow chart of a first embodiment of a frequency compensation method based on a crystal oscillator according to the present invention.

[0063] In this embodiment, the frequency compensation method based on the crystal oscillator includes the following steps:

[0064] Step S10: acquiring temperature information according to preset time information, and determining a current temperature change state according to the temperature information.

[0065] It should be noted that the execution subject of this embodiment is MCU (Microcontroller Unit), and the corresponding frequency compensation amount is calculated through the frequency compensation program based on the crystal oscillator in the MCU to compensate the frequency of the crystal oscillator. When the crystal oscillator is working, it usually shows the hysteresis characteristic of the frequency drift during the temperature rise and fall. The hysteresis characteristic of the frequency drift during the temperature rise and fall means that the frequency drift amount of the crystal oscillator is different at the same temperature, different temperature change speeds, different temperature change accelerations, and different temperature starting points, showing the characteristics of the hysteresis loop, such as Figure 3 The crystal oscillator temperature rise and fall hysteresis characteristic diagram shown is a very complex nonlinear model with many influencing variables. If these variables are to be accurately obtained, the product cost will be greatly increased. In addition, the hysteresis model is complex, the amount of calculation is very large, and the implementation cost is high. Therefore, this embodiment provides a simple and effective low-cost compensation method to solve this problem.

[0066] The step S10 comprises:

[0067] Acquire preset time information, acquire temperature data according to the preset time information, and record the number of acquisitions, and when the number of acquisitions is greater than or equal to a preset threshold, obtain temperature information according to the temperature data.

[0068] It is understandable that the preset time information is a pre-set time interval, which can be 10 seconds, 30 seconds, 1 minute, etc., as long as the value is much smaller than the time of temperature change. It can be timed by a timer. This embodiment does not limit this and can be flexibly adjusted according to actual conditions. The temperature data is the operating temperature during collection, and the number of acquisitions is the number of times temperature data is collected. The preset threshold is the number of times temperature data needs to be collected, which can be set in the frequency compensation program based on the crystal oscillator. This embodiment does not limit this and can be flexibly adjusted according to actual conditions. The temperature information is temperature data collected multiple times.

[0069] The current temperature change is obtained according to the temperature information.

[0070] It should be noted that the current temperature change is the magnitude of the current temperature change. According to the temperature information, the initial working temperature and the current working temperature are obtained, and the temperature change is the initial working temperature minus the current working temperature. For example: if the time information is set to 1 minute, the working temperature 1 minute ago is 20°C, that is, the initial working temperature is 20°C, and the current working temperature is 30°C, then the temperature change is the initial working temperature minus the current working temperature, and the result is -10°C, that is, the current temperature change is -10°C; if the working temperature 1 minute ago is 30°C, that is, the initial working temperature is 30°C, and the current working temperature is 20°C, then the temperature change is the initial working temperature minus the current working temperature, and the result is 10°C, that is, the current temperature change is 10°C.

[0071] The current temperature change state is determined according to the current temperature change amount.

[0072] It should be noted that the temperature change state refers to the temperature change of the working environment. The crystal oscillator works in an environment with slow temperature change. There are three states: insulation state, heating state and cooling state. When the temperature of the working environment remains unchanged, it is in the insulation state, when the temperature of the working environment rises, it is in the heating state, and when the temperature of the working environment drops, it is in the cooling state. The current temperature change state is the current temperature change.

[0073] In the specific implementation, when the current temperature change is a negative number, it means that the initial working temperature is lower than the current working temperature, and the current temperature change state is considered to be a heating state. When the current temperature change is a positive number, it means that the initial working temperature is higher than the current working temperature, and the current temperature change state is considered to be a cooling state. When the current temperature change is zero, it means that the initial working temperature is equal to the current working temperature, and the current temperature change state is considered to be a heat preservation state. For example: the current temperature change is -10°C, and the current temperature change state is a heating state; the current temperature change is 5°C, and the current temperature change state is a cooling state; the current temperature change is 0°C, and the current temperature change state is a heat preservation state.

[0074] In this embodiment, the magnitude of the temperature change is calculated based on the preset time information and the operating temperature of the crystal oscillator to determine which of the three states the current temperature state belongs to.

[0075] Step S20: determining a current frequency compensation mode according to the current temperature change state and the initial temperature change state.

[0076] The step S20 comprises:

[0077] The current ambient temperature change state is determined according to the current temperature change state and the initial temperature change state. When the current ambient temperature change state meets the preset ambient temperature change state, the current frequency compensation mode is determined according to the current ambient temperature change state.

[0078] It is understandable that the initial temperature change state is the temperature change state of the crystal oscillator at the previous moment. According to the current temperature change state and the initial temperature change state, the temperature change of the overall environment can be obtained, that is, the current environment temperature change state. The preset environment temperature change state is the situation where the temperature rise and fall frequency drift hysteresis compensation needs to be performed. In this embodiment, the preset environment temperature change state is divided into 4 types: the initial temperature change state is heating, and the current temperature change state is cooling; the initial temperature change state is cooling, and the current temperature change state is heating; the initial temperature change state is heating, and the current temperature change state is heating; the initial temperature change state is cooling, and the current temperature change state is cooling (the default temperature change state is unchanged in the insulation state, and it is considered that there is no temperature rise and fall hysteresis at this time, and the frequency compensation under hysteresis is not performed). Other environment temperature change states can also be defined. This embodiment does not limit this and can be flexibly adjusted according to actual conditions. The frequency compensation method is a frequency compensation amount calculation expression. Different temperature change conditions have different compensation methods. The current frequency compensation method is a frequency compensation amount calculation expression used in the current environment temperature change state.

[0079] It should be noted that when the initial temperature change state is heating and the current temperature change state is cooling, the frequency compensation calculation expression is as follows:

[0080] V 1 =V 0 +f降 (t 1 )-f 降 (t 0 )-d Tcount

[0081] Where, t 1 is the temperature at the current moment, t 0 is the temperature at the previous moment, V 0 is the initial temperature change state t 0 The actual frequency compensation amount of temperature, V 1 t is the current moment 1 Frequency compensation for temperature, f 降 (t 1 ) is t in cooling state 1 Theoretical frequency compensation for temperature, f 降 (t 1 ) is t in cooling state 0 Theoretical frequency compensation for temperature, d Tcount is a hysteresis related parameter. When the initial temperature change state is cooling and the current temperature change state is heating, the frequency compensation calculation expression is as follows:

[0082] V 1 =V 0 +f 升 (t 1 )-f 升 (t 0 )+d Tcount

[0083] Where V 0 is the initial temperature change state t 0 The actual frequency compensation amount of temperature, V 1 t is the current moment 1 Frequency compensation for temperature, f 升 (t 1 ) is t under the heating state 1 Theoretical frequency compensation for temperature, f 升 (t 1 ) is t under the heating state 0 Theoretical frequency compensation for temperature, d Tcount is a hysteresis related parameter. When the initial temperature change state is heating and the current temperature change state is heating, the frequency compensation calculation expression is as follows:

[0084]

[0085] Where V 0 is the initial temperature change state t 0 The actual frequency compensation amount of temperature, V 1 t is the current moment 1Frequency compensation for temperature, f 升 (t 1 ) is t under the heating state 1 Theoretical frequency compensation for temperature, f 升 (t 1 ) is t under the heating state 0 Theoretical frequency compensation for temperature, d Tcount is a hysteresis related parameter. When the initial temperature change state is cooling and the current temperature change state is cooling, the frequency compensation calculation expression is as follows:

[0086]

[0087] Where V 0 is the initial temperature change state t 0 The actual frequency compensation amount of temperature, V 1 t is the current moment 1 Frequency compensation for temperature, f 降 (t 1 ) is t in cooling state 1 Theoretical frequency compensation for temperature, f 降 (t 1 ) is t in cooling state 0 Theoretical frequency compensation for temperature, d Tcount is the hysteresis related parameter.

[0088] In the specific implementation, the current ambient temperature change state is determined according to the current temperature change state and the initial temperature change state. When the current ambient temperature change state meets the above four conditions, the frequency compensation method corresponding to the current ambient temperature change state is found, and the frequency of the crystal oscillator is compensated according to the frequency compensation method at this time.

[0089] Step S30: Obtain target variable data, and determine a target frequency compensation amount according to the target variable data and the current frequency compensation method.

[0090] It should be understood that the target variable data is the variable data required to calculate the frequency compensation under the current ambient temperature change condition, and the variable data involved include: the current theoretical compensation, the initial theoretical compensation, the initial actual compensation and the current hysteresis compensation. The current theoretical compensation is the frequency compensation corresponding to the current temperature in the temperature and frequency drift curve under the current temperature change state. The initial theoretical compensation is the frequency compensation corresponding to the previous temperature in the temperature and frequency drift curve under the current temperature change state. The initial actual compensation is the frequency compensation at the previous moment. The current hysteresis compensation is the hysteresis-related parameter under the current ambient temperature change condition. Different ambient temperature change states use different variable data for calculation. The target variable data is at least one of the above variables. The target frequency compensation is the frequency that needs to be compensated under the current ambient temperature change state.

[0091] The target variable data acquisition step includes:

[0092] According to the current temperature change state, the corresponding relationship between the target temperature and the frequency drift is determined; according to the current temperature and the corresponding relationship between the target temperature and the frequency drift, the current frequency drift is obtained; according to the current frequency drift, the current theoretical compensation amount is obtained; according to the initial temperature and the corresponding relationship between the target temperature and the frequency drift, the initial frequency drift is obtained; according to the initial frequency drift, the initial theoretical compensation amount is obtained.

[0093] It can be understood that the correspondence between the target temperature and the frequency drift is a temperature and frequency drift curve under the current temperature change state, the current temperature is the temperature at the current moment, the initial temperature is the temperature at the previous moment, the current frequency drift is the frequency drift amount corresponding to the current temperature under the current temperature change state, and the initial frequency drift is the frequency drift amount corresponding to the temperature at the previous moment under the current temperature change state. The correspondence between the temperature and the frequency drift can be found in a relational database corresponding to the temperature and the frequency drift, and the relational database corresponding to the temperature and the frequency drift is obtained in the test mode (the frequency compensation program based on the crystal oscillator is divided into two modes: test mode and working mode), the working temperature corresponds to the frequency drift amount one by one, and different temperature change states have different correspondences between the temperature and the frequency drift. This embodiment uses a fitting curve diagram of the temperature and the frequency drift, which can also be in other forms, and this embodiment does not limit this.

[0094] In the specific implementation, each temperature change state has a corresponding correspondence between temperature and frequency drift, and these correspondences between temperature and frequency drift are stored in a database. According to the current temperature change state, the corresponding correspondence between temperature and frequency drift can be found in the correspondence database between temperature and frequency drift, and the frequency drift amount corresponding to the current temperature and the initial temperature can be found, so as to obtain the current theoretical compensation amount and the initial theoretical compensation amount.

[0095] A current hysteresis compensation amount is determined according to the temperature information and the preset time information.

[0096] It should be noted that the specific steps of obtaining the current hysteresis compensation amount include: obtaining the current temperature change speed according to the temperature information and the preset time information, obtaining the current compensation time interval according to the current temperature change speed, and obtaining the current hysteresis compensation amount according to the current compensation time interval. The hysteresis compensation amount is related to the temperature change speed, the current temperature change speed is the current temperature change speed, the current compensation time interval is the interval at which the hysteresis compensation amount needs to be superimposed under the current environmental temperature change condition, the current compensation time interval is adjusted according to the current temperature change speed, and the hysteresis compensation amount is superimposed according to the current compensation time interval.

[0097] In the specific implementation, if the current temperature change state is cooling, it is necessary to adjust the current compensation time interval t according to the current temperature change speed. count , every interval t count Superimposed hysteresis compensation amount -d Tcount , until the current moment t 1 Frequency compensation value V 1 Under cooling condition t 1 Theoretical frequency compensation value f of temperature 降 (t 1 ) and cannot be lower than f 降 (t 1 ); If the current temperature change state is heating, the current compensation time interval t needs to be adjusted according to the current temperature change speed. count , every interval t count Superimposed hysteresis compensation + d Tcount , until the current moment t 1 Frequency compensation value V 1 Under cooling condition t 1 Theoretical frequency compensation value f of temperature 升 (t 1 ) overlap, and cannot be higher than f 升 (t 1 ).

[0098] An initial actual compensation amount is obtained, and target variable data is determined according to the current theoretical compensation amount, the initial theoretical compensation amount, the initial actual compensation amount, and the current hysteresis compensation amount.

[0099] It is understandable that different ambient temperature change states have different frequency compensation methods, and different frequency compensation methods require different variable data, and corresponding calculations are performed based on actual conditions.

[0100] It should be noted that when the current temperature change state is the same as the initial temperature change state, it is necessary to further select the calculation relationship of the frequency compensation amount, and determine it by comparing the initial actual compensation amount with the current theoretical compensation amount.

[0101] In the specific implementation, the target variable data is substituted into the frequency compensation amount calculation formula to calculate the current required frequency compensation amount. Figure 4 The frequency compensation diagram is shown in the figure. At this time, the ambient temperature is t 1 Point (B) changes from a heating state to a cooling state. At this time, press V 1 =V 0 +f 降 (t 1 )-f 降 (t 0 )-d Tcount To compensate, point A (t 0 ) to point C (t 1 ), where the compensation amount at the previous moment is V 0 =f 升 (t 0 ).

[0102] Step S40: performing frequency compensation on the target to be compensated according to the target frequency compensation amount.

[0103] like Figure 5 As shown in the overall flow chart of the working mode, after entering the working mode, the variable data are initialized, the temperature data of the crystal oscillator is obtained according to the set time interval, the current temperature change state of the crystal oscillator is determined by the temperature data collected multiple times, the ambient temperature change is determined according to the temperature change state at the previous moment and the current temperature change state, the frequency compensation amount currently required by the crystal oscillator is calculated according to the ambient temperature change, and the calculated frequency compensation amount is compensated to the crystal oscillator.

[0104] In this embodiment, temperature information is obtained according to preset time information, and the current temperature change state is determined. The current frequency compensation mode is determined according to the current temperature change state and the initial temperature change state, so that the target frequency compensation amount is determined according to the target variable data and the current frequency compensation mode, and then the frequency compensation is performed on the target to be compensated according to the obtained target frequency compensation amount. This embodiment provides a simple, effective and low-cost compensation method, which can effectively improve the frequency stability of the crystal oscillator, and can be used on existing digital compensation products without the need for additional equipment and devices, greatly reducing product costs.

[0105] refer to Figure 6 , Figure 6 The figure is a flow chart of a second embodiment of a frequency compensation method based on a crystal oscillator according to the present invention.

[0106] Based on the first embodiment above, the frequency compensation method based on the crystal oscillator in this embodiment further includes, before step S10:

[0107] Step S01: Determine test temperature information according to a preset temperature change state.

[0108] It should be noted that before using the working mode to compensate the frequency of the crystal oscillator, it is necessary to first establish a database of the relationship between temperature and frequency drift in the test mode. The test mode is: in a temperature box environment, simulate the environment of heating and cooling state, test the frequency drift at each temperature point under different temperature change states, and establish a database of the relationship between temperature and frequency drift. After entering the test mode, it is necessary to set the ambient temperature first to simulate the temperature change state.

[0109] It can be understood that the preset temperature change state is divided into two types: a cooling state and a heating state. The test temperature information is the working environment temperature of the crystal oscillator in the test mode. Since the working environment temperature of the crystal oscillator is pre-set in the test mode, the test temperature information can also be considered as the temperature for testing, which can be set in the frequency compensation program based on the crystal oscillator. For example, the temperature is set to climb from -45°C to 90°C for heating, and the temperature is set to climb from 90°C to -45°C for cooling. Other situations that can simulate temperature change states can also be simulated. This embodiment does not impose any restrictions on this and can be flexibly adjusted according to actual conditions.

[0110] In a specific implementation, in the test mode, ramp-up and ramp-down are performed respectively, so that the crystal oscillator can be tested at different temperatures under different temperature change states.

[0111] Step S02: Obtaining frequency drift data corresponding to the test temperature information under each preset temperature change state.

[0112] It is understandable that the frequency drift data is the frequency drift amount of the crystal oscillator, and different test temperatures correspond to different frequency drift amounts. This embodiment collects frequency drift data corresponding to different test temperatures under heating and cooling conditions.

[0113] Step S03: obtaining the corresponding relationship between temperature and frequency drift under each preset temperature change state according to the test temperature information and the frequency drift data.

[0114] Step S04: establishing a temperature-frequency drift correspondence database according to the correspondence between temperature and frequency drift under each preset temperature change state, wherein the temperature-frequency drift correspondence database stores various temperature change states and corresponding temperature-frequency drift correspondences.

[0115] In a specific implementation, the test temperature information and frequency drift data under the same temperature change state are processed to establish a corresponding relationship between temperature and frequency drift. The corresponding relationship under the heating state and the cooling state can be obtained respectively. The corresponding relationship can be displayed through a fitting curve graph, and this embodiment does not impose any restrictions on this.

[0116] like Figure 7 As shown in the overall flow diagram of the test mode, in the incubator environment, the ambient temperature is set to climb from -45°C to 90°C, and the temperature and the corresponding frequency drift data of the product are collected as the heating data; the ambient temperature is set to climb from 90°C to -45°C, and the temperature and the corresponding frequency drift data of the product are collected as the cooling data, a database of the corresponding relationship between temperature and frequency drift in each state is established, the data is stored in the product memory, and the next round of testing continues.

[0117] In this embodiment, the frequency drift of the crystal oscillator under different temperature states and temperatures is sampled, and a corresponding database of temperature and frequency drift under various states is established according to the corresponding data of frequency drift under different states and temperatures. The traditional digital compensation method only compensates for the temperature characteristic curve of heating, and ignores the influence of cooling on the frequency offset of the crystal oscillator. Generally speaking, the deviation between heating and cooling of the crystal oscillator is between 0.1 and 0.5ppm. In this way, even if the temperature characteristic curve of heating is compensated to the most ideal state, the stability of the crystal oscillator under the cooling test environment can only be 0.1ppm, which greatly limits the product frequency stability index of the digital compensation method. This embodiment establishes a database of the relationship between temperature and frequency drift, so that in the working mode, the frequency drift of the crystal oscillator can be determined according to the actual environmental conditions, and the frequency to be compensated is calculated according to the corresponding frequency drift, so as to achieve full coverage of the temperature change state by the frequency compensation method and improve the frequency stability of the product.

[0118] Reference Figure 8 , Figure 8 It is a structural block diagram of the first embodiment of the frequency compensation device based on the crystal oscillator of the present invention.

[0119] like Figure 7 As shown, the frequency compensation device based on the crystal oscillator proposed in the embodiment of the present invention includes:

[0120] The acquisition module 10 is used to acquire temperature information according to preset time information, and determine the current temperature change state according to the temperature information.

[0121] The acquisition module 10 is further used to determine a current frequency compensation mode according to the current temperature change state and the initial temperature change state.

[0122] The acquisition module 10 is further used to acquire target variable data, and determine a target frequency compensation amount according to the target variable data and a current frequency compensation method.

[0123] The compensation module 20 is used to perform frequency compensation on a target to be compensated according to the target frequency compensation amount.

[0124] In this embodiment, temperature information is obtained according to preset time information, and the current temperature change state is determined. The current frequency compensation mode is determined according to the current temperature change state and the initial temperature change state, so that the target frequency compensation amount is determined according to the target variable data and the current frequency compensation mode, and then the frequency compensation is performed on the target to be compensated according to the obtained target frequency compensation amount. This embodiment provides a simple, effective and low-cost compensation method, which can effectively improve the frequency stability of the crystal oscillator, and can be used on existing digital compensation products without the need for additional equipment and devices, greatly reducing product costs.

[0125] In one embodiment, the acquisition module 10 is further used to determine the current ambient temperature change state according to the current temperature change state and the initial temperature change state;

[0126] When the current ambient temperature change state meets the preset ambient temperature change state, a current frequency compensation mode is determined according to the current ambient temperature change state.

[0127] In one embodiment, the acquisition module 10 is further used to determine the corresponding relationship between the target temperature and the frequency drift according to the current temperature change state;

[0128] According to the corresponding relationship between the current temperature and the target temperature and the frequency drift, the current frequency drift is obtained, and according to the current frequency drift, the current theoretical compensation amount is obtained;

[0129] According to the corresponding relationship between the initial temperature, the target temperature and the frequency drift, an initial frequency drift is obtained, and according to the initial frequency drift, an initial theoretical compensation amount is obtained;

[0130] Determining a current hysteresis compensation amount according to the temperature information and the preset time information;

[0131] Get the initial actual compensation amount;

[0132] The target variable data is determined according to the current theoretical compensation amount, the initial theoretical compensation amount, the initial actual compensation amount and the current hysteresis compensation amount.

[0133] In one embodiment, the acquisition module 10 is also used to search for the correspondence between temperature and frequency drift in a correspondence database between temperature and frequency drift according to the current temperature change state, so as to obtain the correspondence between the target temperature and frequency drift, wherein the correspondence database between temperature and frequency drift stores various temperature change states and corresponding correspondences between temperature and frequency drift.

[0134] In one embodiment, the acquisition module 10 is further used to obtain the current temperature change rate according to the temperature information and the preset time information;

[0135] According to the current temperature change rate, a current compensation time interval is obtained;

[0136] A current hysteresis compensation amount is obtained according to the current compensation time interval.

[0137] In one embodiment, the acquisition module 10 is further used to acquire preset time information;

[0138] Acquire temperature data according to the preset time information, and record the number of acquisitions;

[0139] When the acquisition times is greater than or equal to a preset threshold, obtaining temperature information according to the temperature data;

[0140] According to the temperature information, obtaining the current temperature change;

[0141] The current temperature change state is determined according to the current temperature change amount.

[0142] In one embodiment, the acquisition module 10 is further used to determine the test temperature information according to a preset temperature change state;

[0143] Obtain frequency drift data corresponding to the test temperature information under each preset temperature change state;

[0144] According to the test temperature information and the frequency drift data, the corresponding relationship between the temperature and the frequency drift under each preset temperature change state is obtained;

[0145] According to the correspondence between temperature and frequency drift under the preset temperature change states, a temperature and frequency drift correspondence database is established, wherein the temperature and frequency drift correspondence database stores various temperature change states and corresponding temperature and frequency drift correspondences.

[0146] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.

[0147] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0148] In addition, for technical details not fully described in this embodiment, reference can be made to the frequency compensation method based on the crystal oscillator provided in any embodiment of the present invention, and will not be repeated here.

[0149] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0150] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0151] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0152] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A frequency compensation method based on a crystal oscillator, characterized in that: The frequency compensation method based on the crystal oscillator comprises: Acquire temperature information according to preset time information, and determine the current temperature change state according to the temperature information; Determining a current frequency compensation mode according to the current temperature change state and the initial temperature change state; Obtain target variable data, and determine a target frequency compensation amount according to the target variable data and a current frequency compensation method, wherein the target variable data includes at least one of a current theoretical compensation amount, an initial theoretical compensation amount, an initial actual compensation amount, and a current hysteresis compensation amount; Performing frequency compensation on a target to be compensated according to the target frequency compensation amount; The determining of the current frequency compensation mode according to the current temperature change state and the initial temperature change state includes: When the initial temperature change state is heating and the current temperature change state is cooling, the current frequency compensation mode is determined to be V1=V0+f 降 (t1)-f 降 (t0)-d Tcount ; When the initial temperature change state is cooling and the current temperature change state is heating, the current frequency compensation mode is determined to be V1=V0+f 升 (t1)-f 升 (t0)+d Tcount ; When the initial temperature change state is heating and the current temperature change state is heating, determine the current frequency compensation mode as When the initial temperature change state is cooling and the current temperature change state is cooling, determine the current frequency compensation mode as Among them, t1 is the temperature at the current moment, t0 is the temperature at the previous moment, V0 is the actual frequency compensation amount of the temperature at the previous moment t0, that is, the initial actual compensation amount, V1 is the frequency compensation amount of the temperature at the current moment t1, that is, the target frequency compensation amount, f 降 (t1) is the theoretical frequency compensation at temperature t1 in the cooling state, that is, the current theoretical compensation in the cooling state, f 降 (t0) is the theoretical frequency compensation at temperature t0 in the cooling state, that is, the initial theoretical compensation in the cooling state, f 升 (t1) is the theoretical frequency compensation value at temperature t1 in the heating state, that is, the current theoretical compensation value in the heating state, f 升 (t0) is the theoretical frequency compensation at temperature t0 in the heating state, that is, the initial theoretical compensation in the heating state, d Tcount It is the hysteresis related parameter, that is, the current hysteresis compensation amount.

2. The method according to claim 1, characterized in that The step of obtaining the target variable data and determining the target frequency compensation amount according to the target variable data and the corresponding relationship between the frequency compensation amount and the temperature also includes: Determining a corresponding relationship between a target temperature and a frequency drift according to the current temperature change state; According to the corresponding relationship between the current temperature and the target temperature and the frequency drift, the current frequency drift is obtained, and according to the current frequency drift, the current theoretical compensation amount is obtained; According to the corresponding relationship between the initial temperature, the target temperature and the frequency drift, an initial frequency drift is obtained, and according to the initial frequency drift, an initial theoretical compensation amount is obtained; Determining a current hysteresis compensation amount according to the temperature information and the preset time information; Get the initial actual compensation amount; The target variable data is determined according to the current theoretical compensation amount, the initial theoretical compensation amount, the initial actual compensation amount and the current hysteresis compensation amount.

3. The method according to claim 2, characterized in that The determining the corresponding relationship between the target temperature and the frequency drift according to the current temperature change state includes: According to the current temperature change state, the correspondence between temperature and frequency drift is searched in a temperature and frequency drift correspondence database to obtain the correspondence between target temperature and frequency drift, wherein the temperature and frequency drift correspondence database stores various temperature change states and corresponding temperature and frequency drift correspondences.

4. The method according to claim 2, characterized in that The determining of the current hysteresis compensation amount according to the temperature information and the preset time information includes: According to the temperature information and the preset time information, a current temperature change rate is obtained; According to the current temperature change rate, a current compensation time interval is obtained; A current hysteresis compensation amount is obtained according to the current compensation time interval.

5. The method according to claim 1, characterized in that The step of acquiring temperature information according to preset time information and determining a current temperature change state and a current temperature change speed according to the temperature information includes: Get preset time information; Acquire temperature data according to the preset time information, and record the number of acquisitions; When the acquisition times is greater than or equal to a preset threshold, obtaining temperature information according to the temperature data; According to the temperature information, obtaining the current temperature change; The current temperature change state is determined according to the current temperature change amount.

6. The method according to any one of claims 1 to 5, characterized in that The acquiring of temperature information and time information, and determining the current temperature change state according to the temperature information and time information, further comprises: Determine the test temperature information according to the preset temperature change state; Obtain frequency drift data corresponding to the test temperature information under each preset temperature change state; According to the test temperature information and the frequency drift data, the corresponding relationship between the temperature and the frequency drift under each preset temperature change state is obtained; According to the correspondence between temperature and frequency drift under the preset temperature change states, a temperature and frequency drift correspondence database is established, wherein the temperature and frequency drift correspondence database stores various temperature change states and corresponding temperature and frequency drift correspondences.

7. A frequency compensation device based on a crystal oscillator, characterized in that: The frequency compensation device based on the crystal oscillator comprises: An acquisition module, used to acquire temperature information according to preset time information, and determine a current temperature change state according to the temperature information; The acquisition module is further used to determine a current frequency compensation mode according to the current temperature change state and the initial temperature change state; The acquisition module is further used to acquire target variable data, and determine a target frequency compensation amount according to the target variable data and a current frequency compensation method, wherein the target variable data includes at least one of a current theoretical compensation amount, an initial theoretical compensation amount, an initial actual compensation amount, and a current hysteresis compensation amount; A compensation module, used for performing frequency compensation on a target to be compensated according to the target frequency compensation amount; The acquisition module is also used to determine that the current frequency compensation mode is V1=V0+f when the initial temperature change state is heating and the current temperature change state is cooling. 降 (y1)-f 降 (t0)-d Tcount ; When the initial temperature change state is cooling and the current temperature change state is heating, the current frequency compensation mode is determined to be V1=V0+f 升 (t1)-f 升 (t0)+d Tcount ; When the initial temperature change state is heating and the current temperature change state is heating, determine the current frequency compensation mode as When the initial temperature change state is cooling and the current temperature change state is cooling, determine the current frequency compensation mode as Among them, t1 is the temperature at the current moment, t0 is the temperature at the previous moment, V0 is the actual frequency compensation amount of the temperature at the previous moment t0, that is, the initial actual compensation amount, V1 is the frequency compensation amount of the temperature at the current moment t1, that is, the target compensation amount, f 降 (t1) is the theoretical frequency compensation at temperature t1 in the cooling state, that is, the current theoretical compensation in the cooling state, f 降 (t0) is the theoretical frequency compensation at temperature t0 in the cooling state, that is, the initial theoretical compensation in the cooling state, f 升 (t1) is the theoretical frequency compensation value at temperature t1 in the heating state, that is, the current theoretical compensation value in the heating state, f 升 (t0) is the theoretical frequency compensation at temperature t0 in the heating state, that is, the initial theoretical compensation in the heating state, d Tcount It is the hysteresis related parameter, that is, the current hysteresis compensation amount.

8. A frequency compensation device based on a crystal oscillator, characterized in that: The device includes: a memory, a processor, and a crystal oscillator-based frequency compensation program stored in the memory and executable on the processor, wherein the crystal oscillator-based frequency compensation program is configured to implement the steps of the crystal oscillator-based frequency compensation method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium stores a frequency compensation program based on a crystal oscillator, and when the frequency compensation program based on a crystal oscillator is executed by a processor, the steps of the frequency compensation method based on a crystal oscillator as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Temperature prediction method and temperature compensation method for oscillator

    JP2004172831A

  • Temperature compensating system

    JP2011097547A