Temperature calibration method, electronic device, and storage medium

By setting up a signal amplification circuit between the cold junction of the thermocouple and the measuring unit, and by using a calibration table and matrix transformation, combined with singular value solving, the nonlinearity problem of the thermocouple temperature measuring device was solved, achieving high-precision and low-cost temperature calibration.

CN119469475BActive Publication Date: 2025-12-30CHINA FAW CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411654369.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-12-30
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

Existing thermocouple temperature measurement devices suffer from low analytical accuracy, high computational load, and high cost due to nonlinear relationships.

Method used

By setting up a signal amplification circuit between the cold junction of the thermocouple and the measuring unit, and using a preset calibration table for interpolation and matrix transformation, combined with singular value solving, the cold junction temperature and potential difference can be accurately calibrated.

Benefits of technology

It improves temperature measurement accuracy, reduces measurement costs, and enhances computational efficiency and the accuracy of temperature calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119469475B_ABST
    Figure CN119469475B_ABST
Patent Text Reader

Abstract

The application discloses a temperature calibration method, an electronic device and a storage medium. The temperature calibration method is applied to a temperature measuring device. The temperature measuring device comprises a thermocouple, a signal amplification circuit and a measuring unit. The method comprises the following steps: obtaining a cold end temperature of a cold end of the thermocouple, and receiving a potential difference sent by the measuring unit; performing interpolation processing on the cold end temperature and the potential difference based on a preset protractor, to obtain an interpolation equation; performing matrix conversion on the interpolation equation, to obtain a parameter matrix; performing singular value solving on the parameter matrix, to obtain an interpolation parameter solution; determining a temperature difference value between the cold end and a hot end of the thermocouple according to the interpolation parameter solution, and performing temperature calibration on the hot end of the thermocouple according to the temperature difference value and the cold end temperature, to obtain a target temperature of a to-be-tested position. In the embodiment of the application, the measurement cost can be reduced while the measurement precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of temperature testing technology, and in particular to a temperature calibration method, electronic device, and storage medium. Background Technology

[0002] In routine vehicle power system testing in the laboratory, temperature signal acquisition is a crucial step. For example, overload and short-circuit tests of vehicle wiring harnesses require detecting whether the temperature at the load end and fuse box exceeds the limit; vehicle electrical balance tests require detecting whether the temperature in the vehicle engine compartment and room temperature are normal; and accidental train landing analysis requires real-time temperature acquisition of specific wires to analyze the cause of the accident. Thermocouples are widely used as temperature sensors due to their unique advantages. However, in practical applications, thermocouple temperature measurement also has some obvious shortcomings and challenges.

[0003] Most thermocouples on the market, especially type K thermocouples, do not exhibit absolute linearity, resulting in low analytical accuracy and a huge computational burden. This nonlinear relationship makes deducing temperature from potential difference more complex, requiring intricate mathematical models and calculations, increasing the difficulty of data processing. While type S thermocouples theoretically offer higher accuracy, their more complex nonlinear relationship limits their practical application. Therefore, although thermocouples have become the mainstream temperature sensor due to their rapid response and wide temperature range, their shortcomings in handling nonlinear relationships and cost lead to current measurement accuracy being relatively low and costly. Summary of the Invention

[0004] The following is an overview of the topics described in detail in this article.

[0005] This application provides a temperature calibration method, electronic device, and storage medium that can reduce measurement costs while improving measurement accuracy.

[0006] In a first aspect, embodiments of this application provide a temperature calibration method applied to a temperature measuring device, the temperature measuring device including a thermocouple, a signal amplification circuit, and a measuring unit;

[0007] The hot junction of the thermocouple is positioned at the test location, the cold junction of the thermocouple is connected to the input terminal of the signal amplification circuit, the output terminal of the signal amplification circuit is connected to the measurement unit, and the measurement unit is used to receive the voltage signal output by the signal amplification circuit to measure the potential difference between the cold junctions.

[0008] The method includes:

[0009] The cold junction temperature of the thermocouple is obtained, and the potential difference sent by the measuring unit is received.

[0010] The cold junction temperature and the potential difference are interpolated based on a preset calibration table to obtain an interpolation equation.

[0011] Perform matrix transformation on the interpolation equation to obtain the parameter matrix;

[0012] Singular value solving is performed on the parameter matrix to obtain the interpolation parameter solution;

[0013] The temperature difference between the cold and hot junctions of the thermocouple is determined based on the interpolation parameters, and the hot junction of the thermocouple is calibrated based on the temperature difference and the cold junction temperature to obtain the target temperature of the test location.

[0014] In some embodiments, the interpolation process based on a preset calibration table to obtain an interpolation equation for the cold junction temperature and the potential difference includes:

[0015] The preset calibration table is filtered based on the cold junction temperature and the potential difference to obtain a set of boundary conditions, wherein the set of boundary conditions includes multiple data points.

[0016] Determine the number of data points in the boundary condition set, and determine the polynomial order based on the number of data points;

[0017] Based on the polynomial order, power function interpolation is performed on the data points in the boundary condition set to obtain the interpolation equation.

[0018] In some embodiments, the step of filtering data from a preset calibration table based on the cold junction temperature and the potential difference to obtain a set of boundary conditions includes:

[0019] The search conditions are generated based on the cold junction temperature and the potential difference;

