Literature DB >> 31847225

Adaptive Nonlinearity Compensation System for Integrated Temperature and Moisture Sensor.

Guohong Chen1, Shengjun Zhou2, Jie Ni1, Hao Huang3,4.   

Abstract

Measuring temperature and moisture are important in many scenarios. It has been verified that temperature greatly affects the accuracy of moisture sensing. Moisture sensing performance would suffer without temperature calibrations. This paper introduces a nonlinearity compensation technique for temperature-dependent nonlinearity calibration of moisture sensors, which is based on an adaptive nonlinear order regulating model. An adaptive algorithm is designed to automatically find the optimal order number, which was subsequently applied in a nonlinear mathematical model to compensate for the temperature effects and improve the moisture measurement accuracy. The integrated temperature and moisture sensor with the proposed adaptive nonlinear order regulating nonlinearity compensation technique is found to be more effective and yield better sensing performance.

Entities:  

Keywords:  adaptive order regulating; nonlinearity compensation; temperature and moisture sensor; temperature-dependent nonlinearity

Year:  2019        PMID: 31847225      PMCID: PMC6952882          DOI: 10.3390/mi10120878

Source DB:  PubMed          Journal:  Micromachines (Basel)        ISSN: 2072-666X            Impact factor:   2.891


1. Introduction

Temperature and moisture sensors have extensive applications in many industries, including agriculture, food, pharmaceuticals, mining, construction, and so on. For instance, integrated temperature and moisture sensors have been widely deployed in the wheatland in Zhejiang academy of agricultural sciences, as shown in Figure 1.
Figure 1

Temperature and moisture sensor deployed in the wheatland.

Many kinds of moisture sensors have been researched and developed. However, previous researchers have proven that temperature variation has a significant and nonlinear influence on moisture measurement results [1,2]. On the one hand, the materials which make up the moisture sensing elements behave in a nonlinear way with the temperature. On the other hand, all moisture sensors must contain active electronics, which are characterized by a nonlinear relationship with temperature [3,4]. To obtain a correct moisture reading, primitive moisture measurement data need to be adjusted according to temperature, often in a nonlinear manner [3,4,5,6]. In general, a commercial sensor would be made of a temperature sensing unit and a moisture sensing unit integrated together. Conventionally, moisture adjustment by temperature was achieved with look-up tables (LUTs), which are large datasets consisting of measured temperatures, measured moistures, and corresponding adjusted moisture values [6]. Manufacturers perform huge numbers of tests under various temperatures and moisture levels in order to construct LUTs. However, the accuracy of this nonlinear mapping relationship depends on the precision of the measurements and the size of the LUT [7,8]. LUT-based adjustment can be highly accurate; however, a sensor unit can potentially be used in a huge range of temperatures, thus requiring a huge LUT to accurately provide moisture level readings. Despite this, the LUT method is effective and straightforward, although its huge size means it cannot be implemented in a microcontroller with limited memory. A mathematical model of nonlinear adjustment can overcome the shortcomings of conventional sensors, and to a large extent, reflect and compensate the complex effect of temperature on moisture readings [9,10,11]. However, the existing compensation methods often use nonlinear mathematical models with fixed orders, which may not reach optimal error under different usage environments, thus making it difficult to attain the best compensation effects. In addition, these models are hard to migrate from one type of sensor to another. In order to achieve a better sensing performance and lower measurement error, we propose a nonlinear compensation method for adaptive order adjustment. A high-order mathematical formula is used to reflect the nonlinear relationship between the actual moisture and the sensor’s measured probe voltage [12,13]. A high-order mathematical compensation model with the smallest error is selected by an adaptive order selection module. The experimental results verify that the measurement accuracy of this adaptive order nonlinearity compensated temperature and moisture sensor is significantly improved.

2. System Construction

The structure of a conventional temperature and moisture sensor is shown in Figure 2. A temperature sensor and a moisture sensor are integrated in the system. The analog measurement results are digitized by an analog-to-digital converter (ADC) and then calibrated by a LUT-based linearization module [14]. The calibration memory should be large enough to store a large LUT for high-accuracy temperature and moisture sensing, thus this traditional method requires a large storage capacity.
Figure 2

System diagram of the conventional moisture and temperature sensor.

