The Error Compensation of Inclinometer Based on Polynomial Fitting

Abstract

In order to reduce the influence of nonlinear characteristic and temperature on the measuring accuracy of inclinometer, the application of polynomial fitting principle to compensate the measuring error of inclinometer is studied. According to the analysis of the experimental data of inclinometer, a polynomial model of the nonlinear error and the measured value is constructed, and then the relation between the coefficient of the polynomial model and the temperature is obtained by fitting, and finally the function of the measurement error of inclinometer on the measured inclination and temperature is obtained. The results show that this method is feasible and effective, which can not only reduce the influence of temperature, but also correct its nonlinear error.

Keywords

Share and Cite:

Zhang, X. and Li, D. (2021) The Error Compensation of Inclinometer Based on Polynomial Fitting. Advances in Aerospace Science and Technology, 6, 1-8. doi: 10.4236/aast.2021.61001.

1. Introduction

Inclinometer is an important instrument for measuring the levelness of the surface to be measured. Due to its high resolution, wide measuring range and simple integration, inclinometer has been widely used in Marine engineering, mechanical automation, space launch and other fields. However, due to the influence of nonlinear factors and temperature, inclinometer has a large measurement error. In order to reduce the measurement error and improve the accuracy, it is necessary to correct the measurement error by hardware compensation [1] [2] or software compensation [3] [4]. Software compensation methods are generally superior to hardware compensation in universality, accuracy, cost, etc. including nonlinear inverse function [5], polynomial fitting [6] [7], neural network [8] [9], etc. The nonlinear inverse function takes into account the nonlinear characteristics of inclinometer, but it does not take into account the temperature factor, and it is difficult to solve the nonlinear inverse function precisely, which leads to the low compensation accuracy. The neural network has high requirements for initial values, easy to fall into local minima, and poor generalization ability. The polynomial fitting method has the characteristic of curvilinear form to compensate the measurement error, high compensation precision and easy operation.

At present, the electronic inclinometer is used in the calibration system of a radar to collect the dip data of the plate, and the measurement error of the dip data directly affects the result of the non-levelness calibration of the antenna plate in the radar standard calibration system. Therefore, this paper takes the BWS2000 inclinometer used in the calibration system as an example to study the software compensation method for the measurement error of inclinometer based on polynomial fitting, so as to reduce the influence of measurement error on the calibration results.

2. Analysis of Dip Data

In order to study the measurement error of inclinometer accurately, it is necessary to reduce the influence of “outliers” and random errors. The application of the composite filtering method can effectively reduce the random error and “outliers” interference, that is, the dip value di is measured for N times, and the arithmetic mean value d is calculated as the N − 2 measured values after removing the minimum and maximum value:

$d=\frac{1}{N-2}{\sum }_{n-2}^{1}{d}_{i}$ (1)

After processing the dip data, finally obtaining the nonlinear error curve as shown in Figure 1 and the temperature drift error curve as shown in Figure 2.

Figure 1. Nonlinear error curve.

Figure 2. Temperature drift error curve.

Figure1 shows the measurement error curve of the inclinometer when the temperature varies from 20˚C to 48˚C at an interval of 4˚C. It can be seen from the Figurethat, within the range of ±10˚, the measurement error of the inclinometer is small and remains within 0.02˚. However, the error varies greatly with the increase of dip angle. As shown in Figure1, when the inclination is beyond ±30˚, the measurement error of the inclinometer exceeds 0.1˚. It can be seen that the larger the dip angle is, the greater error caused by nonlinear factors will be, and the nonlinear error curve is more complex.

Figure 2 shows the measurement error curve varying with temperature at each dip angle. With the change of temperature, the measurement error also changes. The larger the dip angle is, the more significant the error will be.

To sum up, the measurement error includes nonlinear error and temperature drift error, especially on the larger dip angle, the two kinds of errors are more obvious. And the two kinds of errors are independent of each other, there is no interaction relationship. Therefore, the error compensation must be compensated simultaneously for the nonlinear characteristic and the temperature influence.

3. Error Compensation by Polynomial Fitting

3.1. Polynomial Fitting Compensation

When the temperature is t, the actual dip Angle is ${d}^{\prime }$, and the measured value of the inclinometer is d, the measured output model of the inclinometer is

$d=f\left({d}^{\prime },t\right)$ (2)

Due to the nonlinear characteristic and temperature of inclinometer, the function of measurement $f\left(*\right)$ is complex, and its expression is difficult to obtain accurately. The error compensation is to obtain the actual dip angle ${d}^{\prime }$, which requires constructing the inverse model:

${d}^{\prime }={f}^{\prime }\left(d,t\right)$ (3)

And if the error $\epsilon$ can be calculated as a function of temperature t and measured dip value d, namely:

$\epsilon =g\left(d,t\right)$ (4)

Then the actual dip angle ${d}^{\prime }$ can be obtained by $\left(d-\epsilon \right)$, to reduce the error. But the $g\left(*\right)$ is as complex as $f\left(*\right)$, ${f}^{\prime }\left(*\right)$, and their expressions can’t be calculated precisely.

Due to limited conditions, only a limited number of measured data at temperature t and dip value d can be collected. However, the polynomial fitting can be used to fit the relationship function between the error and the dip value, the temperature, that the approximate expression of the function $g\left(*\right)$. Finally the compensation of the measurement error can be realized.

3.2. Nonlinear Error Modeling

As shown in Figure 1, the relationship between the nonlinear error ε and the dip value d at different temperatures can be expressed by a polynomial:

$\epsilon ={p}_{n}×{d}^{n}+{p}_{n-1}×{d}^{n-1}+\cdots +{p}_{1}×d+{p}_{0}$ (5)

How to properly select the highest order n of polynomial is very important for data fitting. If the order is too small, the fitting error will be large and the compensation effect will not be good. On the contrary, the order is too big, although the fitting accuracy of sample data is high, it may not fit the non-sample data accurately. There is a certain error in the sample data itself. Therefore, it is not necessary to make the exacting fitting curve pass all the sample points, but try to pass near the sample points, which can reflect the changing trend of the data.

In order to determine the appropriate polynomial fitting of the highest order, the nonlinear error curve at the temperature of 20˚C was fitted at different orders. The highest order was determined by comparing the sum of squares of the fitting errors at each order, as well as the size and change trend of the determination coefficient. The relationship between the fitting error, coefficient of determination and order is shown in Figure 3.

Figure 3. Sum of squares of fitting errors and coefficient of determination under different orders.

Figure 3 shows that the higher the highest order, the sum of the squares of the fitting error is small, at the same time coefficient of determination is higher. But fitting error sum of squares and coefficient of determination occurred upheaval in order of 3, then changed very little. And it doesn’t need to make the sum of the squares of the fitting error to 0 or coefficient of determination to 1, therefore, identifying the highest order as 3, polynomial model of nonlinear error is:

$\epsilon ={p}_{3}×{d}^{3}+{p}_{2}×{d}^{2}+{p}_{1}×d+{p}_{0}$ (6)

3.3. Compensation of Temperature Error

It can be seen from Figure 1 that the nonlinear error curve has an obvious drift with the temperature, which inevitably affects the coefficient of the polynomial model. Therefore, the relationship function between each coefficient and temperature should also be obtained. According to the nonlinear error ε curve at different temperature t in Figure 1, the coefficient Pn at different temperature was fitted as shown in Table 1. The relationship between temperature and each coefficient can be more intuitively represented by the figure, as shown in Figure 4.

Figure 4. Relationship between the coefficient and temperature.

Table 1. Values of Pn at different temperatures.

As can be seen from Figure 4, the relationship between pn and t is also complex and nonlinear, which also needs to be represented by a high-order polynomial:

${p}_{n}={k}_{m}×{t}^{m}+{k}_{m-1}×{t}^{m-1}+\cdots +{k}_{1}×t+{k}_{0}$ (7)

For each coefficient of the relationship between pn and t function, the solution method is the same of the error function. First, it needs to determine the highest order of the polynomial, then comparing the sum of squares the fitting error and the coefficient of determination under different order, eventually determine p3 - p0 fitting of the highest order of 6, 5, 3, 4 respectively, then solving the p3 -p0 of km, an expression of p3 - p0 is obtained as follows:

$\left\{\begin{array}{l}{p}_{3}=-3.15×{10}^{-13}{t}^{6}+6.60×{10}^{-11}{t}^{5}-5.65×{10}^{-9}{t}^{4}+2.53×{10}^{-7}{t}^{3}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\text{ }\text{\hspace{0.17em}}-6.26×{10}^{-6}{t}^{2}+8.06×{10}^{-5}t-0.000419\\ {p}_{2}=3.75×{10}^{-11}{t}^{5}-6.64×{10}^{-9}{t}^{4}+4.61×{10}^{-7}{t}^{3}-1.57×{10}^{-5}{t}^{2}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\text{ }\text{\hspace{0.17em}}+2.59×{10}^{-4}t-0.001653\\ {p}_{1}=9.75×{10}^{-8}{t}^{3}-1.03×{10}^{-5}{t}^{2}+0.0004029t-0.005332\\ {p}_{0}=2.01×{10}^{-7}{t}^{4}-2.53×{10}^{-5}{t}^{3}+0.001154{t}^{2}-0.02262t+0.1533\end{array}$ (8)

By substituting p3 - p0 in Equation (8) into the polynomial model of nonlinear error in Equation (6), the measurement error function $g\left(d,t\right)$ of inclinometer can be obtained. Therefore, the measurement error can be quickly and accurately obtained according to the dip angle value of the inclinometer at a certain temperature, so as to make real-time measurement error compensation and correction.

4. Experiment of Measurement Error Compensation

In order to verify the validity of the method, new experimental data are used for error compensation and correction experiment. In the experiment of data acquisition, the inclinometer is installed on the radar antenna, and the temperature around the inclinometer is controlled by the air conditioner, so as to obtain the dip data under different inclinations and temperatures.

The measurement data were collected when the dip value varied between ±35˚ at an interval of 5˚ and the temperature varied between 22˚C - 46˚C at an interval of 4˚C. The data were processed by the composite filtering method to obtain the measurement error before compensation, as shown in Figure 5 “Pre-compensation”. After correction of the measurement data by polynomial fitting method, the measurement error is shown in Figure 5 “Post-compensation”. According to the graph comparison, the measurement error of Pre-compensation changes between ±0.2˚, and it changes greatly with the difference of dip angle and temperature. However, the measurement error of Post-compensation is mainly concentrated between ±0.05˚, and is slightly affected by the dip angle and temperature, distributing relatively stable and uniform.

In order to reflect the compensation effect more concretely, the statistical characteristic of the measurement error was compared. The specific values are shown in Table 2.

Figure 5. The measurement output error comparison before and after compensation.

Table 2. The statistical characteristics of measurement errors (Pre-compensation and Post-compensation).

It can be seen from Table 2 that the measurement error of Post-compensation is smaller than the Pre-compensation in terms of mean value, standard deviation and error sum of squares.

Through graphic comparison and quantitative analysis of the measurement errors in Figure 5 and Table 2, it is shown that the polynomial fitting method has a good effect on the measurement error compensation of the inclinometer, which effectively reduces the influence of nonlinear factors and temperature, and it achieves the purpose of improving the measurement accuracy of the inclinometer.

5. Conclusion

Since the nonlinear characteristic and temperature of the inclinometer have great influence on its measurement accuracy, the two factors of nonlinear characteristic and temperature should be taken into account in the compensation of the measurement error. In this paper, a polynomial model of nonlinear error is constructed based on the polynomial fitting principle, and then the relationship between the coefficient of the model and the temperature is calculated. Finally, the function of the measurement error on the dip angle and temperature is obtained, so as to realize the compensation of the measurement error. This method is not only the model of simple structure, easy to operate, and can greatly reduce the temperature drift error, nonlinear error. The error is kept within 0.03˚, the measuring accuracy of the inclinometer is improved effectively. Later, it is applied in radar calibration system to improve the accuracy of calibration results.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

 [1] Li, X.H., Fan, Y.M. and Li, J.Q. (2008) Capacitive Sensor Processing Circuit. Journal of Tianjin University, 41, 1391-1394. [2] Zheng, Y.H., Peng, S. and Jin, Y.X. (2008) Method to Eliminate the Effect of Temperature on the Performance of Dip Sensors. Piezoelectricity and Acoustooptics, 30, 33-35. [3] Chen, N.A. and Ji, H. (2020) Nonlinear Error Compensation of Load Cell Based on Libsvm. Weighing Instrument, 49, 33-35+41. [4] Kan, B.Q., Zhang, A.T., Wang, J.Y., et al. (2005) Software Compensation for Nonlinear Sensor Signals. Journal of Air Force University of Engineering: Natural Science, 6, 25-27. [5] Liu, W.S., Bai, L., Ma, Y.Z. and Chen, M.Q. (2016) Research on Aircraft Brake Servo System Based on Inverse Function Self Correction Method. Computer Simulation, 33, 91-95. [6] Gong, Z.L. and Liu, H.S. (2019) Research on Temperature Drift Compensation of Silicon Capacitive High Precision Dual Axis Tilt Sensor. Sensors and Microsystems, 38, 43-45. [7] Chen, H.T., Xue, Z.G., Jin, H.W. and Zhang, W.Y. (2020) Method and Realization of Nonlinear Compensation and Temperature Compensation for bme680 Pressure Sensor. Journal of Naval Aeronautical Engineering College, 35, 200-204+222. [8] Jia, S., Che, H., Li, Y., et al. (2020) Error Compensation Method of Fog Based on BP Neural Network. Physics and Engineering, 30, 116-120. [9] Wang, X.Y., Zhu, J.L. and Miao, M. (2020) Gyro Error Compensation Method Based on Threshold Noise Reduction and Neural Network. Journal of Beijing University of Information Technology (Natural Science Edition), 35, 58-62+77.