# A Novel Portable Soil Water Sensor Based on Temperature Compensation

Authors: Hao Tian; Chongchong Yu; Tao Xie; Tong Zheng; Mei Sun
Journal: Journal of Sensors
 (2022)

---

## Abstract

Soil water sensors based on the standing wave rate (SWR) principle are affected by temperature in long-term operation. To address this problem, a temperature compensation model based on the binary regression analysis method is proposed. The measurement results of the temperature-compensated standing wave rate (TCSWR) sensor at different temperatures and soil volumetric water content are analyzed, and the least-squares principle is used to identify the parameters to be determined in the compensation model for temperature for the SWR soil water sensor. A portable tapered TCSWR sensor with built-in temperature compensation model was developed on this basis. The calibration results show that the standing wave measurement circuit of the TCSWR sensor can effectively respond to changes in soil water, and the coefficient of the fitted equation exceeds 0.95. A comparison of the results before and after temperature compensation proves that compensation can significantly reduce the measurement error of the TCSWR sensor and improve the measurement accuracy. The static and dynamic characteristics of the TCSWR sensor show that the measurement range of the TCSWR sensor is7.50%-31.50%, the measurement accuracy is ±0.63%, the stability is good, the resolution is a minimum of 0.05%, and the dynamic response time is less than 1 s. The absolute error of the TCSWR sensor measurement is less than 1% in comparison with similar sensors, demonstrating that the measurement results of the TCSWR sensor are reliable.


---

## Body

## 1. Introduction

Soil water is an important parameter in the fields of soil physics, botany, and other agriculture [1]. The main methods used to measure soil water content include the weighing and drying method, electric measurement method, and radiometric method [2]. The most commonly used methods are based on electrical measurement. The electrical measurement methods can be divided into capacitive and dielectric methods, and capacitive methods include bridge and resonance methods. Anderson was the first to explore the use of audio bridges to determine the water content of soil [3]; however, the measurement accuracy of the bridge method is not high owing to the high cost and susceptibility to the interference of soil temperature and conductivity [4]. Babb first studied the use of the resonance method to measure soil water content [5]. Subsequently, Hardy and Bell and others attempted to use a high resonant frequency to improve the measurement accuracy [6, 7]. However, simply increasing the measurement frequency does not eliminate the error, and finding ways to eliminate the interference of conductance during measurement is still necessary for the capacitance method. The dielectric method, which is used to measure soil water content through the dielectric properties of soil, is the most widely used soil water content measurement technique and is mainly divided into time domain reflection (TDR), time domain transmissometry (TDT), frequency domain reflection (FDR), and standing wave rate (SWR). Fellner-Feldegg was the first to use TDR for the study of the electrical properties of liquids [8]. Topp et al. applied it to soil water content measurement and conducted related studies [9, 10]. Thereafter, the soil water content measurement based on the TDR method has been researched in depth and has been applied increasingly. The TDR method soil water sensor is less sensitive to soil properties and external temperature changes and is the most accurate in actual measurement, but it is expensive and not suitable for large-scale promotion [11–13]. Meanwhile, research on soil water content measurement technology based on TDT and FDR is also being conducted, and related products have been developed [14–17]. Gaskin and Miller proposed the use of the SWR to measure soil water content based on electromagnetic wave theory [11, 18]. On this basis, scholars have further studied soil water content measurement based on the SWR principle and developed related sensors [4, 19–22]. SWR sensors provide fast, accurate, automated measurements with a fast dynamic response for volumetric water content measurements in many types of soil and are widely used in long-term monitoring processes in soil water networks owing to their low cost, ease of use, and low power consumption.Because the dielectric constant of the medium can vary at different temperatures and there is also a temperature drift in the sensor hardware, the study of temperature compensation methods for soil water sensors is important in the field of soil water measurement. Some scholars have proposed optimizing the measurement results of the instrument to improve the detection accuracy [23–26]. Western and Seyfried constructed temperature-compensated calibration curves to improve the measurement accuracy by studying the relationship between temperature, soil pore space, and soil conductivity [27]. Bogena et al. studied the influence of temperature variation and conductivity on capacitive soil water sensors and developed a compensating mathematical model based on experimental results [28]. Kapilaratne and Lu proposed an automatic calibration algorithm for the TDR soil water sensor temperature to eliminate measurement errors caused by different soil types [29]. However, the related temperature compensation research is mainly focused on TDR sensors and FDR sensors, and there have been few reports on research and compensation methods for the temperature sensitivity of SWR sensors [29–32]. Therefore, in this study, a temperature compensation method for soil water measurement based on the SWR method was established by analyzing the relationship between the temperature and SWR method measurement results. The focus of this study includes (1) the development of a portable temperature-compensated standing wave rate (TCSWR) sensor for soil water, (2) the development of a mathematical model for temperature compensation, and (3) an analysis of the performance of the TCSWR sensor.


## 2. Materials and Methods

### 2.1. Experimental Site

The indoor location is divided into an indoor laboratory and field. The indoor laboratory has a dry box (BD-200HEGW, Haier, China, −40°C to 10°C, PT100 temperature sensors (Heraeus, Germany), measuring range of −50–250°C, accuracy of ±0.1°C), high- and low-temperature alternating test chamber (GDJ-1500B, Beijing Cheek Test Equipment Co., Ltd., China, temperature control range of −40–150°C, humidity control range of 0–100% RH, temperature control accuracy of ±1.5°C, and humidity control accuracy of ±1% RH), precision electronic scale (JE-301, HEEYII, China, accuracy of 0.01 g, measurement range of 0–2500 g), and TDR soil water sensor (TRIME-HD2, IMKO, Germany, measurement accuracy 1%, measurement range 0–100%).The field base is located at Sanqingyuan Nursery, Haidian District, Beijing, China (116° 21″ 14″ E, 40° 0″ 54″ N, altitude 52 m). The soil in the nursery was artificially placed clay loam soil with a thickness of 80 cm.


### 2.2. Experimental Materials

The experimental soil samples were sandy soil (85% sand mass fraction, 10% powder mass fraction, and 5% clay mass fraction, collected from Gongqing Forestry Field, Shunyi District, Beijing, 116.73° E, 40.11° N), clay loam soil (11% sand mass fraction, 71% powder mass fraction, and 18% clay mass fraction, collected from Sanhaoyuan Nursery, Haidian District, Beijing 116.34° E, 40.00° N), and loess soil (15% sand mass fraction, 65% powder mass fraction, and 20% clay mass fraction, collected from Zhenyuan County, Qingyang City, Gansu Province 107.03° E, 35.54° N) dried in a drying oven (105° C, 48 h) and sieved using a 40-mesh sieve to obtain experimental soil samples of 50 kg for each type of soil. The soil samples were added to each volume of water and stirred for 10 min until the water was well mixed with the soil, such that the water content of the soil after the addition of water was uniform. The sample was added to a polyvinyl chloride (PVC) calibration barrel (diameter: 40 cm, height: 25 cm) and compacted with a nylon rod (diameter: 50 mm, length: 50 cm), and then, the barrel was sealed and left for 48 h until the water transport in the barrel reached equilibrium. Finally, experimental samples with different volumes of water content were obtained.


### 2.3. Soil Water Measurement Principle