[0020] The data in the gradation table is initially filtered using a preset binary search algorithm to select a set of data that meets the search criteria.

[0021] An interpolation curve is plotted based on the data in the dataset, and an independent variable range is set based on the interpolation curve, wherein the independent variable range includes multiple scale points;

[0022] For each scale point in the range of the independent variable, calculate the curve distance between the scale point and the interpolation curve;

[0023] The curve distance is compared with a preset distance threshold to filter out target division points that are less than or equal to the preset distance threshold;

[0024] A set of boundary conditions is generated based on the target indexing point.

[0025] In some embodiments, the step of performing power function interpolation on the data points in the boundary condition set according to the polynomial order to obtain the interpolation equation includes:

[0026] An interpolation polynomial is constructed using a preset interpolation method, and the coefficients of the interpolation polynomial are calculated.

[0027] For each data point in the set of boundary conditions, calculate the difference quotient value of the data point, and construct a difference quotient table based on the difference quotient value;

[0028] An interpolation equation is constructed based on the difference quotient table, the interpolation polynomial, and the coefficients.

[0029] In some embodiments, performing matrix transformation on the interpolation equation to obtain a parameter matrix includes:

[0030] The first matrix corresponding to the potential difference, the second matrix corresponding to the cold junction temperature, and the target parameter matrix are determined based on the interpolation equation.

[0031] The first matrix is ​​transposed, and the target parameter matrix is ​​also transposed.

[0032] Generate a parameter matrix based on the first matrix after transpose, the target parameter matrix after transpose, and the second matrix.

[0033] In some embodiments, the step of performing singular value solving on the parameter matrix to obtain the interpolation parameter solution includes:

[0034] Construct the first orthogonal matrix, the second orthogonal matrix, and the diagonal matrix;

[0035] The diagonal matrix is ​​pseudo-inverseed to obtain a diagonal pseudo-inverse matrix. The first orthogonal matrix is ​​transposed to obtain a first orthogonal transpose matrix. The second orthogonal matrix is ​​transposed to obtain a second orthogonal transpose matrix.

[0036] The singular pseudo-inverse matrix is ​​obtained based on the first orthogonal matrix, the second orthogonal matrix, the first orthogonal transpose matrix, the second orthogonal transpose matrix, the diagonal pseudo-inverse matrix, and the diagonal matrix;

[0037] The interpolation parameter solution is obtained by solving the parameter matrix based on the singular pseudo-inverse matrix.

[0038] In some embodiments, obtaining the singular pseudoinverse matrix based on the first orthogonal matrix, the second orthogonal matrix, the first orthogonal transpose matrix, the second orthogonal transpose matrix, the diagonal pseudoinverse matrix, and the diagonal matrix includes:

[0039] The singular matrix is ​​obtained based on the first orthogonal matrix, the diagonal matrix, and the second orthogonal transpose matrix;

[0040] The singular matrix is ​​obtained by performing a pseudo-inverse transformation on the singular matrix using the second orthogonal matrix, the diagonal pseudo-inverse matrix, and the first orthogonal transpose matrix.

[0041] In some embodiments, calculating the curve distance between the graduation point and the interpolation curve includes:

[0042] For each of the graduation points, determine the graduation coordinates of the graduation point;

[0043] The interpolation curve is parameterized.

[0044] The distance between the graduated coordinates and the parameterized interpolation curve is calculated using a preset distance function.

[0045] Secondly, embodiments of this application also provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the temperature calibration method as described in the first aspect.

[0046] Thirdly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the temperature calibration method as described in the first aspect.

[0047] The temperature calibration method of this application embodiment has the following beneficial effects: The temperature measuring device includes a thermocouple, a signal amplification circuit, and a measuring unit. The hot junction of the thermocouple is set at the position to be tested, and the cold junction of the thermocouple is connected to the input terminal of the signal amplification circuit, so that the signal amplification circuit can directly amplify the signal transmitted by the cold junction and complete the linear amplification of the voltage. The output terminal of the signal amplification circuit is connected to the measuring unit, so that the measuring unit can receive the voltage signal output by the signal amplification circuit, and the potential difference measured by the measuring unit is consistent with the potential difference between the cold junction, thereby improving the test accuracy while controlling the data acquisition cost. This application first obtains the cold junction temperature of the thermocouple and receives the potential difference sent by the measuring unit. Then, based on a preset calibration table, it interpolates the cold junction temperature and potential difference, thereby enabling rapid location of the target value or its interval using the calibration table, reducing computational load, further reducing the number of equations, improving interpolation accuracy, and obtaining the interpolation equation. This allows for the analysis of nonlinear data and provides the correspondence between the cold junction temperature and potential difference, facilitating subsequent improvements in measurement efficiency. The interpolation equation is then matrix-transformed to obtain the parameter matrix, reducing computational complexity and improving data stability. However, since the parameter matrix may not be a singular matrix, this application... The embodiment describes a method for solving the parameter matrix using singular value decomposition (SVD). This SVD yields the left pseudo-inverse of the parameter matrix, allowing for the determination of the optimal interpolation parameter solution under low-power principles. This reduces computational load and time, improving efficiency. The temperature difference between the cold and hot junctions of the thermocouple is then determined based on the interpolation parameter solution. This temperature difference can be calculated using linear operations on the potential difference. Based on the temperature difference and the cold junction temperature, the hot junction of the thermocouple is calibrated, achieving precise temperature determination at the hot junction location and obtaining the target temperature for the test location. This improves measurement accuracy. Furthermore, this embodiment reduces testing costs by inverting the calculation using the cold junction temperature and potential difference to obtain the temperature difference between the cold and hot junctions, further determining the target temperature for the test location. This bidirectional calculation of the temperature difference and target temperature enables precise temperature calibration while controlling costs, improving calibration efficiency.

[0048] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description and the accompanying drawings. Attached Figure Description

[0049] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and form part of the specification. They are used together with the examples of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0050] Figure 1 A schematic diagram of the temperature measuring device provided in the embodiments of this application;

[0051] Figure 2 This is an overall flowchart of the temperature calibration method provided in the embodiments of this application;

[0052] Figure 3 A flowchart illustrating the interpolation process for cold junction temperature and potential difference based on a preset indexing table, provided for embodiments of this application;

[0053] Figure 4 A flowchart for filtering data from a preset calibration table based on cold junction temperature and potential difference, provided for embodiments of this application;

[0054] Figure 5 A flowchart for performing power function interpolation on data points in the boundary condition set based on the polynomial order, provided as an embodiment of this application;

[0055] Figure 6 A flowchart for matrix transformation of interpolation equations provided in this application embodiment;

[0056] Figure 7 This is a flowchart of the singular value solution for the parameter matrix provided in an embodiment of this application;

[0057] Figure 8 A flowchart illustrating the process of obtaining a singular pseudoinverse matrix from a first orthogonal matrix, a second orthogonal matrix, a first orthogonal transpose matrix, a second orthogonal transpose matrix, a diagonal pseudoinverse matrix, and a diagonal matrix, provided for embodiments of this application;

[0058] Figure 9 A flowchart for calculating the distance between the graduation point and the interpolation curve, provided for embodiments of this application;

[0059] Figure 10 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0060] This section will describe in detail specific embodiments of the present invention. Preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the drawings is to supplement the textual description with graphics, so that people can intuitively and vividly understand each technical feature and overall technical solution of the present invention, but they should not be construed as limiting the scope of protection of the present invention.

[0061] In the description of this invention, the use of "first" and "second" is for the purpose of distinguishing technical features only, and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.

[0062] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.

[0063] In routine vehicle power system testing in the laboratory, temperature signal acquisition is a crucial step. For example, overload and short-circuit tests of vehicle wiring harnesses require detecting whether the temperature at the load end and fuse box exceeds the limit; vehicle electrical balance tests require detecting whether the temperature in the vehicle engine compartment and room temperature are normal; and accidental train landing analysis requires real-time temperature acquisition of specific wires to analyze the cause of the accident. Thermocouples are widely used as temperature sensors due to their unique advantages. However, in practical applications, thermocouple temperature measurement also has some obvious shortcomings and challenges.

[0064] Most thermocouples on the market, especially type K thermocouples, do not exhibit absolute linearity, resulting in low analytical accuracy and a huge computational burden. This nonlinear relationship makes deducing temperature from potential difference more complex, requiring intricate mathematical models and calculations, increasing the difficulty of data processing. While type S thermocouples theoretically offer higher accuracy, their more complex nonlinear relationship limits their practical application. Therefore, although thermocouples have become the mainstream temperature sensor due to their rapid response and wide temperature range, their shortcomings in handling nonlinear relationships and cost lead to current measurement accuracy being relatively low and costly.

[0065] To address the aforementioned issues, this application provides a temperature calibration method, electronic device, and storage medium. The temperature measuring device includes a thermocouple, a signal amplification circuit, and a measuring unit. The hot junction of the thermocouple is positioned at the test location, and the cold junction of the thermocouple is connected to the input terminal of the signal amplification circuit. This allows the signal amplification circuit to directly amplify the signal transmitted from the cold junction, achieving linear voltage amplification. The output terminal of the signal amplification circuit is connected to the measuring unit, enabling the measuring unit to receive the voltage signal output by the signal amplification circuit. This ensures that the potential difference measured by the measuring unit remains consistent with the potential difference between the cold junction and the measured unit, thereby improving testing accuracy while controlling data acquisition costs. This application first obtains the cold junction temperature of the thermocouple and receives the potential difference sent by the measuring unit. Then, based on a preset calibration table, it interpolates the cold junction temperature and potential difference, thereby enabling rapid location of the target value or its interval using the calibration table, reducing computational load, further reducing the number of equations, improving interpolation accuracy, and obtaining the interpolation equation. This allows for the analysis of nonlinear data and provides the correspondence between the cold junction temperature and potential difference, facilitating subsequent improvements in measurement efficiency. The interpolation equation is then matrix-transformed to obtain the parameter matrix, reducing computational complexity and improving data stability. However, since the parameter matrix may not be a singular matrix, this application... The embodiment describes a method for solving the parameter matrix using singular value decomposition (SVD). This SVD yields the left pseudo-inverse of the parameter matrix, allowing for the determination of the optimal interpolation parameter solution under low-power principles. This reduces computational load and time, improving efficiency. The temperature difference between the cold and hot junctions of the thermocouple is then determined based on the interpolation parameter solution. This temperature difference can be calculated using linear operations on the potential difference. Based on the temperature difference and the cold junction temperature, the hot junction of the thermocouple is calibrated, achieving precise temperature determination at the hot junction location and obtaining the target temperature for the test location. This improves measurement accuracy. Furthermore, this embodiment reduces testing costs by inverting the calculation using the cold junction temperature and potential difference to obtain the temperature difference between the cold and hot junctions, further determining the target temperature for the test location. This bidirectional calculation of the temperature difference and target temperature enables precise temperature calibration while controlling costs, improving calibration efficiency.

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

