CN107449521B - Temperature compensation method, terminal device and computer readable storage medium - Google Patents
Temperature compensation method, terminal device and computer readable storage medium Download PDFInfo
- Publication number
- CN107449521B CN107449521B CN201710638691.1A CN201710638691A CN107449521B CN 107449521 B CN107449521 B CN 107449521B CN 201710638691 A CN201710638691 A CN 201710638691A CN 107449521 B CN107449521 B CN 107449521B
- Authority
- CN
- China
- Prior art keywords
- temperature
- compensation
- preset
- value
- current
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01K—MEASURING TEMPERATURE; MEASURING QUANTITY OF HEAT; THERMALLY-SENSITIVE ELEMENTS NOT OTHERWISE PROVIDED FOR
- G01K1/00—Details of thermometers not specially adapted for particular types of thermometer
- G01K1/20—Compensating for effects of temperature changes other than those to be measured, e.g. changes in ambient temperature
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01K—MEASURING TEMPERATURE; MEASURING QUANTITY OF HEAT; THERMALLY-SENSITIVE ELEMENTS NOT OTHERWISE PROVIDED FOR
- G01K7/00—Measuring temperature based on the use of electric or magnetic elements directly sensitive to heat ; Power supply therefor, e.g. using thermoelectric elements
- G01K7/16—Measuring temperature based on the use of electric or magnetic elements directly sensitive to heat ; Power supply therefor, e.g. using thermoelectric elements using resistive elements
- G01K7/22—Measuring temperature based on the use of electric or magnetic elements directly sensitive to heat ; Power supply therefor, e.g. using thermoelectric elements using resistive elements the element being a non-linear resistance, e.g. thermistor
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Nonlinear Science (AREA)
- Fire-Detection Mechanisms (AREA)
- Measuring And Recording Apparatus For Diagnosis (AREA)
Abstract
The invention provides a temperature compensation method, terminal equipment and a computer readable storage medium, and relates to the technical field of electrical fire detection. The method comprises the following steps: acquiring the current environmental temperature through a thermistor; judging whether to perform temperature compensation according to the change condition of the current environment temperature; if so, acquiring a current temperature compensation value according to a temperature compensation table preset based on the Fibonacci number series coefficient; in a preset time, if the current environment temperature does not reach the temperature compensation value, the temperature compensation value is kept; and if the current environment temperature is reduced to be lower than the preset temperature compensation initial value, the compensation is quitted, and the current environment temperature is displayed. According to the invention, whether the temperature compensation is carried out by adopting the thermometer formed by Fibonacci number series coefficients is judged by acquiring the change condition of the current environment temperature, so that the critical value of the alarm temperature is reached in advance, the alarm can be effectively carried out in time, and the fire disaster is prevented.
Description
Technical Field
The invention belongs to the technical field of electrical fire detection, and particularly relates to a temperature compensation method, terminal equipment and a computer readable storage medium.
Background
The current state of the industry of the current contact type sensor NTC (Negative Temperature Coefficient, thermistor with Negative Temperature Coefficient) is limited by the harsh requirements of the process and the use conditions, and the packaged finished sensor can not meet the requirement of timely response time. In the practical application of the combined residual current-temperature detector for electrical fire disasters, two requirements of national standard alarm are met: 1. within 40s, the environment temperature is raised to 45-140 ℃ for alarming (the alarm value is set to be 100 ℃ according to the margin of 20 percent higher than the alarm value of the sample under the worst condition, the temperature of an actual testing instrument is set to be 120 ℃, and the temperature cannot be met in practice due to the defect of the province of temperature control equipment and the limitation of the testing instrument in actual development); 2. and (3) the temperature rise condition is not more than 1 ℃/min, no alarm is given, if the alarm is given, the alarm value is recorded, and the error is not more than 5 percent (the test aim is detection precision). Therefore, in order to meet the requirements of the touch sensor on the two international standards, the problem can be solved only by adopting a software compensation mode.
Disclosure of Invention
The invention provides a temperature compensation method, terminal equipment and a computer readable storage medium, aiming at the problem that a contact type sensor needs to meet the requirements of two national standards at the same time when detecting a fire and can only meet the requirements by adopting a software compensation mode.
A first aspect of an embodiment of the present invention provides a method for temperature compensation, including:
acquiring the current environmental temperature through a thermistor;
judging whether to perform temperature compensation according to the change condition of the current environment temperature;
if so, acquiring a current temperature compensation value according to a temperature compensation table preset based on the Fibonacci number series coefficient;
in a preset time, if the current environment temperature does not reach the temperature compensation value, the temperature compensation value is kept; and if the current environment temperature is reduced to be lower than the preset temperature compensation initial value, the compensation is quitted, and the current environment temperature is displayed.
Further, whether temperature compensation is carried out or not is judged according to the change situation of the current environment temperature, and the method comprises the following steps:
acquiring an average ambient temperature value of the current ambient temperature;
judging whether the current average ambient temperature value continuously increases within a preset test time, wherein the amplification is greater than or equal to a preset amplification temperature;
and if so, performing temperature compensation when the current environment temperature is higher than 40 ℃.
Further, if the average ambient temperature value continuously increases within the preset test time and does not exceed the preset comparison value, the current ambient temperature is continuously obtained through the thermistor.
Further, in a preset compensation time, if the current ambient temperature does not reach the temperature compensation value, the temperature compensation value is maintained, and the method includes:
judging that the temperature difference between the current environment temperature and the temperature compensation initial value is compared within the preset time;
correcting the preset compensation time according to the temperature difference;
and if the current environment temperature does not reach the temperature compensation value within the preset compensation time, keeping the temperature compensation value.
Further, the preset compensation time is corrected according to the temperature difference, and the method comprises the following steps:
if the temperature difference is more than 10 ℃, shortening the preset supplementary compensation time for 1 second;
if the temperature difference is greater than 14 ℃, shortening the preset supplementary compensation time for 2 seconds;
if the temperature difference is greater than 18 ℃, shortening the preset supplementing compensation time for 3 seconds;
if the temperature difference is greater than 20 ℃, the preset supplementary compensation time is set to 29 seconds.
A second aspect of an embodiment of the present invention provides a device for temperature compensation, including:
the first acquisition module is used for acquiring the current ambient temperature through the thermistor;
the first judging module is used for judging whether temperature compensation is carried out or not according to the change condition of the current environment temperature;
the second obtaining module is used for obtaining a current temperature compensation value according to a temperature compensation table preset based on the Fibonacci number series coefficient;
in a preset time, if the current environment temperature does not reach the temperature compensation value, the temperature compensation value is kept; and if the current environment temperature is reduced to be lower than the preset temperature compensation initial value, the compensation is quitted, and the current environment temperature is displayed.
Further, the first determination module includes:
a first obtaining unit, configured to obtain an average ambient temperature value of a current ambient temperature;
the first judgment unit is used for judging whether the current average environment temperature value continuously increases within the preset test time, and the amplification is greater than or equal to the preset amplification temperature;
and if so, performing temperature compensation when the current environment temperature is higher than 40 ℃.
Further, the second obtaining module includes:
the second judging unit is used for judging the temperature difference between the current environment temperature and the temperature compensation initial value within the preset time;
the correction unit is used for correcting the preset compensation time according to the temperature difference;
and the maintaining unit is used for maintaining the temperature compensation value if the current environment temperature does not reach the temperature compensation value within the preset compensation time.
A third aspect of the embodiments of the present invention provides a temperature-compensated terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the following steps when executing the computer program:
acquiring the current environmental temperature through a thermistor;
judging whether to perform temperature compensation according to the change condition of the current environment temperature;
if so, acquiring a current temperature compensation value according to a temperature compensation table preset based on the Fibonacci number series coefficient;
in a preset time, if the current environment temperature does not reach the temperature compensation value, the temperature compensation value is kept; and if the current environment temperature is reduced to be lower than the preset temperature compensation initial value, the compensation is quitted, and the current environment temperature is displayed.
A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium for temperature compensation, the computer-readable storage medium storing a computer program, which when executed by a processor implements the following steps:
acquiring the current environmental temperature through a thermistor;
judging whether to perform temperature compensation according to the change condition of the current environment temperature;
if so, acquiring a current temperature compensation value according to a temperature compensation table preset based on the Fibonacci number series coefficient;
in a preset time, if the current environment temperature does not reach the temperature compensation value, the temperature compensation value is kept; and if the current environment temperature is reduced to be lower than the preset temperature compensation initial value, the compensation is quitted, and the current environment temperature is displayed.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: according to the invention, the change condition of the current environment temperature is obtained through the thermistor to judge whether a temperature compensation measure is adopted or not so as to achieve the critical value of the alarm temperature in advance through a temperature compensation mode, on one hand, the alarm is performed in advance through the temperature compensation mode, and the fire can be effectively prevented in time; on the other hand, the temperature is compensated according to the temperature compensation table generated by the Fibonacci sequence, so that the speed of temperature change can be more accurate, and the time for alarming the fire alarm bell can be more accurate.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic flow chart of an implementation of a method for temperature compensation according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of temperature compensation obtained by employing the method of temperature compensation provided in FIG. 1;
FIG. 3 is a Fibonacci series spiral diagram as employed in FIG. 1 in an embodiment of the present invention;
FIG. 4 is a table of temperature values of FIG. 1 after temperature compensation by a Fibonacci number series in an embodiment of the present invention;
FIG. 5 is a schematic diagram of an apparatus for temperature compensation provided by an embodiment of the present invention;
fig. 6 is a schematic diagram of a temperature compensated terminal device provided by an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
FIG. 1 is a schematic flow chart of an implementation of a method for temperature compensation according to an embodiment of the present invention; FIG. 2 is a schematic diagram of temperature compensation obtained by employing the method of temperature compensation provided in FIG. 1; FIG. 3 is a Fibonacci series spiral diagram as employed in FIG. 1 in an embodiment of the present invention; as shown in fig. 1 to 3, the method for temperature compensation provided by the present invention may include:
101. acquiring the current environmental temperature through a thermistor;
specifically, the thermistor is a type of a sensitive element, which is classified into a positive temperature coefficient thermistor PTC and a negative temperature coefficient thermistor NTC according to a temperature coefficient. Thermistors are typically temperature sensitive and exhibit different resistance values at different temperatures. The positive temperature coefficient thermistor PTC has a resistance value which is larger as the temperature is higher, and the negative temperature coefficient thermistor NTC has a resistance value which is lower as the temperature is higher, which are both semiconductor devices. The present embodiment employs a negative temperature coefficient thermistor NTC. The temperature of the NTC is changed when the resistance value is changed, and a temperature change table corresponding to the resistance value can be made according to the characteristic of the NTC.
Further, the thermistor acquiring the current ambient temperature includes: the ADC (Analog-to-digital converter) converts the acquired voltage into a resistance value, and then looks up the temperature degree table according to the resistance value. The span of the temperature degree table can be set to be 10 ℃, the table look-up range is narrowed to be 10 ℃, and therefore the table look-up time is shortened, and the current environment temperature is obtained in time. Continuously collecting temperature values of sampling points: assuming that the sampling is carried out for 10 times, the maximum value and the minimum value are removed, the type is thickened and divided by 8, and the obtained average value of the sampling is the average ambient temperature value of the current sampling point. Setting the current average ambient temperature value as T new, presetting a variable T old, and initially assigning a value of 31.0 ℃.
102. Judging whether to perform temperature compensation according to the change condition of the current environment temperature;
specifically, step 102 includes: acquiring an average ambient temperature value of the current ambient temperature; judging whether the current average ambient temperature value continuously increases within a preset test time, wherein the amplification is greater than or equal to a preset amplification temperature; and if so, performing temperature compensation when the current environment temperature is higher than 40 ℃. Further, it is determined whether T new is greater than T old +0.2 ℃ (0.3 ℃ if greater than 0.2 ℃), and if it is satisfied 7 times in 6 seconds, it is determined that the compensation condition is satisfied when the temperature value reaches 33.1 ℃ or more (31.0 ℃ +0.3 ℃x7 ═ 33.1 ℃), and compensation is performed if the actual temperature is greater than 40 ℃, and no compensation is performed if the actual temperature is less than 40 ℃, thereby preventing false alarm. Further, the average ambient temperature value continuously increases within the preset test time without exceeding the preset comparison value, and specifically, when the method is applied to the embodiment, the preset comparison value is set to increase by 0.2 ℃ per sampling period, and the current ambient temperature is continuously obtained through the thermistor.
103. If so, acquiring a current temperature compensation value according to a temperature compensation table preset based on the Fibonacci number series coefficient;
in a preset time, if the current environment temperature does not reach the temperature compensation value, the temperature compensation value is kept; and if the current environment temperature is reduced to be lower than the preset temperature compensation initial value, the compensation is quitted, and the current environment temperature is displayed.
Specifically, the former partial compensation coefficient among fibonacci number series coefficients (spirals) — { 101%, 103%, 105%, 108%, 113%, 121%, (using 134%, 155%, 189%) … } hardly satisfies the requirement of the compensation period. The segments are multiplied by the actual temperature values and fitted to a temperature compensation table as shown in fig. 4: namely, the temperature of the environment is predicted through a lower actual value, so that the problem of long response time of the temperature sensor is solved. Further, in the preset time, if the current ambient temperature does not reach the temperature compensation value, the maintaining the temperature compensation value may include: judging that the temperature difference between the current environment temperature and the temperature compensation initial value is compared within the preset time; correcting the preset compensation time according to the temperature difference; and if the current environment temperature does not reach the temperature compensation value within the preset compensation time, keeping the temperature compensation value.
Further, if the temperature difference is greater than 10 ℃, shortening the preset supplementary compensation time for 1 second; if the temperature difference is greater than 14 ℃, shortening the preset supplementary compensation time for 2 seconds; if the temperature difference is greater than 18 ℃, shortening the preset supplementing compensation time for 3 seconds; if the temperature difference is greater than 20 ℃, the preset supplementary compensation time is set to 29 seconds. Because the actually tested environment setting temperature is not constant, the interval is between 45 and 140 ℃, and the temperature rising to any temperature in the interval (multiplied by 1.2) from the environment temperature is required to be alarmed within 40s, and the error is not more than 5%. And the compensated value should not be more than 5% of the set ambient temperature, otherwise the temperature displayed is higher than the ambient temperature, which is inaccurate.
Furthermore, the compensation time length is controlled so as to control the accuracy of the temperature after compensation, the initial compensation time length variable is assigned to 22 seconds, after the compensation condition in 5 is judged to be met, the first sampling value of more than 33.1 degrees is stored as an initial value T0, the time is counted from the sampling value, the value after 15 seconds is stored as T1, the temperature difference between T1 and T0, namely the temperature difference of 15 seconds, is used as the compensation time length correction basis of sampling, and the value is shifted by one bit to the right to obtain the correction time length. Based on this correction, the temperature difference T1-T0 is determined again: if the correction time length is more than 10 degrees, the correction time length is shortened by 1 s; shortening by 2s when the temperature is more than 14 degrees; the length is reduced by 3s when the angle is larger than 18 degrees, and is determined as 29s when the angle is larger than 20 degrees.
If the compensation time is used up, the compensation is not carried out until the actual value reaches the compensated value, and the value is kept; if the temperature drops below T0, the compensation is exited and the actual value is displayed. Therefore, the problem of false alarm caused by difficult control of a compensation result is solved, and the following table shows that:
it should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
The method provided by the embodiment can be seen that the temperature change rate of the surrounding environment is acquired by the thermistor to judge whether temperature compensation measures are taken or not so as to achieve the critical value of the alarm temperature in advance through a temperature compensation mode, on one hand, the alarm is performed in advance through the temperature compensation mode, and the fire can be effectively prevented in time; on the other hand, the temperature is compensated by adopting the Fibonacci sequence, so that the speed of temperature change can be more accurate, and the time for alarming the fire alarm bell can be more accurate. The test environment of the method provided by the embodiment is an oven, and due to the fact that the heat conducting performance of liquid such as water, oil and the like is different from that of air, if the compensation method is adopted, the compensation time needs to be adjusted and shortened.
Fig. 5 is a schematic structural diagram of a temperature compensation device according to an embodiment of the present invention, and for convenience of description, only the portions related to the embodiment of the present invention are shown.
A first obtaining module 51, configured to obtain a current ambient temperature through a thermistor;
the first judging module 52 is used for judging whether temperature compensation is carried out according to the change situation of the current environment temperature;
a second obtaining module 53, configured to obtain a current temperature compensation value according to a temperature compensation table preset based on a fibonacci number series coefficient;
in a preset time, if the current environment temperature does not reach the temperature compensation value, the temperature compensation value is kept; and if the current environment temperature is reduced to be lower than the preset temperature compensation initial value, the compensation is quitted, and the current environment temperature is displayed.
The device provided by the embodiment can also see that the temperature change rate of the surrounding environment is acquired by the thermistor to judge whether to adopt temperature compensation measures or not so as to achieve the critical value of the alarm temperature in advance through a temperature compensation mode, on one hand, the alarm is advanced through the temperature compensation mode, and the fire can be effectively prevented in time; on the other hand, the temperature is compensated by adopting the Fibonacci sequence, so that the speed of temperature change can be more accurate, and the time for alarming the fire alarm bell can be more accurate.
It should be noted that, since each module in the system provided in the embodiment of the present invention is based on the same concept as that of the embodiment of the method of the present invention, the technical effect brought by the embodiment of the method of the present invention is the same as that of the embodiment of the method of the present invention, and specific contents may be referred to the description in the embodiment of the method of the present invention, and are not described herein again.
Fig. 6 is a schematic diagram of a temperature compensated terminal device according to an embodiment of the present invention. As shown in fig. 6, the temperature-compensated terminal device 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62 stored in the memory 61 and executable on the processor 60, such as a computer program for implementing the method of temperature compensation. The steps in the various temperature compensated method embodiments described above, such as steps 101 to 103 shown in fig. 1, are implemented when the computer program 62 is executed by the processor 60. Alternatively, the processor 60, when executing the computer program 62, implements the functions of the various modules/units in the above-described apparatus embodiments, such as the functions of the modules 51 to 53 shown in fig. 5.
The invention proposes a computer program 62 for implementing a method of temperature compensation, comprising: acquiring the current environmental temperature through a thermistor; judging whether to perform temperature compensation according to the change condition of the current environment temperature; if so, acquiring a current temperature compensation value according to a temperature compensation table preset based on the Fibonacci number series coefficient; in a preset time, if the current environment temperature does not reach the temperature compensation value, the temperature compensation value is kept; and if the current environment temperature is reduced to be lower than the preset temperature compensation initial value, the compensation is quitted, and the current environment temperature is displayed. The computer program 62 may be divided into one or more modules/units, which are stored in the memory 61 and executed by the processor 60 to implement the present invention. One or more of the modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the temperature compensated terminal device 6. For example, the computer program 62 may be divided into a synchronization module, a summarization module, an acquisition module, and a return module (a module in a virtual device), each of which functions specifically as follows:
the temperature-compensated terminal device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The temperature compensated terminal device may include, but is not limited to, a processor 60, a memory 61. It will be appreciated by those skilled in the art that fig. 6 is merely an example of a temperature compensated terminal device 6 and does not constitute a limitation of the temperature compensated terminal device 6 and may include more or less components than those shown, or combine some components, or different components, e.g. the temperature compensated terminal device 6 may also include input output devices, network access devices, buses, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the temperature compensated terminal device 6, such as a hard disk or a memory of the temperature compensated terminal device 6. The memory 61 may also be an external storage device of the temperature-compensated terminal device 6, such as a plug-in hard disk provided on the temperature-compensated terminal device 6, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 61 may also include both an internal storage unit of the temperature-compensated terminal device 6 and an external storage device. The memory 61 is used for storing computer programs and other programs and data required by the temperature compensated terminal device 6. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method according to the embodiments of the present invention may also be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of the embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.
Claims (6)
1. A method of temperature compensation, comprising:
acquiring the current environmental temperature through a thermistor;
acquiring an average ambient temperature value of the current ambient temperature; judging whether the current average ambient temperature value continuously increases within a preset test time, wherein the amplitude is greater than or equal to a preset amplification temperature;
if the average ambient temperature value does not exceed a preset comparison value after continuously increasing within a preset test time, continuously keeping obtaining the current ambient temperature through the thermistor;
if so, and the current environment temperature is higher than 40 ℃, segmenting part of compensation coefficients in the Fibonacci number series, multiplying the segmented compensation coefficients by the actual temperature value to fit a temperature compensation table, and acquiring a current temperature compensation value based on the temperature compensation table;
within a preset compensation time, if the current environment temperature does not reach the temperature compensation value, keeping the temperature compensation value; and if the current environment temperature is reduced to be lower than a preset temperature compensation initial value, quitting compensation and displaying the current environment temperature.
2. The method of temperature compensation according to claim 1, wherein the temperature compensation value is maintained if the current ambient temperature does not reach the temperature compensation value within a preset compensation time, the method comprising:
judging that the temperature difference between the current environment temperature and the temperature compensation initial value is compared within the preset compensation time;
if the temperature difference is more than 10 ℃, reducing the preset compensation time by 1 second;
if the temperature difference is greater than 14 ℃, reducing the preset compensation time by 2 seconds;
if the temperature difference is greater than 18 ℃, reducing the preset compensation time by 3 seconds;
if the temperature difference is greater than 20 ℃, setting the preset compensation time to be 29 seconds;
and if the current environment temperature does not reach the temperature compensation value within the preset compensation time, keeping the temperature compensation value.
3. A temperature compensated apparatus, comprising:
the first acquisition module is used for acquiring the current ambient temperature through the thermistor;
the first judgment module is used for acquiring the average ambient temperature value of the current ambient temperature; judging whether the current average ambient temperature value continuously increases within a preset test time, wherein the amplitude is greater than or equal to a preset amplification temperature;
if the average ambient temperature value does not exceed a preset comparison value after continuously increasing within a preset test time, continuously keeping obtaining the current ambient temperature through the thermistor;
a second obtaining module, configured to segment a part of compensation coefficients in a fibonacci number series and multiply the part of compensation coefficients by an actual temperature value to fit a temperature compensation table if the current average ambient temperature value continuously increases within a preset test time, an amplification is greater than or equal to a preset amplification temperature, and the current ambient temperature is greater than 40 ℃, and obtain a current temperature compensation value based on the temperature compensation table;
within a preset compensation time, if the current environment temperature does not reach the temperature compensation value, keeping the temperature compensation value; and if the current environment temperature is reduced to be lower than a preset temperature compensation initial value, quitting compensation and displaying the current environment temperature.
4. The temperature-compensated apparatus of claim 3, wherein the second obtaining module comprises:
the second judgment unit is used for judging that the temperature difference between the current environment temperature and the temperature compensation initial value is compared within the preset compensation time;
the correction unit is used for shortening the preset compensation time by 1 second if the temperature difference is greater than 10 ℃;
if the temperature difference is greater than 14 ℃, reducing the preset compensation time by 2 seconds;
if the temperature difference is greater than 18 ℃, reducing the preset compensation time by 3 seconds;
if the temperature difference is greater than 20 ℃, setting the preset compensation time to be 29 seconds;
and the maintaining unit is used for maintaining the temperature compensation value if the current environment temperature does not reach the temperature compensation value within the preset compensation time.
5. A temperature-compensated terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 2 when executing the computer program.
6. A temperature compensated computer readable storage medium, having a computer program stored thereon, wherein the computer program, when being executed by a processor, is adapted to carry out the steps of the method according to any one of the claims 1 to 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710638691.1A CN107449521B (en) | 2017-07-31 | 2017-07-31 | Temperature compensation method, terminal device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710638691.1A CN107449521B (en) | 2017-07-31 | 2017-07-31 | Temperature compensation method, terminal device and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107449521A CN107449521A (en) | 2017-12-08 |
CN107449521B true CN107449521B (en) | 2020-01-17 |
Family
ID=60490557
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710638691.1A Active CN107449521B (en) | 2017-07-31 | 2017-07-31 | Temperature compensation method, terminal device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107449521B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110006548B (en) * | 2018-01-04 | 2021-02-19 | 中国航发商用航空发动机有限责任公司 | Temperature sensor signal compensation method and device, and computer readable storage medium |
CN108426646A (en) * | 2018-03-16 | 2018-08-21 | 深圳市卡卓无线信息技术有限公司 | Device temperature measurement method and device |
CN108664445B (en) * | 2018-04-16 | 2022-11-25 | 深圳和而泰小家电智能科技有限公司 | Temperature calculation method and electronic equipment |
CN110030691A (en) * | 2019-04-01 | 2019-07-19 | 珠海格力电器股份有限公司 | Temperature detection method and device of manual operator |
CN111855019B (en) * | 2020-07-27 | 2023-01-24 | 歌尔科技有限公司 | Temperature measuring method and device, wrist-worn equipment and storage medium |
CN111998235B (en) * | 2020-08-12 | 2022-08-30 | 深圳市祥为测控技术有限公司 | Temperature compensation method and device for leakage positioning and computer storage medium |
CN114545793B (en) * | 2020-11-24 | 2024-04-26 | 广东美的生活电器制造有限公司 | Power-off compensation method and device for household appliance and household appliance |
CN113267264B (en) * | 2021-05-23 | 2023-04-14 | 山东英信计算机技术有限公司 | Temperature detection method, system, equipment and medium of temperature sensor |
CN113483919B (en) * | 2021-06-30 | 2024-06-11 | 启北公司 | Temperature calibration method, system, storage medium and electronic equipment |
CN114594807B (en) * | 2022-03-07 | 2023-02-28 | 黄山奥仪电器有限公司 | Constant temperature control system based on VTI |
CN115173009B (en) * | 2022-07-15 | 2024-03-22 | 西南应用磁学研究所(中国电子科技集团公司第九研究所) | Temperature compensation method for gyromagnetic filter assembly |
CN117268594B (en) * | 2023-11-21 | 2024-01-26 | 深圳市天龙世纪科技发展有限公司 | Intelligent terminal NTC function test method, system and medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8485724B2 (en) * | 2010-03-31 | 2013-07-16 | Microchip Technology Incorporated | Thermocouple electromotive force voltage to temperature converter with integrated cold-junction compensation and linearization |
CN102034329B (en) * | 2010-12-29 | 2012-07-04 | 上海大学 | Infrared fire detection method based on multiband and multi-feature |
US8689635B2 (en) * | 2011-05-13 | 2014-04-08 | Taiwan Silicon Microelectronics Co., Ltd. | Automatic calibration procedure of temperature compensation for digital pressure gauges |
CN102354429B (en) * | 2011-09-22 | 2015-09-16 | 无锡圣敏传感科技有限公司 | Multivariate combined-type linear temperature-sensing fire detector and implementation method |
CN103759851A (en) * | 2014-02-18 | 2014-04-30 | 悉雅特万科思自动化(杭州)有限公司 | Temperature compensation method used for thermal resistance collecting module |
-
2017
- 2017-07-31 CN CN201710638691.1A patent/CN107449521B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107449521A (en) | 2017-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107449521B (en) | Temperature compensation method, terminal device and computer readable storage medium | |
CN110793635B (en) | Thermal imaging temperature measurement method and device and terminal equipment | |
EP3367209B1 (en) | Method and apparatus for surface and ambient temperature estimation for portable devices | |
RU2640126C2 (en) | Methods and instruments of leakage current in resistance thermal detector monitoring | |
EP2963402B1 (en) | Method of operating a mobile device, computer program product and mobile device | |
CN106644148B (en) | Temperature checking method, temperature-detecting device and temperature testing equipment | |
EP2993451A1 (en) | Method of predicting an ambient temperature around a mobile device, computer program product and mobile device | |
US20130226478A1 (en) | Computing device and method for analyzing acquisition values | |
CN110765414A (en) | Performance index data evaluation method, device, equipment and storage medium | |
CN116994979B (en) | Square resistance measuring method, electronic device and storage medium | |
CN108761161B (en) | Method and device for compensating temperature influence errors of electric energy meter | |
CN114199394A (en) | Temperature measuring method and device and electronic equipment | |
CN114397044A (en) | Body temperature detection method and device, electronic equipment and storage medium | |
CN115754603A (en) | Data correction method, device, equipment, storage medium and computer program product | |
CN109781341B (en) | Data calibration method and device for air pressure sensor | |
CN116295902A (en) | Method and device for detecting environmental temperature of electronic equipment | |
CN110608809B (en) | Temperature measuring device, module and method based on thermistor | |
CN113670478B (en) | Temperature data correction method, system, device and medium based on thermometer | |
CN116399374B (en) | MEMS gyroscope sensor compensation method, device, terminal and storage medium | |
JP2007113921A (en) | Conversion arithmetic device | |
CN107607144B (en) | Sensor baseline drift correction method and detection equipment | |
CN115372885A (en) | Metering terminal precision correction method and device, electronic equipment and storage medium | |
CN110186560B (en) | Ultraviolet numerical value correction method and system | |
CN118549710B (en) | Method, device, equipment and medium for measuring true resistance | |
WO2020068516A1 (en) | Fractional mirror ratio technique for digital remote temperature sensors, and related systems, methods, and devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 518000 East and fourth floors, building A1, xinjianxing science and Technology Industrial Park, Fengxin Road, Loucun, Gongming street, Guangming District, Shenzhen City, Guangdong Province Applicant after: TANDA Technology Co., Ltd. Address before: 518000 Guangdong province Shenzhen Guangming New District Gongming Street Village Feng Xin Lu Xinjian Xing Technology Industrial Park A1 Building 1 floor, 3 floor, 4 East Building, 5 floor Applicant before: TANDA Technology Co., Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |