Temperature calibration method, electronic equipment and storage medium
By setting up a signal amplification circuit in the thermocouple temperature measurement device, and using interpolation processing and singular value solution technology, the accuracy and cost problems caused by the nonlinear relationship of the existing thermocouple temperature measurement device are solved, and high-precision temperature measurement and Low-cost temperature calibration.
Patent Information
- Application Number
- CN202411654369.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-19
Smart Images

Figure CN119469475A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of temperature testing technology, and in particular to a temperature calibration method, electronic equipment and storage medium. Background Art
[0002] In the routine laboratory testing of vehicle power systems, the acquisition of temperature signals is a crucial link. For example, the overload and short-circuit test of the vehicle wiring harness requires the detection of whether the temperature of the load end and the fuse box end exceeds the standard, the vehicle electrical balance test requires the detection of whether the vehicle cabin temperature and room temperature are normal, and the accident analysis of accidental train accidents 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 K-type thermocouples, do not have an absolute linear relationship, which leads to low analytical accuracy and huge calculations. This nonlinear relationship makes it more complicated to infer temperature from potential difference, requiring complex mathematical models and calculations, which increases the difficulty of data processing. Although S-type thermocouples can theoretically provide higher accuracy, they are less used in practical applications because of their more complex nonlinear relationship. Therefore, although thermocouples have become the mainstream temperature measurement sensors due to their advantages such as fast response and large temperature measurement range, their shortcomings in nonlinear relationship processing and cost have led to low measurement accuracy and high cost requirements. Summary of the invention
[0004] The following is an overview of the topics described in detail in this article.
[0005] The embodiments of the present application provide a temperature calibration method, an electronic device, and a storage medium, which can reduce measurement costs while improving measurement accuracy.
[0006] In a first aspect, an embodiment of the present application provides a temperature calibration method, which is applied to a temperature measuring device, wherein the temperature measuring device includes a thermocouple, a signal amplification circuit, and a measurement unit; The hot end of the thermocouple is arranged at a position to be tested, the cold end of the thermocouple is connected to the input end of the signal amplifying circuit, the output end of the signal amplifying circuit is connected to the measuring unit, and the measuring unit is used to receive the voltage signal output by the signal amplifying circuit to measure the potential difference between the cold ends; The method comprises: Acquiring the cold end temperature of the cold end of the thermocouple, and receiving the potential difference sent by the measuring unit; Performing interpolation processing on the cold end temperature and the potential difference based on a preset graduation table to obtain an interpolation equation; Performing matrix transformation on the interpolation equation to obtain a parameter matrix; Solving the singular values of the parameter matrix to obtain an interpolation parameter solution; The temperature difference between the cold end and the hot end of the thermocouple is determined according to the interpolation parameter solution, and the hot end of the thermocouple is temperature calibrated according to the temperature difference and the cold end temperature to obtain the target temperature of the position to be tested.
[0007] In some embodiments, the interpolation processing of the cold end temperature and the potential difference based on a preset graduation table to obtain an interpolation equation includes: Screening a preset graduation table according to the cold end temperature and the potential difference to obtain a boundary condition set, wherein the boundary condition set includes 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; The data points in the boundary condition set are subjected to power function interpolation processing according to the polynomial order to obtain an interpolation equation.
[0008] In some embodiments, the data of a preset graduation table is screened according to the cold end temperature and the potential difference to obtain a set of boundary conditions, including: generating a search condition according to the cold end temperature and the potential difference; Performing a preliminary screening of the data in the indexing table by using a preset binary algorithm to screen out a data set that meets the search condition; Draw an interpolation curve according to the data in the data set, and set an independent variable range interval according to the interpolation curve, wherein the independent variable range interval includes a plurality of graduation points; For each graduation point in the range of the independent variable, calculating the curve distance between the graduation point and the interpolation curve; Comparing the curve distance with a preset distance threshold to screen out target graduation points that are less than or equal to the preset distance threshold; A set of boundary conditions is generated according to the target graduation point.
[0009] In some embodiments, performing power function interpolation processing on the data points in the boundary condition set according to the polynomial order to obtain the interpolation equation includes: Constructing an interpolation polynomial by a preset interpolation method, and calculating coefficients of the interpolation polynomial; For each data point in the boundary condition set, calculating a difference quotient value of the data point, and constructing a difference quotient table according to the difference quotient value; An interpolation equation is constructed according to the difference quotient table, the interpolation polynomial and the coefficients.
[0010] In some embodiments, performing matrix transformation on the interpolation equation to obtain a parameter matrix includes: Determine 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 performing a transposition operation on the target parameter matrix; A parameter matrix is generated according to the first matrix after the transposition operation, the target parameter matrix after the transposition operation, and the second matrix.
[0011] In some embodiments, performing singular value solving on the parameter matrix to obtain an interpolation parameter solution includes: Constructing a first orthogonal matrix, a second orthogonal matrix and a diagonal matrix; Performing a pseudo-inverse calculation on the diagonal matrix to obtain a diagonal pseudo-inverse matrix, performing a transposition operation on the first orthogonal matrix to obtain a first orthogonal transposed matrix, and performing a transposition operation on the second orthogonal matrix to obtain a second orthogonal transposed matrix; Obtain 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; The parameter matrix is solved according to the singular pseudo-inverse matrix to obtain an interpolation parameter solution.
[0012] In some embodiments, 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 comprises: Obtain a singular matrix according to the first orthogonal matrix, the diagonal matrix and the second orthogonal transposed matrix; The singular matrix is pseudo-inversely transformed according to the second orthogonal matrix, the diagonal pseudo-inverse matrix and the first orthogonal transposed matrix to obtain a singular pseudo-inverse matrix.
[0013] In some embodiments, the calculating the curve distance between the graduation point and the interpolation curve includes: For each of the graduation points, determining the graduation coordinates of the graduation point; Performing parameterization processing on the interpolation curve; The curve distance between the graduation coordinate and the interpolation curve after parameterization is calculated by a preset distance function.
[0014] In a second aspect, an embodiment of the present application further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the temperature calibration method as described in the first aspect is implemented.
[0015] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the temperature calibration method as described in the first aspect.
[0016] The temperature calibration method of the embodiment of the present application has the following beneficial effects: the temperature measuring device includes a thermocouple, a signal amplifying circuit and a measuring unit, wherein the hot end of the thermocouple is arranged at a position to be tested, and the cold end of the thermocouple is connected to the input end of the signal amplifying circuit, so that the signal amplifying circuit can directly amplify the signal transmitted by the cold end to complete the linear amplification of the voltage, and the output end of the signal amplifying circuit is connected to the measuring unit so that the measuring unit can receive the voltage signal output by the signal amplifying circuit, so that the potential difference measured by the measuring unit is consistent with the potential difference between the cold ends, thereby improving the test accuracy while controlling the data acquisition cost. The embodiment of the present application first obtains the cold end temperature of the cold end of the thermocouple, and receives the potential difference sent by the measuring unit, and then interpolates the cold end temperature and the potential difference based on a preset graduation table, so that the graduation table can be used to quickly locate the target value or its interval, reduce the amount of calculation, further reduce the number of equations, improve the accuracy of interpolation, obtain the interpolation equation, realize the analysis of nonlinear data, and give the corresponding relationship between the cold end temperature and the potential difference, which is convenient for subsequent improvement of measurement efficiency, and then perform matrix conversion on the interpolation equation to obtain a parameter matrix, reduce calculation complexity, and improve data stability. Since there may be a problem that the parameter matrix is not a singular matrix, the present application Please solve the singular value of the parameter matrix in the embodiment, use the singular value solution to find the left pseudo-inverse of the parameter matrix, and then find the optimal interpolation parameter solution under the principle of low power, and obtain the interpolation parameter solution, thereby reducing the amount of calculation and calculation time, and improving the calculation efficiency. After that, the temperature difference between the cold end and the hot end of the thermocouple is determined according to the interpolation parameter solution, so that the corresponding temperature difference can be solved by the linear operation of the potential difference, and the hot end of the thermocouple is temperature calibrated according to the temperature difference and the cold end temperature, so as to achieve the accurate solution of the temperature at the location of the hot end, obtain the target temperature of the position to be tested, and achieve the accurate measurement of the temperature of the position to be tested, and improve the measurement accuracy. The embodiment of the present application reduces the test cost by setting a signal amplification circuit between the cold end of the thermocouple and the measuring unit, and reversely solves the cold end temperature and the potential difference to obtain the temperature difference between the cold end and the hot end, and further obtains the target temperature of the position to be tested, and realizes the two-way solution of the temperature difference and the target temperature, which can achieve accurate calibration of the temperature while controlling the cost, and improve the temperature calibration efficiency.
[0017] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained through the structures particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the examples of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0019] Figure 1 A schematic diagram of a temperature measuring device provided in an embodiment of the present application; Figure 2 is an overall flow chart of the temperature calibration method provided in the embodiment of the present application; Figure 3 A flow chart of interpolating the cold end temperature and the potential difference based on a preset graduation table provided in an embodiment of the present application; Figure 4 A flow chart for screening data on a preset graduation table according to cold end temperature and potential difference provided in an embodiment of the present application; Figure 5 A flowchart of performing power function interpolation processing on data points in a boundary condition set according to a polynomial order provided in an embodiment of the present application; Figure 6 A flowchart of performing matrix conversion on an interpolation equation provided in an embodiment of the present application; Figure 7 A flowchart for solving singular values of a parameter matrix provided in an embodiment of the present application; Figure 8 A flowchart of obtaining a singular pseudo-inverse matrix according to a first orthogonal matrix, a second orthogonal matrix, a first orthogonal transposed matrix, a second orthogonal transposed matrix, a diagonal pseudo-inverse matrix, and a diagonal matrix provided in an embodiment of the present application; Fig. 9 A flow chart for calculating the curve distance between a graduation point and an interpolation curve provided in an embodiment of the present application; Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] This section will describe in detail the specific embodiments of the present invention. The preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but it cannot be understood as a limitation on the scope of protection of the present invention.
[0021] In the description of the present invention, if there is a description of first and second, it is only for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0022] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0023] In the routine laboratory testing of vehicle power systems, the acquisition of temperature signals is a crucial link. For example, the overload and short-circuit test of the vehicle wiring harness requires the detection of whether the temperature of the load end and the fuse box end exceeds the standard, the vehicle electrical balance test requires the detection of whether the vehicle cabin temperature and room temperature are normal, and the accident analysis of accidental train accidents 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.
[0024] Most thermocouples on the market, especially K-type thermocouples, do not have an absolute linear relationship, which leads to low analytical accuracy and huge calculations. This nonlinear relationship makes it more complicated to infer temperature from potential difference, requiring complex mathematical models and calculations, which increases the difficulty of data processing. Although S-type thermocouples can theoretically provide higher accuracy, they are less used in practical applications because of their more complex nonlinear relationship. Therefore, although thermocouples have become the mainstream temperature measurement sensors due to their advantages such as fast response and large temperature measurement range, their shortcomings in nonlinear relationship processing and cost have led to low measurement accuracy and high cost requirements.
[0025] In order to solve the above problems, an embodiment of the present application provides a temperature calibration method, an electronic device and a storage medium, wherein the temperature measuring device includes a thermocouple, a signal amplifying circuit and a measuring unit, wherein the hot end of the thermocouple is arranged at a position to be tested, and the cold end of the thermocouple is connected to the input end of the signal amplifying circuit, so that the signal amplifying circuit can directly amplify the signal transmitted by the cold end to complete the linear amplification of the voltage, and the output end of the signal amplifying circuit is connected to the measuring unit so that the measuring unit can receive the voltage signal output by the signal amplifying circuit, so that the potential difference measured by the measuring unit is consistent with the potential difference between the cold ends, thereby improving the test accuracy while controlling the data acquisition cost. The embodiment of the present application first obtains the cold end temperature of the cold end of the thermocouple, and receives the potential difference sent by the measuring unit, and then interpolates the cold end temperature and the potential difference based on a preset graduation table, so that the graduation table can be used to quickly locate the target value or its interval, reduce the amount of calculation, further reduce the number of equations, improve the accuracy of interpolation, obtain the interpolation equation, realize the analysis of nonlinear data, and give the corresponding relationship between the cold end temperature and the potential difference, which is convenient for subsequent improvement of measurement efficiency, and then perform matrix conversion on the interpolation equation to obtain a parameter matrix, reduce calculation complexity, and improve data stability. Since there may be a problem that the parameter matrix is not a singular matrix, the present application Please solve the singular value of the parameter matrix in the embodiment, use the singular value solution to find the left pseudo-inverse of the parameter matrix, and then find the optimal interpolation parameter solution under the principle of low power, and obtain the interpolation parameter solution, thereby reducing the amount of calculation and calculation time, and improving the calculation efficiency. After that, the temperature difference between the cold end and the hot end of the thermocouple is determined according to the interpolation parameter solution, so that the corresponding temperature difference can be solved by the linear operation of the potential difference, and the hot end of the thermocouple is temperature calibrated according to the temperature difference and the cold end temperature, so as to achieve the accurate solution of the temperature at the location of the hot end, obtain the target temperature of the position to be tested, and achieve the accurate measurement of the temperature of the position to be tested, and improve the measurement accuracy. The embodiment of the present application reduces the test cost by setting a signal amplification circuit between the cold end of the thermocouple and the measuring unit, and reversely solves the cold end temperature and the potential difference to obtain the temperature difference between the cold end and the hot end, and further obtains the target temperature of the position to be tested, and realizes the two-way solution of the temperature difference and the target temperature, which can achieve accurate calibration of the temperature while controlling the cost, and improve the temperature calibration efficiency.
[0026] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0027] Reference Figure 1 , Figure 1 A schematic diagram of a temperature measuring device provided in an embodiment of the present application.
[0028] In some embodiments, the temperature measuring device includes a thermocouple 100, a signal amplifying circuit 200 and a measuring unit 300, and the thermocouple, the signal amplifying circuit 200 and the measuring unit 300 are connected in sequence. Specifically, the hot end of the thermocouple 100 is set at the position to be tested, so that the temperature of the position to be tested is tested through the hot end, and two wires are set between the cold end and the hot end of the thermocouple 100. The cold end of the thermocouple 100 is connected to the input end of the signal amplifying circuit 200, and a potential difference is generated between the two wires of the cold end. The output end of the signal amplifying circuit 200 is connected to the measuring unit 300, and the measuring unit 300 is used to receive the voltage signal output by the signal amplifying circuit 200 to measure the potential difference between the cold ends, so that the potential difference between the cold ends can be accurately measured, and the data acquisition cost can be reduced by setting the signal amplifying circuit 200.
[0029] It should be noted that the signal amplifying circuit 200 in the embodiment of the present application may be a common-phase amplifier circuit, an inverting amplifier circuit, a differential amplifier circuit, a voltage amplifier, a current amplifier, etc., and the embodiment of the present application does not impose any specific limitation.
[0030] It can be understood that the embodiment of the present application uses a precision operational amplifier, which is matched with the same type of resistors to complete voltage linear amplification, and then performs ordinary precision digital acquisition measurement, which can achieve higher test accuracy while controlling the digital acquisition cost.
[0031] Reference Figure 2 The present application embodiment provides a temperature calibration method, which is applicable but not limited to Figure 1 In the temperature measuring device, the temperature calibration method includes but is not limited to steps S101 to S105.
[0032] Step S101 , obtaining the cold end temperature of the cold end of the thermocouple 100 , and receiving the potential difference sent by the measuring unit 300 .
[0033] In step S101 of some embodiments, since the cold end of the thermocouple 100 may change in different scenarios and affect subsequent measurement results, the embodiments of the present application will use an ice-water mixture to perform zero-point calibration on the cold end, and obtain the cold-end temperature of the cold end of the thermocouple 100, that is, the cold-end temperature in the embodiments of the present application is the temperature measured after zero-point calibration with an ice-water mixture, and receive the potential difference sent by the measuring unit 300, so that the potential difference generated between the wires at the cold end can be obtained.
[0034] Step S102, interpolating the cold end temperature and the potential difference based on a preset graduation table to obtain an interpolation equation.
[0035] In step S102 of some embodiments, the cold end temperature and the potential difference are interpolated based on a preset graduation table. Specifically, the bisection method is used to quickly and preliminarily locate the position, and then the power function interpolation is used as the basis to list the corresponding interpolation equations, so as to facilitate the subsequent improvement of the calculation efficiency. The interpolation equations can ensure the uniqueness of the solution, reduce the interpolation error, and further improve the calculation accuracy.
[0036] It should be noted that the graduation table is a pre-calculated and organized table used to quickly find or interpolate specific values, wherein the graduation table in the embodiment of the present application is a graduation table related to the hot end temperature, the cold end temperature and the potential difference.
[0037] Step S103, performing matrix transformation on the interpolation equation to obtain a parameter matrix.
[0038] In step S103 of some embodiments, matrix conversion is performed on the interpolation equation, which reduces the complexity of writing and understanding, and obtains a parameter matrix, making it simple and quick to solve the matrix equation.
[0039] Step S104, performing singular value solving on the parameter matrix to obtain an interpolation parameter solution.
[0040] In step S104 of some embodiments, since the parameter matrix is not a singular matrix, if the calculation is changed from n-1 times to 0 times, the amount of calculation required is huge. To solve this problem, the embodiment of the present application performs singular value solution on the parameter matrix, uses singular value decomposition to find the left pseudo-inverse of the parameter matrix, and then finds the optimal interpolation parameter solution (corresponding to the power function coefficient vector) under the principle of low power, and obtains the interpolation parameter solution, thereby completing the efficient and accurate two-way solution task.
[0041] Step S105, determining the temperature difference between the cold end and the hot end of the thermocouple 100 according to the interpolation parameter solution, and calibrating the hot end of the thermocouple 100 according to the temperature difference and the cold end temperature to obtain the target temperature of the position to be tested.
[0042] In step S105 of some embodiments, the temperature difference between the cold end and the hot end of the thermocouple 100 is determined according to the interpolation parameter solution. Specifically, and (The temperature difference between the hot end and the cold end of the thermocouple 100) is positively correlated. By solving the singular value of the parameter matrix, the optimal interpolation parameter solution can be obtained, that is, the temperature difference between the hot end and the cold end of the thermocouple 100 is obtained, that is, by Can be solved in reverse , and according to the temperature difference And the cold end temperature The temperature of the hot end of the thermocouple 100 is calibrated so that the temperature of the hot end of the thermocouple 100 can be obtained. , and further the target temperature of the position to be tested can be obtained, so as to realize accurate measurement of the temperature of the hot end of the thermocouple 100. The embodiment of the present application can use a pseudo-inverse algorithm for calibration through the corresponding conversion relationship between temperature and voltage, thereby realizing accurate calibration of the target temperature and improving the temperature calibration efficiency.
[0043] Reference Figure 3 , Figure 3 The flowchart of interpolating the cold end temperature and the potential difference based on the preset graduation table provided in the embodiment of the present application includes but is not limited to the following steps S201 to S203.
[0044] Step S201 , screening the preset graduation table according to the cold end temperature and the potential difference to obtain a boundary condition set, wherein the boundary condition set includes a plurality of data points.
[0045] Step S202, determining the number of data points in the boundary condition set, and determining the polynomial order according to the number of data points.
[0046] Step S203, performing power function interpolation processing on the data points in the boundary condition set according to the polynomial order to obtain an interpolation equation.
[0047] In steps S201 to S203 of some embodiments, in the process of interpolating the cold end temperature and the potential difference based on the preset graduation table, the embodiments of the present application first screen the data of the preset graduation table according to the cold end temperature and the potential difference, and select adjacent graduation points to more accurately reflect the local characteristics, improve the accuracy of interpolation, and obtain a set of boundary conditions. By reducing the number of graduation points involved in the interpolation calculation, the order of the equation can be significantly reduced, thereby reducing the amount of calculation and calculation time. Then, the number of data points in the boundary condition set is determined, and the order of the polynomial is determined according to the number of data points. The higher the order, the more accurately the polynomial can fit the data points, thereby achieving an intuitive display of the data. Afterwards, the data points in the boundary condition set are interpolated by a power function according to the polynomial order to obtain an interpolation equation, which is convenient for subsequent improvement of calculation efficiency. In addition, the interpolation equation can ensure the uniqueness of the solution, reduce interpolation errors, and further improve calculation accuracy.
[0048] Reference Figure 4 , Figure 4 The flowchart of the embodiment of the present application for screening data of a preset graduation table according to the cold end temperature and the potential difference includes but is not limited to the following steps S301 to S306.
[0049] Step S301, generating a search condition according to the cold end temperature and the potential difference.
[0050] Step S302, preliminarily screening the data in the partition table by using a preset binary algorithm to screen out a data set that meets the search criteria.
[0051] Step S303: draw an interpolation curve according to the data in the data set, and set an independent variable range interval according to the interpolation curve, wherein the independent variable range interval includes a plurality of graduation points.
[0052] Step S304: for each graduation point in the range of the independent variable, calculate the curve distance between the graduation point and the interpolation curve.
[0053] Step S305 , comparing the curve distance with a preset distance threshold to screen out target graduation points that are less than or equal to the preset distance threshold.
[0054] Step S306, generating a boundary condition set according to the target graduation point.
[0055] In steps S301 to S306 of some embodiments, in the process of screening data of a preset graduation table according to the cold end temperature and the potential difference, the embodiment of the present application first sets the search conditions according to the cold end temperature and the potential difference, so as to facilitate the subsequent use of the cold end temperature and the potential difference as the target value to find out the data that is consistent with or close to the cold end temperature and the potential difference, and then preliminarily screens the data of the graduation table through a preset binary algorithm, so as to quickly locate the target value or the interval where the target value is located, screen out the data set that meets the search conditions, realize the preliminary screening of the data, and reduce the amount of data calculation. Afterwards, an interpolation curve is drawn according to the data in the data set. Specifically, the embodiment of the present application first draws the coordinate axis, and then converts the data in the data set into coordinate data. The cold end temperature can be used as the horizontal axis coordinate and the potential difference as the vertical axis coordinate, or the cold end temperature can be used as the vertical axis coordinate and the potential difference as the horizontal axis coordinate, and the like. The embodiment of the present application does not make specific restrictions. Afterwards, each set of coordinates is drawn on the coordinate axis, and adjacent coordinates are connected to form an interpolation curve. Due to the large number of data points on the interpolation curve, if all given points are used as the boundary conditions for solving the interpolation equation, it is bound to cause problems such as excessive equation order, abnormal curve jumps, and huge amount of calculation. Therefore, the embodiment of the present application will set the independent variable range interval according to the curve trend or inclination of the interpolation curve, so as to screen out a limited number of data points around the independent variable range as boundary conditions. For each graduation point in the independent variable range interval, the curve distance between the graduation point and the interpolation curve is calculated, so as to achieve accurate measurement of the distance between the graduation point and the interpolation curve in the independent variable range interval, which is convenient for subsequent screening of the graduation points. Since the shape of the interpolation curve is mainly affected by the nearby graduation points, the distant points are less affected. Therefore, selecting adjacent graduation points can more accurately reflect local characteristics and improve the accuracy of interpolation. The curve distance is compared with the preset distance threshold to screen out the target division points that are less than or equal to the preset distance threshold, so that the division points that are closer to the interpolation curve can be screened out, and the division points that are far away from the interpolation curve can be removed to avoid the interference of irrelevant division points on the calculation results. Finally, a set of boundary conditions is generated according to 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 calculation and calculation time. In addition, too many division points may cause abnormal fluctuations in the interpolation curve. By limiting the number of division points of the boundary conditions, such fluctuations can be reduced.
[0056] It should be noted that the preset distance threshold in the embodiment of the present application can be set according to the needs of the user, and the embodiment of the present application does not make any specific restrictions.
[0057] Reference Figure 5 , Figure 5The flowchart provided in the embodiment of the present application is for performing power function interpolation processing on data points in a boundary condition set according to the polynomial order, and the method includes but is not limited to the following steps S401 to S403.
[0058] Step S401, constructing an interpolation polynomial by a preset interpolation method, and calculating coefficients of the interpolation polynomial.
[0059] 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 according to the difference quotient value.
[0060] Step S403: construct an interpolation equation according to the difference quotient table, the interpolation polynomial and the coefficients.
[0061] In steps S401 to S403 of some embodiments, in the process of performing power function interpolation processing on data points in a boundary condition set according to the order of the polynomial, the embodiment of the present application first constructs an interpolation polynomial through a preset interpolation method, for example, the interpolation polynomial is constructed by Lagrange interpolation method or Newton interpolation method, and the coefficients of the interpolation polynomial are calculated. Specifically, when the interpolation method is Lagrange interpolation method, the embodiment of the present application constructs the polynomial by constructing basis functions, and calculates the value of each basis function, that is, the coefficient of the interpolation polynomial of the embodiment of the present application; when the interpolation method is Newton interpolation method, the embodiment of the present application constructs the polynomial through difference quotient, and calculates the coefficients of the interpolation polynomial by constructing a difference quotient table. For each data point in the boundary condition set, the difference quotient value of the data point is calculated and the difference quotient table is filled. Specifically, the first-order difference quotient value is calculated for each pair of adjacent data points, and the first-order difference quotient value is placed in the first column of the difference quotient table. The higher-order difference quotients are then calculated and the calculated higher-order difference quotient values are filled into the difference quotient table. After that, the value polynomial and the data points are plotted according to the difference quotient table, the interpolation polynomial and the coefficients. Specifically, the difference quotient and the data points in the difference quotient table are used to construct the polynomial to obtain the interpolation equation, which is convenient for improving the calculation efficiency in the future. The interpolation equation can ensure the uniqueness of the solution, reduce the interpolation error, and further improve the calculation accuracy.
[0062] Reference Figure 6 , Figure 6 The flowchart of performing matrix conversion on the interpolation equation provided in the embodiment of the present application includes but is not limited to the following steps S501 to S503.
[0063] Step S501, 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 an interpolation equation.
[0064] Step S502: performing a transposition operation on the first matrix and performing a transposition operation on the target parameter matrix.
[0065] Step S503 , generating a parameter matrix according to the first matrix after the transposition operation, the target parameter matrix after the transposition operation, and the second matrix.
[0066] In steps S501 to S503 of some embodiments, since there is a problem that the interpolation equation is not a singular matrix, the embodiments of the present application need to perform matrix transformation on the interpolation equation. In the process of performing matrix transformation on the interpolation equation, first, a first matrix corresponding to the potential difference, a second matrix corresponding to the cold end temperature, and a target parameter matrix are determined according to the interpolation equation, wherein the target parameter matrix is a matrix value that needs to be obtained by the interpolation equation. Then, a transposition operation is performed on the first matrix, and a transposition operation is performed on the target parameter matrix, so as to facilitate subsequent solution using the symmetry properties of the first matrix and the target parameter matrix, and then a parameter matrix is generated according to the first matrix after the transposition operation, the target parameter matrix after the transposition operation, and the second matrix, thereby reducing the complexity of writing and understanding, and making it simple and quick to solve the matrix equation.
[0067] Specifically, the interpolation equation established in the embodiment of the present application is expressed as follows: ; in, represents the dependent variable value of the i-th scale data, that is, the potential difference in the embodiment of the present application, The independent variable value representing the i-th division data, that is, the cold end temperature in the embodiment of the present application, and the two variables have a positive correlation.
[0068] The converted parameter matrix is expressed as follows: ; in, is the result of transposing the first matrix; is the second matrix; is the result of transposing the target parameter matrix. Specifically, Represents the parameters of the power function of the entire interpolation curve.
[0069] Reference Figure 7 , Figure 7 The flowchart for solving the singular values of the parameter matrix provided in the embodiment of the present application includes but is not limited to the following steps S601 to S604.
[0070] Step S601, constructing a first orthogonal matrix, a second orthogonal matrix and a diagonal matrix.
[0071] Step S602, 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.
[0072] Step S603, 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.
[0073] Step S604, solving the parameter matrix according to the singular pseudo-inverse matrix to obtain an interpolation parameter solution.
[0074] In steps S601 to S604 of some embodiments, however, for equation In terms of existence The matrix is not a singular matrix problem ( , the interpolation power function equation does not need to be calculated n-1 times). If the calculation is from n-1 times to 0 times, the amount of calculation required is huge. To solve this problem, the embodiment of the present application will solve the singular value of the parameter matrix. Specifically, a first orthogonal matrix, a second orthogonal matrix and a diagonal matrix are constructed, where the first orthogonal matrix is expressed as , the second orthogonal matrix is expressed as , the diagonal matrix is expressed as , , and then perform pseudo-inverse calculation on the diagonal matrix to obtain the diagonal pseudo-inverse matrix, which is expressed as Similarly, the first orthogonal matrix is transposed to obtain a first orthogonal transposed matrix, and the second orthogonal matrix is transposed to obtain a second orthogonal transposed matrix. Then, 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 are used to obtain a singular pseudo-inverse matrix, so that the parameter matrix can be considered to be non-singular. The left pseudo-inverse of the parameter matrix is obtained by singular value decomposition. Finally, the parameter matrix is solved according to the singular pseudo-inverse matrix. Specifically, the parameter matrix Multiply the singular pseudo-inverse matrix on both sides, that is , expressed as , and then we can get of Satisfactory solution ( for The pseudo-inverse matrix of the matrix is obtained to obtain the interpolation parameter solution. The embodiment of the present application 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-order powers, thereby completing an efficient and accurate two-way solution task.
[0075] Reference Figure 8 , Figure 8A flowchart for obtaining a singular pseudo-inverse matrix based on a first orthogonal matrix, a second orthogonal matrix, a first orthogonal transposed matrix, a second orthogonal transposed matrix, a diagonal pseudo-inverse matrix and a diagonal matrix is provided in an embodiment of the present application, and the method includes but is not limited to the following steps S701 to S702.
[0076] Step S701, obtaining a singular matrix according to a first orthogonal matrix, a diagonal matrix and a second orthogonal transposed matrix.
[0077] Step S702: Perform pseudo-inverse transformation 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.
[0078] In steps S701 to S702 of some embodiments, in the process of 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, the embodiment of the present application first obtains a singular matrix according to the first orthogonal matrix, the diagonal matrix and the second orthogonal transposed matrix, which is expressed as , then the singular matrix is pseudo-inversely transformed according to the second orthogonal matrix, the diagonal pseudo-inverse matrix and the first orthogonal transposed matrix to obtain the singular pseudo-inverse matrix, which is expressed as , so that the non-singular case of the parameter matrix can be taken into account, the left pseudo-inverse of the parameter matrix can be obtained by using the singular value decomposition, and then the optimal interpolation parameter solution can be obtained under the principle of low-order power, which is convenient for the subsequent linear operation of the potential difference to solve the corresponding temperature difference.
[0079] Reference Fig. 9 , Fig. 9 The flowchart for calculating the curve distance between a graduation point and an interpolation curve provided in an embodiment of the present application includes but is not limited to the following steps S801 to S803.
[0080] Step S801: for each graduation point, determine the graduation coordinates of the graduation point.
[0081] Step S802: parameterize the interpolation curve.
[0082] Step S803, calculating the curve distance between the graduation coordinate and the interpolation curve after parameterization processing by using a preset distance function.
[0083] In steps S801 to S803 of some embodiments, in the process of calculating 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, so as to simplify the curve equation and make it easier to handle. Specifically, the embodiment of the present application will first determine the curve type of the interpolation curve, and then select one or more parameters for the interpolation curve according to the curve type, so as to describe the positions of all points on the curve by parameters, and then express the curve equation with parameters to ensure that all parameters can cover the entire range of the curve. Afterwards, the curve distance between the graduation coordinates and the interpolation curve after parameterization is calculated by a preset distance function. Specifically, the embodiment of the present application takes the distance function as the Euclidean distance as an example for explanation. For any point on the interpolation curve, a distance function between the point and the graduation point is constructed. For example, , where (x0, y0) are the coordinates of the dividing point, and (xt, yt) are the coordinates of any point on the interpolation curve. In order to find the minimum distance, the embodiment of the present application will minimize D(t), and then differentiate D(t) to calculate the minimum distance of the dividing point, and obtain the curve distance between the dividing point and the interpolation curve, thereby achieving accurate measurement of the distance between the dividing point and the interpolation curve in the range of the independent variable, which is convenient for the subsequent screening of the dividing points, so as to screen out data that is relatively close to the interpolation curve.
[0084] It should be noted that the distance function in the embodiment of the present application can be Euclidean distance, Manhattan distance, Chebyshev distance, etc., and the embodiment of the present application does not make specific limitations.
[0085] See also Fig.10 , Fig.10 The hardware structure of an electronic device of an embodiment is shown, and the electronic device includes: The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an 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 the present application; The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the control method of the display device in the embodiment of this application; Input / output interface 1003, used to implement information input and output; Communication interface 1004, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.); A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 ); The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0086] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program implements the above-mentioned temperature calibration method when executed by a processor.
[0087] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0088] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0089] It can be understood by those skilled in the art that Figure 1-7The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.
[0090] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0091] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0092] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0093] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0094] In the several embodiments provided in the present 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 only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0095] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0096] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0097] If the integrated unit is implemented in the form of 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 the present application, 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, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0098] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A temperature calibration method, characterized in that: Applicable to a temperature measuring device, the temperature measuring device comprising a thermocouple, a signal amplifying 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 to the input end of the signal amplifying circuit, the output end of the signal amplifying circuit is connected to the measuring unit, and the measuring unit is used to receive the voltage signal output by the signal amplifying circuit to measure the potential difference between the cold ends; The method comprises: Acquiring the cold end temperature of the cold end of the thermocouple, and receiving the potential difference sent by the measuring unit; Performing interpolation processing on the cold end temperature and the potential difference based on a preset graduation table to obtain an interpolation equation; Performing matrix transformation on the interpolation equation to obtain a parameter matrix; Solving the singular values of the parameter matrix to obtain an interpolation parameter solution; The temperature difference between the cold end and the hot end of the thermocouple is determined according to the interpolation parameter solution, and the hot end of the thermocouple is temperature calibrated 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 according to claim 1, characterized in that: The interpolation process of the cold end temperature and the potential difference based on the preset graduation table to obtain the interpolation equation includes: Screening a preset graduation table according to the cold end temperature and the potential difference to obtain a boundary condition set, wherein the boundary condition set includes 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; The data points in the boundary condition set are subjected to power function interpolation processing according to the polynomial order to obtain an interpolation equation.
3. The temperature calibration method according to claim 2, characterized in that: The step of screening the preset graduation table according to the cold end temperature and the potential difference to obtain a set of boundary conditions includes: generating a search condition according to the cold end temperature and the potential difference; Performing a preliminary screening of the data in the indexing table by using a preset binary algorithm to screen out a data set that meets the search condition; Draw an interpolation curve according to the data in the data set, and set an independent variable range interval according to the interpolation curve, wherein the independent variable range interval includes a plurality of graduation points; For each graduation point in the range of the independent variable, calculating the curve distance between the graduation point and the interpolation curve; Comparing the curve distance with a preset distance threshold to screen out target graduation points that are less than or equal to the preset distance threshold; A set of boundary conditions is generated according to the target graduation point.
4. The temperature calibration method according to claim 2, characterized in that: The performing power function interpolation processing on the data points in the boundary condition set according to the polynomial order to obtain the interpolation equation includes: Constructing an interpolation polynomial by a preset interpolation method, and calculating coefficients of the interpolation polynomial; For each data point in the boundary condition set, calculating a difference quotient value of the data point, and constructing a difference quotient table according to the difference quotient value; An interpolation equation is constructed according to the difference quotient table, the interpolation polynomial and the coefficients.
5. The temperature calibration method according to claim 1, characterized in that: The interpolation equation is subjected to matrix transformation to obtain a parameter matrix, including: Determine 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 performing a transposition operation on the target parameter matrix; A parameter matrix is generated according to the first matrix after the transposition operation, the target parameter matrix after the transposition operation, and the second matrix.
6. The temperature calibration method according to claim 5, characterized in that: The step of performing singular value solving on the parameter matrix to obtain an interpolation parameter solution includes: Constructing a first orthogonal matrix, a second orthogonal matrix and a diagonal matrix; Performing a pseudo-inverse calculation on the diagonal matrix to obtain a diagonal pseudo-inverse matrix, performing a transposition operation on the first orthogonal matrix to obtain a first orthogonal transposed matrix, and performing a transposition operation on the second orthogonal matrix to obtain a second orthogonal transposed matrix; Obtain 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; The parameter matrix is solved according to the singular pseudo-inverse matrix to obtain an interpolation parameter solution.
7. The temperature calibration method according to claim 6, characterized in that: The step of 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 comprises: Obtain a singular matrix according to the first orthogonal matrix, the diagonal matrix and the second orthogonal transposed matrix; The singular matrix is pseudo-inversely transformed according to the second orthogonal matrix, the diagonal pseudo-inverse matrix and the first orthogonal transposed matrix to obtain a singular pseudo-inverse matrix.
8. The temperature calibration method according to claim 3, characterized in that: The calculating the curve distance between the graduation point and the interpolation curve comprises: For each of the graduation points, determining the graduation coordinates of the graduation point; Performing parameterization processing on the interpolation curve; The curve distance between the graduation coordinate and the interpolation curve after parameterization is calculated by a preset distance function.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the temperature calibration method according to any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to execute the temperature calibration method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Precise retrieval system for focused image main body under numerous and jumbled layout
CN114817597A
Adaptive parameterized model order reduction method for multi-converter parallel system
CN116488161A
Method and device for measuring temperature based on thermocouple, and medium
CN118758443A
Temperature measuring system based on thermocouple
CN118913466A
Temperature detecting device and method using thermocouple
JP2004347383A