RC oscillator, temperature drift compensation method, temperature drift compensation device, temperature drift compensation equipment and medium

By adding a source degradation resistor to the RC oscillator and adjusting the size and resistance value of the PMOS transistor, the problem of large temperature drift in the RC oscillator was solved, achieving low temperature drift and miniaturization design, thus meeting the design requirements of the RC oscillator.

CN120880338APending Publication Date: 2025-10-31GUANG ZHOU XRADIO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510746365.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

On-chip RC oscillators suffer from large temperature drift. Existing compensation methods increase design complexity and area overhead, which is not conducive to miniaturization and low-power design.

Method used

By adding a source degradation resistor to the RC oscillator and adjusting the size and resistance value of the PMOS transistor, a target equation is constructed to achieve a zero temperature coefficient clock frequency, thereby reducing circuit area overhead.

Benefits of technology

It achieves temperature drift compensation for RC oscillators while reducing circuit area overhead, meeting the requirements of miniaturization design and reducing the impact of temperature drift.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880338A_ABST
    Figure CN120880338A_ABST
Patent Text Reader

Abstract

The invention discloses an RC oscillator, a temperature drift compensation method, a temperature drift compensation device, temperature drift compensation equipment and a medium. The source electrode of the first PMOS tube is connected with the power supply through a first resistor, and the source electrode of the second PMOS tube is connected with the power supply through a second resistor; the third PMOS tube is electrically connected with the power supply through a third resistor, and the total width-length ratios of the second PMOS tube and the third PMOS tube are different; a reference current source; a first MOM capacitor; a second MOM capacitor; a fourth resistor; an operational amplifier; a voltage-controlled oscillator; a shaping module; and a switched capacitor. On the basis of a traditional oscillator, the source electrode degeneration resistor is added, the source electrodes of the three PMOS transistors are connected with the power source through the source electrode degeneration resistor, the size of the second PMOS transistor is different from that of the third PMOS transistor, and therefore only the source electrode degeneration resistor is added, and under the condition that the circuit area overhead is reduced, the size of the source electrode degeneration resistor is reduced. And the temperature drift compensation of the RC oscillator is realized by adjusting the resistance values of the second resistor and the third resistor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to, but is not limited to, the field of integrated circuit technology, and in particular to an RC oscillator, a temperature drift compensation method, apparatus, device, and medium. Background Technology

[0002] An on-chip RC oscillator is a low-cost clock source integrated within a chip, primarily used to provide a base clock, backup clock, or low-power clock. However, on-chip RC oscillators suffer from significant temperature drift, which greatly impacts the chip's stability and performance. Current methods compensate for this by adjusting current, resistance, or capacitance based on temperature. This approach requires adding a dedicated temperature detection circuit and calibration array to the on-chip RC oscillator, significantly increasing design complexity and area overhead, which is detrimental to current miniaturization and low-power design requirements. Summary of the Invention

[0003] This application provides an RC oscillator, a temperature drift compensation method, an apparatus, a device, and a medium, which can achieve temperature drift compensation of the RC oscillator while reducing circuit area overhead, thus meeting the design requirements for miniaturization of the RC oscillator.

[0004] In a first aspect, embodiments of this application provide an RC oscillator, including:

[0005] power supply;

[0006] The first PMOS transistor, the source of which is electrically connected to the power supply through a first resistor;

[0007] The second PMOS transistor has its source electrically connected to the power supply through a second resistor, and its gate electrically connected to the gate of the first PMOS transistor.

[0008] The source of the third PMOS transistor is electrically connected to the power supply through a third resistor. The first resistor, the second resistor, and the third resistor are all source degradation resistors. The number of second PMOS transistors is at least 1, the number of third PMOS transistors is at least 1, and the total width-to-length ratio of the second PMOS transistors and the third PMOS transistors is different.

[0009] A reference current source, the output terminal of which is electrically connected to the drain of the first PMOS transistor, the gate of the second PMOS transistor, and the gate of the third PMOS transistor, respectively.

[0010] The first MOM capacitor has one end electrically connected to the drain of the second PMOS transistor, and the other end of the first MOM capacitor is grounded.

