Temperature compensation measurement method, device, and computer equipment

Through a temperature compensation measurement method, the current and previous time temperature values ​​and compensation temperature values ​​are used to calculate the compensation temperature at the current time, which solves the problems of response hysteresis and inaccurate measurements in the temperature control system, and achieves higher temperature measurement accuracy and response speed.

CN114674447BActive Publication Date: 2025-02-28MIAOMIAOCE TECH BEIJING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210458362.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-27
Publication Date
2025-02-28
Estimated Expiration
2042-04-27

AI Technical Summary

Technical Problem

Digital temperature sensors have serious temperature response hysteresis and inaccurate measurement problems in temperature control systems, mainly due to thermal capacity and thermal resistance factors, as well as the impact of external packaging on response time.

Method used

Through a temperature compensation measurement method, the measured temperature value and compensation temperature value of the current and previous moments are obtained, and the compensation temperature at the current moment is calculated using the first parameter, the second parameter and the proportional coefficient, thereby shortening the temperature measurement response time and improving the measurement accuracy.

Benefits of technology

It achieves the improvement of temperature measurement accuracy on the basis of shortening the response time of temperature measurement, and solves the problems of inaccurate measurement and response lag in traditional temperature sensors in temperature control systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114674447B_ABST
    Figure CN114674447B_ABST
Patent Text Reader

Abstract

The present application provides a temperature compensation measurement method, device, and computer equipment, which relates to the field of temperature sensor technology and is used to improve the accuracy of temperature measurement on the basis of shortening the temperature measurement response time. The method mainly includes: obtaining the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment; according to the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment, as well as the first parameter, the second parameter, and the proportional coefficient, calculate the compensated temperature at the current moment; wherein the proportional coefficient is a constant coefficient, and the first parameter and the second parameter are determined according to the proportional coefficient, the sampling time interval, and the time constant of the temperature sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of temperature sensors, and in particular to a temperature compensation measurement method, device, computer equipment and storage medium. Background Art

[0002] Digital temperature sensors are widely used in measurement systems and play an important role in temperature control systems. However, due to the influence of factors such as the thermal capacity and thermal resistance of the temperature sensor itself, there will be a serious temperature response lag. In addition, in the temperature control system, the external packaging made to protect the temperature sensor further increases the response time of the temperature measurement, seriously affecting the accuracy of the temperature measurement. Summary of the invention

[0003] The embodiments of the present application provide a temperature compensation measurement method, apparatus, computer equipment and storage medium, which are used to improve the accuracy of temperature measurement while shortening the temperature measurement response time.

[0004] An embodiment of the present invention provides a temperature compensation measurement method, the method comprising:

[0005] Get the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment;

[0006] Calculate the compensated temperature at the current moment according to the measured temperature value at the current moment, the measured temperature value at the previous moment, the compensated temperature value at the previous moment, the first parameter, the second parameter and the proportionality coefficient;

[0007] The proportional coefficient is a constant coefficient, and the first parameter and the second parameter are determined according to the proportional coefficient, a sampling time interval, and a time constant of a temperature sensor.

[0008] An embodiment of the present invention provides a temperature compensation measuring device, the device comprising:

[0009] An acquisition module is used to acquire the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment;

[0010] A calculation module, used to calculate the compensation temperature at the current moment according to the measured temperature value at the current moment, the measured temperature value at the previous moment and the compensation temperature value at the previous moment, as well as the first parameter, the second parameter and the proportionality coefficient;

[0011] The proportional coefficient is a constant coefficient, and the first parameter and the second parameter are determined according to the proportional coefficient, a sampling time interval, and a time constant of a temperature sensor.

[0012] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned temperature compensation measurement method when executing the computer program.

[0013] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the temperature compensation measurement method is implemented.

[0014] The present invention provides a temperature compensation measurement method, device, computer equipment and storage medium. First, the measured temperature value at the current moment, the measured temperature value at the previous moment and the compensated temperature value at the previous moment are obtained, and then the compensated temperature at the current moment is calculated according to the measured temperature value at the current moment, the measured temperature value at the previous moment and the compensated temperature value at the previous moment, as well as the first parameter, the second parameter and the proportional coefficient. Wherein, the proportional coefficient is a constant coefficient, and the first parameter and the second parameter are determined according to the proportional coefficient, the sampling time interval and the time constant of the temperature sensor. Compared with the prior art that needs to stay for a period of time to accurately measure the temperature, the present invention only needs to obtain the measured temperature at the current moment, and then the compensated temperature at the current moment can be calculated according to the measured temperature value at the current moment, the measured temperature value at the previous moment and the compensated temperature value at the previous moment, as well as the first parameter, the second parameter and the proportional coefficient. Therefore, the present invention can improve the accuracy of temperature measurement on the basis of shortening the temperature measurement response time. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A flow chart of a temperature compensation measurement method provided in this application;