The TCSWR sensor uses the standing wave principle to measure the volumetric water content of soil. When the volumetric water content of the soil is different, the dielectric constant of the soil is different, and the high-frequency electromagnetic wave forms a standing wave on the transmission line because the impedance of the measurement probe does not match that of the transmission line during transmission along the coaxial transmission line [11, 18]. This in turn causes a change in the voltage at both ends of the transmission line, and the volumetric water content of the soil can be measured by detecting the change in voltage at both ends of the transmission line. The measurement principle is shown in Figure 1, where the signal source is a 100 MHz sine wave, and the characteristic impedance of the coaxial transmission line is 50 Ω. When the standing wave at both ends of the transmission line is detected and a differential signal amplifier is used for small-signal amplification, the voltage signal can be obtained, and the transmission line theory can equate Figure 1 to the total set parameter circuit shown in Figure 2 [33].Figure 1
Principle diagram of soil water measurement.Figure 2
Equivalent circuit diagram, whereU is the potential difference between the two ends of the transmission line, ZP is the impedance at the measurement probe, ZL is the characteristic impedance of the coaxial transmission line, R is the soil impedance resistance component, C is the soil impedance reactance component, and I is the current.The RC parallel circuit is shown in Figure2 as the dielectric physical model of the soil to be measured, and the expression for the instantaneous voltage U⌢t at both ends of the transmission line is
(1)U^t=Acosωt+ρ∗cosωt−2β,where A is the voltage amplitude, ρ is the transmission line reflection coefficient, β is the phase shift constant, and ω is the angular frequency. According to Equation (1), the voltage peak of the standing wave crest U^a and the voltage peak of the standing wave trough U^b are
(2)Ua^=A1+ρUb^=A1−ρTherefore, the voltage difference between the two ends of transmission lineU can be obtained as
(3)U=Ua^−Ub^=2Aρ=2AZP−ZLZP+ZLwhere U is the potential difference between the two ends of the transmission line, ZP is the impedance at the measurement probe, and ZL is the characteristic impedance of the coaxial transmission line. The voltage amplitude A and transmission line impedance ZL are constant values, and the potential difference between the two ends of the transmission line is related only to the measurement probe impedance ZP. The measurement probe impedance ZP is determined by the probe size, soil dielectric constant at the measurement, and operating frequency, and the probe size and operating frequency are fixed values; i.e., different soil dielectric constants at the measurement cause the measurement probe impedance ZP to change, which is reflected in the change in the potential difference U at the two ends of the transmission line.


### 2.4. TCSWR Sensor for Soil Water Measurement

The overall TCSWR sensor developed in this study consists of a water measurement cone head, connecting rod, and fixed base group length, as shown in Figure3(a). The tapered head and connecting rod are marked with a scale to measure the insertion depth of the probe with an accuracy of 1 mm. The water measurement cone head diameter is 20 mm, and cone angle is 30°. An internal embedded PT100 temperature measurement probe is connected to the water measurement probe using M16 thread. The water measurement cone head of the bimetallic ring SWR probe is shown in Figure 3(b). Two metal ring probes (20 mm outer diameter, 18 mm inner diameter, and 10 mm spacing) are embedded in a solid corundum column with grooves. The corundum column has M16 threads on both sides for connecting the cone head and cone rod. A water measurement probe is installed on three PVC rings (20 mm outer diameter, 18 mm inner diameter, and installation distance of 10 mm) on the metal ring probe for insulation isolation to ensure that the metal probe does not cause a short circuit between each other or with other connections. A water measurement circuit is installed in the upper part of the metal ring probe, and the circuit is waterproof, which permits the shortest coaxial transmission line and thus minimizes the impact of impedance changes around the coaxial transmission line on the measurement results. The water measurement probe has an overall length of 150 mm (60 mm long metal ring probe installation part, 90 mm long water measurement circuit installation part), a 630 mm connecting rod, and a physical sensor, as shown in Figure 3(c).Figure 3
Assembly of a combined TCSWR probe: (a) detailed schematic diagram showing the parts of the instrument, (b) components of the double-metal-ring SWR probe, and (c) photograph of the actual physical model fabricated during the study. This figure is reproduced from Tian et al. 2019 under the Creative Commons (Attribution License).The principle block diagram of the TCSWR sensor data-processing system is shown in Figure4, which includes the sensor acquisition motherboard, water measurement unit, temperature measurement unit, and display control unit. The corresponding printed circuit board (PCB) is shown in Figure 5. The sensor acquisition motherboard includes a data acquisition controller (STM32103RBT6, STMicroelectronics, Switzerland), analog-to-digital converter (AD623ARZ, Analog Devices Inc., USA), power control module (K7805-1000R3, DEXU Electronics, China), and clock control module (RX-8025T, Epson Toyocom, Japan). The sensor measurement motherboard includes a water measurement unit and a temperature measurement unit. The water measurement unit consists of a bimetallic ring probe and standing wave measurement circuit. The temperature measurement unit consists of a PT100 measuring probe and temperature measurement circuit. The display control unit includes a display module (OLED-0.96, Telesky, China) and a keypad module (Pushbutton Switch-12∗12∗5, Telesky, China).Figure 4
Block diagram of the TCSWR sensor system.Figure 5
PCB of TCSWR sensor: (a) sensor measurement motherboard; (b) sensor acquisition motherboard.
(a)(b)


### 2.5. Calibration of TCSWR Sensor

The TCSWR sensor was inserted into the soil sample calibration bucket, and the voltage value output by the water content measurement probe after digital-to-analog conversion was recorded as the measured voltage of the sample. Simultaneously, the samples in the calibration barrel were sampled with a ring knife (100 mL), and two ring knife drying samples were taken and dried in a drying oven (105°C) for 24 h. The volumetric water content was calculated using the drying method, and the volumetric water content of the two drying samples was averaged as the volumetric water content of the current soil sample. Experimental samples with different volumetric water contents were obtained by adding different volumes of water to the samples. Eight different volumetric water contents were configured for each soil sample, and the voltages measured by the sensors at the corresponding volumetric water contents were recorded. A linear fit was made between the voltage values and the volumetric water content, and the calibration equation was established as(4)θw=k∗U+b,where θw is the soil volumetric water content, U is the analog voltage value output from the water measurement unit, andk and b are the calibration coefficients.


### 2.6. Temperature Compensation Model

The TCSWR sensor was inserted into a cylindrical Plexiglas barrel and sealed with a plastic film to prevent water dissipation. The experimental sample equipped with the sensor was put into the high- and low-temperature alternating test chamber, and the initial temperature was set as 5°C, and the initial air humidity was 30%; after the soil temperature remained stable and unchanged, the temperature of the chamber was adjusted to increase by 1°C and measured continuously until the soil temperature increased to 45°C. The temperatureT measured by the TCSWR sensor was recorded with the soil volumetric water content θw. The above experiments were repeated for samples configured with different soil volumetric water contents, as listed in Table 1; the volume of the soil sample can be known by measuring the bottom area of the Plexiglas barrel and the height of the soil sample inside the barrel, while the volumetric water content of the sample can be calculated very quickly by simply recording the volume of water added to the soil sample, and the final results of the SWR soil water sensor measurements with soil temperature were obtained.Table 1
Volumetric water content of the configured soil samples.
SamplesVolumetric water content (%)Soil samples7.5012.0018.0021.0023.0026.5028.5031.50By analyzing the experimental data, this study established a temperature compensation model based on the least-squares curve fitting method. The soil volumetric water content parameterθwt obtained after the data fusion processing of θw with T can be expressed as
(5)θwt=fθw,T.Therefore, the binary regression equation can be predetermined to calculate the volumetric water content of the soil sample as(6)θwt=γ0+γ1θw+γ2T+γ3θw2+γ4θwT+γ5T2+δ0,where γ0, γ1, γ2, γ3, γ4, and γ5 are constant term coefficients; δ0 is a high-order infinitesimal; and the constant coefficients are determined by least-squares approximation to fit the curve, which should minimize the error sum of squares φ22, and φ22 is
(7)φ2=∑i=1mωxiθwtixi−θwi2,where i denotes different moments, m denotes the final moment, ωxi is the weight function indicating that the data weights at different moment points (xi,θwtixi) are different, and θwi is the soil volumetric water content before compensation at the corresponding moment point. Because the temperatures at different moments in the experiment are different, the measurement data at each moment are unique, and thus, ωxi=1. The mean square error (MSE) is chosen as the evaluation index of the fitting effect between the calculated value of the binary regression equation and the standard value of soil volumetric water content. Then, the mean square difference between the two should be taken as the minimum, and the mean square difference is
(8)Iγ0,γ1,γ2,γ3,γ4,γ5=1m∑i=1m∑j=05γjφij−θwi2,where φi0 is 1, φi1 is θwi, φi2 is T, φi3 is θwi2, φi4 is θwiT,φi5 is T2, and the minimum value of Equation (7) can be converted into the problem of finding the minima of the multivariate functions. From the necessary conditions for determining the extreme value of the multivariate functions, one can obtain
(9)∑i=1162∑j=05γjφij⋅φij−∑i=1162θiφij=0,where 162 is the total number of experimental samples. The experimental measurement data are substituted into Equation (9), and all coefficients of the binary regression Equation (6) are obtained instantly by writing a program to solve it to obtain the temperature compensation model. Finally, we wrote the temperature compensation model into the microcontroller code of the TCSWR sensor using C language. The TCSWR sensor is able to measure the current soil temperature and soil volumetric water content (before compensation) in real time during the actual measurement, and the measurement result is substituted into the temperature compensation model in the microcontroller to calculate and output the compensated soil volumetric water content value.


### 2.7. Static and Dynamic Characteristic Experiments

Static characteristics indicate the input–output relationship characteristics of the sensor when the input is constant or the input changes very slowly. For the requirements of using water sensors, the static performance test of TCSWR sensors includes measurement range, measurement accuracy, stability, and resolution [34, 35]. The measurement range is obtained by calculating the range between the minimum value that the sensor can measure and the maximum value. The measurement accuracy is obtained by configuring 15 samples with different water content gradients, obtaining eight measurements for each sample, and calculating the maximum value of the measurement error. The stability is obtained by placing the sensor in a single sample, obtaining 100 consecutive measurements, and recording the sensor output. The resolution refers to the ability of the TCSWR sensor to sense the smallest change measured, and it is calculated according to the sampling accuracy of the analog-to-digital converter in the sensor.The dynamic characteristics are the response characteristics of the sensor to the input quantity that changes with time. The process of inserting the sensor into the soil is used as the input signal, the input is a first-order step signal, and the dynamic characteristics are obtained by measuring the change in the output with the input [36, 37]. The TCSWR sensor rapidly penetrates the soil until the output is stable, the real-time measurement results are recorded, the dynamic characteristic curve is plotted, and the dynamic characteristic index of the sensor is calculated using the dynamic characteristic curve.


### 2.8. Soil Water Measurement Experiment

Soil water measurements were conducted in the laboratory and in the field. In the laboratory, three samples with different volumetric water contents were configured, the volumetric water contents of the configured soils were measured using TCSWR and TDR sensors, and the measurement data were recorded.The field measurement site was at the Sanqingyuan Nursery. Seven sites were randomly selected in the nursery, and the TCSWR sensor was used to measure the volumetric water content of the soil at each site. The corresponding site was sampled and dried using a ring knife at the same time, and the corresponding volumetric water content of the soil was calculated using the drying method. The measurement performance of the sensor was verified by comparing the measurement results.


## 2.1. Experimental Site

The indoor location is divided into an indoor laboratory and field. The indoor laboratory has a dry box (BD-200HEGW, Haier, China, −40°C to 10°C, PT100 temperature sensors (Heraeus, Germany), measuring range of −50–250°C, accuracy of ±0.1°C), high- and low-temperature alternating test chamber (GDJ-1500B, Beijing Cheek Test Equipment Co., Ltd., China, temperature control range of −40–150°C, humidity control range of 0–100% RH, temperature control accuracy of ±1.5°C, and humidity control accuracy of ±1% RH), precision electronic scale (JE-301, HEEYII, China, accuracy of 0.01 g, measurement range of 0–2500 g), and TDR soil water sensor (TRIME-HD2, IMKO, Germany, measurement accuracy 1%, measurement range 0–100%).The field base is located at Sanqingyuan Nursery, Haidian District, Beijing, China (116° 21″ 14″ E, 40° 0″ 54″ N, altitude 52 m). The soil in the nursery was artificially placed clay loam soil with a thickness of 80 cm.


## 2.2. Experimental Materials

The experimental soil samples were sandy soil (85% sand mass fraction, 10% powder mass fraction, and 5% clay mass fraction, collected from Gongqing Forestry Field, Shunyi District, Beijing, 116.73° E, 40.11° N), clay loam soil (11% sand mass fraction, 71% powder mass fraction, and 18% clay mass fraction, collected from Sanhaoyuan Nursery, Haidian District, Beijing 116.34° E, 40.00° N), and loess soil (15% sand mass fraction, 65% powder mass fraction, and 20% clay mass fraction, collected from Zhenyuan County, Qingyang City, Gansu Province 107.03° E, 35.54° N) dried in a drying oven (105° C, 48 h) and sieved using a 40-mesh sieve to obtain experimental soil samples of 50 kg for each type of soil. The soil samples were added to each volume of water and stirred for 10 min until the water was well mixed with the soil, such that the water content of the soil after the addition of water was uniform. The sample was added to a polyvinyl chloride (PVC) calibration barrel (diameter: 40 cm, height: 25 cm) and compacted with a nylon rod (diameter: 50 mm, length: 50 cm), and then, the barrel was sealed and left for 48 h until the water transport in the barrel reached equilibrium. Finally, experimental samples with different volumes of water content were obtained.


## 2.3. Soil Water Measurement Principle