[0067] Reference Figure 1 , Figure 1 This is a schematic diagram of a temperature measuring device provided in an embodiment of this application.

[0068] In some embodiments, the temperature measuring device includes a thermocouple 100, a signal amplification circuit 200, and a measuring unit 300. The thermocouple, signal amplification circuit 200, and measuring unit 300 are connected sequentially. Specifically, the hot junction of the thermocouple 100 is positioned at the test location to measure the temperature of the test location. Two wires are connected between the hot and cold junctions of the thermocouple 100. The cold junction of the thermocouple 100 is connected to the input terminal of the signal amplification circuit 200, creating a potential difference between the two wires at the cold junction. The output terminal of the signal amplification circuit 200 is connected to the measuring unit 300, which receives the voltage signal output by the signal amplification circuit 200 to measure the potential difference between the cold junctions. This allows for accurate measurement of the potential difference between the cold junctions, and the inclusion of the signal amplification circuit 200 reduces data acquisition costs.

[0069] It should be noted that the signal amplification circuit 200 in the embodiments of this application can be a non-inverting amplifier circuit, an inverting amplifier circuit, a differential amplifier circuit, a voltage amplifier, a current amplifier, etc., and the embodiments of this application do not impose specific limitations.

[0070] It is understood that the embodiments of this application use a precision operational amplifier, which, in conjunction with the same type of resistor, completes the linear voltage amplification before performing ordinary precision data acquisition and measurement. This can achieve higher test accuracy while controlling the data acquisition cost.

[0071] Reference Figure 2 This application provides a temperature calibration method, which can be applied to, but is not limited to, other methods. Figure 1 The temperature measuring device in the middle, the temperature calibration method includes but is not limited to steps S101 to S105.

[0072] Step S101: Obtain the cold junction temperature of the cold junction of the thermocouple 100 and receive the potential difference sent by the measuring unit 300.

[0073] In step S101 of some embodiments, since the cold junction of the thermocouple 100 may change under different scenarios, affecting the subsequent measurement results, this embodiment of the application will use an ice-water mixture to perform zero-point calibration on the cold junction and obtain the cold junction temperature of the thermocouple 100. That is, the cold junction temperature in this embodiment of the application is the temperature measured after zero-point calibration using an ice-water mixture, and the potential difference sent by the measurement unit 300 is received, thereby obtaining the potential difference generated between the wires of the cold junction.

[0074] Step S102: Based on the preset calibration table, interpolate the cold junction temperature and potential difference to obtain the interpolation equation.

[0075] In step S102 of some embodiments, the cold junction temperature and potential difference are interpolated based on a preset indexing table. Specifically, the bisection method is used to quickly locate the initial position, and then the corresponding interpolation equation is listed based on the power function interpolation. This facilitates the improvement of calculation efficiency and ensures the uniqueness of the solution through the interpolation equation, thereby reducing interpolation errors and further improving the calculation accuracy.

[0076] It should be noted that the calibration table is a pre-calculated and organized table used for quickly finding or interpolating specific values. In this embodiment, the calibration table is a calibration table related to hot end temperature, cold end temperature and potential difference.

[0077] Step S103: Perform matrix transformation on the interpolation equation to obtain the parameter matrix.

[0078] In step S103 of some embodiments, the interpolation equation is transformed into a matrix, which reduces the complexity of writing and understanding, and obtains a parameter matrix, making it simple and quick to solve the matrix equation.

[0079] Step S104: Solve for singular values ​​of the parameter matrix to obtain the interpolation parameter solution.

[0080] In step S104 of some embodiments, due to the problem that the parameter matrix is ​​not a singular matrix, the computational cost of calculating from n-1 to 0 times is enormous. To solve this problem, this application embodiment performs singular value decomposition on the parameter matrix, uses singular value decomposition to obtain the left pseudo-inverse of the parameter matrix, and then obtains the optimal interpolation parameter solution (corresponding to the power function coefficient vector) under the principle of low power, thereby obtaining the interpolation parameter solution and completing the efficient and accurate bidirectional solution task.

[0081] Step S105: Determine the temperature difference between the cold junction and the hot junction of the thermocouple 100 according to the interpolation parameter solution, and calibrate the temperature of the hot junction of the thermocouple 100 according to the temperature difference and the cold junction temperature to obtain the target temperature of the test location.

[0082] In step S105 of some embodiments, the temperature difference between the cold and hot junctions of the thermocouple 100 is determined based on the interpolation parameter solution. Specifically, and The temperature difference between the hot and cold junctions of thermocouple 100 shows a positive correlation. By solving the singular value problem of the parameter matrix, the optimal interpolation parameter solution can be obtained, that is, the temperature difference between the hot and cold junctions of thermocouple 100 can be determined. It can be solved in reverse. And based on the temperature difference and cold end temperature By calibrating the temperature of the hot junction of thermocouple 100, the temperature of the hot junction of thermocouple 100 can be determined. Furthermore, the target temperature at the test location can be obtained, enabling accurate measurement of the temperature of the hot junction of the thermocouple 100. In this embodiment, the corresponding conversion relationship between temperature and voltage can be used to perform calibration using a pseudo-inverse algorithm, thereby achieving accurate calibration of the target temperature and improving temperature calibration efficiency.