As shown in Figure 3, the temperature-moisture sensor uses a fixed-order temperature-dependent nonlinear compensation model rather than a look-up table. Temperature-dependent nonlinear modeling requires three sets of data, including internally detected moisture, internally detected temperature, and true moisture transmitted from the outside via the RS485 interface [15]. When determining the fixed-order nonlinear model, the least square (LS) algorithm is used to estimate the model coefficients.
Figure 3

Architecture of the current sensor with model-based temperature-dependent nonlinearity compensation system.

The adaptive order-adjusted temperature and moisture sensor proposed in this paper, as shown in Figure 4, adds an adaptive order adjustment and feedback module based on the Figure 3 fixed-order nonlinear compensation model. The same as the architecture shown in Figure 3, temperature-dependent nonlinear modeling requires the same three sets of data, including internally detected temperature, internally detected moisture, and true moisture. The adaptive nonlinear order regulation algorithm module is added to search for the model with the optimal nonlinear order and the best nonlinearity compensation performance. During the searching process, the LS algorithm is used to estimate coefficients of the variable order models.
Figure 4

System architecture of the proposed temperature and moisture sensor with adaptive nonlinear order regulating model-based linearization.

The advantages and disadvantages and degree of difficulty of the three temperature and moisture sensors are shown in Table 1. All of the three integrated sensors can be implemented by a common sensor with temperature and moisture sensor cores and an STM32L4R5 microcontroller with 2048 KB flash, 640 KB ram, 12-bit DACs (digital-analog convertor), and 16-bit ADCs (analog-digital convertor) from STMicroelectronics in Geneva, Switzerland.
Table 1

Comparison of three temperature and moisture sensors’ architectures.

Sensors’ ArchitecturesLinearization TechnologyAdvantagesDisadvantages
Conventional sensor (Figure 2)LUT-based linearizationSimple and easy-to-achieveToo many experiments, too much memory consumption, poor performance
Current sensor (Figure 3)Model-based linearizationPractical and efficientInflexible, performance can be improved
Proposed sensor (Figure 4)Adaptive nonlinear order regulating model-based linearizationPerfect performanceMore computational resources

3. Adaptive Nonlinear Order Regulating Model-Based Nonlinearity Compensation Algorithm

We performed a total of 12 sets of tests among an adaptively-ordered nonlinearly-corrected sensor, a noncalibrated sensor, and a fixed third-order nonlinearly-corrected sensor just as in [15]. The true moisture levels of each test were fixed, and moisture was measured in a changing environment from C to C, and subsequently compared with the true moisture values. The nonlinear effects of temperature on moisture measurements are clearly observed. The nonlinear modeling and the coefficients estimation are brought out by the experimental data of moisture sensing, as listed in Table 2. To be clear, the true moisture values in the Table 2 were measured using the weighting method after drying, which is a well-known standard method of moisture measurement [16,17].
Table 2

Experimental data of temperature and moisture sensing (in %).

Temp. Idx. m12345678Real
Temp. Tm C 10  C 15  C 20  C 25  C 30  C 35  C 40  C Moisture
Moisture Idx. i Measured Moisture θmeas(i,Tm) θreal(i)
133.133.834.535.435.936.238.740.240.3
231.431.932.433.133.534.936.337.337.2
327.929.830.330.631.131.431.932.332.0
422.623.123.524.325.125.726.527.326.8
519.619.920.922.222.823.624.525.824.6
619.120.420.821.422.623.225.025.123.3
717.218.318.919.519.921.122.323.720.9
816.717.518.118.819.620.621.522.818.6
915.115.716.717.418.319.720.721.616.8
1014.314.815.516.117.118.519.620.315.1
1113.614.114.815.015.816.718.119.413.9
1212.513.213.914.114.515.317.218.112.6
The empirical Topp’s equation describes the nonlinear relationship between the volumetric water content and the dielectric constant of water [18]: Thus, during the measurement, we expected the measured moisture to vary with temperature according to the following relationship: where , and C, and where . During the test, the dielectric constant of water decreases with increasing temperature [19,20,21], and so a temperature-dependent nonlinear model needs to be constructed to compensate for the effects of temperature [15,22,23]. The relationship between the fixed actual moisture value and the actual water dielectric constant can be seen in Equation (3). The nonlinear relationship we constructed can be seen in Equations () and (). where is the real moisture of the test; is the real dielectric permittivity of water in general; is temperature-related nonlinear factor; and are the n nonlinear coefficients to be estimated. Estimated nonlinear coefficients are applied to validate the performance of the temperature-related nonlinearity compensation. By plugging and into Equations (3)–(), one gets the estimation of the real moisture values . For each test i, the moisture error ratios with and without nonlinearity compensation [15], expressed by and , are respectively defined as where m is the temperature index, and M is the total number of the temperatures. The specific calculation process can be seen in Algorithm 1: : real moisture of the test; : real dielectric permittivity of water; : temperature-related nonlinear factor; :the nonlinear coefficients to be estimated; n: Nonlinear correction equation order; P:the optimal corrected nonlinear order; initial ; repeat ; compute by solving Equation (2) with the measured moisture in each row of Table 2; acquire by solving Equation (3) with the real moisture in each row of Table 2; obtain by plugging and into Equation (4); compute by solving Equation (5) by LS algorithm; acquire ; obtain ; determine ; if () then set set else set end if until () is found, P is the optimal corrected nonlinear order. In particular, the LS algorithm in Step 4 can be represented in matrix form as follows: For the ith moisture index, Equation (4) can be rewritten in the matrix form as where the matrixes with nth nonlinear order are and () denotes matrix transpose. With the knowledge of and , the nonlinear coefficients can be estimated by the LS method. The objective function is The least squares solution to Equation (8) is where is the estimated nonlinear coefficients matrix.