The TCSWR sensor uses the standing wave principle to measure the volumetric water content of soil. When the volumetric water content of the soil is different, the dielectric constant of the soil is different, and the high-frequency electromagnetic wave forms a standing wave on the transmission line because the impedance of the measurement probe does not match that of the transmission line during transmission along the coaxial transmission line [11, 18]. This in turn causes a change in the voltage at both ends of the transmission line, and the volumetric water content of the soil can be measured by detecting the change in voltage at both ends of the transmission line. The measurement principle is shown in Figure 1, where the signal source is a 100 MHz sine wave, and the characteristic impedance of the coaxial transmission line is 50 Ω. When the standing wave at both ends of the transmission line is detected and a differential signal amplifier is used for small-signal amplification, the voltage signal can be obtained, and the transmission line theory can equate Figure 1 to the total set parameter circuit shown in Figure 2 [33].Figure 1
Principle diagram of soil water measurement.Figure 2
Equivalent circuit diagram, whereU is the potential difference between the two ends of the transmission line, ZP is the impedance at the measurement probe, ZL is the characteristic impedance of the coaxial transmission line, R is the soil impedance resistance component, C is the soil impedance reactance component, and I is the current.The RC parallel circuit is shown in Figure2 as the dielectric physical model of the soil to be measured, and the expression for the instantaneous voltage U⌢t at both ends of the transmission line is
(1)U^t=Acosωt+ρ∗cosωt−2β,where A is the voltage amplitude, ρ is the transmission line reflection coefficient, β is the phase shift constant, and ω is the angular frequency. According to Equation (1), the voltage peak of the standing wave crest U^a and the voltage peak of the standing wave trough U^b are
(2)Ua^=A1+ρUb^=A1−ρTherefore, the voltage difference between the two ends of transmission lineU can be obtained as
(3)U=Ua^−Ub^=2Aρ=2AZP−ZLZP+ZLwhere U is the potential difference between the two ends of the transmission line, ZP is the impedance at the measurement probe, and ZL is the characteristic impedance of the coaxial transmission line. The voltage amplitude A and transmission line impedance ZL are constant values, and the potential difference between the two ends of the transmission line is related only to the measurement probe impedance ZP. The measurement probe impedance ZP is determined by the probe size, soil dielectric constant at the measurement, and operating frequency, and the probe size and operating frequency are fixed values; i.e., different soil dielectric constants at the measurement cause the measurement probe impedance ZP to change, which is reflected in the change in the potential difference U at the two ends of the transmission line.


## 2.4. TCSWR Sensor for Soil Water Measurement

The overall TCSWR sensor developed in this study consists of a water measurement cone head, connecting rod, and fixed base group length, as shown in Figure3(a). The tapered head and connecting rod are marked with a scale to measure the insertion depth of the probe with an accuracy of 1 mm. The water measurement cone head diameter is 20 mm, and cone angle is 30°. An internal embedded PT100 temperature measurement probe is connected to the water measurement probe using M16 thread. The water measurement cone head of the bimetallic ring SWR probe is shown in Figure 3(b). Two metal ring probes (20 mm outer diameter, 18 mm inner diameter, and 10 mm spacing) are embedded in a solid corundum column with grooves. The corundum column has M16 threads on both sides for connecting the cone head and cone rod. A water measurement probe is installed on three PVC rings (20 mm outer diameter, 18 mm inner diameter, and installation distance of 10 mm) on the metal ring probe for insulation isolation to ensure that the metal probe does not cause a short circuit between each other or with other connections. A water measurement circuit is installed in the upper part of the metal ring probe, and the circuit is waterproof, which permits the shortest coaxial transmission line and thus minimizes the impact of impedance changes around the coaxial transmission line on the measurement results. The water measurement probe has an overall length of 150 mm (60 mm long metal ring probe installation part, 90 mm long water measurement circuit installation part), a 630 mm connecting rod, and a physical sensor, as shown in Figure 3(c).Figure 3
Assembly of a combined TCSWR probe: (a) detailed schematic diagram showing the parts of the instrument, (b) components of the double-metal-ring SWR probe, and (c) photograph of the actual physical model fabricated during the study. This figure is reproduced from Tian et al. 2019 under the Creative Commons (Attribution License).The principle block diagram of the TCSWR sensor data-processing system is shown in Figure4, which includes the sensor acquisition motherboard, water measurement unit, temperature measurement unit, and display control unit. The corresponding printed circuit board (PCB) is shown in Figure 5. The sensor acquisition motherboard includes a data acquisition controller (STM32103RBT6, STMicroelectronics, Switzerland), analog-to-digital converter (AD623ARZ, Analog Devices Inc., USA), power control module (K7805-1000R3, DEXU Electronics, China), and clock control module (RX-8025T, Epson Toyocom, Japan). The sensor measurement motherboard includes a water measurement unit and a temperature measurement unit. The water measurement unit consists of a bimetallic ring probe and standing wave measurement circuit. The temperature measurement unit consists of a PT100 measuring probe and temperature measurement circuit. The display control unit includes a display module (OLED-0.96, Telesky, China) and a keypad module (Pushbutton Switch-12∗12∗5, Telesky, China).Figure 4
Block diagram of the TCSWR sensor system.Figure 5
PCB of TCSWR sensor: (a) sensor measurement motherboard; (b) sensor acquisition motherboard.
(a)(b)


## 2.5. Calibration of TCSWR Sensor

The TCSWR sensor was inserted into the soil sample calibration bucket, and the voltage value output by the water content measurement probe after digital-to-analog conversion was recorded as the measured voltage of the sample. Simultaneously, the samples in the calibration barrel were sampled with a ring knife (100 mL), and two ring knife drying samples were taken and dried in a drying oven (105°C) for 24 h. The volumetric water content was calculated using the drying method, and the volumetric water content of the two drying samples was averaged as the volumetric water content of the current soil sample. Experimental samples with different volumetric water contents were obtained by adding different volumes of water to the samples. Eight different volumetric water contents were configured for each soil sample, and the voltages measured by the sensors at the corresponding volumetric water contents were recorded. A linear fit was made between the voltage values and the volumetric water content, and the calibration equation was established as(4)θw=k∗U+b,where θw is the soil volumetric water content, U is the analog voltage value output from the water measurement unit, andk and b are the calibration coefficients.


## 2.6. Temperature Compensation Model

