Frequency correction circuit and terminal
By combining a temperature sensor and a calculation compensation circuit in the frequency correction circuit, the frequency offset of the crystal oscillator output is corrected, which solves the frequency inaccuracy problem caused by the crystal oscillator frequency drift and aging, and achieves accurate correction and stability of the clock frequency of multiple functional circuits. output.
Patent Information
- Application Number
- CN202310223556.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2024-08-30
AI Technical Summary
The frequency of the crystal oscillator output frequency shifts due to temperature changes, resulting in inaccurate clock frequency and affecting the working performance of the circuit. Especially at high temperatures, the frequency shift may reach 80ppm or higher. Existing technology cannot effectively correct the distortion caused by aging. Frequency offset.
Design a frequency correction circuit, including a clock generation circuit, a temperature sensor, a calculation circuit and a compensation circuit. By obtaining the actual frequency and temperature, the correction parameters are calculated, a control signal is generated, and the frequency output by the clock generation circuit is adjusted to ensure that the functional circuit receives The clock is a corrected clock and is subject to aging compensation based on usage time after mass production.
It effectively corrects the frequency deviation caused by temperature changes and aging, ensuring the accuracy of the clock frequency. It is suitable for situations where multiple functional circuits share the same clock generation circuit, and improves the working stability and accuracy of the circuit.
Smart Images

