Temperature compensation method and device for tilt angle sensor
By using an accelerometer and a pre-trained temperature compensation model in the inclination sensor, combining the current temperature and temperature trends, adjusting the initial output value to determine the inclination value, the problem of inaccurate temperature compensation in the prior art is solved, and the measurement accuracy and stability are improved.
Patent Information
- Application Number
- CN202510062757.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-04-15
AI Technical Summary
The existing temperature compensation scheme of inclination sensors has problems such as high cost, insufficient reliability of results, and no consideration of temperature hysteresis effect and actual temperature scene differences, resulting in large measurement errors and low accuracy.
Get the initial output value of the target object through an accelerometer, obtain the current temperature and temperature trend, and obtain the temperature compensation parameters based on the pre-trained temperature compensation model, adjust the initial output value to determine the inclination value. This method considers the temperature change rate and direction, reducing the impact of temperature scene differences on measurements.
The measurement error of the inclination sensor in the actual temperature change environment is reduced, the impact of the hysteresis effect is reduced, and the accuracy and stability of the inclination angle output are improved.
Smart Images

Figure CN119826865A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of sensor technology, and in particular, to a temperature compensation method, device, computer equipment, computer-readable storage medium, and computer program product for a tilt sensor. Background Art
[0002] Inclination sensors can be used to measure the inclination angle of a target relative to a set reference plane and are widely used in the field of industrial control. In practical applications, inclination sensors are affected by factors such as ambient temperature and humidity, resulting in measurement errors. Therefore, temperature compensation of the inclination sensor is required to improve output accuracy.
[0003] However, the current temperature compensation scheme still has the following defects: (1) the configuration of additional high-precision calibration devices increases costs and the reliability of the results is insufficient; (2) the constructed temperature compensation model does not take into account the temperature hysteresis effect and the differences in actual temperature scenarios, resulting in large scenario errors and low accuracy.
[0004] It should be noted that the above content is not necessarily prior art, nor is it intended to limit the scope of patent protection of this application. Summary of the invention
[0005] Embodiments of the present application provide a temperature compensation method, apparatus, computer equipment, computer-readable storage medium, and computer program product for a tilt sensor to solve or alleviate one or more of the technical problems raised above.
[0006] One aspect of an embodiment of the present application provides a temperature compensation method for a tilt sensor, wherein the tilt sensor includes an accelerometer, and the method includes: Acquiring an initial output value of a target object through the accelerometer; Obtaining the current temperature and temperature trend of the target object; Based on the current temperature, the temperature trend and a pre-trained temperature compensation model, obtaining corresponding temperature compensation parameters; The inclination value of the target object is determined according to the initial output value and the corresponding temperature compensation parameter.
[0007] Optionally, the temperature trend includes a temperature change rate and a temperature change direction, and the temperature change direction includes: temperature increase or temperature decrease.
[0008] Optionally, the temperature compensation parameter includes a scale factor and a zero bias, the scale factor includes a first temperature coefficient and a first temperature change rate coefficient, the first temperature change rate coefficient includes: a first temperature rise coefficient, or a first temperature drop coefficient; the zero bias includes a second temperature coefficient and a second temperature change rate coefficient, the second temperature change rate coefficient includes: a second temperature rise coefficient, or a second temperature drop coefficient; Based on the current temperature, the temperature trend and a pre-trained temperature compensation model, a corresponding temperature compensation parameter is obtained, including: Determining the first temperature coefficient and the second temperature coefficient according to the current temperature; The first temperature change rate coefficient and the second temperature change rate coefficient are determined according to the temperature trend.
[0009] Optionally, the temperature compensation model is obtained by the following operations: Determine the test temperature range and multiple test azimuths; For each test azimuth, the following operations are performed: adjusting the accelerometer to the current test azimuth; obtaining a temperature increase output value sequence and a temperature decrease output value sequence of the target object through the accelerometer in the test temperature range; constructing a plurality of difference equations based on the temperature increase output value sequence and the temperature decrease output value sequence, wherein the difference equations include temperature compensation parameters; extracting the temperature compensation parameters from the plurality of difference equations to construct an observation equation corresponding to the current test azimuth; Constructing a target observation equation group based on the observation equations corresponding to each of the multiple test azimuths; The temperature compensation model is obtained by solving the temperature compensation parameters in the target observation equation group using the least squares method.
[0010] Optionally, the test temperature interval includes a minimum temperature and a maximum temperature; In the temperature test interval, obtaining a temperature increase output value sequence and a temperature decrease output value sequence through the accelerometer includes: In the process of heating up, first output values corresponding to the plurality of first temperature sampling points are sequentially acquired to obtain the temperature-raising output value sequence, wherein the temperature-raising process comprises: gradually heating up from the lowest temperature to the highest temperature at a predetermined rate; In the cooling process, the second output values corresponding to the plurality of second temperature sampling points are sequentially acquired to obtain the cooling output value sequence, wherein the cooling process comprises: gradually cooling from the highest temperature to the lowest temperature at a predetermined rate; The number of the first temperature sampling points and the number of the second temperature sampling points are the same.
[0011] Optionally, based on the temperature increase output value sequence and the temperature decrease output value sequence, a plurality of difference equations are constructed, including: Based on the temperature increase output value sequence and the specific force function template, obtaining a first specific force function sequence, wherein the first specific force function sequence includes a plurality of first specific force functions; Based on the temperature reduction output value sequence and the specific force function template, obtaining a second specific force function sequence, wherein the second specific force function sequence includes a plurality of second specific force functions; The first specific force function and the second specific force function in the first specific force function sequence and the second specific force function sequence are obtained in sequence, and difference equations are constructed one by one to obtain the plurality of difference equations.
[0012] Optionally, the force function template is obtained by the following operations: Determine the reference temperature; Obtaining a reference scale factor and a reference zero bias, as well as a reference output value of the accelerometer at the reference temperature; The specific force function template is determined according to the reference scale factor, the reference zero bias and the reference output value.
[0013] Another aspect of an embodiment of the present application provides a temperature compensation device for a tilt sensor, wherein the tilt sensor includes an accelerometer, and the device includes: A first acquisition module, used for acquiring an initial output value of the target object through the accelerometer; A second acquisition module, used to acquire the current temperature and temperature trend of the target object; A third acquisition module, used to acquire corresponding temperature compensation parameters based on the current temperature, the temperature trend and a pre-trained temperature compensation model; A determination module is used to determine the inclination value of the target object according to the initial output value and the corresponding temperature compensation parameter.
[0014] Another aspect of an embodiment of the present application provides a computer device, including: at least one processor; and a memory communicatively coupled to the at least one processor; Wherein: the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described above.
[0015] Another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method described above is implemented.
[0016] Another aspect of an embodiment of the present application provides a computer program product, including a computer program, which implements the method described above when executed by a processor.
[0017] The above technical solution adopted in the embodiment of the present application may have the following advantages: The current temperature and temperature trend of the target object are obtained, and the initial output value of the target object is obtained through the accelerometer inside the inclinometer. The current temperature and temperature trend are input into a pre-trained temperature compensation model to obtain the corresponding temperature compensation parameters through the temperature compensation model. The initial output value is adjusted according to the temperature compensation parameter to obtain the inclination value of the target object. It can be seen that the embodiment of the present application combines the current temperature and temperature trend for temperature compensation, which can reduce the measurement error of the inclinometer in an actual temperature change environment, reduce the influence of the hysteresis effect, and improve the accuracy and stability of the inclinometer output. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0019] Figure 1 A flow chart schematically shows a temperature compensation method for a tilt sensor according to Embodiment 1 of the present application; Figure 2 A flowchart for obtaining a temperature compensation model according to the first embodiment of the present application is schematically shown; Figure 3 Another flow chart for obtaining a temperature compensation model according to the first embodiment of the present application is schematically shown; Figure 4 Schematically shows Figure 3 Flow chart of sub-steps of step S3023; Figure 5 Schematically shows a temperature test diagram according to the first embodiment of the present application; Figure 6 A flowchart for obtaining a specific force function template according to the first embodiment of the present application is schematically shown; Figure 7 Schematically shows Figure 3 Flow chart of sub-steps of step S3024; Figure 8 A block diagram schematically shows a temperature compensation device for a tilt sensor according to a second embodiment of the present application; and Fig. 9 The hardware architecture diagram of the computer device according to the third embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0021] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0022] In the description of the present application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed, but are only used to facilitate the description of the present application and to distinguish each step, and therefore should not be understood as a limitation on the present application.
[0023] First, the following terms are explained: Scale factor: The proportional relationship between the sensor output signal and the physical quantity being measured.
[0024] Zero bias: The deviation between the output signal of the sensor and the theoretical zero point when there is no input signal (that is, the measured physical quantity is zero).
[0025] Specific force: The acceleration of an object caused by all external forces other than gravity.
[0026] The embodiment of the present application provides a temperature compensation technical solution for an inclination sensor. In this technical solution: (1) no special equipment is required for calibration test, and only general calibration equipment and a temperature chamber are required to achieve accurate modeling of the temperature compensation model; (2) the parameters of the accelerometer inside the inclination sensor are modeled and the compensation solution is designed to solve the result coupling problem of the accelerometer parameters being affected by temperature; the temperature compensation model established based on this, on the basis of temperature compensation, also adds a compensation term for the influence of the temperature change rate on the output accuracy of the inclination sensor, which can reduce the measurement error of the inclination sensor under the condition of external temperature changes, and solve the problem of the step-by-step temperature change and compensation solution after the sensor temperature stabilizes in the related technology: "When the external temperature in the real environment changes smoothly at a certain rate, the sensor and the external temperature are out of sync, and the temperature change rate will also affect the output accuracy of the sensor"; (3) Consider the application scenario with a wide temperature change range: after the external temperature has been heated up / cooled to a large extent, it is cooled / heated in the opposite direction to a large extent. Under the influence of the sensor temperature hysteresis effect, it will be clearly observed that the output value of the sensor at the same external environment temperature point where the temperature rises and falls has a large difference. Therefore, the influence of temperature rise / fall trend on output value is included in the design of the model, which can solve the different influences of different temperature change trends on the sensor, better improve the adaptability of the sensor to various measurement environments, and be applicable to the full temperature range and temperature change environment of industrial scenarios, and make the temperature compensation more accurate. See the following for details.
[0027] The technical solutions of the present application are described below through multiple embodiments. It should be noted that these embodiments can be implemented in a variety of different forms and should not be interpreted as being limited to the embodiments described here.
[0028] Embodiment 1 Figure 1 The flowchart of the temperature compensation method for the tilt sensor according to the first embodiment of the present application is schematically shown.
[0029] like Figure 1 As shown, the temperature compensation method for the tilt sensor may include steps S100 to S106, wherein: Step S100: acquiring an initial output value of a target object through the accelerometer.
[0030] Step S102, obtaining the current temperature and temperature trend of the target object.
[0031] Step S104, acquiring corresponding temperature compensation parameters based on the current temperature, the temperature trend and a pre-trained temperature compensation model.
[0032] Step S106: determining the inclination value of the target object according to the initial output value and the corresponding temperature compensation parameter.
[0033] The temperature compensation method of the inclination sensor provided in this embodiment obtains the current temperature and temperature trend of the target object, and obtains the initial output value of the target object through the accelerometer inside the inclination sensor. The current temperature and temperature trend are input into a pre-trained temperature compensation model to obtain the corresponding temperature compensation parameters through the temperature compensation model. The initial output value is adjusted according to the temperature compensation parameter to obtain the inclination value of the target object. It can be seen that the embodiment of the present application combines the current temperature and temperature trend for temperature compensation, which can reduce the measurement error of the inclination sensor in an actual temperature change environment, reduce the influence of the hysteresis effect, and improve the accuracy and stability of the inclination output.
[0034] The following combination Figure 1 , each step in steps S100~S106 and other optional steps are described in detail.
[0035] Step S100: acquiring an initial output value of a target object through the accelerometer.
[0036] The target object can be an object or surface whose inclination angle is to be measured, such as a building, a mobile phone, a vehicle, a soil slope, etc. By installing or placing the inclination sensor on the target object, the inclination value of the target object can be measured. Among them, the inclination sensor can have a built-in accelerometer, which can be used to measure the component of gravity acceleration. By solving the measurement data, the inclination angle of the object or surface can be calculated. In practical applications, multiple parameters of the accelerometer will change due to temperature, such as temperature drift and sensitivity changes. In order to improve the output accuracy of the inclination sensor, the initial output value of the target object obtained by the accelerometer can be temperature compensated, as described later.
[0037] Step S102, obtaining the current temperature and temperature trend of the target object.
[0038] The temperature trend may be a pattern of temperature changes over time. In an optional embodiment, the temperature trend may include a temperature change rate and a temperature change direction. Exemplarily, the temperature of the target object (the environment) may be continuously and in real time collected by a temperature sensor to determine the current temperature, determine the temperature change direction, and calculate the temperature change rate.
[0039] Step S104, acquiring corresponding temperature compensation parameters based on the current temperature, the temperature trend and a pre-trained temperature compensation model.
[0040] The temperature compensation model may include temperature compensation parameters for a preset temperature range. The temperature compensation parameters can be used to correct the measurement error of the inclination sensor caused by temperature changes. The temperature compensation model can be constructed in a variety of ways, for example: based on the relationship between the inclination value output by the inclination sensor and the temperature, based on the relationship between the output value of the accelerometer and the temperature, etc. In practical applications, temperature will affect multiple parameters of the device at the same time, and the effects of these parameters being affected by temperature are coupled together. Therefore, the accuracy of the temperature compensation model constructed directly based on the inclination value is low. To alleviate the above problems, the construction and training process of the temperature compensation model will be exemplarily introduced below.
[0041] The temperature compensation model can be constructed based on the output value of the accelerometer and the temperature compensation parameters. In an optional embodiment, the temperature compensation parameters may include a scale factor and a zero bias. In practical applications, changes in temperature will affect the scale factor and the zero bias, thereby causing errors. Since the accelerometer has a temperature hysteresis effect, that is, the device cannot adapt quickly when the temperature changes rapidly, and there is a temperature difference between the two, the rate of change of temperature will also affect the scale factor and the zero bias, thereby causing errors. In order to ensure accurate modeling and avoid causing excessive operational pressure on the system, a second-order temperature compensation model can be established to meet the temperature compensation requirements. Exemplarily, a temperature compensation model in which the scale factor and the zero bias change with temperature can be constructed by the following formula: ; in, , is the first-order and second-order coefficients of the scale factor affected by temperature (i.e., the first temperature coefficient), is the coefficient by which the scale factor is affected by the rate of temperature change (i.e., the first temperature change rate coefficient); , is the first-order and second-order coefficients of zero bias affected by temperature (i.e., the second temperature coefficient), is the coefficient of the zero bias affected by the temperature change rate (i.e. the second temperature change rate coefficient), is the base temperature.
[0042] Based on the fact that the temperature hysteresis effect has different effects in temperature rise and temperature drop, the influence of the temperature change direction on the temperature compensation parameters can be further considered on the basis of considering the temperature change and the temperature change rate, that is, whether the temperature is rising or falling. In an optional embodiment, , It can be further designed as follows: ; The superscript "+" indicates the temperature rise coefficient (such as the first temperature rise coefficient , the second temperature rise coefficient ), the superscript “-” indicates the cooling coefficient (such as the first cooling coefficient , the second cooling coefficient ).
[0043] When the temperature changes in the direction of heating, the first cooling coefficient , the second cooling coefficient The value is 0. On the contrary, when the temperature change direction is cooling, the first temperature rise coefficient , the second temperature rise coefficient The value of is 0. Different coefficients are selected according to different temperature change trends.
[0044] The above embodiment introduces how to construct a temperature compensation model. Figure 2 An exemplary introduction to the training process of the temperature compensation model is given.
[0045] In an optional embodiment, if Figure 3 As shown, the temperature compensation model can be obtained by the following steps: Step S300, determining a test temperature range and a plurality of test azimuth angles.
[0046] Step S302: For each test azimuth, perform the following operations: Step S3021: Adjust the accelerometer to the current test azimuth.
[0047] Step S3022: in the test temperature range, obtaining a temperature increase output value sequence and a temperature decrease output value sequence through the accelerometer.
[0048] Step S3023: construct multiple difference equations based on the temperature increase output value sequence and the temperature decrease output value sequence, wherein the difference equations include temperature compensation parameters.
[0049] Step S3024, extracting the temperature compensation parameter from the multiple difference equations to construct an observation equation corresponding to the current test azimuth.
[0050] Step S304: construct a target observation equation group based on the observation equations corresponding to each of the multiple test azimuths.
[0051] Step S306, solving the temperature compensation parameters in the target observation equation group by the least square method to obtain the temperature compensation model.
[0052] For example, the inclination sensor can be placed in an incubator and kept at a preset angle. By adjusting the incubator temperature, different temperature conditions can be simulated. As shown in Table 1, multiple test azimuths can be determined by the six-position method, that is, the XYZ axis orientation of the accelerometer is adjusted to obtain the output value of each axis when the temperature changes under different orientations, so as to calibrate in various directions and further improve the accuracy and reliability of the accelerometer.
[0053] Table 1 Six-position method accelerometer placement orientation
[0054] The test temperature range can be determined according to actual needs, such as -40~60℃, -40~85℃, etc., which can meet most industrial control needs.
[0055] For each test azimuth, the following operations can be performed: adjust the accelerometer to the current test azimuth. Obtain a temperature increase output value sequence and a temperature decrease output value sequence through the accelerometer. Among them, the temperature of the incubator can be gradually increased, and the output values of the accelerometer at multiple temperature points can be collected in real time to obtain a temperature increase output value sequence. Conversely, the temperature of the incubator can be gradually lowered and recorded in real time to obtain a temperature decrease output value sequence. The temperature adjustment method and data recording method can be determined according to actual needs. An exemplary scheme is provided below.
[0056] In an optional embodiment, if Figure 4 As shown, step S3022 may include: Step S400, sequentially acquiring first output values corresponding to a plurality of first temperature sampling points during a heating process to obtain the heating output value sequence, wherein the heating process includes: gradually heating from a lowest temperature to a highest temperature at a predetermined rate.
[0057] Step S402, in the cooling process, sequentially obtain the second output values corresponding to the plurality of second temperature sampling points to obtain the cooling output value sequence, wherein the cooling process comprises: gradually cooling from the highest temperature to the lowest temperature at a predetermined rate; wherein the number of the first temperature sampling points and the second temperature sampling points is the same.
[0058] The test temperature range (e.g. -40°C to 60°C) may include a minimum temperature of -40°C and a maximum temperature of 60°C. Figure 5As shown, in the test temperature range, a certain temperature (such as the reference temperature) is used as the starting temperature (such as 25°C). After waiting for a period of time for the accelerometer to stabilize, the temperature can be gradually increased to the highest temperature (such as 60°C) at a predetermined rate (1°C / min). During the heating process, the output values of the accelerometer at multiple temperature points can be collected, and the obtained output value data can be adjusted in sequence to obtain the heating output value sequence. Wait for a period of time (such as at least one hour) to allow the accelerometer temperature to stabilize, and then gradually cool down to the lowest temperature (such as -40°C) at 1°C / min. During the cooling process, the output values of the accelerometer at multiple temperature points can be collected, and the obtained output value values can be adjusted in sequence to obtain the cooling output value sequence. In this way, a cycle of temperature testing can be completed, and a set of heating output value sequences and cooling output value sequences of the current test azimuth can be obtained. Of course, the above process can also be repeated multiple times to obtain multiple sets of heating output value sequences and cooling output value sequences to further enrich the data and reduce errors. It should be noted that at least one temperature test of heating and cooling is performed at each test azimuth to ensure temperature compensation for both heating and cooling conditions.
[0059] In this embodiment, heating and cooling are performed on each test azimuth angle, and a corresponding output value sequence is obtained for subsequent model training, which can improve the accuracy of the temperature compensation model.
[0060] Based on the temperature increase output value sequence (such as a set of data sequence from -40°C to 60°C) and the temperature decrease output value sequence (such as a set of data sequence from 60°C to -40°C), based on the aforementioned model formula and the preset specific force function template, multiple difference equations can be constructed, and the difference equations include temperature compensation parameters. The preset specific force function template can be designed according to actual needs, and an exemplary solution is provided below.
[0061] In an optional embodiment, if Figure 6 As shown, the force function template can be obtained by following the steps below: Step S600, determining a reference temperature.
[0062] Step S602: Obtain a reference scale factor and a reference zero bias, as well as a reference output value of the accelerometer at the reference temperature.
[0063] Step S604: determining the specific force function template according to the reference scale factor, the reference zero bias and the reference output value.
[0064] For example, the reference temperature, such as 25°C, can be determined according to actual needs. The reference scale factor, reference zero bias, and reference output value of the accelerometer at the reference temperature are obtained. According to the reference scale factor, reference zero bias, reference output value, and specific force definition, the ideal specific force formula of the three-axis accelerometer in the inclination sensor, that is, the specific force function template, can be obtained, which can be expressed as follows: ; in, is the specific force of the accelerometer, with the superscript is the test azimuth of the accelerometer, is the reference temperature, is the output value of the accelerometer, is the reference scale factor of the accelerometer, It is the reference zero bias.
[0065] In this embodiment, a specific force function template may be constructed using reference parameters and output values of the accelerometer at a reference temperature, which is used to subsequently construct a plurality of difference formulas.
[0066] In an optional embodiment, if Figure 7 As shown, step S3023 may include: Step S700: acquiring a first specific force function sequence based on the temperature increase output value sequence and the specific force function template, wherein the first specific force function sequence includes a plurality of first specific force functions.
[0067] Step S702: acquiring a second specific force function sequence based on the temperature reduction output value sequence and the specific force function template, wherein the second specific force function sequence includes a plurality of second specific force functions.
[0068] Step S704, sequentially obtain the first comparative force function and the second comparative force function in the first comparative force function sequence and the second comparative force function sequence, and construct difference equations in a one-to-one correspondence to obtain the plurality of difference equations.
[0069] Exemplarily, each output value in the temperature increase output value sequence can be substituted into the force function template to obtain a first force function sequence. Each output value in the temperature reduction output value sequence is substituted into the force function template to obtain a second force function sequence. Subtracting the first force function and the second force function in the two force function sequences one by one can eliminate the installation error existing in fixing the accelerometer according to the six-position method (the ordinary calibration equipment has low precision and cannot accurately obtain the installation error) so as to solve more accurate temperature compensation parameters. Assuming that the sampling times of the accelerometer are 2n, because the gravity component of the same test azimuth angle remains unchanged, the specific force of the accelerometer will not change, that is, the subtraction results of each n force function for heating and cooling are 0, which can be expressed as follows: ; in, , Respectively represent the specific force function (specific force information) obtained by the first n and last n samplings, subscript represents the i-th temperature sampling point.
[0070] Furthermore, the temperature compensation model of the scale factor and zero bias designed above can be substituted into the above formula. After deformation and simplification, multiple difference equations can be obtained, each of which includes temperature compensation parameters (6 coefficients). Multiple difference equations can be expressed as follows: .
[0071] In this embodiment, based on the temperature test data, the specific force function template and the temperature compensation model, a plurality of difference formulas for solving the temperature compensation parameters can be constructed to eliminate installation errors and reduce costs.
[0072] It can be seen that the above embodiments not only consider the influence of temperature on sensor error, but also consider the influence of temperature change rate and temperature change direction on the sensor, and construct a temperature compensation model that comprehensively considers multiple factors. To simplify the calculation, the temperature compensation model can be written as a linear observation equation, and the 6 coefficients of the temperature compensation model (only one coefficient corresponding to the heating and cooling conditions is used at the same time, so they are combined into one coefficient during calculation) as state variables can be expressed as follows: ; Correspondingly, the observation equation can be expressed as follows:
[0073] Among them, the superscript is the test azimuth of the accelerometer.
[0074] The six-position method is used to obtain the accelerometer output values of multiple test azimuths. Combining the force function template, the scale factor and the zero bias formula, multiple difference formulas can be constructed to construct the observation equations corresponding to each test azimuth, thereby forming an observation equation group, which can be expressed as follows: .
[0075] The final temperature compensation model can be obtained by solving the observation equations using the least squares method.
[0076] The above-mentioned embodiments describe how to construct and train a temperature compensation model. The following will provide an exemplary description of how to correct the tilt sensor error based on the temperature compensation model.
[0077] The current temperature and temperature trend are input into the temperature compensation model to determine the corresponding temperature compensation parameters. In an optional embodiment, the first temperature coefficient and the second temperature coefficient can be obtained by the current temperature; the first temperature change rate coefficient and the second temperature change rate coefficient can be determined by the temperature trend, and then the corresponding scale factor and zero bias can be determined.
[0078] In this embodiment, a model analysis and compensation scheme design are performed on the parameters of the accelerometer inside the inclination sensor to solve the result coupling problem of the accelerometer parameters being affected by temperature. The temperature compensation model established based on this not only adds a compensation term for the influence of the temperature change rate on the output accuracy of the inclination sensor on the basis of temperature compensation, but also can reduce the measurement error of the inclination sensor when the external temperature changes.
[0079] Step S106: determining the inclination value of the target object according to the initial output value and the corresponding temperature compensation parameter.
[0080] According to the temperature compensation parameters (scale factor and zero bias), the initial output value of the accelerometer can be adjusted and solved to obtain the inclination value of the target object. The calculation formula for temperature compensation can be expressed as follows: ; in, and They are the inclination values after temperature compensation in the heating environment and the cooling environment, is the gravity value, and , and as well as and are the specific force value, scale factor and zero bias value calculated after temperature compensation in the heating environment and cooling environment respectively. is the output value of the accelerometer.
[0081] In this embodiment, the output value of the accelerometer is corrected based on the temperature compensation parameter that comprehensively considers various factors, and an accurate inclination value can be obtained through calculation, thereby achieving accurate inclination measurement in a temperature-changing environment.
[0082] Embodiment 2 Figure 8The block diagram of the temperature compensation device of the inclination sensor according to the second embodiment of the present application is schematically shown. The inclination sensor includes an accelerometer. The device can be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can complete specific functions. The following description will specifically introduce the functions of each program module in this embodiment. Figure 8 As shown, the device 1000 may include: a first acquisition module 1100, a second acquisition module 1200, a third acquisition module 1300 and a determination module 1400, wherein: A first acquisition module 1100 is used to acquire an initial output value of a target object through the accelerometer; The second acquisition module 1200 is used to acquire the current temperature and temperature trend of the target object; A third acquisition module 1300 is used to acquire corresponding temperature compensation parameters based on the current temperature, the temperature trend and a pre-trained temperature compensation model; The determination module 1400 is used to determine the inclination value of the target object according to the initial output value and the corresponding temperature compensation parameter.
[0083] As an optional embodiment, the temperature trend includes a temperature change rate and a temperature change direction, and the temperature change direction includes: temperature increase or temperature decrease.
[0084] As an optional embodiment, the temperature compensation parameter includes a scale factor and a zero bias, the scale factor includes a first temperature coefficient and a first temperature change rate coefficient, the first temperature change rate coefficient includes: a first temperature rise coefficient, or a first temperature drop coefficient; the zero bias includes a second temperature coefficient and a second temperature change rate coefficient, the second temperature change rate coefficient includes: a second temperature rise coefficient, or a second temperature drop coefficient; Based on the current temperature, the temperature trend and a pre-trained temperature compensation model, a corresponding temperature compensation parameter is obtained, including: Determining the first temperature coefficient and the second temperature coefficient according to the current temperature; The first temperature change rate coefficient and the second temperature change rate coefficient are determined according to the temperature trend.
[0085] As an optional embodiment, the temperature compensation model is obtained by the following operations: Determine the test temperature range and multiple test azimuths; For each test azimuth, the following operations are performed: adjusting the accelerometer to the current test azimuth; obtaining a temperature increase output value sequence and a temperature decrease output value sequence through the accelerometer in the test temperature range; constructing a plurality of difference equations based on the temperature increase output value sequence and the temperature decrease output value sequence, wherein the difference equations include temperature compensation parameters; extracting the temperature compensation parameters from the plurality of difference equations to construct an observation equation corresponding to the current test azimuth; Constructing a target observation equation group based on the observation equations corresponding to each of the multiple test azimuths; The temperature compensation model is obtained by solving the temperature compensation parameters in the target observation equation group using the least squares method.
[0086] As an optional embodiment, the test temperature range includes a minimum temperature and a maximum temperature; In the temperature test interval, obtaining a temperature increase output value sequence and a temperature decrease output value sequence of the target object through the accelerometer includes: In the process of heating up, first output values corresponding to the plurality of first temperature sampling points are sequentially acquired to obtain the temperature-raising output value sequence, wherein the temperature-raising process comprises: gradually heating up from the lowest temperature to the highest temperature at a predetermined rate; In the cooling process, sequentially obtain the second output values corresponding to the plurality of second temperature sampling points to obtain the cooling output value sequence, wherein the cooling process comprises: gradually cooling from the highest temperature to the lowest temperature at a predetermined rate; The number of the first temperature sampling points and the number of the second temperature sampling points are the same.
[0087] As an optional embodiment, based on the temperature increase output value sequence and the temperature decrease output value sequence, a plurality of difference equations are constructed, including: Based on the temperature increase output value sequence and the specific force function template, obtaining a first specific force function sequence, wherein the first specific force function sequence includes a plurality of first specific force functions; Based on the temperature reduction output value sequence and the specific force function template, obtaining a second specific force function sequence, wherein the second specific force function sequence includes a plurality of second specific force functions; The first specific force function and the second specific force function in the first specific force function sequence and the second specific force function sequence are sequentially obtained, and difference equations are constructed one by one to obtain the multiple difference equations.
[0088] As an optional embodiment, the force function template is obtained by the following operations: Determine the reference temperature; Obtaining a reference scale factor and a reference zero bias, as well as a reference output value of the accelerometer at the reference temperature; The specific force function template is determined according to the reference scale factor, the reference zero bias and the reference output value.
[0089] Embodiment 3 Fig. 9 The schematic diagram of the hardware architecture of a computer device 10000 suitable for implementing the temperature compensation method of the tilt sensor according to the third embodiment of the present application is schematically shown. In some embodiments, the computer device 10000 may be a terminal device such as a smart phone, a wearable device, a tablet computer, a personal computer, a vehicle terminal, a game console, a virtual device, a workbench, a digital assistant, a set-top box, a robot, etc. In other embodiments, the computer device 10000 may be a rack server, a blade server, a tower server, or a cabinet server (including an independent server, or a server cluster composed of multiple servers), etc. Fig. 9 As shown, the computer device 10000 includes but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other through a system bus. Among them: The memory 10010 includes at least one type of computer-readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 10010 can be an internal storage module of the computer device 10000, such as a hard disk or memory of the computer device 10000. In other embodiments, the memory 10010 can also be an external storage device of the computer device 10000, such as a plug-in hard disk equipped on the computer device 10000, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 10010 can also include both the internal storage module of the computer device 10000 and its external storage device. In this embodiment, the memory 10010 is generally used to store the operating system and various application software installed in the computer device 10000, such as the program code of the temperature compensation method of the tilt sensor, etc. In addition, the memory 10010 can also be used to temporarily store various data that have been output or will be output.
[0090] In some embodiments, the processor 10020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips. The processor 10020 is generally used to control the overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is used to run the program code stored in the memory 10010 or process data.
[0091] The network interface 10030 may include a wireless network interface or a wired network interface, and the network interface 10030 is generally used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 10000 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.
[0092] It should be pointed out that Fig. 9 Only a computer device having components 10010 - 10030 is shown, but it should be understood that implementation of all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0093] In this embodiment, the temperature compensation method of the tilt sensor stored in the memory 10010 can also be divided into one or more program modules and executed by one or more processors (such as the processor 10020) to complete the embodiment of the present application.
[0094] Embodiment 4 An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the temperature compensation method for the tilt sensor in the embodiment are implemented.
[0095] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the computer-readable storage medium can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store an operating system and various application software installed on the computer device, such as the program code of the temperature compensation method of the tilt sensor in the embodiment, etc. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or are to be output.
[0096] Embodiment 5 An embodiment of the present application also provides a computer program product, including a computer program, which implements the method in the above embodiment when executed by a processor.
[0097] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by general-purpose computer devices, they can be concentrated on a single computer device, or distributed on a network composed of multiple computer devices, optionally, they can be implemented by executable program codes of computer devices, so that they can be stored in a storage device and executed by the computer device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0098] It should be noted that the above are only preferred embodiments of the present application, and the patent protection scope of the present application is not limited thereto. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A temperature compensation method for a tilt sensor, characterized in that: The tilt sensor comprises an accelerometer, and the method comprises: Acquiring an initial output value of a target object through the accelerometer; Obtaining the current temperature and temperature trend of the target object; Based on the current temperature, the temperature trend and a pre-trained temperature compensation model, obtaining corresponding temperature compensation parameters; The inclination value of the target object is determined according to the initial output value and the corresponding temperature compensation parameter.
2. The method according to claim 1, characterized in that The temperature trend includes a temperature change rate and a temperature change direction, and the temperature change direction includes: temperature increase or temperature decrease.
3. The method according to claim 2, characterized in that The temperature compensation parameter includes a scale factor and a zero bias, the scale factor includes a first temperature coefficient and a first temperature change rate coefficient, the first temperature change rate coefficient includes: a first temperature rise coefficient, or a first temperature drop coefficient; the zero bias includes a second temperature coefficient and a second temperature change rate coefficient, the second temperature change rate coefficient includes: a second temperature rise coefficient, or a second temperature drop coefficient; Based on the current temperature, the temperature trend and a pre-trained temperature compensation model, a corresponding temperature compensation parameter is obtained, including: Determining the first temperature coefficient and the second temperature coefficient according to the current temperature; The first temperature change rate coefficient and the second temperature change rate coefficient are determined according to the temperature trend.
4. The method according to claim 1, characterized in that: The temperature compensation model is obtained by the following operations: Determine the test temperature range and multiple test azimuths; For each test azimuth, the following operations are performed: adjusting the accelerometer to the current test azimuth; obtaining a temperature increase output value sequence and a temperature decrease output value sequence through the accelerometer in the test temperature range; constructing a plurality of difference equations based on the temperature increase output value sequence and the temperature decrease output value sequence, wherein the difference equations include temperature compensation parameters; extracting the temperature compensation parameters from the plurality of difference equations to construct an observation equation corresponding to the current test azimuth; Constructing a target observation equation group based on the observation equations corresponding to each of the multiple test azimuths; The temperature compensation model is obtained by solving the temperature compensation parameters in the target observation equation group using the least squares method.
5. The method according to claim 4, characterized in that The test temperature range includes a minimum temperature and a maximum temperature; In the temperature test interval, obtaining a temperature increase output value sequence and a temperature decrease output value sequence of the target object through the accelerometer includes: In the process of heating up, first output values corresponding to the plurality of first temperature sampling points are sequentially acquired to obtain the temperature-raising output value sequence, wherein the temperature-raising process comprises: gradually heating up from the lowest temperature to the highest temperature at a predetermined rate; In the cooling process, the second output values corresponding to the plurality of second temperature sampling points are sequentially acquired to obtain the cooling output value sequence, wherein the cooling process comprises: gradually cooling from the highest temperature to the lowest temperature at a predetermined rate; The number of the first temperature sampling points and the number of the second temperature sampling points are the same.
6. The method according to claim 5, characterized in that Based on the temperature increase output value sequence and the temperature decrease output value sequence, a plurality of difference equations are constructed, including: Based on the temperature increase output value sequence and the specific force function template, obtaining a first specific force function sequence, wherein the first specific force function sequence includes a plurality of first specific force functions; Based on the temperature reduction output value sequence and the specific force function template, obtaining a second specific force function sequence, wherein the second specific force function sequence includes a plurality of second specific force functions; The first specific force function and the second specific force function in the first specific force function sequence and the second specific force function sequence are obtained in sequence, and difference equations are constructed one by one to obtain the plurality of difference equations.
7. The method according to claim 6, characterized in that The specific force function template is obtained by the following operations: Determine the reference temperature; Obtaining a reference scale factor and a reference zero bias, as well as a reference output value of the accelerometer at the reference temperature; The specific force function template is determined according to the reference scale factor, the reference zero bias and the reference output value.
8. A temperature compensation device for an inclination sensor, characterized in that: The tilt sensor comprises an accelerometer, and the device comprises: A first acquisition module, used for acquiring an initial output value of the target object through the accelerometer; A second acquisition module, used to acquire the current temperature and temperature trend of the target object; A third acquisition module, used to acquire corresponding temperature compensation parameters based on the current temperature, the temperature trend and a pre-trained temperature compensation model; A determination module is used to determine the inclination value of the target object according to the initial output value and the corresponding temperature compensation parameter.
9. A computer device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to claims 1 to 7 are implemented.
Citation Information
Cited By
Inductosyn temperature self-adaptive compensation method, device and equipment
CN121113129A
Method, device and equipment for temperature adaptive compensation of an inductive synchronizer
CN121113129B
Temperature compensation method of pressure sensor
CN121347052A