The TCSWR sensor was inserted into a cylindrical Plexiglas barrel and sealed with a plastic film to prevent water dissipation. The experimental sample equipped with the sensor was put into the high- and low-temperature alternating test chamber, and the initial temperature was set as 5°C, and the initial air humidity was 30%; after the soil temperature remained stable and unchanged, the temperature of the chamber was adjusted to increase by 1°C and measured continuously until the soil temperature increased to 45°C. The temperatureT measured by the TCSWR sensor was recorded with the soil volumetric water content θw. The above experiments were repeated for samples configured with different soil volumetric water contents, as listed in Table 1; the volume of the soil sample can be known by measuring the bottom area of the Plexiglas barrel and the height of the soil sample inside the barrel, while the volumetric water content of the sample can be calculated very quickly by simply recording the volume of water added to the soil sample, and the final results of the SWR soil water sensor measurements with soil temperature were obtained.Table 1
Volumetric water content of the configured soil samples.
SamplesVolumetric water content (%)Soil samples7.5012.0018.0021.0023.0026.5028.5031.50By analyzing the experimental data, this study established a temperature compensation model based on the least-squares curve fitting method. The soil volumetric water content parameterθwt obtained after the data fusion processing of θw with T can be expressed as
(5)θwt=fθw,T.Therefore, the binary regression equation can be predetermined to calculate the volumetric water content of the soil sample as(6)θwt=γ0+γ1θw+γ2T+γ3θw2+γ4θwT+γ5T2+δ0,where γ0, γ1, γ2, γ3, γ4, and γ5 are constant term coefficients; δ0 is a high-order infinitesimal; and the constant coefficients are determined by least-squares approximation to fit the curve, which should minimize the error sum of squares φ22, and φ22 is
(7)φ2=∑i=1mωxiθwtixi−θwi2,where i denotes different moments, m denotes the final moment, ωxi is the weight function indicating that the data weights at different moment points (xi,θwtixi) are different, and θwi is the soil volumetric water content before compensation at the corresponding moment point. Because the temperatures at different moments in the experiment are different, the measurement data at each moment are unique, and thus, ωxi=1. The mean square error (MSE) is chosen as the evaluation index of the fitting effect between the calculated value of the binary regression equation and the standard value of soil volumetric water content. Then, the mean square difference between the two should be taken as the minimum, and the mean square difference is
(8)Iγ0,γ1,γ2,γ3,γ4,γ5=1m∑i=1m∑j=05γjφij−θwi2,where φi0 is 1, φi1 is θwi, φi2 is T, φi3 is θwi2, φi4 is θwiT,φi5 is T2, and the minimum value of Equation (7) can be converted into the problem of finding the minima of the multivariate functions. From the necessary conditions for determining the extreme value of the multivariate functions, one can obtain
(9)∑i=1162∑j=05γjφij⋅φij−∑i=1162θiφij=0,where 162 is the total number of experimental samples. The experimental measurement data are substituted into Equation (9), and all coefficients of the binary regression Equation (6) are obtained instantly by writing a program to solve it to obtain the temperature compensation model. Finally, we wrote the temperature compensation model into the microcontroller code of the TCSWR sensor using C language. The TCSWR sensor is able to measure the current soil temperature and soil volumetric water content (before compensation) in real time during the actual measurement, and the measurement result is substituted into the temperature compensation model in the microcontroller to calculate and output the compensated soil volumetric water content value.


## 2.7. Static and Dynamic Characteristic Experiments

Static characteristics indicate the input–output relationship characteristics of the sensor when the input is constant or the input changes very slowly. For the requirements of using water sensors, the static performance test of TCSWR sensors includes measurement range, measurement accuracy, stability, and resolution [34, 35]. The measurement range is obtained by calculating the range between the minimum value that the sensor can measure and the maximum value. The measurement accuracy is obtained by configuring 15 samples with different water content gradients, obtaining eight measurements for each sample, and calculating the maximum value of the measurement error. The stability is obtained by placing the sensor in a single sample, obtaining 100 consecutive measurements, and recording the sensor output. The resolution refers to the ability of the TCSWR sensor to sense the smallest change measured, and it is calculated according to the sampling accuracy of the analog-to-digital converter in the sensor.The dynamic characteristics are the response characteristics of the sensor to the input quantity that changes with time. The process of inserting the sensor into the soil is used as the input signal, the input is a first-order step signal, and the dynamic characteristics are obtained by measuring the change in the output with the input [36, 37]. The TCSWR sensor rapidly penetrates the soil until the output is stable, the real-time measurement results are recorded, the dynamic characteristic curve is plotted, and the dynamic characteristic index of the sensor is calculated using the dynamic characteristic curve.


## 2.8. Soil Water Measurement Experiment

Soil water measurements were conducted in the laboratory and in the field. In the laboratory, three samples with different volumetric water contents were configured, the volumetric water contents of the configured soils were measured using TCSWR and TDR sensors, and the measurement data were recorded.The field measurement site was at the Sanqingyuan Nursery. Seven sites were randomly selected in the nursery, and the TCSWR sensor was used to measure the volumetric water content of the soil at each site. The corresponding site was sampled and dried using a ring knife at the same time, and the corresponding volumetric water content of the soil was calculated using the drying method. The measurement performance of the sensor was verified by comparing the measurement results.


## 3. Results and Discussion

### 3.1. Calibration of TCSWR Sensor

A previously described method [33, 38] was used to obtain the linear fitting curves of the output voltage of the TCSWR sensor water measurement circuit and the volumetric water contents of the experimental soil samples, as shown in Figure 6. The coefficients of determination of the primary linear fitting curves of the sandy soil, clay loam soil, and loess soil samples were 0.95, 0.97, and 0.96, respectively, and the fitting coefficients reached more than 0.95, indicating that the volumetric water content between the voltage value and the measured sample soil had good linear relationships. Calibration coefficients for the three soils were obtained according to the fitted curve equations, where the k values were 34.14, 49.50, and 45.33, and the b values were 7.72, 7.76, and 6.58, respectively.Figure 6
Calibration curves of the TCSWR sensor water measurement.
(a)
Sandy soil(b)
Clay loam soil(c)
Loess soil


### 3.2. Effect of Temperature on Measurement Results

The variation curves of the measurement results of the TCSWR soil sensor at different temperatures are shown in Figure7. The measurement results did not change significantly in the range of 28.50% to 31.50% of the volumetric water content of the soil. The maximum value of the variance of the measurement results was calculated to be 0.15%, and the maximum value of the mean variance was 0.39%, indicating that this TCSWR sensor can work stably and accurately at this time. While the soil volumetric water content was within 7.50% to 28.50%, the measurement results increased significantly with an increase in temperature; thus, the TCSWR sensor compensation was mainly in the range of 7.50% to 26.50% in this study. Or and Wraith suggested that water near the particle surfaces of the finer-textured soils is increasingly becoming “invisible” to the dielectric measurement because of surface forces. However, with increasing soil temperatures, these surface forces reduce in strength, thereby causing a positive relationship between water content and temperature [39]; the variation of soil volumetric water content from 7.5% to 28% in Figure 7 also supports this conclusion. Meanwhile, the dielectric constant of water decreases with increasing temperature [29, 30], and as the proportion of water contained in the soil increases, the effect of surface forces on soil particles gradually decreases, and the effect of the dielectric constant of water on the overall dielectric constant of the soil gradually increases [40]; as the temperature increases, the rate of increase in the volumetric water content of the soil shows a decrease, as evidenced by the rate of change of the curve in Figure 7; when the water in the soil is close to saturation, the effect of the dielectric constant of water on the overall dielectric constant of the soil gradually increases due to the dielectric constant which dominates the overall dielectric constant of the soil; the volumetric water content of the soil decreases slightly with increasing temperature, so the output of the sensor seems to decrease slightly with increasing temperature at 28.50% to 31.50%.Figure 7
Variation curves of measurement results of TCSWR soil sensors at different temperatures.
(a)
Sandy soil(b)
Clay loam soil(c)
Loess soilChange in temperature affects not only the dielectric constant of the soil under test but also the dielectric constant [27, 28]. They can also cause a temperature drift in the sensor hardware circuitry [41, 42]. Therefore, temperature compensation for sensor measurements must be considered from both perspectives. The output voltages of the TCSWR sensor water measurement circuit at different temperatures were recorded, and the results are shown in Figure 8. The error of the voltage value caused by the temperature change was 0.003 V. Combining the calibration coefficients k and b and substituting them in Equation (4) yield the corresponding errors of 0.10%, 0.15%, and 0.14%, which proves that the measurement error caused by the temperature drift of the TCSWR sensor hardware circuit is very small. Therefore, the temperature compensation can ignore the effect of hardware circuit temperature drift.Figure 8
Temperature drift characteristic curve of TCSWR sensor hardware circuit.For the case in which the effect of hardware circuit temperature drift is ignored, the TCSWR sensor measurements at different temperatures are substituted into Equation (9), and all coefficients of the binary regression Equation (6) can be obtained by writing a MATLAB program to solve it. The temperature compensation model is obtained as in Equation (10), and the coefficient of determination R2 of the fitted curve is 0.998, which is in good agreement. The significance level is 0.05, indicating that the temperature compensation model is reliable.
(10)θwt=0.92153θw−0.17341T−0.00124θw2+0.00509θwT+0.00007T2+3.78133.At the same time, we write the temperature compensation model (Equation (10)) into the microcontroller code of the TCSWR sensor in C language, which enables the TCSWR sensor to calculate and output the compensated soil volumetric water content value in real time during the field measurement.