[0011] The second MOM capacitor has one end electrically connected to the drain of the third PMOS transistor, and the other end grounded.

[0012] The fourth resistor has one end electrically connected to the drain of the second PMOS transistor, and the other end grounded.

[0013] An operational amplifier, wherein the non-inverting input terminal of the operational amplifier is electrically connected to the drain of the third PMOS transistor, and the inverting input terminal of the operational amplifier is electrically connected to the drain of the second PMOS transistor.

[0014] A voltage-controlled oscillator, wherein the input terminal of the voltage-controlled oscillator is electrically connected to the output terminal of the operational amplifier;

[0015] Shaping module, which is electrically connected to the output terminal of the voltage-controlled oscillator;

[0016] A switched capacitor is electrically connected to the output terminal of the shaping module and the drain of the third PMOS transistor, respectively.

[0017] In some embodiments, the fourth resistor is an adjustable resistor.

[0018] Secondly, embodiments of this application provide a temperature drift compensation method applied to the RC oscillator of the first aspect, the method comprising:

[0019] The output frequency formula of the RC oscillator is established based on the fourth resistance value, the second current, the third current and the capacitance value of the switched capacitor, wherein the second current is the drain current of the second PMOS transistor, the third current is the drain current of the third PMOS transistor, and the fourth resistance value is the resistance value of the fourth resistor.

[0020] A target equation is constructed based on the output frequency formula, wherein when the target equation is true, the output frequency of the RC oscillator satisfies a zero temperature coefficient clock. The target equation includes a second temperature coefficient corresponding to the second current and a third temperature coefficient corresponding to the third current. The second temperature coefficient and the third temperature coefficient are respectively located on the left and right sides of the equal sign of the target equation. The second temperature coefficient is associated with the second resistance value of the second resistor, and the third temperature coefficient is associated with the third resistance value of the third resistor.

[0021] By adjusting the second resistance value and the third resistance value, the target equation is made true.

[0022] In some embodiments, the output frequency formula for the RC oscillator is established based on the fourth resistance value, the second current, the third current, and the capacitance value of the switched capacitor, and is obtained according to the following formula:

[0023]

[0024] Where f is the output frequency of the RC oscillator, I R For the second current, I C R4 is the third current, and C is the fourth resistance. SW The capacitance value of the switched capacitor.

[0025] In some embodiments, constructing a target equation based on the output frequency formula includes:

[0026] Differentiate both sides of the output frequency equation with respect to the temperature value, and set the first temperature coefficient of the switched capacitor to 0 to obtain the intermediate equation.

[0027] Set the intermediate equation to 0 to obtain the target equation.

[0028] In some embodiments, the objective equation is expressed as follows:

[0029]

[0030] Where T is the temperature value. This is the second temperature coefficient. This refers to the third temperature coefficient.

[0031] In some embodiments, the second temperature coefficient is calculated according to the following formula:

[0032]

[0033] V GS2 =V G2 -(V dd -R2*I R );

[0034] The third temperature coefficient is calculated according to the following formula:

[0035]

[0036] V GS3 =V G3 -(V dd -R3*I C );

[0037] Where, μ P C represents the mobility of p-type carriers. oxWhere is the gate oxide capacitance per unit area, W2 is the channel width of the second PMOS transistor, and L2 is the channel length of the second PMOS transistor. V is the total width-to-length ratio of the second PMOS transistor. GS2 V is the voltage difference between the gate and source of the second PMOS transistor. G2 V is the gate voltage of the second PMOS transistor. dd R2 is the power supply voltage, and V is the second resistance value. TH2 W3 is the threshold voltage for the second PMOS transistor to switch from cutoff to turn-on, W3 is the channel width of the third PMOS transistor, and L3 is the channel length of the third PMOS transistor. V is the total width-to-length ratio of the third PMOS transistor. GS3 V is the voltage difference between the gate and source of the third PMOS transistor. G3 R3 is the gate voltage of the third PMOS transistor, and R3 is the third resistance value. TH3 The threshold voltage for the third PMOS transistor to switch from off to on.

[0038] Thirdly, embodiments of this application provide a control device, including at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor, which, when executed by the at least one control processor, enable the at least one control processor to perform the temperature drift compensation method as described in the second aspect.

[0039] Thirdly, embodiments of this application also provide an electronic device, including the control device of the second aspect.

[0040] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for performing the temperature drift compensation method as described in the second aspect.

[0041] This application provides an RC oscillator, a temperature drift compensation method, apparatus, device, and medium. The RC oscillator includes: a power supply; a first PMOS transistor, the source of which is electrically connected to the power supply through a first resistor; a second PMOS transistor, the source of which is electrically connected to the power supply through a second resistor, and the gate of which is electrically connected to the gate of the first PMOS transistor; a third PMOS transistor, the source of which is electrically connected to the power supply through a third resistor, wherein the first resistor, the second resistor, and the third resistor are all source degradation resistors; the number of second PMOS transistors is at least one; the number of third PMOS transistors is at least one; and the total width-to-length ratio of the second PMOS transistors and the third PMOS transistors is different; and a reference current source, the output terminal of which is connected to the drain of the first PMOS transistor, the gate of the second PMOS transistor, and the gate of the third PMOS transistor, respectively. The gate of the MOSFET is electrically connected; a first MOM capacitor, one end of which is electrically connected to the drain of the second PMOS transistor, and the other end of which is grounded; a second MOM capacitor, one end of which is electrically connected to the drain of the third PMOS transistor, and the other end of which is grounded; a fourth resistor, one end of which is electrically connected to the drain of the second PMOS transistor, and the other end of which is grounded; an operational amplifier, the non-inverting input of which is electrically connected to the drain of the third PMOS transistor, and the inverting input of which is electrically connected to the drain of the second PMOS transistor; a voltage-controlled oscillator (VCO), the input of which is electrically connected to the output of the operational amplifier; a shaping module, the shaping module being electrically connected to the output of the VCO; and a switched capacitor, the switched capacitor being electrically connected to both the output of the shaping module and the drain of the third PMOS transistor. According to the solution provided in the embodiments of this application, a source degradation resistor is added to the structure of the traditional oscillator, so that the sources of the three PMOS transistors are connected to the power supply through the source degradation resistor, and the second PMOS transistor and the third PMOS transistor are different in size. Based on this structure, temperature drift compensation of the RC oscillator can be achieved by adjusting the resistance values ​​of the second and third resistors by only adding the source degradation resistor. That is to say, temperature drift compensation is achieved while reducing circuit area overhead, which meets the design requirements of miniaturization of RC oscillators. Attached Figure Description

[0042] Figure 1 This is a schematic diagram of the structure of an RC oscillator provided in one embodiment of this application;

[0043] Figure 2 This is a flowchart of the steps of a temperature drift compensation method provided in another embodiment of this application;

[0044] Figure 3 This is a schematic diagram of the output frequency of an RC oscillator as a function of temperature, provided in another embodiment of this application.

[0045] Figure 4 This is a structural diagram of a control device provided in another embodiment of this application;

[0046] Figure 5 This is a waveform diagram of an RC oscillator in operation according to another embodiment of this application. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0048] It is understandable that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, or the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0049] An on-chip RC oscillator is a low-cost clock source integrated within a chip, primarily used to provide a base clock, backup clock, or low-power clock. However, on-chip RC oscillators suffer from significant temperature drift, which greatly impacts the chip's stability and performance. Current methods compensate for this by adjusting current, resistance, or capacitance based on temperature. This approach requires adding a dedicated temperature detection circuit and calibration array to the on-chip RC oscillator, significantly increasing design complexity and area overhead, which is detrimental to current miniaturization and low-power design requirements.

