Temperature compensation method, circuit, chip, and electronic device
By receiving the temperature signal and updating the calibration value according to the temperature change trend and preset conditions, the problem of frequent target signal fluctuations caused by the temperature-sensitive circuit near the critical temperature between different temperature intervals is solved, and signal stability and error control are achieved.
Patent Information
- Application Number
- CN202211570634.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-06-30
- Filing Date
- 2022-12-08
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-12-08
AI Technical Summary
The temperature-sensitive circuit fluctuates near the critical temperature between different temperature ranges, causing the target signal to switch frequently and cannot be effectively controlled within the error range.
By receiving the temperature signal, the target temperature range is determined, and based on the temperature change trend, preset hysteresis temperature and critical temperature, it is determined whether the calibration switching conditions are met, and the calibration value is updated to avoid frequent fluctuations.
It effectively avoids the frequent fluctuations of the target signal caused by the temperature-sensitive circuit near the critical temperature between adjacent temperature intervals, ensuring signal stability and error control.
Smart Images

Figure CN116009620B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to a temperature compensation method, circuit, chip, and electronic equipment. Background Art
[0002] Circuits that are sensitive to temperature and are placed inside the chip need to be configured with calibration values according to the actual operating temperature during use. Such circuits will output target signals according to the calibration values. Since temperature has a significant impact on the target signals of such circuits, in order to control the target signals within a certain error range, such circuits will be calibrated at multiple points during production. Taking the clock oscillator as an example, in order to control the actual clock frequency output by the clock oscillator within a certain error range, different calibration values are configured for different temperature ranges of the clock oscillator during production. During the use of the chip, the corresponding calibration value is configured for the clock oscillator according to the temperature range where the actual operating temperature is located.
[0003] When the ambient temperature fluctuates around a critical temperature between two adjacent temperature intervals, the calibration value will be switched back and forth between the two adjacent temperature intervals, causing frequent fluctuations in target signals such as clock frequency. Summary of the invention
[0004] The purpose of the present application is to provide a temperature compensation method, circuit, chip, and electronic device to solve the technical problem in the prior art that a target signal output by a temperature-sensitive circuit frequently fluctuates.
[0005] The technical solution of the present application is as follows: a temperature compensation method is provided, comprising:
[0006] receiving a first temperature signal, and acquiring a target temperature range in which the first temperature signal is located;
[0007] When the target temperature interval is an adjacent temperature interval of the current temperature interval corresponding to the current calibration value, determining whether the first temperature signal meets the calibration switching condition according to the temperature change trend, the preset hysteresis temperature and the critical temperature; wherein the critical temperature is the temperature that divides the target temperature interval and the current temperature interval;
[0008] When the determination result is yes, the current calibration value is updated according to the target calibration value corresponding to the target temperature interval, and the updated current calibration value is sent to the temperature sensitive circuit.
[0009] Another technical solution of the present application is as follows: a temperature compensation circuit is provided, including a temperature interval judgment module and a selection module;
[0010] The temperature interval judgment module is used to receive a first temperature signal and obtain a target temperature interval in which the first temperature signal is located; when the target temperature interval is an adjacent temperature interval of the current temperature interval corresponding to the current calibration value, determine whether the first temperature signal meets the calibration switching condition according to the temperature change trend, the preset hysteresis temperature and the critical temperature, wherein the critical temperature is the temperature that divides the target temperature interval and the current temperature interval; when the determination result is yes, output a corresponding selection signal according to the target temperature interval;
[0011] The selection module is used to obtain a corresponding target calibration value according to the selection signal, and send the target calibration value to the temperature sensitive circuit.
[0012] Another technical solution of the present application is as follows: a chip is provided, comprising the above-mentioned temperature compensation circuit.
[0013] Another technical solution of the present application is as follows: an electronic device is provided, comprising the above-mentioned temperature compensation circuit or the above-mentioned chip.
[0014] The temperature compensation method, circuit, chip, and wearable device of the present application receive a first temperature signal and obtain a target temperature interval in which the first temperature signal is located; when the target temperature interval is an adjacent temperature interval of the current temperature interval corresponding to the current calibration value, determine whether the first temperature signal meets the calibration switching condition according to the temperature change trend, the preset hysteresis temperature, and the critical temperature between the temperature interval corresponding to the current calibration value and the target temperature interval; when the determination result is yes, update the current calibration value according to the target calibration value corresponding to the target temperature interval, and send the updated current calibration value to the temperature sensitive circuit; through the above method, when it is necessary to switch the calibration value between two adjacent temperature intervals, it is further determined whether to switch based on the preset hysteresis temperature and the temperature change trend, so as to avoid frequent fluctuations in the target signal output by the temperature sensitive circuit when the ambient temperature fluctuates near the critical temperature between the two adjacent temperature intervals. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of an application scenario of the temperature compensation circuit of the present application;
[0016] Figure 2 A schematic diagram of a temperature compensation method according to an embodiment of the present application;
[0017] Figure 3 Schematic diagram of the principle of calibration switching in an embodiment of the present application;
[0018] Figure 4 A schematic flow chart of a temperature compensation method according to another embodiment of the present application;
[0019] Figure 5 This is a schematic diagram of the principle of counting the number of times the first temperature signal is within the target temperature range in an embodiment of the present application;
[0020] Figure 6 A schematic diagram of a temperature compensation method according to an embodiment of the present application;
[0021] Figure 7 A schematic diagram of a temperature compensation method according to an embodiment of the present application;
[0022] Figure 8 This is a schematic diagram of the principle of step-by-step calibration switching in an embodiment of the present application;
[0023] Fig. 9 This is a schematic diagram of the structure of a temperature compensation circuit in an embodiment of the present application;
[0024] Fig.10 This is a schematic diagram of the structure of another temperature compensation circuit in an embodiment of the present application;
[0025] Fig.11 A schematic diagram of the structure of a chip according to an embodiment of the present application;
[0026] Fig.12 A schematic diagram of the structure of an electronic device according to an embodiment of the present application;
[0027] Fig.13 A schematic diagram of the structure of an electronic device according to another embodiment of the present application;
[0028] Fig.14 A schematic diagram of the structure of a storage medium according to an embodiment of the present application. DETAILED DESCRIPTION
[0029] 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.
[0030] In the present application, the temperature sensitive circuit is a functional module that is sensitive to the ambient temperature and outputs a target signal. For example, the temperature sensitive circuit may be a clock oscillator, and the output target signal may be a clock signal; the temperature sensitive circuit may also be other circuits or devices.
[0031] The temperature compensation circuit 100 of the present application can be applied in Figure 1In the electronic device 200 shown, the electronic device 200 includes a temperature sensitive circuit 300, the temperature compensation circuit 100 is connected to the temperature sensitive circuit 300, the temperature compensation circuit 100 receives a first temperature signal of the temperature sensitive circuit 300, and performs temperature compensation on the temperature sensitive circuit 300 according to the first temperature signal. Optionally, the electronic device 200 can be a wearable device, such as a smart bracelet, a smart watch, a TWS (True Wireless Stereo) headset, etc.
[0032] For ease of description, this application first describes the temperature compensation method.
[0033] Figure 2 FIG. 1 is a flow chart of a temperature compensation method according to an embodiment of the present application. It should be noted that if the results are substantially the same, the method of the present application is not limited to the method of FIG. Figure 2 The process sequence shown is limited. Figure 2 As shown, the temperature compensation method includes the following steps:
[0034] S101, receiving a first temperature signal, and acquiring a target temperature range in which the first temperature signal is located.
[0035] The first temperature signal is an ambient temperature signal of the temperature sensitive circuit collected by the temperature sensor. After receiving the first temperature signal, the target temperature range of the ambient temperature of the temperature sensitive circuit is determined according to the first temperature signal.
[0036] S102, when the target temperature interval is an adjacent temperature interval of the current temperature interval corresponding to the current calibration value, determine whether the first temperature signal meets the calibration switching condition according to the temperature change trend, the preset hysteresis temperature and the critical temperature; wherein the critical temperature is the temperature that divides the target temperature interval and the current temperature interval.
[0037] The current temperature interval is the temperature interval corresponding to the current calibration value of the temperature sensitive circuit. If the target temperature interval and the current temperature interval are two adjacent temperature intervals, it is necessary to further determine whether the calibration switching condition is met. In this embodiment, a hysteresis temperature is preset, and whether the first temperature signal meets the calibration switching condition is determined based on the hysteresis temperature and the temperature change trend.
[0038] S103, when the determination result is yes, updating the current calibration value according to the target calibration value corresponding to the target temperature range, and sending the updated current calibration value to the temperature sensitive circuit.
[0039] When the calibration switching condition is met, the target calibration value corresponding to the target temperature interval is sent to the temperature sensitive circuit, and the temperature sensitive circuit generates a corresponding target signal according to the target calibration value and then outputs it. In this way, it is avoided that the target signal output by the temperature sensitive circuit is frequently switched between two calibration values due to fluctuations near the critical temperature between two adjacent temperature intervals.
[0040] In an optional embodiment, in step S102, when the temperature change trend is increasing, if the first temperature signal is greater than or equal to the sum of the critical temperature and the hysteresis temperature, it is determined that the first temperature signal meets the calibration switching condition; when the temperature change trend is decreasing, if the first temperature signal is less than or equal to the difference between the critical temperature and the hysteresis temperature, it is determined that the first temperature signal meets the calibration switching condition. For example, refer to Figure 3 As shown, the current temperature range is 0℃~15℃, the target temperature range is 15℃~45℃, the hysteresis temperature is 3℃, the temperature change trend is increasing, the current temperature range is adjacent to the target temperature range, the critical temperature is 15℃, and when the first temperature signal is greater than or equal to 18℃, it is determined that the calibration switching conditions are met; the current temperature range is 15℃~45℃, the target temperature range is 0℃~15℃, the hysteresis temperature is 3℃, the temperature change trend is decreasing, the current temperature range is adjacent to the target temperature range, the critical temperature is 15℃, and when the first temperature signal is less than or equal to 12℃, it is determined that the calibration switching conditions are met.
[0041] In some embodiments, the temperature sensitive circuit includes a clock oscillator, which generates a clock of a corresponding frequency according to the target calibration value. In this embodiment, frequent switching of the clock frequency between two calibration values caused by fluctuations near a critical temperature between two adjacent temperature intervals can be avoided.
[0042] In an optional implementation, step S103 specifically includes the following steps:
[0043] S1031, when the determination result is yes, determining the calibration switch effective time according to the current sampling cycle, wherein the calibration switch effective time is equal to or later than the end time of the sampling state in the current sampling cycle;
[0044] S1032, when the calibration switching time is reached, updating the current calibration value according to the target calibration value corresponding to the target temperature range, and sending the updated current calibration value to the temperature sensitive circuit.
[0045] Among them, the temperature sensitive circuit is used as a clock oscillator as an example for explanation. When the calibration switching condition is met, direct switching is performed. If the switching time is within the current sampling cycle, the sampling work of the first half of the current sampling cycle will be performed under the clock before the switching, and the sampling work of the second half of the current sampling cycle will be performed under the clock after the switching, resulting in invalid data of the current sampling cycle. In order not to affect the operation of the analog-to-digital converter, counting module or other functional modules inside the chip, the switching is performed after the sampling state of the current sampling cycle ends. A sampling state and a sleep state may appear in a sampling cycle. In the sampling state, a sampling timing signal is generated for sampling. In the sleep state, the system enters standby mode to reduce power consumption, does not generate a sampling timing signal, and does not perform sampling. The sampling cycle generally includes a sampling time period corresponding to the sampling state and a sleep time period corresponding to the sleep state in chronological order. No sampling is performed in the sleep state. Therefore, the calibration switching effective time is set to be equal to or later than the end time of the sampling state in the current sampling cycle.
[0046] In an alternative embodiment, see Figure 4 As shown, Figure 4 FIG. 1 is a flow chart of a temperature compensation method according to another embodiment of the present invention. After step S101 and before step S102, step S202 is also included. It should be noted that if there are substantially the same results, the method of the present invention is not limited to the above method. Figure 4 The process sequence shown is limited. Figure 4 As shown, the temperature compensation method includes the following steps:
[0047] S101, receiving a first temperature signal, and acquiring a target temperature range in which the first temperature signal is located.
[0048] S202: When the time correlation amount of the first temperature signal in the target temperature interval is greater than or equal to a preset threshold, determine whether the target temperature interval is an adjacent temperature interval of the current temperature interval.
[0049] Among them, the time-related quantity of the first temperature signal in the target temperature range is counted, and the time-related quantity here includes the number of times or the duration. If the time-related quantity is the number of times, the preset threshold value can be a preset number of times threshold value, and the number of times the first temperature signal is in the target temperature range is counted to determine whether it is greater than or equal to the preset number of times threshold value. Specifically, if the first temperature signal is in the target temperature range, the number of times the first temperature signal is in the target temperature range is accumulated by 1; if the first temperature signal is not in the target temperature range, the number of times the first temperature signal is in the target temperature range is reset to zero; if the number of times the first temperature signal is in the target temperature range is greater than or equal to the preset number of times threshold value, it is determined whether the target temperature range is an adjacent temperature range of the current temperature range. Please refer to Figure 5As shown, taking the preset number threshold equal to 4 as an example, when the first temperature signals corresponding to three consecutive sampling points are all greater than 18°C, the number of times the first temperature signal is in the target temperature range greater than 18°C is 3. Since the first temperature signal corresponding to the next sampling point is less than 18°C, the number of times the first temperature signal is in the target temperature range greater than 18°C is 0, and the calibration switching process is not started; subsequently, when the first temperature signals corresponding to four consecutive sampling points are all greater than 18°C, the number of times the first temperature signal is in the target temperature range greater than 18°C is 4, and the calibration switching process is started. If the time-related quantity is duration, the preset threshold may be a preset time threshold, and statistics are then taken on the duration that the first temperature signal is in the target temperature interval to determine whether it is greater than or equal to the preset time threshold. Specifically, if the first temperature signal is in the target temperature interval, statistics are taken on the duration that the first temperature signal is in the target temperature interval; if the first temperature signal is not in the target temperature interval, the duration that the first temperature signal is in the target temperature interval is reset to zero; if the duration that the first temperature signal is in the target temperature interval is greater than or equal to the preset time threshold, it is determined whether the target temperature interval is an adjacent temperature interval to the current temperature interval.
[0050] In the above manner, the time-related quantity is the number of times or duration that the first temperature signal is continuously in the target temperature range, and the calibration switching process is initiated only when multiple first temperature signals sampled continuously are in the target temperature range and the number of times or duration satisfies the condition of being greater than or equal to the preset threshold. In the above manner, the calibration value switching caused by the misjudgment of the first temperature signal is avoided.
[0051] S102, when the target temperature interval is an adjacent temperature interval to the temperature interval corresponding to the current calibration value, determine whether the first temperature signal meets the calibration switching condition according to the temperature change trend, the preset hysteresis temperature and the critical temperature, wherein the critical temperature is the temperature that divides the target temperature interval and the current temperature interval.
[0052] S103, when the determination result is yes, updating the current calibration value according to the target calibration value corresponding to the target temperature range, and sending the updated current calibration value to the temperature sensitive circuit.
[0053] In an optional embodiment, at least one transition value is provided between the calibration values of two adjacent temperature intervals. When the calibration values of two adjacent temperature intervals are switched in step S103, the first transition value closest to the current calibration value is first switched along the temperature change trend, and then switched to the next transition value, until switching to the target calibration value. Step S103 specifically includes the following steps:
[0054] S1031, when the determination result is yes, updating the current calibration value according to the first transition value between the current temperature interval and the target temperature interval, and sending the updated current calibration value to the temperature sensitive circuit;
[0055] S1032, updating the current calibration value according to a next transition value between the current temperature interval and the target temperature interval, and sending the updated current calibration value to the temperature sensitive circuit;
[0056] S1033, repeat the above steps until the current calibration value is the last transition value between the current temperature interval and the target temperature interval, update the current calibration value according to the target calibration value corresponding to the target temperature interval, and send the updated current calibration value to the temperature sensitive circuit.
[0057] For example, the current calibration value is 10, the target calibration value is 20, and there are two transition values 13 and 16 between the current calibration value and the target calibration value. The temperature change trend is increasing, first switching from 10 to 13, then from 13 to 16, and finally from 16 to 20.
[0058] For another example, the current calibration value is 20, the target calibration value is 10, and two transition values 16 and 13 are set between the current calibration value and the target calibration value. The temperature change trend is decreasing, first switching from 20 to 16, then from 16 to 13, and finally from 13 to 10.
[0059] In an alternative embodiment, see Figure 6 As shown, Figure 6 FIG. 1 is a flow chart of a temperature compensation method according to another embodiment of the present invention. It should be noted that if the results are substantially the same, the method of the present invention is not limited to the method of FIG. Figure 6 The process sequence shown is limited. Figure 6 As shown, the temperature compensation method includes the following steps:
[0060] S101, receiving a first temperature signal, and acquiring a target temperature range in which the first temperature signal is located.
[0061] S102, when the target temperature interval is an adjacent temperature interval of the current temperature interval corresponding to the current calibration value, determine whether the first temperature signal meets the calibration switching condition according to the temperature change trend, the preset hysteresis temperature and the critical temperature, wherein the critical temperature is the temperature that divides the target temperature interval and the current temperature interval.
[0062] S103, when the determination result is yes, updating the current calibration value according to the target calibration value corresponding to the target temperature range, and sending the updated current calibration value to the temperature sensitive circuit.
[0063] S104: When the target temperature interval is not an adjacent temperature interval of the current temperature interval, the current calibration value is updated according to the target calibration value corresponding to the target temperature interval, and the updated current calibration value is sent to the temperature sensitive circuit.
[0064] Among them, if the target temperature range and the current temperature range are not adjacent, for example, the first temperature signal is 50°C and its original temperature signal is 10°C, then its current temperature range is 0°C~15°C, and the target temperature range is 45°C~60°C, and the two are not adjacent, then the current calibration value is updated to the calibration value corresponding to the target temperature range.
[0065] In an alternative embodiment, see Figure 7 As shown, Figure 7 FIG. 1 is a flow chart of a temperature compensation method according to another embodiment of the present invention. It should be noted that if the results are substantially the same, the method of the present invention is not limited to the method of FIG. Figure 7 The process sequence shown is limited. Figure 7 As shown, the temperature compensation method includes the following steps:
[0066] S304, when the target temperature interval is not an adjacent temperature interval of the current temperature interval, determine the adjacent temperature interval of the current temperature interval according to the temperature change trend, update the current calibration value according to the calibration value corresponding to the adjacent temperature interval, and send the updated current calibration value to the temperature sensitive circuit.
[0067] Among them, when the target temperature interval is not adjacent to the current temperature interval, directly switching to the target calibration value corresponding to the target temperature interval will cause the calibration value to change too much in a short time. Therefore, the temperature interval adjacent to the current temperature interval can be determined along the temperature change trend, and the current calibration value can be switched to the calibration value of the adjacent temperature interval. Then, step S101 is executed to enter the next first temperature signal collection and judgment. Please refer to Figure 8 As shown, if the first temperature signal is 50°C and its original temperature signal is 10°C, it means that the temperature signal rises directly from 10°C to 50°C, then its current temperature range is 0°C~15°C, and the target temperature range is 45°C~60°C, and the two are not adjacent. In step S304, first from the current calibration value A corresponding to the current temperature range to the calibration value B corresponding to the adjacent temperature range (15°C~45°C), and then execute step S101. In the next cycle, the calibration value B corresponding to the adjacent temperature range is used as the current calibration value, and it is switched from the calibration value B to the target calibration value C of the target temperature range of 45°C~60°C.
[0068] An embodiment of the present application provides a temperature compensation circuit. Fig. 9As shown, the temperature compensation circuit 100 includes a temperature interval judgment module 10 and a selection module 20, wherein the temperature interval judgment module 10 is used to receive a first temperature signal and obtain a target temperature interval in which the first temperature signal is located; when the target temperature interval is an adjacent temperature interval of the current temperature interval corresponding to the current calibration value, whether the first temperature signal meets the calibration switching condition is determined according to the temperature change trend, the preset hysteresis temperature and the critical temperature, wherein the critical temperature is the temperature that divides the target temperature interval and the current temperature interval; when the determination result is yes, a corresponding selection signal is output according to the target temperature interval; the selection module is used to obtain the corresponding target calibration value according to the selection signal, and send the target calibration value to the temperature sensitive circuit.
[0069] In an optional embodiment, the selection signal may be a digital signal, and each temperature interval corresponds to a selection signal, for example, the temperature interval 0°C to 15°C corresponds to the selection signal 01, the temperature interval 15°C to 45°C corresponds to the selection signal 10, and the temperature interval 45°C to 60°C corresponds to the selection signal 11. The selection module 20 obtains the corresponding target calibration value according to the selection signal and sends it to the temperature sensitive circuit, so that the temperature sensitive circuit generates a target signal according to the target calibration value.
[0070] In an optional embodiment, the temperature interval judgment module 10 is also used to determine that the first temperature signal meets the calibration switching condition when the temperature change trend is increasing, if the first temperature signal is greater than or equal to the sum of the critical temperature and the hysteresis temperature; when the temperature change trend is decreasing, if the first temperature signal is less than or equal to the difference between the critical temperature and the hysteresis temperature, then determine that the first temperature signal meets the calibration switching condition.
[0071] In an alternative embodiment, see Fig.10 As shown, the temperature compensation circuit 100 further includes a storage module 30 for storing calibration values of each temperature interval, and the selection module 20 obtains a target calibration value corresponding to the selection signal from the storage module 30 according to the received selection signal. The temperature compensation circuit 100 further includes a temperature sensor 40 for collecting a first temperature signal and sending the first temperature signal to the temperature interval determination module 10.
[0072] In an optional embodiment, the temperature interval judgment module 10 is further used to determine whether the target temperature interval is an adjacent temperature interval of the current temperature interval when the number of times the first temperature signal is in the target temperature interval is greater than or equal to a preset number threshold.
[0073] In an optional embodiment, the temperature interval judgment module 10 is also used to determine the adjacent temperature interval edge of the current temperature interval according to the temperature change trend when the target temperature interval is not an adjacent temperature interval of the current temperature interval, and output a corresponding selection signal according to the adjacent temperature interval.
[0074] In some embodiments, the temperature sensitive circuit includes a clock oscillator, which generates a clock of a corresponding frequency according to the target calibration value. In this embodiment, frequent switching of the clock frequency between two calibration values caused by fluctuations near a critical temperature between two adjacent temperature intervals can be avoided.
[0075] In an alternative implementation, please continue to refer to Fig.10 As shown, the selection module 20 includes a selector 21 and a selection control module 22, wherein the selector 21 is connected to the storage module 30 and the temperature interval judgment module 10 respectively, and is used to receive a selection signal sent by the temperature interval judgment module 10, obtain a corresponding target calibration value from the storage module 30 according to the selection signal, and send the obtained target calibration value to the selection control module 22. The selection control module 22 is connected to the selector 21 and the temperature sensitive circuit respectively, and the selection control module 22 is used to determine the calibration switching effective time according to the current sampling cycle, wherein the calibration switching effective time is equal to or later than the end time of the sampling state in the current sampling cycle; when the calibration switching time is reached, the target calibration value is sent to the temperature sensitive circuit.
[0076] In an optional embodiment, at least one transition value is provided between the calibration values of two adjacent temperature intervals; the selection control module 22 is also used to send the transition values to the temperature sensitive circuit in sequence according to the arrangement order of at least one transition value between the current calibration value and the target calibration value; after all the transition values are sent to the temperature sensitive circuit, the target calibration value is sent to the temperature sensitive circuit. Specifically, the selection control module 22 obtains the first transition value between the current calibration value and the target calibration value, and sends the first transition value to the temperature sensitive circuit; obtains the next transition value between the current calibration value and the target calibration value, and sends the next transition value to the temperature sensitive circuit; repeats the above steps until the last transition value is sent to the temperature sensitive circuit, and then sends the target calibration value to the temperature sensitive circuit.
[0077] Fig.11 Schematic diagram of the structure of a chip according to an embodiment of the present application. Fig.11 As shown, the chip 50 includes a temperature compensation circuit 100 .
[0078] Fig.12 Schematic diagram of the structure of an electronic device according to an embodiment of the present application. Fig.12As shown, the electronic device 60 includes a temperature compensation circuit 100 .
[0079] Among them, the electronic device 60 electronic device can be but not limited to a weight scale, a body fat scale, a nutrition scale, an infrared electronic thermometer, a pulse oximeter, a human body composition analyzer, a mobile power supply, a wireless charger, a fast charger, a car charger, an adapter, a display, a USB (Universal Serial Bus) docking station, a stylus, a true wireless headset, a car central control screen, a car, a smart wearable device, a mobile terminal, and a smart home device. Smart wearable devices include but are not limited to smart watches, smart bracelets, and cervical massagers. Mobile terminals include but are not limited to smart phones, laptops, tablets, and POS (point of sales terminal). Smart home devices include but are not limited to smart sockets, smart rice cookers, smart sweepers, and smart lights.
[0080] Fig.13 is a schematic diagram of the structure of an electronic device according to another embodiment of the present application. Fig.13 As shown, the electronic device 70 includes a processor 71 and a memory 72 coupled to the processor 71 .
[0081] The memory 72 stores program instructions for implementing the temperature compensation method of any of the above embodiments.
[0082] The processor 71 is used to execute program instructions stored in the memory 72 to perform temperature compensation.
[0083] The processor 71 may also be referred to as a CPU (Central Processing Unit). The processor 71 may be an integrated circuit chip having signal processing capabilities. The processor 71 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0084] See also Fig.14 , Fig.14It is a structural diagram of a storage medium 80 of an embodiment of the present application. The storage medium 80 of the embodiment of the present application stores program instructions 81 that can implement all the above methods, and the storage medium can be non-volatile or volatile. Among them, the program instructions 81 can be stored in the above storage medium in the form of a software product, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, RandomAccess Memory), a disk or an optical disk, or a terminal device such as a computer, a server, a mobile phone, and a tablet.
[0085] The above is only an implementation method of the present application. It should be pointed out that a person skilled in the art can make improvements without departing from the inventive concept of the present application, but these improvements are within the scope of protection of the present application.
Claims
1. A temperature compensation method, It is characterized in that include: receiving a first temperature signal, and acquiring a target temperature range in which the first temperature signal is located; When the target temperature interval is an adjacent temperature interval of the current temperature interval corresponding to the current calibration value, determining whether the first temperature signal meets the calibration switching condition according to the temperature change trend, the preset hysteresis temperature and the critical temperature; wherein the critical temperature is the temperature that divides the target temperature interval and the current temperature interval; When the determination result is yes, updating the current calibration value according to the target calibration value corresponding to the target temperature interval, and sending the updated current calibration value to the temperature sensitive circuit; The determining whether the first temperature signal meets the calibration switching condition according to the temperature change trend, the preset hysteresis temperature and the critical temperature includes: When the temperature change trend is increasing, if the first temperature signal is greater than or equal to the sum of the critical temperature and the hysteresis temperature, it is determined that the first temperature signal meets the calibration switching condition; When the temperature variation trend is decreasing, if the first temperature signal is less than or equal to the difference between the critical temperature and the hysteresis temperature, it is determined that the first temperature signal meets the calibration switching condition.
2. The temperature compensation method according to claim 1, It is characterized in that After receiving the first temperature signal and acquiring the target temperature range where the first temperature signal is located, the method further includes: When the time correlation amount of the first temperature signal in the target temperature interval is greater than or equal to a preset threshold, it is determined whether the target temperature interval is an adjacent temperature interval of the current temperature interval, wherein the time correlation amount includes the number of times or the duration.
3. The temperature compensation method according to claim 1 or 2, It is characterized in that After receiving the first temperature signal and acquiring the target temperature range where the first temperature signal is located, the method further includes: When the target temperature interval is not an adjacent temperature interval of the current temperature interval, the current calibration value is updated according to the target calibration value corresponding to the target temperature interval, and the updated current calibration value is sent to the temperature sensitive circuit.
4. The temperature compensation method according to claim 1 or 2, It is characterized in that When the determination result is yes, updating the current calibration value according to the target calibration value corresponding to the target temperature interval, and sending the updated current calibration value to the temperature sensitive circuit, comprises: When the determination result is yes, determining the calibration switch effective time according to the current sampling period, wherein the calibration switch effective time is equal to or later than the end time of the sampling state in the current sampling period; When the calibration switching effective time is reached, the current calibration value is updated according to the target calibration value corresponding to the target temperature range, and the updated current calibration value is sent to the temperature sensitive circuit.
5. The temperature compensation method according to claim 1 or 2, It is characterized in that After receiving the first temperature signal and acquiring the target temperature range where the first temperature signal is located, the method further includes: When the target temperature interval is not an adjacent temperature interval of the current temperature interval, the adjacent temperature interval of the current temperature interval is determined according to the temperature change trend, the current calibration value is updated according to the calibration value corresponding to the adjacent temperature interval, and the updated current calibration value is sent to the temperature sensitive circuit.
6. The temperature compensation method according to claim 1, It is characterized in that At least one transition value is provided between the calibration values of two adjacent temperature intervals; The updating of the current calibration value according to the target calibration value corresponding to the target temperature interval, and sending the updated current calibration value to the temperature sensitive circuit, comprises: updating the current calibration value according to a first transition value between the current temperature interval and the target temperature interval, and sending the updated current calibration value to the temperature sensitive circuit; updating the current calibration value according to a next transition value between the current temperature interval and the target temperature interval, and sending the updated current calibration value to the temperature sensitive circuit; Repeat the above steps until the current calibration value is the last transition value between the current temperature interval and the target temperature interval, update the current calibration value according to the target calibration value corresponding to the target temperature interval, and send the updated current calibration value to the temperature sensitive circuit.
7. The temperature compensation method according to claim 1, It is characterized in that The temperature sensitive circuit includes a clock oscillator.
8. A temperature compensation circuit, It is characterized in that Including temperature range judgment module and selection module; The temperature interval judgment module is used to receive a first temperature signal and obtain a target temperature interval in which the first temperature signal is located; when the target temperature interval is an adjacent temperature interval of the current temperature interval corresponding to the current calibration value, determine whether the first temperature signal meets the calibration switching condition according to the temperature change trend, the preset hysteresis temperature and the critical temperature, wherein the critical temperature is the temperature that divides the target temperature interval from the temperature interval corresponding to the current calibration value; when the determination result is yes, output a corresponding selection signal according to the target temperature interval; The selection module is used to obtain a corresponding target calibration value according to the selection signal, and send the target calibration value to the temperature sensitive circuit; The temperature interval judgment module is also used to determine that the first temperature signal meets the calibration switching condition when the temperature change trend is increasing, if the first temperature signal is greater than or equal to the sum of the critical temperature and the hysteresis temperature; when the temperature change trend is decreasing, if the first temperature signal is less than or equal to the difference between the critical temperature and the hysteresis temperature, then determine that the first temperature signal meets the calibration switching condition.
9. The temperature compensation circuit according to claim 8, It is characterized in that The temperature interval judgment module is also used to determine whether the target temperature interval is an adjacent temperature interval of the current temperature interval when the time correlation amount of the first temperature signal in the target temperature interval is greater than or equal to a preset threshold; wherein the time correlation amount includes the number of times or the duration.
10. The temperature compensation circuit according to claim 8, It is characterized in that The temperature interval judgment module is also used to determine the adjacent temperature interval of the current temperature interval according to the temperature change trend when the target temperature interval is not the adjacent temperature interval of the current temperature interval, and output a corresponding selection signal according to the adjacent temperature interval.
11. The temperature compensation circuit according to claim 8, It is characterized in that The selection module includes a selector and a selection control module; The selector is used to obtain a corresponding target calibration value according to a selection signal, and send the target calibration value to the selection control module.
12. The temperature compensation circuit according to claim 11, It is characterized in that At least one transition value is provided between the calibration values of two adjacent temperature intervals; The selection control module is used to send the transition values to the temperature sensitive circuit in sequence according to the arrangement order of at least one transition value set between the current calibration value and the target calibration value; when all the transition values are sent to the temperature sensitive circuit, the target calibration value is sent to the temperature sensitive circuit.
13. The temperature compensation circuit according to claim 11, It is characterized in that The selection module is also used to determine the calibration switch effective time according to the current sampling cycle, wherein the calibration switch effective time is equal to or later than the end time of the sampling state in the current sampling cycle; when the calibration switch effective time arrives, the target calibration value is sent to the temperature sensitive circuit.
14. The temperature compensation circuit according to claim 8, It is characterized in that It also includes a temperature sensor for collecting a first temperature signal and sending the first temperature signal to the temperature interval judgment module.
15. The temperature compensation circuit according to claim 8, It is characterized in that The temperature sensitive circuit includes a clock oscillator.
16. A chip, It is characterized in that The temperature compensation circuit comprises the temperature compensation circuit as claimed in any one of claims 8 to 15.
17. An electronic device, It is characterized in that The invention comprises the temperature compensation circuit according to any one of claims 8 to 15 or the chip according to claim 16.