### 3.3. Soil Water Measured by TCSWR Sensor after Temperature Compensation

The results of the soil volumetric moisture content measured by the TCSWR sensor after the temperature compensation model are shown in Figure9; it can be seen that the volatility of the soil moisture content measured by the TCSWR sensor with temperature changes is significantly reduced after the temperature compensation. Zheng et al. proposed to use the sensitivity temperature coefficient to measure the degree of influence of the sensor measurement value by temperature [43], and it is calculated that the average sensitivity temperature coefficient of the TCSWR sensor measurement result is reduced from 4.1059×10−2%/°C to 1.3933×10−2%/°C before the compensation, which proves that the temperature sensitivity of the sensor is significantly reduced after the temperature compensation.Figure 9
Variation curves of measurement results of TCSWR soil sensors at different temperatures after temperature compensation.
(a)
Sandy soil(b)
Clay loam soil(c)
Loess soilThe mean absolute error (MAE) and MSE of the measurement results before and after compensation were calculated using the temperature compensation model for the TCSWR sensor measurement results. The results are shown in Table2, which reveals that the MAE and MSE were significantly reduced after compensation, proving that compensation can greatly reduce measurement error and improve measurement accuracy [30, 32].Table 2
Comparison of temperature compensation effects.
Temperature compensationSoil samplesIndicatorsSoil volumetric water content (%)7.5012.0018.0021.0023.0026.50Before compensationSandy soilMAE1.031.041.170.740.470.53MSE0.400.400.460.290.180.21Clay loam soilMAE1.481.450.800.790.840.82MSE0.560.540.310.330.330.33Loess soilMAE1.371.331.450.960.570.78MSE0.520.510.550.380.230.31After compensationSandy soilMAE0.540.330.630.240.230.26MSE0.220.130.230.080.100.09Clay loam soilMAE0.110.350.250.650.540.42MSE0.040.130.110.220.190.18Loess soilMAE0.140.180.580.250.170.44MSE0.060.070.220.100.060.18For the temperature compensation of SWR soil water sensor, Kapilaratne and Lu designed an automatic temperature correction algorithm to remove the rain effect from SWC data by combining statistical inference techniques with temperature correction algorithm [29]. Zhao et al. studied the temperature drift characteristics of a 4-probe-type SWR soil water sensor and established a corresponding temperature compensation [44]. However, the above temperature compensation schemes are all postcompensation on the computer software after obtaining the measurement results; TCSWR sensor can get the compensated soil water measurement results in real time in the field measurement by building the temperature compensation model into the microcontroller code, which is more convenient for field application and saves manpower [30–32].


### 3.4. Analysis of Static and Dynamic Characteristics of TCSWR Sensors

The sensor measurement range is between the minimum and maximum values that the sensor can measure [34, 35]. The TCSWR sensor measures the volumetric water content of the soil. The sensor output is 0% (empty load under ideal conditions) when the sensor is placed in air and 100% (full-scale range under ideal conditions) when the sensor is placed in water. The volumetric water content of the soil becomes larger with the sensor measurement value becomes linearly larger; and the soil moisture measured in the experiment in this paper is 7.5%-31.5%; thus, the measurement range of the sensor is 7.5%-31.5%. Using the samples with different water content gradients, multiple measurements were made, and the maximum value of the error was calculated to be 1.26%; thus, the sensor measurement accuracy was ±0.63%. Stability experiments for multiple measurements of the same sample were performed, and the measurement results are shown in Figure 10. In the measured data, the maximum volumetric water content was 25.68%, the minimum volumetric water content was 23.74%, and the standard deviation was 0.49%. The stability of the sensor output was good, and it could be used for repeated measurements. The TCSWR sensor is based on the standing wave principle of the water content detection circuit. The standing wave at both ends of the transmission line is detected and then amplified through an amplifier to output an analog voltage signal. Then, the volumetric water content of the soil is obtained through the AD sampling module for voltage acquisition and processing; thus, the resolution of the sensor is determined by the sampling accuracy of the analog-to-digital converter. The sampling accuracy of the analog-to-digital converter is 0.8 mV, corresponding to a resolution of 0.05%. At the same time, the dynamic response of the sensor is determined by the sensor itself, and the transition time of the TCSWR sensor is 0.58 s as calculated by the dynamic characteristic test; this shows that the dynamic response of the sensor is fast and can meet the actual demand.Figure 10
Variation curve of multiple measurements of the TCSWR sensor for a single sample.


### 3.5. Measurement Performance Verification of TCSWR Sensor

The TDR sensor and TCSWR sensor were used to measure the soil samples with different volumes of water content configured in the laboratory, and the measurement results are compared in Table3. The absolute error between the TCSWR and TDR sensor measurement results is 0.93% at most. The absolute error is less than 1%, indicating that the accuracy of TCSWR and TDR sensor measurements is comparable and meets practical application requirements [45].Table 3
Comparison of measurement results.
Soil samplesSensor typeSoil volumetric water content (%)Sandy soilTDR7.2610.7414.8917.1220.8926.4030.11TCSWR7.8611.1114.1016.7420.5325.5730.33Absolute errors0.600.370.790.380.360.830.22Clay loam soilTDR6.579.1816.6322.3425.0728.5232.14TCSWR6.2610.0716.1021.6225.4328.4031.89Absolute errors0.310.890.530.720.360.120.25Loess soilTDR6.9612.6114.8217.4120.6826.4433.31TCSWR7.3711.8413.9216.4821.1227.3633.85Absolute errors0.410.770.900.930.440.920.54In the outdoor experiment, measurements were performed at seven randomly selected locations in the nursery. The volumetric water content of the soil measured using the TCSWR sensor and the drying method is shown in Figure11; then, the decision error of the TCSWR sensor and drying method measurement results was calculated (Table 4); the maximum absolute error is 0.98% (measurement point 3) and is less than 1%; this meets the actual requirements of soil water content measurement. Furthermore, the volumetric water content of the soil varied greatly from site to site. The analysis showed that the difference in volumetric water content was caused by the plants planted at the randomly selected sites and by whether the site had been irrigated recently. Based on the observation of the actual sample sites, sites 4 and 6 were recently irrigated, so the volumetric water content was obviously high. Sites 2 and 3 were sample sites without any plants, so the water content was the lowest. Site 1 was a lawn, and site 5 was an apple tree sample site, and the volumetric water content was slightly higher than that for sites 2 and 3. This proves that plants have a role in maintaining the soil water content and water conservation [46–48]. The soil volumetric water content of sites 4 and 6 was about 9% higher than that of sites 2 and 3, while the soil volumetric water content of sites 1 and 5 was only about 3% higher than that of sites 2 and 3, indicating that irrigation can significantly increase the water content of the soil and providing support for the need for irrigation in agricultural production [49, 50].Figure 11
Comparison of measurement results of field experiments.Table 4
Absolute errors of measurement results of TCSWR sensor and drying method.
Measurement pointTCSWR (%)Drying method (%)Absolute errors (%)112.713.220.52210.210.940.7439.810.780.9842120.30.7512.913.260.36618.417.920.48