[0083] Reference Figure 3 , Figure 3 The flowchart for interpolating cold junction temperature and potential difference based on a preset indexing table provided in the embodiments of this application includes, but is not limited to, the following steps S201 to S203.

[0084] Step S201: Based on the cold junction temperature and potential difference, the preset calibration table is filtered to obtain a set of boundary conditions, wherein the set of boundary conditions includes multiple data points.

[0085] Step S202: Determine the number of data points in the boundary condition set, and determine the polynomial order based on the number of data points.

[0086] Step S203: Perform power function interpolation on the data points in the boundary condition set according to the polynomial order to obtain the interpolation equation.

[0087] In steps S201 to S203 of some embodiments, during the interpolation process of cold junction temperature and potential difference based on a preset calibration table, this embodiment first filters the preset calibration table based on the cold junction temperature and potential difference. Selecting nearby calibration points can more accurately reflect local characteristics and improve the accuracy of interpolation, thus obtaining a set of boundary conditions. By reducing the number of calibration points involved in the interpolation calculation, the degree of the equation can be significantly reduced, thereby reducing the amount of calculation and the calculation time. Then, the number of data points in the set of boundary conditions is determined, and the order of the polynomial is determined based on the number of data points. The higher the order, the more accurately the polynomial can fit the data points, achieving an intuitive display of the data. Afterward, power function interpolation is performed on the data points in the set of boundary conditions based on the order of the polynomial to obtain the interpolation equation, which facilitates subsequent improvement of calculation efficiency. Furthermore, the uniqueness of the solution can be guaranteed through the interpolation equation, reducing interpolation errors and further improving calculation accuracy.

[0088] Reference Figure 4 , Figure 4 The flowchart provided in this application embodiment shows how to filter data from a preset calibration table based on cold junction temperature and potential difference. The method includes, but is not limited to, the following steps S301 to S306.

[0089] Step S301: Generate search conditions based on cold junction temperature and potential difference.

[0090] Step S302: The data in the gradation table is initially filtered using a preset binary search algorithm to select a set of data that meets the search criteria.

[0091] Step S303: Plot an interpolation curve based on the data in the dataset, and set the range of independent variables based on the interpolation curve, wherein the range of independent variables includes multiple scale points.

[0092] Step S304: For each scale point in the range of the independent variable, calculate the curve distance between the scale point and the interpolation curve.

[0093] Step S305: Compare the curve distance with a preset distance threshold to filter out target graduation points that are less than or equal to the preset distance threshold.

[0094] Step S306: Generate a set of boundary conditions based on the target indexing points.

[0095] In steps S301 to S306 of some embodiments, during the data filtering process of the preset calibration table based on the cold junction temperature and potential difference, this embodiment first sets search conditions based on the cold junction temperature and potential difference to facilitate the subsequent use of the cold junction temperature and potential difference as target values ​​to find data that is consistent with or close to the cold junction temperature and potential difference. Then, the calibration table is initially filtered using a preset binary search algorithm to quickly locate the target value or the range in which the target value is located, and filter out the data set that meets the search conditions, thereby achieving preliminary data filtering and reducing the amount of data calculation. Afterwards, an interpolation curve is plotted based on the data in the data set. Specifically, this embodiment first plots coordinate axes and then converts the data in the data set into coordinate data. The cold junction temperature can be used as the horizontal axis coordinate and the potential difference as the vertical axis coordinate, or the cold junction temperature can be used as the vertical axis coordinate and the potential difference as the horizontal axis coordinate, etc. This embodiment does not impose specific limitations. Then, each set of coordinates is plotted on the coordinate axis and adjacent coordinates are connected to form an interpolation curve. Because the interpolation curve contains a large number of data points, using all given points as boundary conditions for the interpolation equation would inevitably lead to problems such as excessively high equation degrees, abnormal curve fluctuations, and enormous computational burden. Therefore, this embodiment sets the range of independent variables based on the curve's direction or slope, thereby selecting a limited number of data points around the range of independent variables as boundary conditions. For each division point within the range of independent variables, the distance between the division point and the interpolation curve is calculated, thus achieving accurate measurement of the distance between the division point and the interpolation curve, facilitating subsequent selection of division points. Since the shape of the interpolation curve is mainly affected by nearby division points, with distant points having a smaller impact, selecting nearby division points can more accurately reflect local characteristics and improve interpolation accuracy. The curve distance is compared with a preset distance threshold to filter out target division points that are less than or equal to the preset distance threshold. This allows for the selection of division points that are close to the interpolation curve, while removing division points that are far from the interpolation curve, thus avoiding interference from irrelevant division points in the calculation results. Finally, a set of boundary conditions is generated based on the target division points. By reducing the number of division points involved in the interpolation calculation, the number of equations can be significantly reduced, thereby reducing the amount of computation and the computation time. Furthermore, too many division points may cause abnormal fluctuations in the interpolation curve. Limiting the number of division points in the boundary conditions can reduce such fluctuations.