[0016] Figure 2 A flow chart for determining the time constant of the temperature sensor provided in this application;

[0017] Figure 3 A schematic diagram of the structure of the temperature compensation measuring device provided in this application;

[0018] Figure 4 Schematic diagram of the computer equipment provided for this application. DETAILED DESCRIPTION

[0019] In order to better understand the above-mentioned technical scheme, the technical scheme of the embodiments of the present application is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical scheme of the embodiments of the present application, rather than limitations on the technical scheme of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments may be combined with each other.

[0020] See also Figure 1, a temperature compensation method provided by an embodiment of the present invention is applied to a temperature measuring device, such as an electronic thermometer, etc. The method specifically includes steps S101 to S105:

[0021] Step S101, obtaining the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment.

[0022] Among them, the temperature measurement value is the temperature actually measured by the temperature sensor, and the compensation temperature value is the temperature value obtained by correcting the temperature measurement value. It should be noted that the current moment in this embodiment is the duration of the current temperature measurement, which is a moment determined according to the sampling time interval, and specifically the current moment is determined according to the number of sampling time intervals passed by the current time. For example, the sampling time interval is 2 seconds, and the current moment is 6 seconds, which means that the temperature value measured by the thermometer for 6 seconds and the temperature value measured at the previous moment, that is, the temperature value measured by the thermometer for 4 seconds, are obtained.

[0023] The sampling time interval in this embodiment can be set according to actual needs, such as the sampling time interval is 1 second, 2 seconds, 3 seconds, etc., and this embodiment does not make any specific limitation on this.

[0024] Step S102, calculating the compensated temperature at the current moment according to the measured temperature value at the current moment, the measured temperature value at the previous moment, the compensated temperature value at the previous moment, the first parameter, the second parameter and the proportionality coefficient.

[0025] The proportional coefficient is a constant coefficient, and the first parameter and the second parameter are determined according to the proportional coefficient, a sampling time interval, and a time constant of a temperature sensor.

[0026] The proportional coefficient in this embodiment is proportional to the compensation temperature at the current moment. That is to say, the value of the proportional coefficient affects the effect of dynamic compensation. If the value of the proportional coefficient is too large, over-compensation will occur; and if the value is too small, under-compensation will occur. In actual use, the value of the proportional coefficient can be determined through experiments and simulations according to actual conditions. Preferably, the value range of the proportional coefficient is 1-100.

[0027] In an optional embodiment provided by the present invention, the compensated temperature at the current moment is calculated according to the measured temperature value at the current moment, the measured temperature value at the previous moment, the compensated temperature value at the previous moment, the first parameter, the second parameter and the proportionality coefficient, including:

[0028] The compensation temperature at the current moment is calculated by the formula Tc(n)=A(BTs(n)-kTs(n-1)+Tc(n-1));

[0029] Among them, the Tc(n) is the compensated temperature at the current moment, the Ts(n) is the measured temperature value at the current moment, the Ts(n-1) is the measured temperature value at the previous moment, the Tc(n-1) is the compensated temperature value at the previous moment, n is a natural number, k is the proportional coefficient, A is the first parameter, and B is the second parameter.

[0030] Specifically, in this embodiment, n is used to represent the measured temperature value obtained by the most recent sampling, which can be specifically represented by a natural number of 1-N. If n is 3, the currently obtained measured temperature value is the temperature measurement value obtained by the third sampling, and the temperature measurement value at the previous moment is the temperature measurement value obtained by the second sampling. If the sampling time interval is 2 seconds and n is 3, the measured temperature value of the thermometer when the duration is 6 seconds and the measured temperature value at the previous moment, that is, the measured temperature value of the thermometer when the duration is 4 seconds, are obtained.

[0031] This embodiment provides a temperature compensation measurement method, first obtaining the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment, and then calculating the compensated temperature at the current moment according to the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment, as well as the first parameter, the second parameter, and the proportional coefficient. Wherein, the proportional coefficient is a constant coefficient, and the first parameter and the second parameter are determined according to the proportional coefficient, the sampling time interval, and the time constant of the temperature sensor. Compared with the prior art that requires a period of time to accurately measure the temperature, the present invention only needs to obtain the measured temperature at the current moment, and then it can calculate the compensated temperature at the current moment according to the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment, as well as the first parameter, the second parameter, and the proportional coefficient, so that the present invention can improve the accuracy of temperature measurement on the basis of shortening the temperature measurement response time.