4. Experimental Results and Discussion

Moisture error ratios under various nonlinear model-based compensation methods and the traditional methods are displayed in Figure 5. Measurement environments were kept the same throughout. It is obvious that the measurement error is very large without correction, which shows that temperature has a significant and nonlinear influence on the measurement results. In addition, measurement errors were greatly reduced when using third-order nonlinear correction. To further enhance sensor performance, we proposed and studied the adaptive order adjustable model. For the sensors studied in this article, the moisture error ratio reached a minimum under the eighth-order nonlinear compensation model, which indicated the best correction effect. Furthermore, corrections at even higher orders (ninth and above) would not yield better results as they would be overcorrected.
Figure 5

Performance validation of the temperature-related nonlinearity compensation(n = 3∼8).

For instance, in the condition of moisture index , the real moisture is , the sensing error ratio without nonlinearity compensation is as high as ; however, the error ratios with -order and -order nonlinearity compensations are reduced to and , respectively. In the condition of moisture index , the real moisture is , the measurement error ratio without nonlinearity compensation is , but the error ratio with 3rd-order nonlinearity compensation is reduced to , while the error ratio with 8th-order nonlinearity compensation is . It is verified that the proposed adaptive nonlinear order regulating model-based nonlinearity compensation algorithm can obtain the optimal nonlinear order and achieve the best compensation performance. To be clear, the 3∼8th-order nonlinear coefficients are estimated and listed in Table 3, Table 4, Table 5, Table 6, Table 7 and Table 8, respectively.
Table 3

Estimated nonlinear coefficients for the 3rd nonlinear order model.

Test No.Estimated Nonlinear Coefficients
i a^1(i) a^2(i) a^3(i)
12.3059 ×103−0.1388 ×103−0.0048 ×103
22.3831 ×103−0.1185 ×103−0.0052 ×103
30.6369 ×103−0.0511 ×1030.0007 ×103
42.3190 ×103−0.1013 ×103−0.0043 ×103
53.0301 ×103−0.1183 ×103−0.0045 ×103
62.5375 ×103−0.0515 ×103−0.0019 ×103
72.2943 ×103−0.0170 ×1030.0004 ×103
81.8741 ×1030.0943 ×1030.0035 ×103
92.3390 ×1030.1327 ×1030.0040 ×103
102.2872 ×1030.1928 ×1030.0050 ×103
111.5311 ×1030.2383 ×1030.0081 ×103
121.0382 ×1030.2828 ×1030.0109 ×103
Table 4

Estimated nonlinear coefficients for the 4th nonlinear order model.