[0096] It should be noted that the preset distance threshold in this application embodiment can be set according to the user's needs, and this application embodiment does not impose any specific restrictions.

[0097] Reference Figure 5 , Figure 5The flowchart provided in this application describes the power function interpolation process for data points in the boundary condition set based on the polynomial order. The method includes, but is not limited to, the following steps S401 to S403.

[0098] Step S401: Construct an interpolation polynomial using a preset interpolation method and calculate the coefficients of the interpolation polynomial.

[0099] Step S402: For each data point in the boundary condition set, calculate the difference quotient value of the data point and construct a difference quotient table based on the difference quotient value.

[0100] Step S403: Construct the interpolation equation based on the difference quotient table, the interpolation polynomial, and the coefficients.

[0101] In steps S401 to S403 of some embodiments, during the process of power function interpolation of data points in the boundary condition set according to the polynomial order, the embodiments of this application first construct an interpolation polynomial using a preset interpolation method, such as Lagrange interpolation or Newton interpolation, and calculate the coefficients of the interpolation polynomial. Specifically, when the interpolation method is Lagrange interpolation, the embodiments of this application construct the polynomial by constructing basis functions and calculate the value of each basis function, which is the coefficient of the interpolation polynomial of the embodiments of this application; when the interpolation method is Newton interpolation, the embodiments of this application construct the polynomial by difference quotients and calculate the coefficients of the interpolation polynomial by constructing a difference quotient table. For each data point in the boundary condition set, calculate the difference quotient value of the data point and fill the difference quotient table. Specifically, for each pair of adjacent data points, calculate the first-order difference quotient value and place it in the first column of the difference quotient table. Then, calculate the higher-order difference quotient values ​​and fill them into the difference quotient table. After that, draw the value polynomial and data points based on the difference quotient table, the interpolation polynomial, and the coefficients. Specifically, use the difference quotients in the difference quotient table and the data points to construct the polynomial and obtain the interpolation equation. This facilitates subsequent improvement of computational efficiency, and the interpolation equation can ensure the uniqueness of the solution, reduce interpolation errors, and further improve computational accuracy.

[0102] Reference Figure 6 , Figure 6 The flowchart for matrix transformation of interpolation equations provided in this application embodiment includes, but is not limited to, the following steps S501 to S503.

[0103] Step S501: Determine the first matrix corresponding to the potential difference, the second matrix corresponding to the cold junction temperature, and the target parameter matrix based on the interpolation equation.

[0104] Step S502: Transpose the first matrix and the target parameter matrix.

[0105] Step S503: Generate a parameter matrix based on the first matrix after transpose, the target parameter matrix after transpose, and the second matrix.

[0106] In steps S501 to S503 of some embodiments, since the interpolation equation is not a singular matrix, this embodiment of the application needs to perform matrix transformation on the interpolation equation. In the process of matrix transformation of the interpolation equation, firstly, a first matrix corresponding to the potential difference, a second matrix corresponding to the cold junction temperature, and a target parameter matrix are determined according to the interpolation equation. The target parameter matrix is ​​the matrix value that needs to be obtained through the interpolation equation. Then, the first matrix and the target parameter matrix are transposed to facilitate subsequent solution using the symmetry properties of the first matrix and the target parameter matrix. Then, the parameter matrix is ​​generated according to the transposed first matrix, the transposed target parameter matrix, and the second matrix, which reduces the complexity of writing and understanding, and makes solving the matrix equation simple and fast.

[0107] Specifically, the interpolation equation established in this application embodiment is expressed as follows:

[0108] ;

[0109] in, The dependent variable value representing the i-th scale data, i.e., the potential difference in the embodiments of this application, The independent variable value representing the i-th scale data is the cold end temperature in the embodiments of this application, and the two variables have a positive correlation.

[0110] The parameter matrix representation is as follows:

[0111] ;

[0112] in, This is the result of transposing the first matrix; This is the second matrix; This is the result of transposing the target parameter matrix; specifically, This represents the parameters of the power function for the entire interpolation curve.

[0113] Reference Figure 7 , Figure 7 The flowchart for solving the singular value of the parameter matrix provided in the embodiments of this application includes, but is not limited to, the following steps S601 to S604.

[0114] Step S601: Construct the first orthogonal matrix, the second orthogonal matrix, and the diagonal matrix.

[0115] Step S602: Perform pseudo-inverse calculation on the diagonal matrix to obtain the diagonal pseudo-inverse matrix; perform transpose operation on the first orthogonal matrix to obtain the first orthogonal transpose matrix; and perform transpose operation on the second orthogonal matrix to obtain the second orthogonal transpose matrix.

[0116] Step S603: Obtain the singular pseudo-inverse matrix based on the first orthogonal matrix, the second orthogonal matrix, the first orthogonal transpose matrix, the second orthogonal transpose matrix, the diagonal pseudo-inverse matrix, and the diagonal matrix.

[0117] Step S604: Solve the parameter matrix based on the singular pseudo-inverse matrix to obtain the interpolation parameter solution.