[0032] See also Figure 2 , an embodiment of the present invention provides a method for determining a time constant of a temperature sensor, the method specifically comprising steps S201 to S203:

[0033] Step S201, obtaining the temperature drop percentage of the temperature sensor at different sampling moments in chronological order.

[0034] Among them, the sampling time n is 1-N, and the temperature drop percentage of the temperature sensor at different sampling times is obtained in chronological order, that is, the temperature drop percentage of the temperature sensor at the first sampling time, the temperature drop percentage of the temperature sensor at the second sampling time, the temperature drop percentage of the temperature sensor at the third sampling time... The temperature drop percentage of the temperature sensor at the Nth sampling time is obtained in sequence.

[0035] Specifically, this embodiment determines the temperature drop percentage of the temperature sensor at different times according to the sampling time n and the sampling time interval to. When the sampling time n is 1-3 and the sampling time interval to is 2 seconds, the temperature drop percentage of the temperature sensor at 2 seconds, the temperature drop percentage of the temperature sensor at 4 seconds, and the temperature drop percentage of the temperature sensor at 6 seconds are obtained in sequence.

[0036] In an optional embodiment provided by the present invention, the acquiring, in chronological order, the temperature drop percentage of the temperature sensor at different sampling moments includes:

[0037] Step S2011, obtaining the medium temperature T of the temperature sensor θ ;

[0038] Step S2012, heating the temperature sensor by a constant current, and obtaining the temperature T0 of the temperature sensor when the temperature sensor reaches thermal equilibrium;

[0039] Step S2013, cutting off the heating current of the temperature sensor, and acquiring the temperature T (mto) of the temperature sensor at a sampling time interval to from the moment of cutting off the current, where m is a natural number;

[0040] Step S2014, calculate the temperature drop percentage K of the temperature sensor at different sampling times mto by the following formula:

[0041]

[0042] For example, the time when the temperature sensor reaches thermal equilibrium is t0, and the temperature of the temperature sensor itself corresponding to this time is T0. At this moment, the heating current of the temperature sensor is cut off, and then the time at t0+t mto The corresponding body temperature of the temperature sensor. Among them, m is 1-M. For example, the time corresponding to t0 is 10:00:00, to is 2 seconds, when m=1, the body temperature corresponding to the temperature sensor at time 10:00:02 is T(to), when m=2, the body temperature corresponding to the temperature sensor at time 10:00:04 is T(2to), when m=3, the body temperature corresponding to the temperature sensor at time 10:00:06 is T(3to)...

[0043] Step S202, obtaining the first sampling moment when the temperature drop percentage is greater than a preset value.

[0044] In this embodiment, after each temperature drop percentage of a temperature sensor is obtained, it is calculated whether the temperature drop percentage is greater than a preset value. If the temperature drop percentage of the temperature sensor is greater than the preset value, the temperature drop percentage of the temperature sensor obtained this time is determined as the first temperature drop percentage, and then the sampling time corresponding to the first temperature drop percentage is determined.

[0045] Step S203: determining the first sampling moment at which the acquired temperature drop percentage is greater than a preset value as the time constant of the temperature sensor.

[0046] It should be noted that Γ is the time constant of the temperature sensor, which is a key parameter affecting the dynamic performance of temperature measurement and depends on the material and structural characteristics of the temperature sensor itself. The meaning of the time constant of the temperature sensor is: after a temperature sensor with a certain initial temperature is placed in a medium with a constant temperature, the time taken for the temperature change of the temperature sensor to reach 63.2% of the difference between the medium temperature and the initial temperature of the temperature sensor from zero.

[0047] Preferably, the preset value is 63.2%, and the sampling time t corresponding to when the temperature drop percentage K is greater than 63.2% for the first time is recorded. mto , then the time constant Γ of the temperature sensor in this medium and working condition is equal to t mto , if m=2, to is 2 seconds, then the time constant Γ of the temperature sensor is 4.

[0048] Furthermore, after the time constant of the temperature sensor is determined, the first parameter and the second parameter may be calculated according to the time constant of the temperature sensor and the proportional coefficient sampling time interval.

[0049] Specifically, the first parameter is calculated by the following formula:

[0050]