Test No.Estimated Nonlinear Coefficients
i a^1(i) a^2(i) a^3(i) a^4(i)
14.0052 ×104−3.8107 ×1047.5852 ×1061.0460 ×106
29.9438 ×104−2.9512 ×1043.7633 ×1067.6233 ×107
34.0457 ×104−8.0658 ×1052.2654 ×1061.2754 ×107
41.1753 ×103−2.4673 ×1043.0875 ×1066.2788 ×107
51.4789 ×103−3.1559 ×1045.5129 ×1068.5151 ×107
62.4366 ×103−6.4367 ×105−1.2525 ×1065.5407 ×108
71.9509 ×103−6.0701 ×1052.6894 ×1061.8852 ×107
82.7507 ×1032.0581 ×104−2.1841 ×106−4.8120 ×107
93.9083 ×1033.3228 ×104−6.1429 ×106−8.6141 ×107
104.5520 ×1034.8080 ×104−9.7061 ×106−1.2432 ×106
113.7140 ×1035.1586 ×104−6.0784 ×106−1.1983 ×106
123.8067 ×1036.3482 ×104−7.1164 ×106−1.5197 ×106
Table 5

Estimated nonlinear coefficients for the 5th nonlinear order model.

Test No.Estimated Nonlinear Coefficients
i a^1(i) a^2(i) a^3(i) a^4(i) a^5(i)
12.258 ×103−5.365 ×104−1.939 ×1051.864 ×1067.825 ×108
22.698 ×103−4.376 ×104−2.097 ×1051.512 ×1067.174 ×108
31.214 ×103−1.483 ×104−9.480 ×1064.836 ×1073.407 ×108
42.580 ×103−3.642 ×104−1.730 ×1051.246 ×1065.915 ×108
52.562 ×103−4.062 ×104−1.021 ×1051.328 ×1064.562 ×108
63.223 ×103−1.302 ×104−1.267 ×1054.016 ×1073.313 ×108
72.672 ×103−1.211 ×104−7.783 ×1065.060 ×1073.038 ×108
81.928 ×1032.746 ×1049.760 ×106−8.433 ×107−3.465 ×108
92.044 ×1034.883 ×1042.093 ×105−1.682 ×106−7.853 ×108
102.173 ×1036.799 ×1042.484 ×105−2.290 ×106−1.002 ×107
111.189 ×1037.272 ×1043.059 ×105−2.310 ×106−1.064 ×107
124.343 ×1049.170 ×1044.185 ×105−3.004 ×106−1.420 ×107
Table 6

Estimated nonlinear coefficients for the 6th nonlinear order model.

Test No.Estimated Nonlinear Coefficients
i a^1(i) a^2(i) a^3(i) a^4(i) a^5(i) a^6(i)
1−1.283 ×103−9.107 ×1045.032 ×1056.986 ×106−1.671 ×107−1.515 ×108
23.948 ×104−6.810 ×1042.437 ×1054.843 ×106−8.783 ×108−9.853 ×109
33.672 ×104−2.378 ×1047.181 ×1061.708 ×106−2.457 ×108−3.621 ×109
47.791 ×104−5.545 ×1041.814 ×1053.851 ×106−6.562 ×108−7.704 ×109
57.840 ×104−5.941 ×1042.479 ×1053.900 ×106−7.759 ×108−7.608 ×109
61.487 ×103−3.137 ×1042.151 ×1052.914 ×106−8.720 ×108−7.430 ×109
71.806 ×103−2.126 ×1049.270 ×1061.759 ×106−2.965 ×108−3.706 ×109
83.228 ×1034.120 ×104−1.583 ×105−2.723 ×1065.542 ×1085.561 ×109
94.596 ×1037.580 ×104−2.931 ×105−5.374 ×1069.831 ×1081.092 ×108
105.370 ×1031.018 ×103−3.810 ×105−6.915 ×1061.213 ×1071.368 ×108
114.205 ×1031.046 ×103−2.878 ×105−6.672 ×1061.026 ×1071.290 ×108
123.272 ×1031.217 ×103−1.401 ×105−7.108 ×1065.458 ×1081.214 ×108
Table 7

Estimated nonlinear coefficients for the 7th nonlinear order model.