[0118] In some embodiments, steps S601 to S604, however, for equations In other words, there exists The problem is not that the matrix is ​​a singular matrix. The interpolation power function equation does not need to be of degree n-1. Calculating from degree n-1 to degree 0 would incur a huge computational burden. To address this issue, this embodiment of the application performs singular value solving on the parameter matrix. Specifically, it constructs a first orthogonal matrix, a second orthogonal matrix, and a diagonal matrix, wherein the first orthogonal matrix is ​​represented as... The second orthogonal matrix is ​​represented as The diagonal matrix is ​​represented as , Then, perform pseudo-inverse calculation on the diagonal matrix to obtain the diagonal pseudo-inverse matrix, represented as... Similarly, the first orthogonal matrix is ​​transposed to obtain the first orthogonal transpose matrix, and the second orthogonal matrix is ​​transposed to obtain the second orthogonal transpose matrix. Then, using the first orthogonal matrix, the second orthogonal matrix, the first orthogonal transpose matrix, the second orthogonal transpose matrix, the diagonal pseudoinverse matrix, and the diagonal matrix, a singular pseudoinverse matrix is ​​obtained. This allows us to consider the non-singular case of the parameter matrix. The left pseudoinverse of the parameter matrix is ​​then obtained using singular value decomposition. Finally, the parameter matrix is ​​solved based on the singular pseudoinverse matrix. Specifically, the parameter matrix... Multiply both sides by the singular pseudo-inverse matrix on the left, i.e. , represented as Therefore, under the principle of least-order interpolation, we can obtain of Satisfactory solution ( for The pseudo-inverse matrix of the parameter matrix is ​​obtained. In this embodiment, the left pseudo-inverse of the parameter matrix is ​​obtained by singular value decomposition, and then the optimal interpolation parameter solution (corresponding to the power function coefficient vector) is obtained under the principle of low power, thereby completing the efficient and accurate bidirectional solution task.

[0119] Reference Figure 8 , Figure 8 The flowchart provided for embodiments of this application provides a method for obtaining a singular pseudo-inverse matrix from a first orthogonal matrix, a second orthogonal matrix, a first orthogonal transpose matrix, a second orthogonal transpose matrix, a diagonal pseudo-inverse matrix, and a diagonal matrix. The method includes, but is not limited to, the following steps S701 to S702.

[0120] Step S701: Obtain the singular matrix based on the first orthogonal matrix, the diagonal matrix, and the second orthogonal transpose matrix.

[0121] Step S702: Perform a pseudo-inverse transformation on the singular matrix based on the second orthogonal matrix, the diagonal pseudo-inverse matrix, and the first orthogonal transpose matrix to obtain the singular pseudo-inverse matrix.

[0122] In steps S701 to S702 of some embodiments, during the process of obtaining the singular pseudo-inverse matrix based on the first orthogonal matrix, the second orthogonal matrix, the first orthogonal transpose matrix, the second orthogonal transpose matrix, the diagonal pseudo-inverse matrix, and the diagonal matrix, the embodiments of this application first obtain the singular matrix based on the first orthogonal matrix, the diagonal matrix, and the second orthogonal transpose matrix, denoted as... Then, based on the second orthogonal matrix, the diagonal pseudoinverse matrix, and the first orthogonal transpose matrix, a pseudoinverse transformation is performed on the singular matrix to obtain the singular pseudoinverse matrix, denoted as: This allows us to consider the non-singular case of the parameter matrix, use singular value decomposition to find the left pseudo-inverse of the parameter matrix, and then find the optimal interpolation parameter solution under the principle of low power, which facilitates the subsequent solution of the corresponding temperature difference through linear calculation of the potential difference.

[0123] Reference Figure 9 , Figure 9 The flowchart for calculating the curve distance between the graduation point and the interpolation curve provided in the embodiments of this application includes, but is not limited to, the following steps S801 to S803.

[0124] Step S801: For each scale point, determine the scale coordinates of the scale point.

[0125] Step S802: Parametric processing is performed on the interpolation curve.

[0126] Step S803: Calculate the curve distance between the graduated coordinates and the parameterized interpolation curve using a preset distance function.

[0127] In steps S801 to S803 of some embodiments, during the calculation of the curve distance between the graduation point and the interpolation curve, for each graduation point in the range of the independent variable, the graduation coordinates of the graduation point are first determined, and then the interpolation curve is parameterized to simplify the curve equation and make it easier to process. Specifically, in this embodiment, the curve type of the interpolation curve is first determined, and then one or more parameters are selected for the interpolation curve according to the curve type to describe the position of all points on the curve. The curve equation is then expressed using parameters to ensure that all parameters can cover the entire range of the curve. Afterwards, the curve distance between the graduation coordinates and the parameterized interpolation curve is calculated using a preset distance function. Specifically, this embodiment uses Euclidean distance as an example. For any point on the interpolation curve, a distance function between that point and the graduation point is constructed, for example... Where (x0, y0) are the coordinates of the division point, and (xt, yt) are the coordinates of any point on the interpolation curve. In order to find the minimum distance, this embodiment minimizes D(t), and then differentiates D(t) to calculate the minimum distance of the division point, thereby obtaining the curve distance between the division point and the interpolation curve. This enables accurate measurement of the distance between the division point and the interpolation curve within the range of the independent variable, which facilitates the subsequent screening of the division point and allows for the selection of data that are closer to the interpolation curve.

[0128] It should be noted that the distance function in the embodiments of this application can be Euclidean distance, Manhattan distance, Chebyshev distance, etc., and the embodiments of this application do not impose specific limitations.

[0129] Please see Figure 10 , Figure 10 This illustration shows the hardware structure of an electronic device according to one embodiment. The electronic device includes:

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

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

[0132] Input / output interface 1003 is used to implement information input and output;

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

[0134] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);