[0050] To address the aforementioned problems, this application provides an RC oscillator, a temperature drift compensation method, apparatus, device, and medium. The RC oscillator includes: a power supply; a first PMOS transistor, the source of which is electrically connected to the power supply via a first resistor; a second PMOS transistor, the source of which is electrically connected to the power supply via a second resistor, and the gate of which is electrically connected to the gate of the first PMOS transistor; a third PMOS transistor, the source of which is electrically connected to the power supply via a third resistor, wherein the first resistor, the second resistor, and the third resistor are all source degradation resistors; the number of second PMOS transistors is at least one; the number of third PMOS transistors is at least one; and the total width-to-length ratios of the second PMOS transistors and the third PMOS transistors are different; and a reference current source, the output terminal of which is connected to the drain of the first PMOS transistor, the gate of the second PMOS transistor, and the... The gate of the third PMOS transistor is electrically connected; a first MOM capacitor, one end of which is electrically connected to the drain of the second PMOS transistor, and the other end of which is grounded; a second MOM capacitor, one end of which is electrically connected to the drain of the third PMOS transistor, and the other end of which is grounded; a fourth resistor, one end of which is electrically connected to the drain of the second PMOS transistor, and the other end of which is grounded; an operational amplifier, the non-inverting input of which is electrically connected to the drain of the third PMOS transistor, and the inverting input of which is electrically connected to the drain of the second PMOS transistor; a voltage-controlled oscillator, the input of which is electrically connected to the output of the operational amplifier; a shaping module, the shaping module being electrically connected to the output of the voltage-controlled oscillator; and a switched capacitor, the switched capacitor being electrically connected to both the output of the shaping module and the drain of the third PMOS transistor. According to the solution provided in the embodiments of this application, a source degradation resistor is added to the structure of the traditional oscillator, so that the sources of the three PMOS transistors are connected to the power supply through the source degradation resistor, and the second PMOS transistor and the third PMOS transistor are different in size. Based on this structure, temperature drift compensation of the RC oscillator can be achieved by adjusting the resistance values ​​of the second and third resistors by only adding the source degradation resistor. That is to say, temperature drift compensation is achieved while reducing circuit area overhead, which meets the design requirements of miniaturization of RC oscillators.

[0051] The embodiments of this application will be further described below with reference to the accompanying drawings.

[0052] refer to Figure 1 , Figure 1 This is a schematic diagram of the structure of an RC oscillator provided in one embodiment of this application. This application provides an RC oscillator, including:

[0053] power supply;

[0054] The source of the first PMOS transistor is electrically connected to the power supply through the first resistor.

[0055] The source of the second PMOS transistor is electrically connected to the power supply through the second resistor, and the gate of the second PMOS transistor is electrically connected to the gate of the first PMOS transistor.

[0056] The source of the third PMOS transistor is electrically connected to the power supply through the third resistor. The first, second, and third resistors are all source degradation resistors. The number of second PMOS transistors is at least 1, the number of third PMOS transistors is at least 1, and the total width-to-length ratio of the second and third PMOS transistors is different.

[0057] The reference current source is electrically connected to the drain of the first PMOS transistor, the gate of the second PMOS transistor, and the gate of the third PMOS transistor, respectively.

[0058] The first MOM capacitor has one end electrically connected to the drain of the second PMOS transistor, and the other end is grounded.

[0059] The second MOM capacitor has one end electrically connected to the drain of the third PMOS transistor, and the other end grounded.

[0060] The fourth resistor has one end electrically connected to the drain of the second PMOS transistor, and the other end grounded.

[0061] The operational amplifier has its non-inverting input terminal electrically connected to the drain of the third PMOS transistor, and its inverting input terminal electrically connected to the drain of the second PMOS transistor.

[0062] A voltage-controlled oscillator (VCO) is electrically connected to the output of an operational amplifier.

[0063] The shaping module is electrically connected to the output of the voltage-controlled oscillator.

[0064] The switched capacitor is electrically connected to the output terminal of the shaping module and the drain of the third PMOS transistor, respectively.

