K-type thermocouple compensation method and system and storage medium
Through multi-dimensional temperature compensation and external design of cold-end sensors, the influence of domestic heating and harsh environment on the K-type thermocouple acquisition accuracy is solved, and high-precision temperature acquisition is achieved.
Patent Information
- Application Number
- CN202510876149.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-07-25
AI Technical Summary
In the field of monitoring optical loads, excessive heat from domestic devices leads to inconsistent cold-end compensation, affecting the acquisition accuracy, and the harsh working environment increases the difficulty of high-precision acquisition.
Through the multi-dimensional temperature compensation method, combined with the external design of the cold-end temperature sensor, ADC acquisition compensation, cold-end temperature calibration and thermocouple indexing method are used to achieve accurate temperature acquisition of K-type thermocouples.
The acquisition accuracy of K-type thermocouples in high and low temperature and low air pressure environments is improved, and the influence of environmental factors is reduced, and the acquisition accuracy can reach less than ±0.04℃.
Smart Images

Figure CN120369136A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of temperature acquisition, and particularly relates to a compensation method, system and storage medium for a K-type thermocouple. Background Art
[0002] At present, high-precision acquisition of K-type thermocouples is mainly applied to the optical experiment field to collect the load temperature. According to the real-time collection of the load temperature at multiple points, the characteristics of the load changing with time are analyzed critically. At present, national substitution is a trend, and it is necessary to replace software and hardware with domestic products, and under various harsh working environments, such as high and low temperatures, low air pressure, and self-heating during acquisition, long-term high-precision acquisition of K-type thermocouples needs to be realized. For the acquisition scheme affected by such multiple environmental linkage factors, it is extremely difficult to achieve an acquisition accuracy of 0.1% within a certain temperature range.
[0003] In the field of monitoring optical loads, it is necessary to collect K-type thermocouple information in real time for a long time, and there are the following problems: First, domestic devices generate too much heat, resulting in inconsistent cold-end compensation for different channels, seriously affecting the acquisition accuracy; second, the working environment is relatively harsh, and environmental factors affect the acquisition accuracy. Summary of the Invention
[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a compensation method, system and storage medium for a K-type thermocouple.
[0005] The purpose of the present invention is achieved through the following technical solutions: In the first aspect of the present invention, a compensation method for a K-type thermocouple is provided, including the following steps: In the ADC acquisition compensation stage, the digital quantity of the K-type thermocouple after voltage conversion is collected through an analog-to-digital converter ADC, and the current channel acquisition voltage compensation value is calculated, and then the voltage value after acquisition compensation of the K-type thermocouple is obtained; In the cold-end temperature acquisition compensation stage, temperature compensation calibration model parameters are obtained from the cold-end temperature sensor externally connected to the current group, and the cold-end temperature value before calibration compensation of the current group is obtained; the real cold-end acquisition temperature value is calculated by fusing the temperature compensation calibration model parameters of the current group cold-end and the cold-end temperature value before calibration compensation; In the thermocouple compensation stage, the actual acquisition temperature value is calculated by using the K-type thermocouple graduation look-up table method according to the voltage value after acquisition compensation of the K-type thermocouple; the real cold-end acquisition temperature value and the actual acquisition temperature value are fused to finally obtain the K-type thermocouple acquisition temperature value of the current channel.
[0006] Preferably, the ADC acquisition compensation stage further includes the following steps: Collect the digital quantity of the K-type thermocouple after voltage conversion through the analog-to-digital converter ADC, and calculate the current K-type thermocouple voltage by inversely deducing based on the collected reference voltage. Obtain the calibration compensation table for the voltage collected by the current channel, perform calibration value compensation matching for two adjacent points, and calculate the linearization compensation gain and / or offset error parameters to obtain the compensation parameters. Superimpose the compensation parameters on the collected value of the K-type thermocouple to obtain the compensation value of the voltage collected by the current channel.
[0007] Preferably, the cold-junction temperature acquisition and compensation stage further includes the following steps: Perform multi-stage calibration compensation on the cold-junction temperature sensor. Place the cold-junction acquisition aviation plug into a constant temperature bath, set the temperature of the constant temperature bath and the range of calibration measurement points. After the temperature is stable for a preset time, collect the cold-junction temperature value, and record the current collected value and the actual constant temperature bath temperature value. Perform calibration compensation recording once every preset temperature to obtain multiple collected values and their corresponding constant temperature bath temperature values; write the corresponding relationship between the collected values and the constant temperature bath temperature values into the register space of the cold-junction temperature sensor. Connect the cold-junction temperature sensor of the current group, collect the cold-junction temperature value before calibration compensation, automatically match the constant temperature bath temperature interval according to the cold-junction temperature value before calibration compensation, and perform temperature segment compensation to calculate the cold-junction temperature compensation value. Superimpose the cold-junction temperature compensation value on the cold-junction temperature value before calibration compensation to finally obtain the true cold-junction collected temperature value.
[0008] Preferably, the cold-junction temperature sensor is placed outside the K-type thermocouple acquisition box.
[0009] The second aspect of the present invention provides: a K-type thermocouple compensation system for implementing any one of the above K-type thermocouple compensation methods, including: The ADC acquisition compensation module is used to collect the digital quantity of the K-type thermocouple after voltage conversion through the analog-to-digital converter ADC and calculate the compensation value of the voltage collected by the current channel, and further obtain the voltage value of the K-type thermocouple after acquisition compensation. The cold-junction temperature acquisition and compensation module is used to obtain the temperature compensation calibration model parameters from the cold-junction temperature sensor externally connected to the current group, and obtain the cold-junction temperature value before calibration compensation of the current group; calculate the true cold-junction collected temperature value by fusing the temperature compensation calibration model parameters of the current group's cold-junction and the cold-junction temperature value before calibration compensation. The thermocouple compensation module is used to calculate the actual collected temperature value according to the voltage value of the K-type thermocouple after acquisition compensation by using the K-type thermocouple graduation table lookup method; fuse the true cold-junction collected temperature value and the actual collected temperature value to finally obtain the K-type thermocouple collected temperature value of the current channel.
[0010] The third aspect of the present invention provides: a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, any of the above K-type thermocouple compensation methods is implemented.
[0011] The beneficial effects of the present invention are as follows: 1) Through temperature compensation in multiple dimensions, and fitting the temperature points of the cold junction multi-interval temperature acquisition results with the actual cold junction sensor in terms of temperature segments, the influence of environmental factors is reduced, the acquisition accuracy is improved, and the defects brought about by the localization of devices and the harsh working environment are overcome.
[0012] 2) By placing the cold junction temperature sensor outside the K-type thermocouple acquisition box, the instability error caused by the heat generation of domestic devices is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is the overall flowchart of the method of the present invention; Figure 2 is the layout structure schematic diagram of the K-type thermocouple acquisition box; Figure 3 is the interface schematic diagram of the K-type thermocouple acquisition box; Figure 4 is the schematic diagram of the verification result. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0014] Next, the technical solutions of the present invention will be clearly and completely described in conjunction with the embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts fall within the protection scope of the present invention.
[0015] Refer to Figures 1 - 4 , the first aspect of the present invention provides: a K-type thermocouple compensation method, including the following steps: In the ADC acquisition compensation stage, the digital quantity of the K-type thermocouple after voltage conversion is acquired by the analog-to-digital converter ADC, and the acquisition voltage compensation value of the current channel is calculated, and then the voltage value after the acquisition compensation of the K-type thermocouple is obtained; In the cold junction temperature acquisition compensation stage, the temperature compensation calibration model parameters are obtained from the externally connected cold junction temperature sensor of the current group, and the cold junction temperature value before calibration compensation of the current group is obtained; the true cold junction acquisition temperature value is calculated by fusing the temperature compensation calibration model parameters of the cold junction of the current group and the cold junction temperature value before calibration compensation; During the thermocouple compensation stage, the actual collected temperature value is calculated by using the K-type thermocouple graduation table lookup method based on the compensated voltage value collected by the K-type thermocouple; the real cold junction collected temperature value is fused with the actual collected temperature value to finally obtain the K-type thermocouple collected temperature value of the current channel.
[0016] In this embodiment, to improve the collection accuracy, the influence of domestic devices on the collection accuracy is comprehensively considered in terms of software, and multi-dimensional collection calibration compensation is carried out. In terms of hardware, at the input collection design end, the input conditioning and collection are combined to implement a "high aggregation" integrated design scheme. Since the amplitude of the K-type thermocouple input quantity is extremely small, the crosstalk between levels caused by external interference can be reduced. The problem that the cold junction sensor is affected by the large and unstable heat dissipation of domestic devices is solved, the cold junction collected temperature is kept relatively stable, and the compensation accuracy of the K-type thermocouple is improved. According to such domestic design, the collection accuracy error range can be within ±0.04°C; the collection module is placed in a high and low temperature chamber, the K-type thermocouple probe is placed in a room temperature environment, the temperature of the high temperature chamber is set to 70°C, and the temperature results of the K-type thermocouples of each channel are collected as Figure 3 shown.
[0017] The thermocouple compensation stage specifically includes the following steps: obtaining the temperature value after cold junction compensation of the current group (8 K-type thermocouple collection channels) and the voltage value after calibration of the K-type ADC of the current channel; According to the voltage collected by the K-type thermocouple, the actual corresponding temperature value of the current K-type thermocouple is calculated by using the table lookup method; The compensated cold junction temperature is fused with the K-type thermocouple compensation temperature value after looking up the table to finally obtain the K-type thermocouple collected temperature value of the current channel.
[0018] To achieve system-level synchronous sampling of 40-channel K-type thermocouples, the system can be divided into 5 groups of cold junction compensations to perform cold junction temperature compensation on 8 collection channels, and finally obtain the K-type thermocouple temperature values of 40-channel collections. For the convenience of collection record tracking and query, the temperature of each channel is stored in the emmc memory of the internal SDIO interface according to the time and date, and can be read through the shell method.
[0019] In some embodiments, the ADC collection compensation stage further includes the following steps: Collect the digital quantity of the K-type thermocouple after voltage conversion through the analog-to-digital converter ADC, and calculate the current K-type thermocouple voltage by back-calculating based on the collected reference voltage; Obtain the calibration compensation table of the collected voltage of the current channel, perform calibration value compensation matching for two adjacent points, and calculate the linearization compensation gain and / or offset error parameter to obtain the compensation parameter; Superimpose the compensation parameter and the K-type thermocouple collected value to obtain the collected voltage compensation value of the current channel.
[0020] In this embodiment, data acquisition of a domestic 32-bit ADC is realized, and the lower 8 bits of the acquisition result are removed. The domestic ADC compensation algorithm includes two parts. One part is to perform temperature segment fitting on the acquisition results at multiple interval temperature points with the actual sensor, and the other part is to perform calibration compensation inside the ADC chip, and the acquired data is smoothed using a window filtering algorithm. The ADC acquisition compensation stage specifically includes the following steps: S100, after conditioning the small signal of the K-type thermocouple analog quantity, the K-type thermocouple analog quantity is acquired through the ADC externally connected to the CPU, and the input standard analog quantity is recorded; S101, calculate the true analog acquisition quantity through the following formula for the digital quantity after ADC conversion: M = (Vref * D) / 2^16; where, M is the floating-point K-type thermocouple acquisition voltage calculated, in mV; Vref: is the reference voltage of the acquisition channel; D: is the digital quantity acquired by the ADC.
[0021] S102, repeat steps S100 and S101, the analog input range is -50°C to 150°C, calibrate one point every 10°C, and there are a total of 20 calibration data points.
[0022] S103, store the calibrated data in the fixed storage area of the CPU's ROM according to the corresponding relationship.
[0023] S200, after single-channel acquisition is completed, perform automatic data interval comparison with the calibration table to obtain the calibration values of two points adjacent to the current acquisition value; S201, calculate the gain / channel compensation value within the range of these two points according to the following formula, and the formula is as follows: ΔY = KΔX + b; where, ΔY is the gain / channel compensation parameter that needs to be compensated for the current acquisition value, K is the linear parameter, ΔX is the difference between the calibration values, and b is the channel correction value.
[0024] S300, superimpose the gain / channel compensation value calculated in S201 on the actually acquired channel analog voltage to finally obtain the compensated ADC channel acquisition value.
[0025] In some embodiments, the cold-end temperature acquisition compensation stage further includes the following steps: Perform multi-stage calibration compensation on the cold-end temperature sensor. Place the cold-end acquisition aviation plug into a constant temperature bath, set the temperature of the constant temperature bath and the range of calibration measurement points. After the temperature is stable for a preset time, acquire the cold-end temperature value and record the current acquisition value and the actual constant temperature bath temperature value; Perform calibration compensation records every preset temperature to obtain multiple acquisition values and their corresponding constant temperature bath temperature values; write the corresponding relationship between the acquisition values and the constant temperature bath temperature values into the register space of the cold-end temperature sensor; Connect the cold junction temperature sensor of the current group to collect the cold junction temperature value before calibration compensation, automatically match the constant temperature bath temperature range according to the cold junction temperature value before calibration compensation, and perform temperature segment compensation to calculate the cold junction temperature compensation value; Superimpose the cold junction temperature compensation value and the cold junction temperature value before calibration compensation to finally obtain the true cold junction acquisition temperature value.
[0026] In this embodiment, since the cold junction temperature sensor is greatly affected by environmental temperature factors, this device belongs to a non-linear device. Based on this characteristic, it is necessary to perform multi-stage calibration compensation on it to improve the cold junction temperature acquisition accuracy. The specific steps are as follows: S401: Place the cold junction acquisition aviation plug into the constant temperature bath, set the temperature of the constant temperature bath, calibrate the measurement point range from -50°C to 150°C. After setting the temperature to be stable for half an hour, the acquisition module measures its cold junction temperature value and records the current acquisition value and the actual constant temperature bath temperature value; S402: Perform calibration compensation records every 5°C, and repeat the calibration compensation steps of S401; S403: Finally obtain the multi-point acquisition values and their corresponding constant temperature bath temperature values. In order not to target the specific usage method of the cold junction acquisition aviation plug in the future, it is necessary to write the corresponding relationship between the acquisition value and the constant temperature bath temperature value into the spare register space of the cold junction temperature sensor.
[0027] S500: Connect the cold junction sensor of the current group, collect the actual cold junction temperature value, and store it in the buffer.
[0028] S600: Obtain the cold junction sensor record value, automatically match the recorded constant temperature bath temperature range according to the current cold junction acquisition value, perform temperature segment compensation, and finally calculate the cold junction temperature compensation value.
[0029] S601: Superimpose it with the actually acquired temperature value to finally obtain the compensated cold junction acquisition temperature value.
[0030] In some embodiments, the cold junction temperature sensor is placed outside the K-type thermocouple acquisition box.
[0031] The second aspect of the present invention provides: A K-type thermocouple compensation system for implementing any one of the above K-type thermocouple compensation methods, including: An ADC acquisition compensation module for collecting the digital quantity of the K-type thermocouple after voltage conversion through an analog-to-digital converter ADC and calculating the current channel acquisition voltage compensation value, and further obtaining the voltage value of the K-type thermocouple after acquisition compensation; The cold-end temperature acquisition and compensation module is used to obtain the temperature compensation calibration model parameters from the cold-end temperature sensor externally connected to the current group, and obtain the cold-end temperature value before calibration and compensation of the current group; calculate the true cold-end acquisition temperature value by fusing the temperature compensation calibration model parameters of the cold-end of the current group and the cold-end temperature value before calibration and compensation. The thermocouple compensation module is used to calculate the actual acquisition temperature value by using the K-type thermocouple indexing and look-up table method according to the voltage value after acquisition and compensation of the K-type thermocouple; fuse the true cold-end acquisition temperature value and the actual acquisition temperature value to finally obtain the K-type thermocouple acquisition temperature value of the current channel.
[0032] The third aspect of the present invention provides: a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, any of the above K-type thermocouple compensation methods is implemented.
[0033] The above are only the preferred embodiments of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein, should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be changed within the scope of the concept described herein through the above teachings or the technology or knowledge in related fields. And the changes and alterations made by those skilled in the art without departing from the spirit and scope of the present invention should all be within the protection scope of the appended claims of the present invention.
Claims
1. A K-type thermocouple compensation method, characterized in that: Including the following steps: During the ADC acquisition compensation stage, the digital quantity of the K-type thermocouple after voltage conversion is acquired by the analog-to-digital converter (ADC), and the acquisition voltage compensation value of the current channel is calculated, thereby obtaining the voltage value of the K-type thermocouple after acquisition compensation; During the cold junction temperature acquisition compensation stage, the temperature compensation calibration model parameters are obtained from the cold junction temperature sensor externally connected to the current group, and the cold junction temperature value before calibration compensation of the current group is obtained; The true cold junction acquisition temperature value is calculated by fusing the temperature compensation calibration model parameters of the current group's cold junction and the cold junction temperature value before calibration compensation; During the thermocouple compensation stage, the actual acquisition temperature value is calculated using the K-type thermocouple graduation table lookup method based on the voltage value of the K-type thermocouple after acquisition compensation; The true cold junction acquisition temperature value and the actual acquisition temperature value are fused to finally obtain the acquisition temperature value of the K-type thermocouple of the current channel.
2. The K-type thermocouple compensation method according to claim 1, characterized in that: The ADC acquisition compensation stage further includes the following steps: The digital quantity of the K-type thermocouple after voltage conversion is acquired by the analog-to-digital converter (ADC), and the voltage of the current K-type thermocouple is calculated by reverse deduction based on the acquired reference voltage; The calibration compensation table of the acquisition voltage of the current channel is obtained, and the calibration value compensation matching of two adjacent points is performed to calculate the linearization compensation gain and / or offset error parameters to obtain the compensation parameters; The compensation parameters are superimposed on the acquisition value of the K-type thermocouple to obtain the acquisition voltage compensation value of the current channel.
3. The K-type thermocouple compensation method according to claim 1, wherein: The cold junction temperature acquisition compensation stage further includes the following steps: Perform multi-stage calibration compensation on the cold junction temperature sensor. Place the cold junction acquisition aviation plug into a constant temperature bath, set the temperature of the constant temperature bath and the range of calibration measurement points. After the temperature is stable for a preset time, acquire the cold junction temperature value and record the current acquisition value and the actual constant temperature bath temperature value; Perform a calibration compensation record every preset temperature to obtain multiple acquisition values and their corresponding constant temperature bath temperature values; write the corresponding relationship between the acquisition values and the constant temperature bath temperature values into the register space of the cold junction temperature sensor; Connect the cold junction temperature sensor of the current group, acquire the cold junction temperature value before calibration compensation, automatically match the constant temperature bath temperature interval segment according to the cold junction temperature value before calibration compensation, and perform temperature segment compensation to calculate the cold junction temperature compensation value; The cold junction temperature compensation value is superimposed on the cold junction temperature value before calibration compensation to finally obtain the true cold junction acquisition temperature value.
4. The K-type thermocouple compensation method according to any one of claims 1-3, characterized in that: The cold junction temperature sensor is placed outside the K-type thermocouple acquisition box.
5. A K-type thermocouple compensation system, characterized in that: For implementing the K-type thermocouple compensation method according to any one of claims 1-4, including: An ADC acquisition compensation module, configured to acquire the digital quantity of the K-type thermocouple after voltage conversion by the analog-to-digital converter (ADC) and calculate the acquisition voltage compensation value of the current channel, thereby obtaining the voltage value of the K-type thermocouple after acquisition compensation; A cold junction temperature acquisition compensation module, configured to obtain the temperature compensation calibration model parameters from the cold junction temperature sensor externally connected to the current group, and obtain the cold junction temperature value before calibration compensation of the current group; calculate the true cold junction acquisition temperature value by fusing the temperature compensation calibration model parameters of the current group's cold junction and the cold junction temperature value before calibration compensation; The thermocouple compensation module is used to calculate the actual collected temperature value by using the K-type thermocouple indexing look-up table method according to the compensated voltage value collected by the K-type thermocouple; fuse the real cold junction collected temperature value with the actual collected temperature value to finally obtain the K-type thermocouple collected temperature value of the current channel.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, the K-type thermocouple compensation method according to any one of claims 1-4 is implemented.
Citation Information
Patent Citations
System and method for collecting temperature by using thermoelectric couple
CN101093177A
Cited By
Vacuum furnace temperature control method and system based on multiple sensors
CN121953682A