Figure CN118573152A
Abstract
Description
Technical Field
[0001] The present application relates to the field of circuit technology, and in particular to a frequency correction circuit and a terminal. Background Art
[0002] The frequency of the crystal oscillator output will change with the change of temperature. This phenomenon is called temperature drift, or temperature drift for short. Temperature drift may cause a large frequency offset, that is, there is a difference between the actual frequency output by the crystal oscillator and the reference frequency. For example, the frequency offset value may be between -40ppm (one millionth) and 40ppm. At high temperatures, the frequency offset value can reach 80ppm or even higher.
[0003] Therefore, based on the working mechanisms of different functional circuits, the clock frequency needs to be corrected. Summary of the invention
[0004] In order to solve the above technical problems, the present application provides a frequency correction circuit and a terminal, which correct the clock frequency output by the clock generation circuit so that the clock received by the functional circuit is a corrected second clock.
[0005] In a first aspect, the present application provides a frequency correction circuit, which includes a clock generation circuit, a temperature sensor, a calculation circuit, a compensation circuit, and a functional circuit; the calculation circuit is electrically connected to the functional circuit, the temperature sensor, and the compensation circuit, and the compensation circuit is also electrically connected to the clock generation circuit, and the clock generation circuit is also electrically connected to the functional circuit. The functional circuit is configured to receive a first clock at an actual temperature output by the clock generation circuit and work using the first clock. The calculation circuit is configured to obtain the actual frequency of the first clock and the actual temperature input by the temperature sensor, and calculate to obtain a first parameter. The compensation circuit is configured to obtain the first parameter and the current actual temperature input by the temperature sensor, and generate a control signal. The clock generation circuit is configured to obtain a control signal, and under the control of the control signal, input a corrected second clock to the functional circuit.
[0006] In the present application, a first parameter is obtained according to the actual frequency and the actual temperature by using a calculation circuit, and the first parameter is fed back to the compensation circuit. The compensation circuit calculates a control signal for correcting the clock frequency according to the first parameter and the current actual temperature, and inputs the control signal to the clock generation circuit. The clock generation circuit obtains a corrected second clock under the control of the control signal. Compared with the related art, the second clock output by the clock generation circuit is a frequency-corrected clock, rather than the clock output by the clock generation circuit after frequency correction, which is still the first clock without frequency correction.
[0007] In some possible implementations, there are multiple functional circuits, and the multiple functional circuits share the same clock generating circuit.
[0008] In the present application, a first parameter is obtained according to the actual frequency and the actual temperature by using a calculation circuit, and the first parameter is fed back to the compensation circuit. The compensation circuit calculates a control signal for correcting the clock frequency according to the first parameter and the current actual temperature, and inputs the control signal to the clock generation circuit. The clock generation circuit obtains a corrected second clock under the control of the control signal. In this way, the clocks received by multiple functional circuits sharing the same clock generation circuit are all the corrected second clocks. Compared with the related art, the present application can correct the clock frequency output by the clock generation circuit to ensure that the clock frequencies received by multiple functional circuits sharing the same clock generation circuit are all the corrected clock frequencies.
[0009] In some possible implementations, the multiple functional circuits include a target functional circuit. The calculation circuit is configured to obtain multiple actual frequencies determined by the target functional circuit; wherein, in a current time period, the operating time of the target functional circuit is greater than or equal to the operating time of other functional circuits in the multiple functional circuits. In this way, it can be ensured that the actual frequency of the target functional circuit with the longest current operating time is accurately corrected.
[0010] In some possible implementations, due to different working mechanisms, multiple functional circuits in the same functional system may have different requirements for the frequency offset of the clock. If the frequency correction circuit obtains the corrected second clock based on the actual frequency determined by the target functional circuit, then for the target functional circuit, the actual frequency of the second clock can meet the frequency offset required by the target functional circuit; for other functional circuits in the functional circuit except the target functional circuit, it can calculate the offset between the actual frequency of the second clock and the required frequency offset based on the first clock and the second clock, and then, for example, can use the offset to perform self-correction.
[0011] In some possible implementations, the plurality of functional circuits are cellular communication circuits; the target functional circuit is configured to determine the actual frequency of the first clock based on the clock frequency of the base station. Alternatively, the plurality of functional circuits are satellite communication circuits; the target functional circuit is configured to determine the actual frequency of the first clock based on the clock frequency of the satellite.
[0012] For example, the multiple functional circuits are cellular communication circuits, and the multiple cellular communication circuits have a mechanism for aligning frequency offset with the base station, and can timely track the clock frequency transmitted by the base station, and determine the actual frequency of the first clock based on the clock frequency of the base station.
[0013] For another example, the multiple functional circuits are satellite communication circuits, GNSS or BDS starts position positioning, and obtains the local first frequency offset, so that the actual frequency of the first clock is determined by the multiple functional circuits. Optionally, GNSS or BDS can periodically start position positioning at a certain interval to periodically obtain the frequency offset of the local first clock.
[0014] In some possible implementations, the calculation circuit is configured to obtain the first parameter based on the received actual frequency and actual temperature, and a preset frequency-temperature correspondence relationship. The compensation circuit is configured to obtain the control signal based on the first parameter and the current actual temperature, and a preset frequency-control signal correspondence relationship.
[0015] Specifically, the compensation circuit includes a parameter storage circuit and a voltage generating circuit, and the control signal is a control voltage. The parameter storage circuit is configured to obtain a first parameter, and obtain a second parameter through the first parameter, the frequency-temperature correspondence, and the frequency-control signal correspondence; the voltage generating circuit is configured to obtain the second parameter, and obtain the control voltage according to the second parameter, the current actual temperature, the frequency-temperature correspondence, and the frequency-control signal correspondence.
[0016] In some possible implementations, the frequency-temperature correspondence includes a frequency-temperature characteristic formula. The calculation circuit is configured to obtain the first parameter according to the obtained multiple actual frequencies and multiple actual temperatures, the preset reference temperature and its corresponding reference frequency, and the frequency-temperature characteristic formula.
[0017] In some possible implementations, the frequency-control signal correspondence includes a clock frequency-voltage formula. The compensation circuit is configured to obtain the control voltage according to the first parameter and the current actual temperature, a preset reference temperature, and the clock frequency-voltage formula.
[0018] Optionally, the frequency-temperature characteristic formula is used to express the relationship between the clock output by the clock generating circuit and the temperature of the clock generating circuit. For example, if the clock generating circuit is a crystal oscillator, and the material of the crystal in the crystal oscillator is a quartz crystal with different cut faces, the relationship between the frequency of the clock generating circuit and the actual temperature is different for quartz crystals with different cut faces. For example, if the crystal is an AT-cut quartz crystal, the frequency-temperature characteristic formula of the clock generating circuit can be approximated by a polynomial, such as a quadratic polynomial, a cubic polynomial, a quintic polynomial, etc.
[0019] Taking the frequency-temperature characteristic formula as a cubic curve polynomial as an example, the frequency-temperature characteristic formula is The clock frequency-voltage formula is Among them, A3, A1, A0 are first parameters, and A3, A1, A0 are all constants; f0 represents the reference frequency; Δf represents the difference between the reference frequency and multiple actual frequencies; T represents multiple actual temperatures and the current actual temperature; T0 represents the reference temperature; α is a constant; B3, B1, B0 are second parameters, and B3, B1, B0 are all constants.
[0020] In some possible implementations, the voltage generating circuit includes a tertiary voltage generating circuit, a linear voltage generating circuit, and an adder; the second parameter includes a first sub-parameter, a second sub-parameter, and a third sub-parameter. The parameter storage circuit is configured to input the first sub-parameter into the tertiary voltage generating circuit, the second sub-parameter into the linear voltage generating circuit, and the third sub-parameter into the tertiary voltage generating circuit, or the linear voltage generating circuit, or the adder. The tertiary voltage generating circuit is configured to calculate B3(T-T0) in the clock frequency-voltage formula based on the current actual temperature, the reference temperature, and the first sub-parameter. 3 The linear voltage generating circuit is configured to calculate the second result of B1(T-T0) in the clock frequency-voltage formula according to the current actual temperature, the reference temperature, and the second sub-parameter, and input the second result, or the second result and the third sub-parameter to the adder. The adder is configured to add the received first result, the second result, and the third sub-parameter to obtain the control voltage.
[0021] The third voltage generation circuit can be implemented by a differential amplifier or a multiplier. For example, a differential amplifier can be used to perform (T-T0) on (T-T0). 2 times to obtain (T-T0) 3 Or, a multiplier may be used to multiply the three (T-T0). Of course, the tertiary voltage generating circuit may also be implemented using other circuits, which is not limited in this application.
[0022] In some possible implementations, the tertiary voltage generating circuit includes a first voltage generating circuit and a second voltage generating circuit. If the current actual temperature is greater than or equal to the reference temperature, the first voltage generating circuit is configured to obtain a first result that is a positive value or 0 according to the current actual temperature, the reference temperature, and the first sub-parameter; and the second voltage generating circuit does not work. If the current actual temperature is less than the reference temperature, the second voltage generating circuit is configured to obtain a first result that is a negative value according to the current actual temperature, the reference temperature, and the first sub-parameter; and the first voltage generating circuit does not work.
[0023] By distinguishing the first voltage generating circuit and the second voltage generating circuit, the first voltage generating circuit is used to calculate and obtain a first result which is a positive value or 0, and the second voltage generating circuit is used to calculate and obtain a second result which is a negative value.
[0024] In some possible implementations, the output frequency of the clock generating circuit is not only related to the temperature of the clock generating circuit, but also changes as the clock generating circuit is used for a period of time. This phenomenon is called aging.
[0025] The solutions proposed in the related art all solve the problem of frequency offset based on the temperature of the clock generation circuit according to different circuit structures. For example, a temperature sensor is used to detect the actual temperature of the clock generation circuit, and the compensation circuit generates a control voltage according to the actual temperature of the clock generation circuit. The clock generation circuit obtains the control voltage to correct the clock frequency and inputs the frequency-corrected clock to the communication circuit. This solution cannot compensate for the frequency offset caused by aging after the terminal leaves the factory.
[0026] Based on this, the calculation circuit of the present application is also configured to obtain the first parameter of the frequency-temperature characteristic formula according to the total use time of the clock generation circuit and the preset aging formula. In this way, after mass production, the frequency offset caused by aging can be corrected based on the total use time of the clock generation circuit.
[0027] In some possible implementations, the clock generation circuit is integrated on a first chip, the functional circuit is integrated on a second chip, the calculation circuit is integrated on a third chip, and the compensation circuit and the temperature sensor are integrated on a fourth chip. The first chip, the second chip, the third chip, and the fourth chip can all be arranged on the same circuit board. In order to facilitate the temperature sensor to detect the actual temperature of the clock generation circuit, the fourth chip provided with the temperature sensor can be arranged close to the first chip provided with the clock generation circuit.
[0028] Furthermore, the first chip and the fourth chip are the same chip, that is, the clock oscillator, the compensation circuit and the temperature sensor are integrated on the same chip.
[0029] In a second aspect, the present application provides a terminal, which includes a circuit board and the frequency correction circuit described in the first aspect, and the frequency correction circuit is arranged on the circuit board.
[0030] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.
[0031] In a third aspect, the present application also provides a frequency correction system, including a clock generation module, a temperature sensor, a calculation unit, a compensation module, and a functional module; the functional module is used to receive a first clock at an actual temperature output by a clock generation circuit and work using the first clock. The calculation unit is used to obtain the actual frequency of the first clock and the actual temperature input by the temperature sensor, and calculate the first parameter. The compensation module is used to obtain the first parameter and the current actual temperature input by the temperature sensor, and generate a control signal. The clock generation module is used to obtain a control signal, and under the control of the control signal, input the corrected second clock to the functional circuit.
[0032] In some possible implementations, there are multiple functional modules, and the multiple functional modules share the same clock generation module.
[0033] In some possible implementations, the plurality of functional modules include a target functional module. The calculation unit is configured to obtain an actual frequency determined by the target functional module. In the current time period, the working time of the target functional module is greater than or equal to the working time of other functional modules in the plurality of functional modules.
[0034] In some possible implementations, the plurality of functional modules are all cellular communication modules; the target functional module is used to determine the actual frequency of the first clock based on the clock frequency of the base station. Alternatively, the plurality of functional modules are all satellite communication modules; the target functional module is used to determine the actual frequency of the first clock based on the clock frequency of the satellite.
[0035] In some possible implementations, the calculation unit is used to obtain the first parameter according to the actual frequency and actual temperature obtained, and the preset frequency-temperature correspondence relationship. The compensation module is used to obtain the control signal according to the first parameter and the current actual temperature, and the preset frequency-control signal correspondence relationship.
[0036] In some possible implementations, the compensation module includes a parameter storage module and a voltage generation module, and the control signal is a control voltage. The parameter storage module is used to obtain a first parameter, and obtain a second parameter through the first parameter, the frequency-temperature correspondence, and the frequency-control signal correspondence; the voltage generation module is used to obtain the second parameter, and obtain the control voltage according to the second parameter, the current actual temperature, the frequency-temperature correspondence, and the frequency-control signal correspondence.
[0037] In some possible implementations, the frequency-temperature correspondence includes a frequency-temperature characteristic formula, and the frequency-control signal correspondence includes a clock frequency-voltage formula. The frequency-temperature characteristic formula is The clock frequency-voltage formula is Among them, A3, A1, A0 are first parameters, and A3, A1, A0 are all constants; f0 represents the reference frequency; Δf represents the difference between the reference frequency and multiple actual frequencies; T represents multiple actual temperatures and the current actual temperature; T0 represents the reference temperature; α is a constant; B3, B1, B0 are second parameters, and B3, B1, B0 are all constants.
[0038] In some possible implementations, the voltage generation module includes a tertiary voltage generation module, a linear voltage generation module, and an adder; the second parameter includes a first sub-parameter, a second sub-parameter, and a third sub-parameter. The parameter storage module is used to send the first sub-parameter to the tertiary voltage generation module, send the second sub-parameter to the linear voltage generation module, and send the third sub-parameter to the tertiary voltage generation module, or the linear voltage generation module, or the adder.
[0039] The tertiary voltage generation module is configured to calculate B3(T-T0) in the clock frequency-voltage formula according to the current actual temperature, the reference temperature, and the first sub-parameter. 3 The linear voltage generating module is configured to calculate the second result of B1(T-T0) in the clock frequency-voltage formula according to the current actual temperature, the reference temperature, and the second sub-parameter, and send the second result, or the second result and the third sub-parameter to the adder. The adder is configured to add the received first result, the second result, and the third sub-parameter to obtain the control voltage.
[0040] In some possible implementations, the tertiary voltage generation module includes a first voltage generation module and a second voltage generation module. If the current actual temperature is greater than or equal to the reference temperature, the first voltage generation module is configured to obtain a first result based on the current actual temperature, the reference temperature, and the first sub-parameter; the second voltage generation module does not work. If the current actual temperature is less than the reference temperature, the second voltage generation module is configured to obtain a first result based on the current actual temperature, the reference temperature, and the first sub-parameter; the first voltage generation module does not work.
[0041] In some possible implementations, the calculation unit is further used to obtain a first parameter of the frequency-temperature characteristic formula according to the total usage time of the clock generation module and a preset aging formula.
[0042] The calculation unit of the third aspect is equivalent to the calculation circuit of the first aspect, the clock generation module of the third aspect is equivalent to the clock generation circuit of the first aspect, the compensation module of the third aspect is equivalent to the compensation circuit of the first aspect, the functional circuit of the third aspect is equivalent to the functional module of the first aspect, the cellular communication module of the third aspect is equivalent to the cellular communication circuit of the first aspect, the satellite communication module of the third aspect is equivalent to the satellite communication circuit of the first aspect, the parameter storage module of the third aspect is equivalent to the parameter storage circuit of the first aspect, the voltage generating circuit of the third aspect is equivalent to the voltage generating module of the first aspect, the tertiary voltage generating module of the third aspect is equivalent to the tertiary voltage generating circuit of the first aspect, the linear voltage generating module of the third aspect is equivalent to the linear voltage generating circuit of the first aspect, the first voltage generating circuit of the third aspect is equivalent to the first voltage generating module of the first aspect, and the second voltage generating circuit of the third aspect is equivalent to the second voltage generating module of the first aspect.
[0043] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, and the explanations corresponding to the third aspect and any implementation of the third aspect can refer to the explanations corresponding to the first aspect in the specific implementation below, which will not be repeated here.
[0044] In a fourth aspect, the present application provides a frequency correction method, which is applied to a frequency correction device, wherein the frequency correction device includes a clock generation module, a temperature sensor, a calculation unit, a compensation module, and a functional module; the frequency correction method includes: using the functional module to receive a first clock at an actual temperature output by a clock generation circuit, and using the first clock to work. Using the calculation unit to obtain the actual frequency of the first clock and the actual temperature input by the temperature sensor, and calculate the first parameter. Using the compensation module to obtain the first parameter and the current actual temperature input by the temperature sensor, and generate a control signal. The control signal is obtained through the clock generation circuit, and under the control of the control signal, the corrected second clock is input to the functional circuit.
[0045] In some possible implementations, there are multiple functional modules, and the multiple functional modules share the same clock generation module.
[0046] In some possible implementations, the multiple functional modules include a target functional module. Using a computing unit to obtain the actual frequency of the first clock includes: using the computing unit to obtain the actual frequency determined by the target functional module. In the current time period, the working time of the target functional module is greater than or equal to the working time of other functional modules in the multiple functional modules.
[0047] In some possible implementations, the plurality of functional modules are all cellular communication modules; using the calculation unit to obtain the actual frequency determined by the target functional module includes: using the target functional module to determine the actual frequency of the first clock based on the clock frequency of the base station. Alternatively, the plurality of functional modules are all satellite communication modules; using the calculation unit to obtain the actual frequency determined by the target functional module includes: using the target functional module to determine the actual frequency of the first clock based on the clock frequency of the satellite.
[0048] In some possible implementations, the actual frequency of the first clock and the actual temperature input by the temperature sensor are obtained by a calculation unit, and the first parameter is calculated, including: the first parameter is obtained by the calculation unit according to the actual frequency and actual temperature obtained, and a preset frequency-temperature correspondence relationship. The first parameter and the current actual temperature input by the temperature sensor are obtained by a compensation module, and a control signal is generated, including: the control signal is obtained by the compensation module according to the first parameter and the current actual temperature, and a preset frequency-control signal correspondence relationship.
[0049] In some possible implementations, the compensation module includes a parameter storage module and a voltage generation module, and the control signal is a control voltage. The compensation module is used to obtain the control signal according to the first parameter and the current actual temperature, and the preset frequency-control signal correspondence, including: using the parameter storage module to obtain the first parameter, and obtaining the second parameter through the first parameter, the frequency-temperature correspondence, and the frequency-control signal correspondence. The voltage generation module is used to obtain the second parameter, and the control voltage is obtained according to the second parameter, the current actual temperature, the frequency-temperature correspondence, and the frequency-control signal correspondence.
[0050] In some possible implementations, the frequency-temperature correspondence includes a frequency-temperature characteristic formula, and the frequency-control signal correspondence includes a clock frequency-voltage formula. The frequency-temperature characteristic formula is The clock frequency-voltage formula is Among them, A3, A1, A0 are first parameters, and A3, A1, A0 are all constants; f0 represents the reference frequency; Δf represents the difference between the reference frequency and multiple actual frequencies; T represents multiple actual temperatures and the current actual temperature; T0 represents the reference temperature; α is a constant; B3, B1, B0 are second parameters, and B3, B1, B0 are all constants.
[0051] In some possible implementations, the voltage generating module includes a tertiary voltage generating module, a linear voltage generating module, and an adder; the second parameter includes a first sub-parameter, a second sub-parameter, and a third sub-parameter.
[0052] The second parameter is obtained by using the voltage generation module, and the control voltage is obtained according to the second parameter, the current actual temperature, the frequency-temperature correspondence, and the frequency-control signal correspondence, including: using the parameter storage module to send the first sub-parameter to the tertiary voltage generation module, the second sub-parameter to the linear voltage generation module, and the third sub-parameter to the tertiary voltage generation module, or the linear voltage generation module, or the adder. The second parameter is obtained by using the voltage generation module, and the control voltage is obtained according to the second parameter, the current actual temperature, the reference temperature, the frequency-temperature characteristic formula, and the clock frequency-voltage formula, including: using the parameter storage module to send the first sub-parameter to the tertiary voltage generation module, the second sub-parameter to the linear voltage generation module, and the third sub-parameter to the tertiary voltage generation module, or the linear voltage generation module, or the adder. The tertiary voltage generation module calculates B3(T-T0) in the clock frequency-voltage formula according to the current actual temperature, the reference temperature, and the first sub-parameter. 3 The first result of the clock frequency-voltage formula is calculated by the linear voltage generation module according to the current actual temperature, the reference temperature, and the second sub-parameter, and the second result, or the second result and the third sub-parameter are sent to the adder. The first result, the second result, and the third sub-parameter received are added by the adder to obtain the control voltage.
[0053] In some possible implementations, the tertiary voltage generation module includes a first voltage generation module and a second voltage generation module. If the current actual temperature is greater than or equal to the reference temperature, the first voltage generation module is configured to obtain a first result based on the current actual temperature, the reference temperature, and the first sub-parameter; the second voltage generation module does not work. If the current actual temperature is less than the reference temperature, the second voltage generation module is configured to obtain a first result based on the current actual temperature, the reference temperature, and the first sub-parameter; the first voltage generation module does not work.
[0054] In some possible implementations, the frequency correction method further includes: a calculation unit obtains a first parameter of the frequency-temperature characteristic formula according to the total usage time of the clock generation module and a preset aging formula.
[0055] The clock generating module of the fourth aspect is equivalent to the clock generating circuit of the first aspect, the calculating unit of the fourth aspect is equivalent to the calculating circuit of the first aspect, the compensation module of the fourth aspect is equivalent to the compensation circuit of the first aspect, the functional circuit of the fourth aspect is equivalent to the multiple functional modules of the first aspect, the cellular communication module of the fourth aspect is equivalent to the cellular communication circuit of the first aspect, the satellite communication module of the fourth aspect is equivalent to the satellite communication circuit of the first aspect, the parameter storage module of the fourth aspect is equivalent to the parameter storage circuit of the first aspect, the voltage generating circuit of the fourth aspect is equivalent to the voltage generating module of the first aspect, the tertiary voltage generating module of the fourth aspect is equivalent to the tertiary voltage generating circuit of the first aspect, the linear voltage generating module of the fourth aspect is equivalent to the linear voltage generating circuit of the first aspect, the first voltage generating circuit of the fourth aspect is equivalent to the first voltage generating module of the first aspect, and the second voltage generating circuit of the fourth aspect is equivalent to the second voltage generating module of the first aspect.
[0056] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, and the explanations corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the explanations corresponding to the first aspect in the specific implementation below, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 An interaction diagram between a base station and a mobile phone provided in an embodiment of the present application;
[0058] Figure 2a A schematic diagram of sending and receiving signals by a communication circuit in a mobile phone provided in an embodiment of the present application;
[0059] Figure 2b A schematic diagram of the operation of multiple communication circuits in the same communication system provided by an embodiment of the present application;
[0060] Figure 3 A schematic diagram of frequency correction provided for the related technology of this application;
[0061] Figure 4a A connection diagram of various circuits in a frequency correction circuit provided in an embodiment of the present application;
[0062] Figure 4b A connection diagram of various circuits in another frequency correction circuit provided in an embodiment of the present application;
[0063] Figure 5a A connection diagram of various circuits in another frequency correction circuit provided in an embodiment of the present application;
[0064] Figure 5b A diagram showing the connection relationship between each circuit in a compensation circuit, a temperature sensor and a clock generation circuit provided in an embodiment of the present application;
[0065] Figure 5c A diagram showing the connection relationship between each circuit in another compensation circuit provided in an embodiment of the present application and a temperature sensor and a clock generating circuit;
[0066] Figure 5d A diagram showing the connection relationship between each circuit, a temperature sensor and a clock generating circuit in another compensation circuit provided in an embodiment of the present application;
[0067] Figure 5e A diagram showing the connection relationship between each circuit, a temperature sensor and a clock generating circuit in another compensation circuit provided in an embodiment of the present application;
[0068] Figure 6a A connection diagram of various circuits in another frequency correction circuit provided in an embodiment of the present application;
[0069] Figure 6b A diagram showing the connection relationship between each circuit, a temperature sensor and a clock generating circuit in another compensation circuit provided in an embodiment of the present application;
[0070] Figure 6c A connection diagram of various circuits in another compensation circuit provided in an embodiment of the present application, and a temperature sensor and a clock generation circuit.
[0071] Reference numerals:
[0072] 11-clock generating circuit; 12-functional circuit; 13-calculating circuit; 14-temperature sensor; 15-compensation circuit; 151-parameter storage circuit; 152-voltage generating circuit; 1521-tertiary voltage generating circuit; 1522-linear voltage generating circuit; 1523-adder; 1524-secondary voltage generating circuit. DETAILED DESCRIPTION
[0073] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0074] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0075] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.
[0076] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0077] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.
[0078] The embodiment of the present application provides a terminal, which may be a device that requires a clock signal, such as a consumer electronic product, a home electronic product, a vehicle-mounted electronic product, a communication electronic product, etc. The clock generation circuit may be a crystal oscillator (e.g., a quartz crystal oscillator), a micro-electro-mechanical system (MEMS) crystal oscillator, a voltage controlled oscillator (VCO), etc. For example, the clock generation circuit may include a crystal (XO) and a clock oscillator, and the clock oscillator may power the crystal to cause the crystal to oscillate to generate a clock.
[0079] Consumer electronic products include mobile phones, tablet computers, laptops, personal computers (PCs), personal digital assistants (PDAs), smart wearable products (e.g., smart watches, smart bracelets, etc.), virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, drones, etc. Home electronic products include smart door locks, TVs, smart speakers, etc. Car electronic products include car displays, etc. Communication electronic products include memory, base stations and other communication equipment that contain clock generation circuits.
[0080] Taking a mobile phone as an example, the mobile phone includes multiple functional systems, such as a communication system, a storage system, an audio and video system, etc. The clock generation circuit can provide clock signals for each system. Usually, each functional circuit in the same system shares the same clock generation circuit so that each functional circuit in the same system can maintain synchronization. For the convenience of description, the following description takes the communication system as an example unless otherwise specified.
[0081] For example, the communication system may include communication circuits such as second generation (2G) mobile communication, third generation (3G) mobile communication, fourth generation (4G), fifth generation (5G) mobile communication, etc. The 2G cellular communication circuit, 3G cellular communication circuit, 4G cellular communication circuit, and 5G cellular communication circuit in the same communication system may share the same clock generation circuit so that the local frequency of the cellular communication circuit is consistent with the frequency of the base station.
[0082] 2G mobile communications include the global system for mobile communications (GSM) and wideband code division multiple access (WCDMA). 3G mobile communications include code division multiple access 2000 (CDMA2000). 4G mobile communications include long term evolution (LTE). 5G mobile communications include cellular communication circuits such as new radio (NR).
[0083] like Figure 1 As shown, in different application scenarios, the mobile phone can communicate with the base station through the above-mentioned 2G cellular communication circuit, 3G cellular communication circuit, 4G cellular communication circuit, 5G cellular communication circuit, etc.
[0084] like Figure 2a As shown, the mobile phone also includes an antenna, a receiver, and a transmitter. In different application scenarios, the above-mentioned 2G cellular communication circuit, 3G cellular communication circuit, 4G cellular communication circuit, 5G cellular communication circuit, etc. can obtain the signal sent from the base station through the antenna and the receiver; the above-mentioned 2G cellular communication circuit, 3G cellular communication circuit, 4G cellular communication circuit, 5G cellular communication circuit, etc. can transmit signals to the base station through the antenna and the transmitter.
[0085] like Figure 2bAs shown, taking the mobile phone working in LTE mode as an example, the mobile phone receives the RF signal sent by the base station through the antenna, and the antenna sends the received RF signal to the receiver. After receiving the RF signal, the receiver uses a filter to filter the RF signal based on the frequency band required for LTE communication to obtain a RF signal in the first frequency band; then, the receiver amplifies, mixes, and processes the RF signal in the first frequency band to obtain a first baseband signal; then, the receiver converts the first baseband signal in the form of an analog signal into the first baseband signal in the form of a digital signal, and inputs the first baseband signal in the form of a digital signal to the LTE communication circuit.
[0086] Or, if Figure 2b As shown, taking the mobile phone working in NR mode as an example, the mobile phone receives the RF signal sent by the base station through the antenna, and the antenna sends the received RF signal to the receiver. After the receiver receives the RF signal, based on the frequency band required for NR communication, the RF signal is filtered by a filter to obtain an RF signal with a frequency band in the second frequency band; then, the receiver amplifies, mixes, and processes the RF signal with a frequency band in the second frequency band to obtain a second baseband signal; then, the receiver converts the first baseband signal in the form of an analog signal into the first baseband signal in the form of a digital signal, and inputs the second baseband signal into the NR circuit.
[0087] The above article briefly introduces the communication method between the cellular communication circuit and the base station by taking the LTE communication circuit and the NR communication circuit as examples. In some possible implementation methods, the communication method of the mobile phone is not limited to mobile communication, but also satellite communication. For example, satellite communication is achieved through the global navigation satellite system (GNSS), Beidou navigation satellite system (BDS), etc.
[0088] However, the frequency output by the clock generation circuit will change with the change of temperature. This phenomenon is called temperature drift, or temperature drift for short. Temperature drift may cause a large frequency offset, that is, there is a difference between the actual frequency output by the clock generation circuit and the reference frequency. For example, the frequency offset value may be between -40ppm (one part per million) and 40ppm. At high temperatures, the frequency offset value can reach 80ppm or even higher. Therefore, based on the working mechanism of different communication circuits, the clock frequency needs to be corrected.
[0089] In this regard, Figure 3As shown, the related technology proposes the following solution: the communication circuit receives the clock (clock, CLK) output by the clock generating circuit, the temperature sensor detects the actual temperature of the clock generating circuit, the calculation circuit obtains the actual frequency of the clock and the temperature detected by the temperature sensor, and calculates the compensation frequency, and inputs the compensation frequency into the communication circuit.
[0090] However, in this solution, a computing circuit is used to perform frequency correction on a communication circuit, and the clock frequency output by the clock generating circuit is not corrected. The clock output by the clock generating circuit still has a frequency offset problem caused by temperature.
[0091] Based on this, Figure 4a As shown, an embodiment of the present application provides a frequency correction circuit, which can be set on a circuit board of a terminal. In addition to the clock generation circuit 11, the frequency correction circuit also includes a temperature sensor 14, a calculation circuit 13, a compensation circuit 15, and a functional circuit 12. The clock generation circuit 11 can be integrated on the first chip. Taking the clock generation circuit 11 as a crystal oscillator as an example, the crystal of the crystal oscillator can be set on the circuit board, and the clock oscillator of the crystal oscillator is integrated on the first chip.
[0092] The calculation circuit 13 is electrically connected to the functional circuit 12 , the temperature sensor 14 , and the compensation circuit 15 . The compensation circuit 15 is also electrically connected to the clock generation circuit 11 . The clock generation circuit 11 is also electrically connected to the functional circuit 12 .
[0093] The functional circuit 12 is configured to receive the first clock at the actual temperature input by the clock generating circuit 11 and work using the first clock. The functional circuit 12 can be integrated on the second chip.
[0094] The calculation circuit 13 is configured to obtain the actual frequency of the first clock and the actual temperature input by the temperature sensor 14, and calculate the first parameter. The calculation circuit 13 can be integrated on the third chip.
[0095] The compensation circuit 15 is configured to obtain the first parameter and the current actual temperature input by the temperature sensor 14 and generate a control signal. The compensation circuit 15 and the temperature sensor 14 can be integrated on the same fourth chip.
[0096] On this basis, the first chip integrated with the clock generating circuit 11 can be the same chip as the fourth chip integrated with the compensation circuit 15 and the temperature sensor 14, that is, the clock generating circuit 11, the temperature sensor 14, and the compensation circuit 15 are integrated on the same chip. Among them, in the case where the clock generating circuit 11 is a crystal oscillator, the position of the fourth chip on the circuit board can be set close to the crystal, so that the temperature sensor 14 can detect the actual temperature of the crystal. Alternatively, the temperature sensor 14 can be directly set on the circuit board and set close to the crystal, rather than being integrated on the fourth chip of the circuit board.
[0097] The clock generating circuit 11 is configured to obtain a control signal, and under the control of the control signal, input the corrected second clock to the functional circuit 12. For different clock generating circuits 11, the control signal driving different clock generating circuits 11 to output the second clock is different. Taking the clock generating circuit 11 as a crystal oscillator as an example, the control signal can be a control voltage.
[0098] On this basis, in order to facilitate the temperature sensor 14 to detect the actual temperature of the crystal, optionally, the temperature sensor 14 can be integrated with the crystal on the same chip.
[0099] In the present application, the calculation circuit 13 is used to obtain the first parameter according to the actual frequency and the actual temperature, and the first parameter is fed back to the compensation circuit 15. The compensation circuit 15 calculates the control signal for correcting the clock frequency according to the first parameter and the current actual temperature, and inputs the control signal to the clock generation circuit 11. The clock generation circuit 11 obtains the corrected second clock under the control of the control signal. Compared with the related art, the second clock output by the clock generation circuit 11 is the clock after frequency correction, rather than the clock output by the clock generation circuit 11 after frequency correction, which is still the first clock without frequency correction.
[0100] In some possible implementations, the temperature sensor 14 may be used to detect the actual temperature of the crystal. The temperature sensor 14 may detect the actual temperature of the clock generating circuit 11 in real time; or, the temperature sensor 14 may periodically detect the actual temperature of the clock generating circuit 11 at certain intervals. Taking the clock generating circuit 11 as a crystal oscillator as an example, the actual temperature or current actual temperature of the clock generating circuit 11 detected by the temperature sensor 14 may be the actual temperature or current actual temperature of the crystal detected by the temperature sensor 14.
[0101] In some embodiments, Figure 4bAs shown, there are multiple functional circuits 12, and the multiple functional circuits 12 share the same clock generating circuit 11. Those skilled in the art should know that the reason why the same clock generating circuit 11 can input the first clock or the second clock to the multiple functional circuits 12 is that the multiple functional circuits 12 are the same functional system and share the same clock generating circuit 11.
[0102] Since the communication mechanisms of the multiple communication circuits are different, the frequency offset requirements of the clock generating circuit 11 are different. If multiple communication circuits are to share the same clock generating circuit 11, the clock frequency needs to be corrected.
[0103] Regarding the related art, a calculation circuit 13 is used to perform frequency correction on a communication circuit, and the clock frequency output by the clock generation circuit 11 is not corrected. Therefore, other communication circuits that also receive the clock output by the clock generation circuit 11 still have a frequency offset problem.
[0104] As for the solution of the embodiment of the present application, since the calculation circuit 13 and the compensation circuit 15 feed back the corrected control signal to the clock generation circuit 11, the clock generation circuit 11 can input the corrected second clock to the multiple functional circuits 12 under the control of the control signal. In this way, the clocks received by the multiple functional circuits 12 sharing the same clock generation circuit 11 are all the corrected second clocks. Compared with the related art, the present application can correct the clock frequency output by the clock generation circuit 11 to ensure that the clock frequencies received by the multiple functional circuits 12 sharing the same clock generation circuit 11 are all the corrected clock frequencies.
[0105] In some possible implementations, the multiple functional circuits 12 may belong to the same functional system, which may be, for example, the aforementioned communication system, storage system, audio and video system, etc. Taking the functional system as a communication system as an example, the multiple functional circuits 12 may be the aforementioned 2G cellular communication circuit, 3G cellular communication circuit, 4G cellular communication circuit, 5G cellular communication circuit, etc.
[0106] In some possible implementations, the actual frequency of the first clock may be determined by the functional circuit 12 .
[0107] For example, multiple functional circuits 12 are cellular communication circuits, and multiple cellular communication circuits have a mechanism for aligning frequency offsets with the base station, which can timely track the clock frequency transmitted by the base station, and determine multiple actual frequencies of multiple first clocks based on the clock frequency of the base station.
[0108] For another example, the multiple functional circuits 12 are satellite communication circuits, and the GNSS or BDS starts the position positioning and obtains the local first frequency offset, so that the actual frequency of the first clock is determined by the multiple functional circuits 12. Optionally, the GNSS or BDS can periodically start the position positioning at a certain interval to periodically obtain the frequency offset of the local first clock.
[0109] In some embodiments, the calculation circuit 13 is configured to obtain the first parameter according to the acquired actual frequency and actual temperature, and a preset frequency-temperature correspondence relationship.
[0110] In some possible implementations, the frequency-temperature correspondence may include a frequency-temperature (fT) characteristic formula, or a lookup table for characterizing the correspondence between the actual frequency and the first parameter.
[0111] Optionally, the calculation circuit 13 calculates the first parameter according to a preset frequency-temperature characteristic formula, and the frequency-temperature characteristic formula is used to express the relationship between the clock output by the clock generating circuit 11 and the temperature of the clock generating circuit 11. Taking the material of the clock generating circuit 11 as quartz crystals with different cut faces as an example, the relationship between the frequency and the actual temperature of the clock generating circuit 11 is different for quartz crystals with different cut faces. For example, taking the crystal as an AT-cut quartz crystal as an example, the frequency-temperature characteristic formula of the clock generating circuit 11 can be approximately expressed by a polynomial, such as a quadratic polynomial, a cubic polynomial, a quintic polynomial, etc.
[0112] For example, after the calculation circuit 13 obtains multiple actual temperatures and multiple actual frequencies of multiple first clocks corresponding to the multiple actual temperatures, it can calculate the first parameter for correcting the frequency of the clock generating circuit 11 according to the frequency-temperature characteristic formula, multiple actual temperatures, and multiple actual frequencies.
[0113] The temperature values of the above multiple actual temperatures are all different. The actual temperatures of the clock generating circuit 11 are different, and the frequencies of the first clocks output by the clock generating circuit 11 are also different. The actual temperatures of the clock generating circuit 11 correspond to the actual frequencies of the first clocks.
[0114] Optionally, the calculation circuit 13 calculates the first parameter according to a preset lookup table, which is used to characterize the correspondence between the actual frequency at the actual temperature and the first parameter. The calculation circuit 13 obtains the actual frequency input by the target function circuit 12 and can obtain the first parameter according to the lookup table.
[0115] In some embodiments, the compensation circuit 15 is configured to obtain a control signal according to the first parameter and the current actual temperature, and a preset frequency-control signal correspondence relationship.
[0116] In some possible implementations, the frequency-control signal correspondence may include a clock frequency-control signal formula, or a lookup table for characterizing the correspondence between the frequency and the control signal, etc.
[0117] Optionally, the clock frequency-control signal formula may indicate the relationship between the frequency and the control signal in different application scenarios of the clock generation circuit 11. The control signal may be, for example, a control voltage.
[0118] For example, the compensation circuit 15 obtains the control voltage according to the first parameter and the current actual temperature, as well as the preset reference temperature and the clock frequency-voltage formula.
[0119] Optionally, the compensation circuit 15 calculates the control signal according to a preset lookup table, which is used to characterize the correspondence between the frequency and the control signal. The compensation circuit 15 obtains the first parameter input by the calculation circuit 13 and the frequency-temperature correspondence, and can obtain the second parameter according to the lookup table.
[0120] The following describes the working process of the calculation circuit 13 and the compensation circuit 15 by taking the frequency-temperature correspondence relationship as the frequency-temperature characteristic formula, the frequency-control signal correspondence relationship as the clock frequency-control signal formula, the clock generating circuit 11 as a crystal oscillator, and the frequency-temperature characteristic formula as a cubic curve formula and a quadratic curve formula as examples:
[0121] In the first case, the expression of the cubic curve polynomial can be The relative frequency change caused by temperature drift can be expressed by the absolute frequency offset value Δf and the preset reference frequency f0, and the relative frequency change = Δf / f0, in ppm. The absolute frequency offset value Δf is determined by the actual frequency f and the preset reference frequency f0, Δf = f-f0. At the preset reference temperature T0, the reference frequency of the clock generating circuit 11 is f0; at the temperature T, the actual frequency of the clock generating circuit 11 is f. When the absolute frequency offset value Δf≠0, the reference temperature T0 is different from the actual temperature T. A3, A1, and A0 are all first parameters.
[0122] It should be understood that in order to solve the first parameters A3, A1, and A0, the multiple actual temperatures should include at least three different actual temperature values, and at least three actual frequencies of at least three first clocks at at least three different actual temperatures. For the convenience of description, the following description is given by taking the multiple actual temperatures including three different actual temperatures T1, T2, and T3, and the three actual frequencies f1, f2, and f3 of the three first clocks at the three different actual temperatures T1, T2, and T3 as an example. Among them, the temperature values of the three actual temperatures T1, T2, and T3 are not equal to the temperature value of the reference temperature T0, and the frequency values of the three actual frequencies f1, f2, and f3 are not equal to the frequency value of the reference frequency f0.
[0123] The calculation circuit 13 calculates the values of the first parameters A3, A1, and A0 respectively according to three actual temperatures T1, T2, and T3, three actual frequencies f1, f2, and f3, a reference temperature T0, a reference frequency f0, and a frequency-temperature characteristic formula expressed as a cubic curve polynomial.
[0124] That is, the actual frequency f1 and the actual temperature T1 are substituted into the cubic curve polynomial to obtain formula 1; the actual frequency f2 and the actual temperature T2 are substituted into the cubic curve polynomial to obtain formula 2; the actual frequency f3 and the actual temperature T3 are substituted into the cubic curve polynomial to obtain formula 3. Then, the values of the first parameters A3, A1, and A0 are calculated according to formulas 1, 2, and 3.
[0125] In some possible implementations, the three different actual temperatures T1, T2, and T3 may include a low temperature, a lower temperature / a higher temperature, and a high temperature. For example, the three different actual temperatures T1, T2, and T3 are 0° C., 20° C., and 50° C., respectively. For another example, the three different actual temperatures T1, T2, and T3 are 0° C., 30° C., and 50° C., respectively.
[0126] In addition, the embodiment of the present application does not limit the temperature value of the reference temperature T0. Optionally, the reference temperature T0 may be 25°C.
[0127] In some possible implementations, as mentioned above, multiple functional circuits 12 can all determine the actual frequency of the first clock, and the calculation circuit 13 can obtain the above three actual frequencies f1, f2, f3 from one of the functional circuits 12; or, the calculation circuit 13 can also obtain the above three actual frequencies f1, f2, f3 from multiple functional circuits 12, for example, the calculation circuit 13 obtains the actual frequency f1 from one functional circuit 12, obtains the actual frequency f2 from another functional circuit 12, and obtains the actual frequency f3 from yet another functional circuit 12.
[0128] Optional, such as Figure 5a As shown, the multiple functional circuits 12 include a target functional circuit. In the current time period, the use time of the target functional circuit is greater than or equal to the use time of other functional circuits 12 in the multiple functional circuits 12. The calculation circuit 13 obtains the above three actual frequencies f1, f2, and f3 from the target functional circuit. In this way, it can be ensured that the actual frequency of the target functional circuit with the longest current working time is accurately corrected.
[0129] For example, in the current time period, the duration of the mobile phone communicating with the base station through the 5G communication circuit is 1 minute, the duration of the mobile phone communicating with the base station through the 4G communication circuit is 5 seconds, and the duration of the mobile phone communicating with the base station through the 3G communication circuit and the 2G communication circuit is 0. Then the target communication circuit can be a 5G communication circuit. The 5G communication circuit has a mechanism to align the frequency offset with the base station, and can timely track the clock frequency transmitted by the base station. The three actual frequencies f1, f2, and f3 of the three first clocks are determined based on the clock frequency of the base station, and then the calculation circuit 13 obtains the actual frequencies f1, f2, and f3 from the 5G communication circuit. That is, the target functional circuit determines the multiple actual frequencies of the multiple first clocks based on the clock frequency of the base station. Similarly, if the multiple functional circuits 12 are satellite communication circuits, the target functional circuit determines the multiple actual frequencies of the multiple first clocks based on the clock frequency of the satellite.
[0130] It should be noted that the embodiment of the present application does not limit the duration of the current time period, and as the name implies, it can be the time period in which the functional circuit 12 receives the three first clocks. For example, the current time period is 1 minute, and within the current time period of 1 minute, the functional circuit 12 receives the three first clocks output by the clock generating circuit 11, and obtains the three actual frequencies f1, f2, and f3 of the three first clocks.
[0131] In some possible implementations, the calculation circuit 13 may include a selector to select three actual frequencies f1 , f2 , and f3 input to the target functional circuit using the selector.
[0132] In some possible implementations, due to different working mechanisms, multiple functional circuits 12 in the same functional system may have different requirements for the frequency offset of the clock. If the frequency correction circuit obtains the corrected second clock based on the actual frequency determined by the target functional circuit, then for the target functional circuit, the actual frequency of the second clock can meet the frequency offset required by the target functional circuit; for other functional circuits 12 in the functional circuit 12 except the target functional circuit, it can calculate the offset between the actual frequency of the second clock and the required frequency offset based on the first clock and the second clock, and then, for example, can use the offset to perform self-correction.
[0133] Next, the compensation circuit 15 obtains the first parameters A3, A1, A0 input by the calculation circuit 13 and the current actual temperature T input by the temperature sensor 14, and calculates the compensation circuit 15 according to the clock frequency-voltage formula between the output frequency of the clock generation circuit 11 and the control voltage Vc. And the cubic polynomial The formula and formula Take the same, and derive the control voltage Vc = B3 (T-T0) 3+B1(T-T0)+B0, B3, B1, B0 are the second parameters, Wherein, α is a constant. Based on the voltage-controlled characteristics of the crystal, when the same clock generating circuit 11 is used in different circuit structures, the output frequency of the clock generating circuit 11 is different under the same control voltage. The output frequency of the clock generating circuit 11 in different circuit structures can be adjusted by adjusting α.
[0134] The clock generating circuit 11 obtains the control voltage Vc input by the compensation circuit 15, and inputs the corrected second clock to the plurality of functional circuits 12 under the control of the control voltage Vc, thereby achieving the purpose of correcting the frequency of the clock generating circuit 11. It should be understood that the clock generating circuit 11 obtains the compensation voltage Vc input by the compensation circuit 15, which means that the clock oscillator of the clock generating circuit 11 receives the control voltage to make the crystal oscillate, so as to output the corrected second clock.
[0135] like Figure 5b As shown, the compensation circuit 15 may include a parameter storage circuit 151 and a voltage generating circuit 152. The process in which the compensation circuit 15 obtains the control voltage Vc according to the first parameters A3, A1, A0, and the current actual temperature T may be implemented by the parameter storage circuit 151 and the voltage generating circuit 152:
[0136] The parameter storage circuit 151 is configured to obtain the first parameters A3, A1, and A0, and obtain the second parameters B3, B1, and B0 according to the first parameters A3, A1, and A0. and the clock frequency-voltage formula Take etc. and get the formula in,
[0137] The voltage generating circuit 152 is configured to obtain the second parameters B3, B1, B0, and according to the second parameters B3, B1, B0, the current actual temperature T, the reference temperature T0, the formula Vc = B3 (T-T0) m +B1(T-T0)+B0, the control voltage Vc is calculated. Specifically, Figure 5b-5d As shown, the voltage generating circuit 152 includes a tertiary voltage generating circuit 1521, a linear voltage generating circuit 1522, and an adder 1523. The second parameter includes a first sub-parameter B3, a second sub-parameter B1, and a third sub-parameter B0.
[0138] like Figure 5b-5dAs shown, the parameter storage circuit 151 is configured to input the first sub-parameter B3 into the tertiary voltage generating circuit 1521, input the second sub-parameter B1 into the linear voltage generating circuit 1522, and input the third sub-parameter B0 into the tertiary voltage generating circuit 1521, or the linear voltage generating circuit 1522, or the adder 1523.
[0139] The tertiary voltage generating circuit 1521 is configured to calculate B3(T-T0) in the clock frequency-voltage formula according to the current actual temperature T, the reference temperature T0, and the first sub-parameter B3. 3 If the tertiary voltage generating circuit 1521 obtains the first sub-parameter B3 from the parameter storage circuit 151, the tertiary voltage generating circuit 1521 inputs the first result to the adder 1523; if the tertiary voltage generating circuit 1521 obtains the first sub-parameter B3 and the third sub-parameter B0 from the parameter storage circuit 151, the tertiary voltage generating circuit 1521 inputs the first result and the third sub-parameter B0 to the adder 1523.
[0140] In some possible implementations, the tertiary voltage generating circuit 1521 may be implemented by a differential amplifier or a multiplier. For example, a differential amplifier may be used to perform (T-T0) on (T-T0). 2 times to obtain TT-T0) 3 Or, a multiplier may be used to multiply the three (T-T0). Of course, the tertiary voltage generating circuit 1521 may also be implemented using other circuits, which is not limited in the present embodiment.
[0141] The linear voltage generating circuit 1522 is configured to calculate the second result of B1(T-T0) in the clock frequency-voltage formula according to the current actual temperature T, the reference temperature T0, and the second sub-parameter B1. If the linear voltage generating circuit 1522 obtains the second sub-parameter B1 from the parameter storage circuit 151, the linear voltage generating circuit 1522 inputs the second result to the adder 1523; if the linear voltage generating circuit 1522 obtains the second sub-parameter B1 and the third sub-parameter B0 from the parameter storage circuit 151, the linear voltage generating circuit 1522 inputs the second result and the third sub-parameter B0 to the adder 1523.
[0142] The adder 1523 is configured to add the received first result, the second result, and the third sub-parameter B0 to obtain the control voltage Vc.
[0143] In some possible implementations, the compensation circuit 15 is based on the formula Vc=B3(T-T0) 3+B1(T-T0)+B0 calculates the current actual temperature T of the control voltage Vc, which may be the current actual temperature of the crystal most recently obtained by the compensation circuit 15 from the temperature sensor 14. The current actual temperature and the actual temperatures T1, T2, and T3 are not simultaneously obtained by the compensation circuit 15 from the temperature sensor 14. The temperature value of the current actual temperature may be the same as one of the temperature values of the actual temperatures T1, T2, and T3; or, the temperature value of the current actual temperature may be different from the temperature values of the actual temperatures T1, T2, and T3.
[0144] In some other possible implementations, the compensation circuit 15 is based on the formula Vc=B3(T-T0) 3 +B1(T-T0)+B0 calculates the current actual temperature T of the control voltage Vc, which may also be the actual temperature obtained by the compensation circuit 15 at the last time among the actual temperatures T1, T2, and T3. For example, the compensation circuit 15 obtains the actual temperature T1, the actual temperature T2, and the actual temperature T3 from the temperature sensor 14 in sequence, and the actual temperature T3 may be used as the current actual temperature T for calculating the control voltage Vc.
[0145] like Figure 5e As shown, the tertiary voltage generating circuit 1521 includes a first voltage generating circuit and a second voltage generating circuit. If the current actual temperature T is greater than or equal to the reference temperature, the first voltage generating circuit is configured to obtain a first result of a positive value or 0 according to the current actual temperature T, the reference temperature T0, and the first sub-parameter B3; the second voltage generating circuit does not work. If the current actual temperature T is less than the reference temperature, the second voltage generating circuit is configured to obtain a first result of a negative value according to the current actual temperature T, the reference temperature T0, and the first sub-parameter B3; the first voltage generating circuit does not work.
[0146] By distinguishing the first voltage generating circuit and the second voltage generating circuit, the first voltage generating circuit is used to calculate and obtain a first result which is a positive value or 0, and the second voltage generating circuit is used to calculate and obtain a second result which is a negative value.
[0147] In some embodiments, the output frequency of the clock generating circuit 11 is not only related to the temperature of the crystal, but also changes as the clock generating circuit 11 is used for a period of time. This phenomenon is called aging.
[0148] The solutions proposed in the related art are all based on different circuit structures to solve the problem of frequency offset based on the temperature of the crystal. For example, the temperature sensor 14 is used to detect the actual temperature of the crystal, the compensation circuit 15 generates a control voltage Vc according to the actual temperature of the crystal, and the clock generation circuit 11 obtains the control voltage Vc to correct the clock frequency and input the frequency-corrected clock to the communication circuit. This solution cannot compensate for the frequency offset caused by aging after the terminal leaves the factory.
[0149] Based on this, the calculation circuit 13 of the embodiment of the present application is also configured to obtain the first parameter of the frequency-temperature characteristic formula according to the total usage time of the clock generating circuit 11 and the preset aging formula. For example, according to the constant term A0 in the first parameter affected by the total usage time of the clock generating circuit 11, the calculation circuit 13 can add the first parameter A0` obtained by the temperature of the clock generating circuit 11 and the first parameter A0`` obtained by the total usage time to obtain the constant term A0 of the first parameter. In this way, after mass production, the frequency offset caused by aging can be corrected based on the total usage time of the clock generating circuit 11.
[0150] Furthermore, the compensation circuit 15 and the clock generating circuit 11 work in the same manner as in the previous embodiment. The compensation circuit 15 calculates the control voltage Vc according to the first parameter, etc., and transmits the control voltage Vc to the clock generating circuit 11. The clock generating circuit 11 outputs the corrected second clock under the control of the control voltage Vc. The calculation process is the same as in the previous embodiment, and will not be described in detail here.
[0151] In some possible implementations, since the functional module 12 receives the clock signal (the first clock or the second clock) output by the clock generating circuit 11 , the total usage time of the clock generating circuit 11 can also be determined by the functional module 12 .
[0152] In the second case, the expression of the quadratic polynomial can be The relative frequency change caused by temperature drift can be expressed by the absolute frequency offset value Δf and the preset reference frequency f0, and the relative frequency change = Δf / f0, in ppm. The absolute frequency offset value Δf is determined by the actual frequency f and the preset reference frequency f0, Δf = f-f0. At the preset reference temperature T0, the reference frequency of the clock generating circuit 11 is f0; at the temperature T, the actual frequency of the clock generating circuit 11 is f. When the absolute frequency offset value Δf≠0, the reference temperature T0 is different from the actual temperature T. A2 and A0 are both first parameters.
[0153] It should be understood that in order to solve the first parameters A2 and A0, the multiple actual temperatures should include at least two different actual temperature values, and at least two actual frequencies of at least two first clocks at at least two different actual temperatures. For the convenience of description, the following description is given by taking the multiple actual temperatures including two different actual temperatures T1 and T2, and the two actual frequencies f1 and f2 of the two first clocks at the two different actual temperatures T1 and T2 as an example. Among them, the temperature values of the two actual temperatures T1 and T2 are not equal to the temperature value of the reference temperature T0, and the frequency values of the two actual frequencies f1 and f2 are not equal to the frequency value of the reference frequency f0.
[0154] The calculation circuit 13 calculates the values of the first parameters A2 and A0 according to two actual temperatures T1 and T2, two actual frequencies f1 and f2, a reference temperature T0, a reference frequency f0, and a frequency-temperature characteristic formula expressed as a quadratic curve polynomial.
[0155] That is, the actual frequency f1 and the actual temperature T1 are substituted into the quadratic curve polynomial to obtain formula 1; the actual frequency f2 and the actual temperature T2 are substituted into the quadratic curve polynomial to obtain formula. Then, the values of the first parameters A2 and A0 are calculated according to formula 1 and formula 2.
[0156] In some possible implementations, there is a large temperature difference between the two different actual temperatures T1 and T2. For example, the two different actual temperatures T1 and T2 are 20° C. and 20° C., respectively. For another example, the two different actual temperatures T1 and T2 are 0° C. and 40° C., respectively.
[0157] In addition, the embodiment of the present application does not limit the temperature value of the reference temperature T0. Optionally, the reference temperature T0 may be 25°C.
[0158] In some possible implementations, as mentioned above, multiple functional circuits 12 can all determine the actual frequency of the first clock, and the calculation circuit 13 can obtain the two actual frequencies f1 and f2 from one of the functional circuits 12; or, the calculation circuit 13 can also obtain the two actual frequencies f1 and f2 from multiple functional circuits 12, for example, the calculation circuit 13 obtains the actual frequency f1 from one functional circuit 12, obtains the actual frequency f2 from another functional circuit 12, and obtains the actual frequency f3 from yet another functional circuit 12.
[0159] Optional, such as Figure 6a As shown, the multiple functional circuits 12 include a target functional circuit. In the current time period, the use time of the target functional circuit is greater than or equal to the use time of other functional circuits 12 in the multiple functional circuits 12. The calculation circuit 13 obtains the above two actual frequencies f1 and f2 from the target functional circuit. In this way, it can be ensured that the actual frequency of the target functional circuit with the longest current working time is accurately corrected.
[0160] For example, in the current time period, the duration of the mobile phone communicating with the base station through the 5G communication circuit is 1 minute, the duration of the mobile phone communicating with the base station through the 4G communication circuit is 5 seconds, and the duration of the mobile phone communicating with the base station through the 3G communication circuit and the 2G communication circuit is 0. Then the target communication circuit can be a 5G communication circuit. The 5G communication circuit has a mechanism to align the frequency offset with the base station, and can timely track the clock frequency transmitted by the base station. The two actual frequencies f1 and f2 of the two first clocks are determined based on the clock frequency of the base station, and then the calculation circuit 13 obtains the actual frequencies f1 and f2 from the 5G communication circuit. That is, the target functional circuit determines the multiple actual frequencies of the multiple first clocks based on the clock frequency of the base station. Similarly, if the multiple functional circuits 12 are satellite communication circuits, the target functional circuit determines the multiple actual frequencies of the multiple first clocks based on the clock frequency of the satellite.
[0161] It should be noted that the embodiment of the present application does not limit the duration of the current time period, and as the name implies, it can be the time period in which the functional circuit 12 receives the two first clocks. For example, the current time period is 1 minute, and within the current time period of 1 minute, the functional circuit 12 receives the two first clocks output by the clock generation circuit 11, and obtains the three actual frequencies f1 and f2 of the two first clocks.
[0162] In some possible implementations, the calculation circuit 13 may include a selector to select two actual frequencies f1 and f2 input to the target functional circuit using the selector.
[0163] In some possible implementations, due to different working mechanisms, multiple functional circuits 12 in the same functional system may have different requirements for the frequency offset of the clock. If the frequency correction circuit obtains the corrected second clock based on the actual frequency determined by the target functional circuit, then for the target functional circuit, the actual frequency of the second clock can meet the frequency offset required by the target functional circuit; for other functional circuits 12 in the functional circuit 12 except the target functional circuit, it can calculate the offset between the actual frequency of the second clock and the required frequency offset based on the first clock and the second clock, and then, for example, can use the offset to perform self-correction.
[0164] Next, the compensation circuit 15 obtains the first parameters A2 and A0 input by the calculation circuit 13 and the current actual temperature T input by the temperature sensor 14, and calculates the clock frequency-voltage formula between the output frequency of the clock generation circuit 11 and the control voltage Vc. And the quadratic polynomial The formula and formula Take the same, and derive the control voltage Vc = B2 (T-T0) 2 +B0, B2 and B0 are the second parameters, Wherein, α is a constant. Based on the voltage-controlled characteristics of the crystal, when the same clock generating circuit 11 is used in different circuit structures, the output frequency of the clock generating circuit 11 is different under the same control voltage. The output frequency of the clock generating circuit 11 in different circuit structures can be adjusted by adjusting α.
[0165] The clock generating circuit 11 obtains the control voltage Vc input by the compensation circuit 15, and inputs the corrected second clock to the plurality of functional circuits 12 under the control of the control voltage Vc, thereby achieving the purpose of correcting the frequency of the clock generating circuit 11. It should be understood that the clock generating circuit 11 obtains the compensation voltage Vc input by the compensation circuit 15, which means that the clock oscillator of the clock generating circuit 11 receives the control voltage to make the crystal oscillate, so as to output the corrected second clock.
[0166] like Figure 6b As shown, the compensation circuit 15 may include a parameter storage circuit 151 and a voltage generating circuit 152. The process in which the compensation circuit 15 obtains the control voltage Vc according to the first parameters A2 and A0 and the current actual temperature T may be implemented by the parameter storage circuit 151 and the voltage generating circuit 152:
[0167] The parameter storage circuit 151 is configured to obtain the first parameters A2 and A0, and obtain the second parameters B2 and B0 according to the first parameters A2 and A0. and the clock frequency-voltage formula Take etc. and get the formula in,
[0168] The voltage generating circuit 152 is configured to obtain the second parameters B2 and B0, and according to the second parameters B2 and B0, the current actual temperature T, the reference temperature T0, the formula Vc = B2 (T-T0) 2 +B0, the control voltage Vc is calculated. Specifically, Figure 6b and Figure 6c As shown, the voltage generating circuit 152 includes a secondary voltage generating circuit 1524 and an adder 1523. The second parameter includes a first sub-parameter B2 and a second sub-parameter B0.
[0169] like Figure 6b and Figure 6c As shown, the parameter storage circuit 151 is configured to input the first sub-parameter B2 to the secondary voltage generating circuit 1524 , and input the second sub-parameter B0 to the secondary voltage generating circuit 1524 or the adder 1523 .
[0170] The secondary voltage generating circuit 1524 is configured to calculate b2(T-T0) in the clock frequency-voltage formula according to the current actual temperature T, the reference temperature T0, and the first sub-parameter B2. 2 If the secondary voltage generating circuit 1524 obtains the first sub-parameter B2 from the parameter storage circuit 151, the secondary voltage generating circuit 1524 inputs the first result to the adder 1523; if the secondary voltage generating circuit 1524 obtains the first sub-parameter B2 and the second sub-parameter B0 from the parameter storage circuit 151, the secondary voltage generating circuit 1524 inputs the first result and the second sub-parameter B0 to the adder 1523.
[0171] In some possible implementations, the secondary voltage generating circuit 1524 may be implemented by a differential amplifier or a multiplier. For example, a differential amplifier may be used to amplify (T-T0) by (T-T0) times to obtain (T-T0) 2 Or, a multiplier may be used to multiply the two (T-T0). Of course, the secondary voltage generating circuit 1524 may also be implemented using other circuits, which is not limited in the present embodiment.
[0172] The adder 1523 is configured to add the received first result and the second sub-parameter B0 to obtain the control voltage Vc.
[0173] In some possible implementations, the compensation circuit 15 is based on the formula Vc=B2(T-T0) 2 +B0 calculates the current actual temperature T of the control voltage Vc, which may be the current actual temperature of the crystal most recently obtained by the compensation circuit 15 from the temperature sensor 14. The current actual temperature and the actual temperatures T1 and T2 are not obtained by the compensation circuit 15 from the temperature sensor 14 at the same time. The temperature value of the current actual temperature may be the same as one of the temperature values of the actual temperatures T1 and T2; or, the temperature value of the current actual temperature may be different from both the temperature values of the actual temperatures T1 and T2.
[0174] In some other possible implementations, the compensation circuit 15 is based on the formula Vc=B2(T-T0) 2 +B0 calculates the current actual temperature T of the control voltage Vc, which may also be the actual temperature obtained by the compensation circuit 15 for the last time among the actual temperatures T1 and T2. For example, the compensation circuit 15 obtains the actual temperature T1 and the actual temperature T2 from the temperature sensor 14 in sequence, and the actual temperature T2 may be used as the current actual temperature T for calculating the control voltage Vc.
[0175] In some embodiments, the output frequency of the clock generating circuit 11 is not only related to the temperature of the crystal, but also changes as the clock generating circuit 11 is used for a period of time. This phenomenon is called aging.
[0176] The solutions proposed in the related art are all based on different circuit structures to solve the problem of frequency offset based on the temperature of the crystal. For example, the temperature sensor 14 is used to detect the actual temperature of the crystal, the compensation circuit 15 generates a control voltage Vc according to the actual temperature of the crystal, and the clock generation circuit 11 obtains the control voltage Vc to correct the clock frequency and input the frequency-corrected clock to the communication circuit. This solution cannot compensate for the frequency offset caused by aging after the terminal leaves the factory.
[0177] Based on this, the calculation circuit 13 of the embodiment of the present application is also configured to obtain the first parameter of the frequency-temperature characteristic formula according to the total usage time of the clock generating circuit 11 and the preset aging formula. For example, according to the constant term A0 in the first parameter affected by the total usage time of the clock generating circuit 11, the calculation circuit 13 can add the first parameter A0` obtained by the temperature of the clock generating circuit 11 and the first parameter A0`` obtained by the total usage time to obtain the constant term A0 of the first parameter. In this way, after mass production, the frequency offset caused by aging can be corrected based on the total usage time of the clock generating circuit 11.
[0178] Furthermore, the compensation circuit 15 and the clock generating circuit 11 work in the same manner as in the previous embodiment. The compensation circuit 15 calculates the control voltage Vc according to the first parameter, etc., and transmits the control voltage Vc to the clock generating circuit 11. The clock generating circuit 11 outputs the corrected second clock under the control of the control voltage Vc. The calculation process is the same as in the previous embodiment, and will not be described in detail here.
[0179] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A frequency correction circuit, characterized in that: Including clock generation circuit, temperature sensor, calculation circuit, compensation circuit, and functional circuit; The functional circuit is configured to receive a first clock at an actual temperature output by the clock generating circuit and operate using the first clock; The calculation circuit is configured to obtain the actual frequency of the first clock and the actual temperature input by the temperature sensor, and calculate a first parameter; The compensation circuit is configured to obtain the first parameter and the current actual temperature input by the temperature sensor, and generate a control signal; The clock generating circuit is configured to obtain the control signal and input the corrected second clock to the functional circuit under the control of the control signal.
2. The frequency correction circuit according to claim 1, characterized in that: There are multiple functional circuits, and the multiple functional circuits share the same clock generating circuit.
3. The frequency correction circuit according to claim 2, characterized in that: The plurality of said functional circuits include a target functional circuit; The calculation circuit is configured to obtain the actual frequency determined by the target functional circuit; wherein, in a current time period, the operating duration of the target functional circuit is greater than or equal to the operating duration of other functional circuits among the multiple functional circuits.
4. The frequency correction circuit according to claim 3, characterized in that: The plurality of functional circuits are all cellular communication circuits; the target functional circuit is configured to determine the actual frequency of the first clock based on the clock frequency of the base station; or, A plurality of the functional circuits are satellite communication circuits; The target function circuit is configured to determine the actual frequency of the first clock based on the clock frequency of the satellite.
5. The frequency correction circuit according to any one of claims 1 to 4, characterized in that: The calculation circuit is configured to obtain the first parameter according to the acquired actual frequency and the actual temperature, and a preset frequency-temperature correspondence relationship.
6. The frequency correction circuit according to claim 5, characterized in that: The compensation circuit is configured to obtain the control signal according to the first parameter, the current actual temperature, and a preset frequency-control signal correspondence relationship.
7. The frequency correction circuit according to claim 6, characterized in that: The compensation circuit includes a parameter storage circuit and a voltage generation circuit, and the control signal is a control voltage; The parameter storage circuit is configured to obtain the first parameter, and obtain a second parameter through the first parameter, the frequency-temperature correspondence, and the frequency-control signal correspondence; The voltage generating circuit is configured to obtain the second parameter, and obtain the control voltage according to the second parameter, the current actual temperature, the frequency-temperature correspondence, and the frequency-control signal correspondence.
8. The frequency correction circuit according to claim 7, characterized in that: The frequency-temperature correspondence includes a frequency-temperature characteristic formula, and the frequency-control signal correspondence includes a clock frequency-voltage formula; The frequency-temperature characteristic formula is: The clock frequency-voltage formula is Among them, A3, A1, A0 are the first parameters, and A3, A1, A0 are all constants; f0 represents the reference frequency; Δf represents the difference between the reference frequency and multiple actual frequencies; T represents multiple actual temperatures and the current actual temperature; T0 represents the reference temperature; α is a constant; B3, B1, B0 are the second parameters, and B3, B1, B0 are all constants.
9. The frequency correction circuit according to claim 8, characterized in that: The voltage generating circuit includes a tertiary voltage generating circuit, a linear voltage generating circuit, and an adder; the second parameter includes a first sub-parameter, a second sub-parameter, and a third sub-parameter; The parameter storage circuit is configured to input the first sub-parameter into the tertiary voltage generating circuit, input the second sub-parameter into the linear voltage generating circuit, and input the third sub-parameter into the tertiary voltage generating circuit, or the linear voltage generating circuit, or the adder; The tertiary voltage generating circuit is configured to calculate B3(T-T0) in the clock frequency-voltage formula according to the current actual temperature, the reference temperature, and the first sub-parameter. 3 and inputting the first result, or the first result and the third sub-parameter, into the adder; The linear voltage generating circuit is configured to calculate a second result of B1(T-T0) in the clock frequency-voltage formula according to the current actual temperature, the reference temperature, and the second sub-parameter, and input the second result, or the second result and the third sub-parameter, into the adder; The adder is configured to add the received first result, the second result, and the third sub-parameter to obtain the control voltage.
10. The frequency correction circuit according to claim 9, characterized in that: The tertiary voltage generating circuit comprises a first voltage generating circuit and a second voltage generating circuit; If the current actual temperature is greater than or equal to the reference temperature, the first voltage generating circuit is configured to obtain the first result according to the current actual temperature, the reference temperature, and the first sub-parameter; The second voltage generating circuit is not working; If the current actual temperature is lower than the reference temperature, the second voltage generating circuit is configured to obtain the first result according to the current actual temperature, the reference temperature and the first sub-parameter; and the first voltage generating circuit is not working.
11. The frequency correction circuit according to any one of claims 8 to 10, characterized in that: The calculation circuit is further configured to obtain the first parameter of the frequency-temperature characteristic formula according to the total use time of the clock generating circuit and a preset aging formula.
12. The frequency correction circuit according to any one of claims 1 to 11, characterized in that: The clock generating circuit is integrated on a first chip, the functional circuit is integrated on a second chip, the calculation circuit is integrated on a third chip, and the compensation circuit and the temperature sensor are integrated on a fourth chip.
13. The frequency correction circuit according to claim 12, characterized in that: The first chip and the fourth chip are the same chip.
14. A terminal, characterized in that: It comprises a circuit board and the frequency correction circuit according to any one of claims 1 to 13, wherein the frequency correction circuit is arranged on the circuit board.