[0051] Among them, A is the first parameter, τsample is the sampling time interval, which is set according to the actual sampling time of the temperature sensor, such as 1s, 2s, b=k / Γ, k is the proportional coefficient, and Γ is the time constant of the temperature sensor.

[0052] Specifically, the second parameter is calculated by the following formula:

[0053]

[0054] Wherein, B is the second parameter, τsample is the sampling time interval, k is the proportional coefficient, and Γ is the time constant of the temperature sensor.

[0055] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0056] In one embodiment, a temperature compensation measuring device is provided, and the temperature compensation measuring device corresponds one-to-one with the temperature compensation measuring method in the above embodiment. Figure 3 As shown, the functional modules of the temperature compensation measuring device are described in detail as follows:

[0057] An acquisition module 31 is used to acquire the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment;

[0058] A calculation module 32, used to calculate the compensated temperature at the current moment according to the measured temperature value at the current moment, the measured temperature value at the previous moment and the compensated temperature value at the previous moment, as well as the first parameter, the second parameter and the proportionality coefficient;

[0059] The proportional coefficient is a constant coefficient, and the first parameter and the second parameter are determined according to the proportional coefficient, a sampling time interval, and a time constant of a temperature sensor.

[0060] In an optional embodiment, the calculation module 32 is specifically configured to:

[0061] The compensation temperature at the current moment is calculated by the formula Tc(n)=A(BTs(n)-kTs(n-1)+Tc(n-1));

[0062] Among them, the Tc(n) is the compensated temperature at the current moment, the Ts(n) is the measured temperature value at the current moment, the Ts(n-1) is the measured temperature value at the previous moment, the Tc(n-1) is the compensated temperature value at the previous moment, n is a natural number, k is the proportional coefficient, A is the first parameter, and B is the second parameter.

[0063] In an optional embodiment, the device further includes a determination module 33;

[0064] The acquisition module 31 is further used to acquire the temperature drop percentage of the temperature sensor at different sampling times in chronological order;

[0065] The acquisition module 31 is also used to obtain the first sampling moment when the temperature drop percentage is greater than a preset value;

[0066] The determination module 33 is used to determine the first sampling moment at which the acquired temperature drop percentage is greater than a preset value as the time constant of the temperature sensor.

[0067] In an optional embodiment, the acquisition module 31 is specifically configured to:

[0068] Get the medium temperature T of the temperature sensor θ ;

[0069] The temperature sensor is heated by a constant current, and when the temperature sensor reaches thermal equilibrium, the temperature T0 of the temperature sensor is obtained;

[0070] Cut off the heating current of the temperature sensor, and obtain the temperature T (mto) of the temperature sensor at a time interval to from the moment of cutting off the current, where m is a natural number;

[0071] The temperature drop percentage K of the temperature sensor at different sampling times mto is calculated by the following formula:

[0072]

[0073] In an optional embodiment, the first parameter is calculated by the following formula:

[0074]

[0075] Wherein, A is the first parameter, τsample is the sampling time interval, b=k / Γ, k is the proportionality coefficient, and Γ is the time constant of the temperature sensor.

[0076] In an optional embodiment, the second parameter is calculated by the following formula:

[0077]

[0078] Wherein, B is the second parameter, τsample is the sampling time interval, k is the proportional coefficient, and Γ is the time constant of the temperature sensor.

[0079] In an optional embodiment, the proportionality coefficient has a value range of 1-100, and the proportionality coefficient is proportional to the compensation temperature at the current moment.

[0080] For the specific definition of the temperature compensation measuring device, please refer to the definition of the temperature compensation measuring method above, which will not be repeated here. Each module in the above-mentioned device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0081] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a temperature compensation measurement method is implemented.

[0082] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0083] Get the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment;

[0084] Calculate the compensated temperature at the current moment according to the measured temperature value at the current moment, the measured temperature value at the previous moment, the compensated temperature value at the previous moment, the first parameter, the second parameter and the proportionality coefficient;

[0085] The proportional coefficient is a constant coefficient, and the first parameter and the second parameter are determined according to the proportional coefficient, a sampling time interval, and a time constant of a temperature sensor.

[0086] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0087] Get the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment;

[0088] Calculate the compensated temperature at the current moment according to the measured temperature value at the current moment, the measured temperature value at the previous moment, the compensated temperature value at the previous moment, the first parameter, the second parameter and the proportionality coefficient;

[0089] The proportional coefficient is a constant coefficient, and the first parameter and the second parameter are determined according to the proportional coefficient, a sampling time interval, and a time constant of a temperature sensor.