### 3.6. Potential Limitations

In the calibration of the TCSWR sensor and establishment of a temperature compensation model, because of the limitation of the soil samples available in the laboratory, only sandy soil, clay loam, and loess were calibrated when establishing the temperature compensation model. Through the performance analysis of the TCSWR sensor and a comparison of similar sensors, the results show that the TCSWR sensor with temperature compensation is a low-cost soil water measurement sensor; however, to make the TCSWR sensor applicable to various types of soil with complex soil types, it is necessary to collect abundant soil texture samples for experiments to improve the accuracy of the temperature compensation model.


## 3.1. Calibration of TCSWR Sensor

A previously described method [33, 38] was used to obtain the linear fitting curves of the output voltage of the TCSWR sensor water measurement circuit and the volumetric water contents of the experimental soil samples, as shown in Figure 6. The coefficients of determination of the primary linear fitting curves of the sandy soil, clay loam soil, and loess soil samples were 0.95, 0.97, and 0.96, respectively, and the fitting coefficients reached more than 0.95, indicating that the volumetric water content between the voltage value and the measured sample soil had good linear relationships. Calibration coefficients for the three soils were obtained according to the fitted curve equations, where the k values were 34.14, 49.50, and 45.33, and the b values were 7.72, 7.76, and 6.58, respectively.Figure 6
Calibration curves of the TCSWR sensor water measurement.
(a)
Sandy soil(b)
Clay loam soil(c)
Loess soil


## 3.2. Effect of Temperature on Measurement Results

The variation curves of the measurement results of the TCSWR soil sensor at different temperatures are shown in Figure7. The measurement results did not change significantly in the range of 28.50% to 31.50% of the volumetric water content of the soil. The maximum value of the variance of the measurement results was calculated to be 0.15%, and the maximum value of the mean variance was 0.39%, indicating that this TCSWR sensor can work stably and accurately at this time. While the soil volumetric water content was within 7.50% to 28.50%, the measurement results increased significantly with an increase in temperature; thus, the TCSWR sensor compensation was mainly in the range of 7.50% to 26.50% in this study. Or and Wraith suggested that water near the particle surfaces of the finer-textured soils is increasingly becoming “invisible” to the dielectric measurement because of surface forces. However, with increasing soil temperatures, these surface forces reduce in strength, thereby causing a positive relationship between water content and temperature [39]; the variation of soil volumetric water content from 7.5% to 28% in Figure 7 also supports this conclusion. Meanwhile, the dielectric constant of water decreases with increasing temperature [29, 30], and as the proportion of water contained in the soil increases, the effect of surface forces on soil particles gradually decreases, and the effect of the dielectric constant of water on the overall dielectric constant of the soil gradually increases [40]; as the temperature increases, the rate of increase in the volumetric water content of the soil shows a decrease, as evidenced by the rate of change of the curve in Figure 7; when the water in the soil is close to saturation, the effect of the dielectric constant of water on the overall dielectric constant of the soil gradually increases due to the dielectric constant which dominates the overall dielectric constant of the soil; the volumetric water content of the soil decreases slightly with increasing temperature, so the output of the sensor seems to decrease slightly with increasing temperature at 28.50% to 31.50%.Figure 7
Variation curves of measurement results of TCSWR soil sensors at different temperatures.
(a)
Sandy soil(b)
Clay loam soil(c)
Loess soilChange in temperature affects not only the dielectric constant of the soil under test but also the dielectric constant [27, 28]. They can also cause a temperature drift in the sensor hardware circuitry [41, 42]. Therefore, temperature compensation for sensor measurements must be considered from both perspectives. The output voltages of the TCSWR sensor water measurement circuit at different temperatures were recorded, and the results are shown in Figure 8. The error of the voltage value caused by the temperature change was 0.003 V. Combining the calibration coefficients k and b and substituting them in Equation (4) yield the corresponding errors of 0.10%, 0.15%, and 0.14%, which proves that the measurement error caused by the temperature drift of the TCSWR sensor hardware circuit is very small. Therefore, the temperature compensation can ignore the effect of hardware circuit temperature drift.Figure 8
Temperature drift characteristic curve of TCSWR sensor hardware circuit.For the case in which the effect of hardware circuit temperature drift is ignored, the TCSWR sensor measurements at different temperatures are substituted into Equation (9), and all coefficients of the binary regression Equation (6) can be obtained by writing a MATLAB program to solve it. The temperature compensation model is obtained as in Equation (10), and the coefficient of determination R2 of the fitted curve is 0.998, which is in good agreement. The significance level is 0.05, indicating that the temperature compensation model is reliable.
(10)θwt=0.92153θw−0.17341T−0.00124θw2+0.00509θwT+0.00007T2+3.78133.At the same time, we write the temperature compensation model (Equation (10)) into the microcontroller code of the TCSWR sensor in C language, which enables the TCSWR sensor to calculate and output the compensated soil volumetric water content value in real time during the field measurement.


## 3.3. Soil Water Measured by TCSWR Sensor after Temperature Compensation

The results of the soil volumetric moisture content measured by the TCSWR sensor after the temperature compensation model are shown in Figure9; it can be seen that the volatility of the soil moisture content measured by the TCSWR sensor with temperature changes is significantly reduced after the temperature compensation. Zheng et al. proposed to use the sensitivity temperature coefficient to measure the degree of influence of the sensor measurement value by temperature [43], and it is calculated that the average sensitivity temperature coefficient of the TCSWR sensor measurement result is reduced from 4.1059×10−2%/°C to 1.3933×10−2%/°C before the compensation, which proves that the temperature sensitivity of the sensor is significantly reduced after the temperature compensation.Figure 9
Variation curves of measurement results of TCSWR soil sensors at different temperatures after temperature compensation.
(a)
Sandy soil(b)
Clay loam soil(c)
Loess soilThe mean absolute error (MAE) and MSE of the measurement results before and after compensation were calculated using the temperature compensation model for the TCSWR sensor measurement results. The results are shown in Table2, which reveals that the MAE and MSE were significantly reduced after compensation, proving that compensation can greatly reduce measurement error and improve measurement accuracy [30, 32].Table 2
Comparison of temperature compensation effects.
Temperature compensationSoil samplesIndicatorsSoil volumetric water content (%)7.5012.0018.0021.0023.0026.50Before compensationSandy soilMAE1.031.041.170.740.470.53MSE0.400.400.460.290.180.21Clay loam soilMAE1.481.450.800.790.840.82MSE0.560.540.310.330.330.33Loess soilMAE1.371.331.450.960.570.78MSE0.520.510.550.380.230.31After compensationSandy soilMAE0.540.330.630.240.230.26MSE0.220.130.230.080.100.09Clay loam soilMAE0.110.350.250.650.540.42MSE0.040.130.110.220.190.18Loess soilMAE0.140.180.580.250.170.44MSE0.060.070.220.100.060.18For the temperature compensation of SWR soil water sensor, Kapilaratne and Lu designed an automatic temperature correction algorithm to remove the rain effect from SWC data by combining statistical inference techniques with temperature correction algorithm [29]. Zhao et al. studied the temperature drift characteristics of a 4-probe-type SWR soil water sensor and established a corresponding temperature compensation [44]. However, the above temperature compensation schemes are all postcompensation on the computer software after obtaining the measurement results; TCSWR sensor can get the compensated soil water measurement results in real time in the field measurement by building the temperature compensation model into the microcontroller code, which is more convenient for field application and saves manpower [30–32].