[0135] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.

[0136] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described temperature calibration method.

[0137] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0138] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0139] It will be understood by those skilled in the art that Figure 1-7 The technical solutions shown do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0140] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0141] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0142] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0143] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0144] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.

[0145] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0146] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0147] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0148] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A temperature calibration method, characterized by, The application is applied to a temperature measuring device, which comprises a thermocouple, a signal amplification circuit and a measuring unit. The hot end of the thermocouple is arranged at a position to be tested, the cold end of the thermocouple is connected with the input end of the signal amplification circuit, the output end of the signal amplification circuit is connected with the measuring unit, and the measuring unit is used for receiving the voltage signal output by the signal amplification circuit to measure the potential difference between the cold ends. The method comprises: obtaining the cold end temperature of the cold end of the thermocouple and receiving the potential difference sent by the measuring unit; performing data screening on a preset scale according to the cold end temperature and the potential difference to obtain a boundary condition set, wherein the boundary condition set comprises a plurality of data points; determining the number of data points in the boundary condition set and determining the polynomial order according to the number of data points; performing power function interpolation processing on the data points in the boundary condition set according to the polynomial order to obtain an interpolation equation; performing matrix conversion on the interpolation equation to obtain a parameter matrix; solving the parameter matrix by singular value to obtain an interpolation parameter solution; determining the temperature difference between the cold end and the hot end of the thermocouple according to the interpolation parameter solution, and calibrating the temperature of the hot end of the thermocouple according to the temperature difference and the cold end temperature to obtain the target temperature of the position to be tested.

2. The temperature calibration method of claim 1, wherein, The data screening on the preset scale according to the cold end temperature and the potential difference to obtain the boundary condition set comprises: generating a lookup condition according to the cold end temperature and the potential difference; performing preliminary data screening on the scale by a preset dichotomy algorithm to screen out a data set meeting the lookup condition; drawing an interpolation curve according to the data in the data set, and setting an independent variable range interval according to the interpolation curve, wherein the independent variable range interval comprises a plurality of scale points; calculating the curve distance of each scale point in the independent variable range interval and the interpolation curve; comparing the curve distance with a preset distance threshold to screen out a target scale point less than or equal to the preset distance threshold; generating a boundary condition set according to the target scale point.

3. The temperature calibration method of claim 1, wherein, The power function interpolation processing on the data points in the boundary condition set according to the polynomial order to obtain the interpolation equation comprises: constructing an interpolation polynomial by a preset interpolation method and calculating the coefficients of the interpolation polynomial; calculating the difference quotient value of each data point in the boundary condition set, and constructing a difference quotient table according to the difference quotient value; constructing an interpolation equation according to the difference quotient table, the interpolation polynomial and the coefficients.

4. The temperature calibration method of claim 1, wherein, The matrix conversion on the interpolation equation to obtain the parameter matrix comprises: determining a first matrix corresponding to the potential difference, a second matrix corresponding to the cold end temperature and a target parameter matrix according to the interpolation equation; performing a transposition operation on the first matrix and a transposition operation on the target parameter matrix; generating a parameter matrix according to the transposed first matrix, the transposed target parameter matrix and the second matrix.

5. The temperature calibration method of claim 4, wherein, The singular value solving of the parameter matrix obtains an interpolation parameter solution, and the singular value solving of the parameter matrix comprises: constructing a first orthogonal matrix, a second orthogonal matrix and a diagonal matrix; performing pseudo-inverse calculation on the diagonal matrix to obtain a diagonal pseudo-inverse matrix, performing transposition operation on the first orthogonal matrix to obtain a first orthogonal transposed matrix, and performing transposition operation on the second orthogonal matrix to obtain a second orthogonal transposed matrix; obtaining a singular pseudo-inverse matrix according to the first orthogonal matrix, the second orthogonal matrix, the first orthogonal transposed matrix, the second orthogonal transposed matrix, the diagonal pseudo-inverse matrix and the diagonal matrix; solving the parameter matrix according to the singular pseudo-inverse matrix to obtain an interpolation parameter solution.

6. The temperature calibration method of claim 5, wherein, The singular pseudo-inverse matrix is obtained according to the first orthogonal matrix, the second orthogonal matrix, the first orthogonal transposed matrix, the second orthogonal transposed matrix, the diagonal pseudo-inverse matrix and the diagonal matrix, and the singular pseudo-inverse matrix comprises: obtaining a singular matrix according to the first orthogonal matrix, the diagonal matrix and the second orthogonal transposed matrix; performing pseudo-inverse conversion on the singular matrix according to the second orthogonal matrix, the diagonal pseudo-inverse matrix and the first orthogonal transposed matrix to obtain a singular pseudo-inverse matrix.

7. The temperature calibration method of claim 2, wherein, The curve distance between the index point and the interpolation curve is calculated, and the curve distance comprises: for each index point, determining the index coordinate of the index point; performing parameterization processing on the interpolation curve; calculating the curve distance between the index coordinate and the parameterization-processed interpolation curve by using a preset distance function.

8. An electronic device, comprising: comprise: a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the temperature calibration method in any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions for executing the temperature calibration method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Temperature measuring system based on thermocouple

    CN118913466A