[0065] Specifically, in this embodiment, the RC oscillator is a module located within the chip, as shown in the reference. Figure 1Iref is the reference current source for other circuits in the chip. Resistors R1, R2, and R3 are source degradation resistors of the same length and width, but different in number and requiring matching. PMOS transistors M1, M2, and M3 are PMOS transistors of the same gate length and width, but different in number and requiring matching. The first MOM capacitor C0 and the second MOM capacitor C1 are two MOM capacitors of the same size. OP1 is an operational amplifier. The drain of the second PMOS transistor M2 is connected to the inverting input of OP1, and the drain of the third PMOS transistor M3 is connected to the non-inverting input of OP1. The output voltage of OP1 is connected to the voltage-controlled oscillator (VCO) in the subsequent stage. The output of the VCO is shaped and fed back to the switched capacitor.

[0066] It is understandable that the working principle of the RC oscillator in this embodiment is as follows: the drain current of the second PMOS transistor M2 replicates the reference current Iref of the reference current source according to a preset ratio, and after flowing through the fourth resistor R4, it generates a fixed voltage V. R When the voltage-controlled oscillator (VCO) is not oscillating, the switched capacitor circuit is equivalent to a high impedance. The drain current of the third PMOS transistor M3 replicates Iref according to a preset ratio. This current continuously charges the second MOM capacitor C1, increasing the voltage Vc at the non-inverting input of the operational amplifier OP1 until it approaches and exceeds the voltage at the inverting input. Due to the large open-loop gain of the operational amplifier OP1, the output voltage Vctrl of the operational amplifier OP1 begins to increase, controlling the VCO to start oscillating. The oscillator output is shaped and fed back to the switched capacitor circuit to start it working. Each time the switched capacitor operates, it draws charge from the second MOM capacitor C1, causing Vc to decrease. When the equivalent resistance of the switched capacitor circuit equals the fourth resistance of the fourth resistor R4, the circuit enters a steady state, and the output of the operational amplifier OP1 remains essentially unchanged. Here, voltages Vc and V... R The waveform of Vctrl is as follows Figure 5 As shown.

[0067] It should be noted that the fourth resistor is an adjustable resistor. Therefore, the fourth resistor R4 only needs to be calibrated once during the factory test to make the RC oscillator output the expected frequency, which can eliminate the influence of resistor, capacitor and current deviation on the frequency.

[0068] refer to Figure 2 , Figure 2 This is a flowchart illustrating the steps of a temperature drift compensation method provided in another embodiment of this application. This application provides a temperature drift compensation method applicable to, for example... Figure 1 The RC oscillator shown in the method includes, but is not limited to, the following steps:

[0069] Step S10: Based on the fourth resistance value, the second current, the third current and the capacitance value of the switched capacitor, establish the output frequency formula corresponding to the RC oscillator, where the second current is the drain current of the second PMOS transistor, the third current is the drain current of the third PMOS transistor, and the fourth resistance value is the resistance value of the fourth resistor.

[0070] Step S20: Construct a target equation based on the output frequency formula. When the target equation is true, the output frequency of the RC oscillator satisfies the zero temperature coefficient clock. The target equation includes the second temperature coefficient corresponding to the second current and the third temperature coefficient corresponding to the third current. The second temperature coefficient and the third temperature coefficient are located on the left and right sides of the equal sign of the target equation, respectively. The second temperature coefficient is associated with the second resistance value of the second resistor, and the third temperature coefficient is associated with the third resistance value of the third resistor.

[0071] Step S30: Adjust the second and third resistance values ​​to make the target equation true.

[0072] It is understood that the temperature drift compensation method in this embodiment is applied to Figure 1 The RC oscillator shown is Figure 1 The RC oscillator shown is based on the structure of a traditional oscillator, with the addition of source degradation resistors. This allows the sources of the three PMOS transistors to be connected to the power supply through the source degradation resistors, and also makes the second and third PMOS transistors have different sizes. Based on this structure, temperature drift compensation of the RC oscillator can be achieved by adjusting the resistance values ​​of the second and third resistors, simply by adding source degradation resistors. In other words, temperature drift compensation is achieved while reducing circuit area overhead, thus meeting the design requirements for miniaturization of RC oscillators.

[0073] Specifically, Figure 2 The formula for calculating the output frequency of the RC oscillator in step S10, based on the fourth resistance value, the second current, the third current, and the capacitance value of the switched capacitor, is obtained according to the following formula:

[0074]

[0075] Where f is the output frequency of the RC oscillator, I R For the second current, I C The third current is R4, and the fourth resistance is C. SW This is the capacitance value of the switched capacitor.

[0076] Specifically, Figure 2 Step S20 includes, but is not limited to, the following steps:

[0077] Step S21: Differentiate both sides of the output frequency equation with respect to the temperature value, and set the first temperature coefficient of the switched capacitor to 0 to obtain the intermediate equation.

[0078] Step S22: Set the intermediate equation to 0 to obtain the target equation.

[0079] It should be noted that, in this embodiment, the expression for the objective equation is as follows:

[0080]

[0081] Where T is the temperature value. The second temperature coefficient, It is the third temperature coefficient.

[0082] Understandably, based on Figure 1 The structure of the RC oscillator is analyzed, I R and I C Replicated using a standard current mirror, the two values ​​are equal or proportional, therefore their ratio has no temperature drift. Furthermore, in modern CMOS processes, the temperature drift of MOM capacitors can be very small (<20ppm / ℃). Therefore, the temperature drift of the RC oscillator mainly originates from the resistance. In this embodiment, by differentiating both sides of the output frequency equation with respect to the temperature value, setting the first temperature coefficient of the switched capacitor to 0, an intermediate equation is obtained. Setting this intermediate equation to 0 simplifies the process to the target equation. It can be seen that I appears in the target equation. R and I C The temperature coefficients corresponding to the two currents are respectively as well as To satisfy the equation, the current I can only be adjusted. R and I C The value of the current is determined by the output frequency formula, but the current value is also related to the frequency, and the values ​​of both are not easily adjusted. Therefore, this application makes the equation satisfy the condition by adjusting the values ​​of the two current temperature coefficients.

[0083] Specifically, the second temperature coefficient is calculated using the following formula:

[0084]

[0085] V GS2 =V G2 -(V dd -R2*I R );

[0086] The third temperature coefficient is calculated using the following formula:

[0087]

[0088] V GS3 =V G3 -(V dd -R3*I C );

[0089] Where, μ P C represents the mobility of p-type carriers. ox Where is the gate oxide capacitance per unit area, W2 is the channel width of the second PMOS transistor, and L2 is the channel length of the second PMOS transistor. V is the overall width-to-length ratio of the second PMOS transistor. GS2 V is the voltage difference between the gate and source of the second PMOS transistor. G2 V is the gate voltage of the second PMOS transistor. dd R2 is the power supply voltage, and V is the second resistance value. TH2 W3 is the threshold voltage for the second PMOS transistor to turn on from off, W3 is the channel width of the third PMOS transistor, and L3 is the channel length of the third PMOS transistor. V is the overall width-to-length ratio of the third PMOS transistor. GS3 V is the voltage difference between the gate and source of the third PMOS transistor. G3 R3 is the gate voltage of the third PMOS transistor, and R3 is the third resistance value. TH3 This is the threshold voltage for the third PMOS transistor to switch from cutoff to turn-on.

[0090] It can be seen that the values ​​of the two temperature coefficients are related to the corresponding PMOS transistor's (V) GS -V TH ) related, while (V GS -V TH The resistance value is related to the source degradation resistance corresponding to the two temperature coefficients. In existing RC oscillators, the gates and sources of PMOS transistors M2 and M3 are connected together, therefore their V... GS They are equal, and since they are both transistors of the same type and size, their V values ​​are also equal. TH Equal, that is, the V values ​​of PMOS transistors M2 and M3 in the existing RC oscillator are equal. GS -V TH Equal. This application adds source degradation resistors R1, R2, and R3 to the existing RC oscillator, connecting the sources of M2 and M3 to their respective source degradation resistors. Furthermore, in this embodiment, the PMOS transistors M2 and M3 have different dimensions. Thus, by adjusting the values ​​of source degradation resistors R2 and R3, the source voltages of M2 and M3 can no longer be equal, thereby making the Vo of M2 and M3 equal. GS -V TH The values ​​are no longer equal; that is, after determining that the PMOS transistors M2 and M3 of the RC oscillator in this embodiment have different dimensions, the Vo of M2 and M3 can be adjusted by adjusting the resistance values ​​of the source degradation resistors R2 and R3. GS -V TH And then adjust and modify I R and IC The corresponding temperature coefficients are determined to make the target equation hold, thereby ensuring that the output frequency of the RC oscillator satisfies the zero temperature coefficient clock condition and completes temperature drift compensation.