## 3.4. Analysis of Static and Dynamic Characteristics of TCSWR Sensors

The sensor measurement range is between the minimum and maximum values that the sensor can measure [34, 35]. The TCSWR sensor measures the volumetric water content of the soil. The sensor output is 0% (empty load under ideal conditions) when the sensor is placed in air and 100% (full-scale range under ideal conditions) when the sensor is placed in water. The volumetric water content of the soil becomes larger with the sensor measurement value becomes linearly larger; and the soil moisture measured in the experiment in this paper is 7.5%-31.5%; thus, the measurement range of the sensor is 7.5%-31.5%. Using the samples with different water content gradients, multiple measurements were made, and the maximum value of the error was calculated to be 1.26%; thus, the sensor measurement accuracy was ±0.63%. Stability experiments for multiple measurements of the same sample were performed, and the measurement results are shown in Figure 10. In the measured data, the maximum volumetric water content was 25.68%, the minimum volumetric water content was 23.74%, and the standard deviation was 0.49%. The stability of the sensor output was good, and it could be used for repeated measurements. The TCSWR sensor is based on the standing wave principle of the water content detection circuit. The standing wave at both ends of the transmission line is detected and then amplified through an amplifier to output an analog voltage signal. Then, the volumetric water content of the soil is obtained through the AD sampling module for voltage acquisition and processing; thus, the resolution of the sensor is determined by the sampling accuracy of the analog-to-digital converter. The sampling accuracy of the analog-to-digital converter is 0.8 mV, corresponding to a resolution of 0.05%. At the same time, the dynamic response of the sensor is determined by the sensor itself, and the transition time of the TCSWR sensor is 0.58 s as calculated by the dynamic characteristic test; this shows that the dynamic response of the sensor is fast and can meet the actual demand.Figure 10
Variation curve of multiple measurements of the TCSWR sensor for a single sample.


## 3.5. Measurement Performance Verification of TCSWR Sensor

The TDR sensor and TCSWR sensor were used to measure the soil samples with different volumes of water content configured in the laboratory, and the measurement results are compared in Table3. The absolute error between the TCSWR and TDR sensor measurement results is 0.93% at most. The absolute error is less than 1%, indicating that the accuracy of TCSWR and TDR sensor measurements is comparable and meets practical application requirements [45].Table 3
Comparison of measurement results.
Soil samplesSensor typeSoil volumetric water content (%)Sandy soilTDR7.2610.7414.8917.1220.8926.4030.11TCSWR7.8611.1114.1016.7420.5325.5730.33Absolute errors0.600.370.790.380.360.830.22Clay loam soilTDR6.579.1816.6322.3425.0728.5232.14TCSWR6.2610.0716.1021.6225.4328.4031.89Absolute errors0.310.890.530.720.360.120.25Loess soilTDR6.9612.6114.8217.4120.6826.4433.31TCSWR7.3711.8413.9216.4821.1227.3633.85Absolute errors0.410.770.900.930.440.920.54In the outdoor experiment, measurements were performed at seven randomly selected locations in the nursery. The volumetric water content of the soil measured using the TCSWR sensor and the drying method is shown in Figure11; then, the decision error of the TCSWR sensor and drying method measurement results was calculated (Table 4); the maximum absolute error is 0.98% (measurement point 3) and is less than 1%; this meets the actual requirements of soil water content measurement. Furthermore, the volumetric water content of the soil varied greatly from site to site. The analysis showed that the difference in volumetric water content was caused by the plants planted at the randomly selected sites and by whether the site had been irrigated recently. Based on the observation of the actual sample sites, sites 4 and 6 were recently irrigated, so the volumetric water content was obviously high. Sites 2 and 3 were sample sites without any plants, so the water content was the lowest. Site 1 was a lawn, and site 5 was an apple tree sample site, and the volumetric water content was slightly higher than that for sites 2 and 3. This proves that plants have a role in maintaining the soil water content and water conservation [46–48]. The soil volumetric water content of sites 4 and 6 was about 9% higher than that of sites 2 and 3, while the soil volumetric water content of sites 1 and 5 was only about 3% higher than that of sites 2 and 3, indicating that irrigation can significantly increase the water content of the soil and providing support for the need for irrigation in agricultural production [49, 50].Figure 11
Comparison of measurement results of field experiments.Table 4
Absolute errors of measurement results of TCSWR sensor and drying method.
Measurement pointTCSWR (%)Drying method (%)Absolute errors (%)112.713.220.52210.210.940.7439.810.780.9842120.30.7512.913.260.36618.417.920.48


## 3.6. Potential Limitations

In the calibration of the TCSWR sensor and establishment of a temperature compensation model, because of the limitation of the soil samples available in the laboratory, only sandy soil, clay loam, and loess were calibrated when establishing the temperature compensation model. Through the performance analysis of the TCSWR sensor and a comparison of similar sensors, the results show that the TCSWR sensor with temperature compensation is a low-cost soil water measurement sensor; however, to make the TCSWR sensor applicable to various types of soil with complex soil types, it is necessary to collect abundant soil texture samples for experiments to improve the accuracy of the temperature compensation model.


## 4. Conclusions

The measurement results of the TCSWR sensor were analyzed under different temperatures and soil volumetric water contents. A temperature compensation method was established for the TCSWR sensor to advance the development of SWR soil water sensors. A portable tapered TCSWR sensor with built-in temperature compensation model was developed on this basis. The calibration results showed that the standing wave measurement circuit designed in this study could effectively respond to the variation in water within the soil, and the coefficient of the fitted equation exceeded 0.95. When the possible influence of temperature was addressed, it was found that the measurement error caused by the temperature drift of the hardware circuit was small. The static and dynamic characteristics of the TCSWR sensor showed that the measurement range was 7.50%-31.50%, the measurement accuracy was ±0.63%, the stability was good, the resolution was a minimum of 0.05%, and the dynamic response time was less than 1 s, which can meet the experimental requirements. In comparison with the internationally recognized TDR water content sensor and drying method measurement results, the absolute measurement error was less than 1%, demonstrating that the measurement results of the TCSWR sensor are reliable. It is also possible to combine TCSWR sensors with smart internet of things and artificial intelligence algorithms [51–54] to study soil water prediction problems at different time scales [55–57] and can be applied to other engineering systems in combination with environmental parameters [58–60].



---

*Source: 1061569-2022-08-12.xml*