Test No.Estimated Nonlinear Coefficients
i a^1(i) a^2(i) a^3(i) a^4(i) a^5(i) a^6(i) a^7(i)
11.921 ×103−1.904 ×103−7.442 ×1052.279 ×1051.036 ×106−6.598 ×108−3.154 ×109
22.820 ×103−1.433 ×103−7.006 ×1051.681 ×1058.229 ×107−4.833 ×108−2.388 ×109
31.210 ×103−4.993 ×104−2.564 ×1055.868 ×1062.920 ×107−1.700 ×108−8.300 ×1010
42.482 ×103−1.083 ×103−4.816 ×1051.225 ×1055.739 ×107−3.472 ×108−1.677 ×109
52.409 ×103−1.098 ×103−3.850 ×1051.192 ×1055.328 ×107−3.339 ×108−1.600 ×109
62.821 ×103−7.277 ×104−3.045 ×1059.499 ×1064.140 ×107−2.860 ×108−1.314 ×109
72.661 ×103−4.778 ×104−2.402 ×1055.977 ×1062.914 ×107−1.727 ×108−8.417 ×1010
81.823 ×1038.478 ×1043.888 ×105−9.656 ×106−4.722 ×1072.785 ×1081.383 ×109
92.382 ×1031.445 ×1035.690 ×105−1.630 ×105−7.332 ×1074.605 ×1082.180 ×109
102.304 ×1031.969 ×1038.126 ×105−2.204 ×105−1.030 ×1066.231 ×1083.018 ×109
111.513 ×1031.881 ×1037.601 ×105−1.995 ×105−9.081 ×1075.560 ×1082.650 ×109
121.159 ×1042.196 ×1031.089 ×104−2.268 ×105−1.131 ×1066.221 ×1083.107 ×109
Table 8

Estimated nonlinear coefficients for the 8th nonlinear order model.

Test No.Estimated Nonlinear Coefficients
i a^1(i) a^2(i) a^3(i) a^4(i) a^5(i) a^6(i) a^7(i) a^8(i)
1−9.155 ×1043.239 ×102−3.458 ×1028.583 ×103−1.815 ×1031.067 ×104−5.813 ×106−6.912 ×1010
27.324 ×1042.979 ×102−2.923 ×1027.514 ×103−1.548 ×1039.244 ×105−4.967 ×106−5.057 ×1010
32.747 ×1041.939 ×102−1.799 ×1025.398 ×103−1.107 ×1037.096 ×105−3.808 ×106−1.637 ×1010
49.766 ×1043.094 ×102−2.723 ×1027.688 ×103−1.496 ×1039.426 ×105−4.884 ×106−3.529 ×1010
57.935 ×1044.380 ×102−3.524 ×1021.083 ×102−1.985 ×1031.311 ×104−6.516 ×106−3.492 ×1010
61.526 ×1033.937 ×102−2.354 ×1029.513 ×103−1.538 ×1031.159 ×104−5.435 ×106−2.947 ×1010
71.526 ×1034.150 ×102−2.016 ×1021.006 ×102−1.410 ×1031.218 ×104−5.181 ×106−1.637 ×1010
82.838 ×1033.561 ×1023.262 ×1047.713 ×103−4.711 ×1048.782 ×105−2.434 ×1062.947 ×1010
93.815 ×1034.165 ×1024.732 ×1038.636 ×103−3.747 ×1049.545 ×105−2.290 ×1064.929 ×1010
104.639 ×1033.822 ×1021.646 ×1027.210 ×1031.778 ×1047.484 ×105−6.800 ×1076.567 ×1010
113.399 ×1033.327 ×1022.385 ×1026.242 ×1035.424 ×1046.297 ×1053.400 ×1075.823 ×1010
122.319 ×1033.188 ×1023.014 ×1025.931 ×1037.631 ×1045.879 ×1058.521 ×1076.412 ×1010

5. Conclusions

This paper presents an adaptive nonlinear order regulating model-based nonlinear compensation system for integrated temperature and moisture sensors. On the basis of a temperature-dependent multiorder nonlinear model for compensation correction, the measurement performance of each order nonlinear model and traditional method is compared. The experimental results verify that the nonlinear model compensation method can significantly reduce the sensing error, and the eighth order nonlinear model achieves the best measurement performance on the the integrated temperature and moisture sensor deployed in the wheatland in Zhejiang academy of agricultural sciences. Through this adaptive nonlinear compensation method, the measurement performance of the temperature and moisture sensor is greatly improved.
  1 in total

1.  Research on Temperature Compensation of Multi-Channel Pressure Scanner Based on an Improved Cuckoo Search Optimizing a BP Neural Network.

Authors:  Huan Wang; Qinghua Zeng; Zongyu Zhang; Hongfu Wang
Journal:  Micromachines (Basel)       Date:  2022-08-19       Impact factor: 3.523

  1 in total

北京卡尤迪生物科技股份有限公司 © 2022-2023.