[0091] In summary, it can be understood that this embodiment is based on the following Figure 1 The structure of the RC oscillator shown establishes an output frequency formula based on the fourth resistance value of the fourth resistor, the drain current (i.e., the second current) of the second PMOS transistor, the drain current (i.e., the third current) of the third PMOS transistor, and the capacitance value of the switched capacitor. A target equation is then constructed based on this output frequency formula. If this target equation holds, the output frequency of the RC oscillator satisfies a zero-temperature coefficient clock, i.e., low temperature drift is achieved. The target equation includes the second temperature coefficient corresponding to the second current and the third temperature coefficient corresponding to the third current. The second temperature coefficient is associated with the second resistance value of the second resistor, and the third temperature coefficient is associated with the third resistance value of the third resistor. Thus, by simply adding a source degradation resistor (which occupies a small circuit area) between the PMOS transistor and the power supply terminal to the traditional RC oscillator, and adjusting the resistance values ​​of the second and third resistors to achieve the target equation, low temperature drift can be achieved. Compared to solutions requiring dedicated temperature detection circuits and calibration arrays on the RC oscillator, this approach effectively meets the design requirements for miniaturization of RC oscillators. (Reference) Figure 4 Curve A is the output frequency of the RC oscillator before compensation as a function of temperature, curve B is the output frequency of the RC oscillator after compensation as a function of temperature, and curve C is the output frequency of the RC oscillator under ideal conditions as a function of temperature. It can be seen that after the RC oscillator of this application is compensated for temperature drift by the source degradation resistor compensation circuit, it is close to curve C, effectively achieving low temperature drift.

[0092] like Figure 4 As shown, Figure 4 This is a structural diagram of a control device provided in one embodiment of this application. The present invention also provides a control device 400, comprising:

[0093] The processor 410 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0094] The memory 420 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 420 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 420 and is called and executed by the processor 410 to execute the temperature drift compensation method of the embodiments of this application.

[0095] Input / output interface 430 is used to realize information input and output;

[0096] The communication interface 440 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0097] Bus 450 transmits information between various components of the device (e.g., processor 410, memory 420, input / output interface 430, and communication interface 440);

[0098] The processor 410, memory 420, input / output interface 430 and communication interface 440 are connected to each other within the device via bus 450.

[0099] In addition, this application also provides an electronic device, including the control device 400 of the above embodiments.

[0100] In addition, this application embodiment also provides a storage medium, which is a computer-readable storage medium, storing a computer program that, when executed by a processor, implements the above-described temperature drift compensation method.

[0101] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separate, and may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0102] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0103] The above provides a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. An RC oscillator, characterized in that, include: power supply; The first PMOS transistor, the source of which is electrically connected to the power supply through a first resistor; The second PMOS transistor has its source electrically connected to the power supply through a second resistor, and its gate electrically connected to the gate of the first PMOS transistor. The source of the third PMOS transistor is electrically connected to the power supply through a third resistor. The first resistor, the second resistor, and the third resistor are all source degradation resistors. The number of second PMOS transistors is at least 1, the number of third PMOS transistors is at least 1, and the total width-to-length ratio of the second PMOS transistors and the third PMOS transistors is different. A reference current source, the output terminal of which is electrically connected to the drain of the first PMOS transistor, the gate of the second PMOS transistor, and the gate of the third PMOS transistor, respectively. The first MOM capacitor has one end electrically connected to the drain of the second PMOS transistor, and the other end of the first MOM capacitor is grounded. The second MOM capacitor has one end electrically connected to the drain of the third PMOS transistor, and the other end grounded. The fourth resistor has one end electrically connected to the drain of the second PMOS transistor, and the other end grounded. An operational amplifier, wherein the non-inverting input terminal of the operational amplifier is electrically connected to the drain of the third PMOS transistor, and the inverting input terminal of the operational amplifier is electrically connected to the drain of the second PMOS transistor. A voltage-controlled oscillator, wherein the input terminal of the voltage-controlled oscillator is electrically connected to the output terminal of the operational amplifier; Shaping module, which is electrically connected to the output terminal of voltage-controlled oscillator; A switched capacitor is electrically connected to the output terminal of the shaping module and the drain of the third PMOS transistor, respectively.