[0090] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0091] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0092] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A temperature compensation method, characterized in that: The method comprises: Get the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment; Calculate the compensated temperature at the current moment according to the measured temperature value at the current moment, the measured temperature value at the previous moment, the compensated temperature value at the previous moment, the first parameter, the second parameter and the proportionality coefficient; Wherein, the proportional coefficient is a constant coefficient, and the first parameter and the second parameter are determined according to the proportional coefficient, the sampling time interval, and the time constant of the temperature sensor; The method of calculating the compensated temperature at the current moment according to the measured temperature value at the current moment, the measured temperature value at the previous moment, the compensated temperature value at the previous moment, the first parameter, the second parameter and the proportionality coefficient comprises: The compensation temperature at the current moment is calculated by the formula Tc(n)=A(BTs(n)-kTs(n-1)+Tc(n-1)); Wherein, Tc(n) is the compensation temperature at the current moment, Ts(n) is the measured temperature value at the current moment, Ts(n-1) is the measured temperature value at the previous moment, Tc(n-1) is the compensation temperature value at the previous moment, n is a natural number, k is the proportional coefficient, A is the first parameter, and B is the second parameter; The first parameter is calculated by the following formula: Wherein, A is the first parameter, τsample is the sampling time interval, b=k / Γ, k is the proportionality coefficient, and Γ is the time constant of the temperature sensor; The second parameter is calculated by the following formula: Wherein, B is the second parameter, τsample is the sampling time interval, k is the proportional coefficient, and Γ is the time constant of the temperature sensor.

2. The method according to claim 1, characterized in that The method further comprises: Obtaining the temperature drop percentage of the temperature sensor at different sampling times in chronological order; Get the first sampling moment when the temperature drop percentage is greater than the preset value; The first sampling moment at which the acquired temperature drop percentage is greater than a preset value is determined as the time constant of the temperature sensor.

3. The method according to claim 2, characterized in that The step of obtaining the temperature drop percentage of the temperature sensor at different sampling times in chronological order includes: Get the medium temperature T of the temperature sensor θ ; The temperature sensor is heated by a constant current, and when the temperature sensor reaches thermal equilibrium, a body temperature T0 of the temperature sensor is obtained; Cut off the heating current of the temperature sensor, and obtain the temperature R (mto) of the temperature sensor at a time interval to from the moment of cutting off the current, where m is a natural number; The temperature drop percentage K of the temperature sensor at different sampling times mto is calculated by the following formula:

4. The method according to claim 1, characterized in that The proportionality coefficient has a value range of 1-100, and the proportionality coefficient is proportional to the compensation temperature at the current moment.

5. A temperature compensation device, characterized in that: The device comprises: An acquisition module is used to acquire the measured temperature value at the current moment, the measured temperature value at the previous moment, and the compensated temperature value at the previous moment; A calculation module, used to calculate the compensation temperature at the current moment according to the measured temperature value at the current moment, the measured temperature value at the previous moment and the compensation temperature value at the previous moment, as well as the first parameter, the second parameter and the proportionality coefficient; Wherein, the proportional coefficient is a constant coefficient, and the first parameter and the second parameter are determined according to the proportional coefficient, the sampling time interval, and the time constant of the temperature sensor; The method of calculating the compensated temperature at the current moment according to the measured temperature value at the current moment, the measured temperature value at the previous moment, the compensated temperature value at the previous moment, the first parameter, the second parameter and the proportionality coefficient comprises: The compensation temperature at the current moment is calculated by the formula Tc(n)=A(BTs(n)-kTs(n-1)+Tc(n-1)); Wherein, Tc(n) is the compensation temperature at the current moment, Ts(n) is the measured temperature value at the current moment, Ts(n-1) is the measured temperature value at the previous moment, Tc(n-1) is the compensation temperature value at the previous moment, n is a natural number, k is the proportional coefficient, A is the first parameter, and B is the second parameter; The first parameter is calculated by the following formula: Wherein, A is the first parameter, τsample is the sampling time interval, b=k / Γ, k is the proportionality coefficient, and Γ is the time constant of the temperature sensor; The second parameter is calculated by the following formula: Wherein, B is the second parameter, τsample is the sampling time interval, k is the proportional coefficient, and Γ is the time constant of the temperature sensor.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the temperature compensation method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the temperature compensation method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Method and device for measuring temperature

    CN106706165A

  • Temperature self-adaptive output method and medium

    CN110956338A