2. The RC oscillator according to claim 1, characterized in that, The fourth resistor is an adjustable resistor.

3. A method for compensating for temperature drift, characterized in that, Applied to the RC oscillator of claim 1 or 2, the method comprises: The output frequency formula of the RC oscillator is established based on the fourth resistance value, the second current, the third current and the capacitance value of the switched capacitor, wherein the second current is the drain current of the second PMOS transistor, the third current is the drain current of the third PMOS transistor, and the fourth resistance value is the resistance value of the fourth resistor. A target equation is constructed based on the output frequency formula, wherein when the target equation is true, the output frequency of the RC oscillator satisfies a zero temperature coefficient clock. The target equation includes a second temperature coefficient corresponding to the second current and a third temperature coefficient corresponding to the third current. The second temperature coefficient and the third temperature coefficient are respectively located on the left and right sides of the equal sign of the target equation. The second temperature coefficient is associated with the second resistance value of the second resistor, and the third temperature coefficient is associated with the third resistance value of the third resistor. By adjusting the second resistance value and the third resistance value, the target equation is made true.

4. The temperature drift compensation method according to claim 3, characterized in that, Based on the fourth resistance value, the second current, the third current, and the capacitance value of the switched capacitor, the output frequency formula corresponding to the RC oscillator is established, which is obtained according to the following formula: Where f is the output frequency of the RC oscillator, I R For the second current, I C R4 is the third current, and C is the fourth resistance. SW The capacitance value of the switched capacitor.

5. The temperature drift compensation method according to claim 4, characterized in that, Constructing the target equation based on the output frequency formula includes: Differentiate both sides of the output frequency equation with respect to the temperature value, and set the first temperature coefficient of the switched capacitor to 0 to obtain the intermediate equation. Set the intermediate equation to 0 to obtain the target equation.

6. The temperature drift compensation method according to claim 5, characterized in that, The expression for the objective equation is as follows: Where T is the temperature value. This is the second temperature coefficient. This refers to the third temperature coefficient.

7. The temperature drift compensation method according to claim 6, characterized in that, The second temperature coefficient is calculated using the following formula: V GS2 =V G2 -(V dd -R2*I R ); The third temperature coefficient is calculated according to the following formula: In GS3 =V G3 -(In dd -R3*I C ); Where, μ P C represents the mobility of p-type carriers. ox Where is the gate oxide capacitance per unit area, W2 is the channel width of the second PMOS transistor, and L2 is the channel length of the second PMOS transistor. V is the total width-to-length ratio of the second PMOS transistor. GS2 V is the voltage difference between the gate and source of the second PMOS transistor. G2 V is the gate voltage of the second PMOS transistor. dd The voltage is the power supply voltage, R2 is the second resistance value, and V TH2 W3 is the threshold voltage for the second PMOS transistor to switch from cutoff to turn-on, W3 is the channel width of the third PMOS transistor, and L3 is the channel length of the third PMOS transistor. V is the total width-to-length ratio of the third PMOS transistor. GS3 V is the voltage difference between the gate and source of the third PMOS transistor. G3 R3 is the gate voltage of the third PMOS transistor, and R3 is the third resistance value. TH3 The threshold voltage for the third PMOS transistor to switch from off to on.

8. A control device, characterized in that, It includes at least one control processor and a memory for communicatively connecting to the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform the temperature drift compensation method as described in any one of claims 3 to 7.

9. An electronic device, characterized in that, Includes the control device as described in claim 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the temperature drift compensation method as described in any one of claims 3 to 7.