Correcting Inaccurately Recorded Data due to Faulty Calibration of a Capacitance Water Content Probe

Measuring soil water content by capacitance probes requires rigorous calibration to achieve acceptable accuracy. Some of the capacitance probes’ usersmight take several readings using the default device calibrations or other prestored calibrations bymistake. This can lead to logging of faulty readings for periods of up tomonths or years.This study aimed to (1) study the importance of probe calibration and the level of error that results from using flawed calibrations and (2) to develop a mathematical method to correct the faulty recorded data. This research involved studying eleven scenarios of faulty calibrations including errors in the air/water calibration and in the in-soil calibration.Amathematicalmethodwas developed to correct the faulty recorded data and comparisons were made for the data after and before correction. Results indicated that using the manufacturer’s default calibration within the software resulted in substantial error values especially for heavy textured soils. It is recommended that users and especially researchers should perform rigorous in-soil calibration wherever the probe is installed, and they should repeat the calibrations whenever the soil structure changed.


Introduction
Accurate estimations of soil water content are required for precise agriculture and for agricultural research such as determinations of crop water requirements, water use efficiency, and irrigation scheduling.Soil water content estimations are also used in field hydrology [1].The direct method of soil water content measurement is the gravimetric method, which involves taking a physical sample of the soil, weighing it before any water is lost, and then drying it in an oven at 105 ∘ C before weighing it again [2,3].The soil water mass is measured as the mass difference between the two weights (before and after oven-drying).Normally, water content is expressed as the mass ratio of water to dry soil matter called mass basis (  ), or volume ratio of water to soil called volume basis ().The   measure is usually used for comparative purposes, especially when the compared soil samples are not consistent in volume as in studying the tillage effect on water movement in soil or when the soil changes its volume as it dries (like some clay soils).On the other hand,  is widely applied in a wide range of research fields especially in irrigation studies.
Although the gravimetric method is accurate and reliable, it is slow and laborious; however, it does not allow continuous measurement of water content for a particular place as the sample is destroyed during the measurement process [4].Hence, many nondestructive methods to measure and monitor water content change have been developed.These methods measure water content indirectly by taking related measures that indirectly give an indication of the soil water content such as electrical conductivity of a porous block (using gypsum blocks), matrix soil-water potential (using a tensiometer), electromagnetic pulse speed (using time domain reflectometry, TDR), frequency of an oscillating circuit (using capacitance sensors), and reflection of neutrons on the hydrogen atom (using the neutron probe).However, the measures of these methods have to be converted to an accurate estimate of soil water content, usually through simple mathematical models that require calibration of parameters depending on soil structure, texture, salinity, bulk density, organic matter content, and so forth.In many cases, a default calibration is preset within the device, so that it displays the water content directly (depending on this default calibration).Users are required to change the default calibration parameters to their field's calibrated parameters; otherwise, faulty readings may arise.Conversely, a wellcalibrated nondestructive method can result in a convenient and accurate method of measuring soil water content that allows continuous measures of a sample.
Despite the advantages of nondestructive methods, each method involves specific drawbacks.The tensiometer can monitor only a small range of soil water content [5].The neutron probe readings are affected by organic matter, chloride, boron and soil density, despite thenegligible radiation hazard [2,3,6].Gypsum blocks are affected by soil salinity and soil chemical content [7].The electromagnetic methods (capacitive and time domain reflectometry) are affected by salinity, temperature, and magnetic soil components such as ironstone [8].
A typical capacitance sensor consists mainly of two electronic components: a capacitor and an electronic oscillator.The capacitor consists of two metal electrodes arranged coaxially and laid several millimeters apart with plastic isolation in-between.The oscillator produces sinusoidal waveform to make a fringing field around the sensor.The frequency of oscillation is inversely proportional to the soil bulk electrical permittivity and to the soil water content.For example, the frequencies of the EnviroSCAN sensors are about 75 MHz when the sensors are surrounded by air; and about 48 MHz when the sensors are surrounded by deionized water [2].Thus, the frequencies in soil should be within this range.
Due to their ease of use, the capacitance probes are currently one of the most preferable methods by farmers and landowners.However, rigorous calibration is required to ensure maximum reliability of measures.The increasing affordability and resulting widespread use of the electromagnetic water sensors have coincided with calibration problems that have occurred not only with usage by farmers and landowners, but also for some scientific researchers.The basic calibration procedure for electromagnetic probes involves taking sensor readings in pure water (  ), in air (  ), and in soil (  ) of different water contents; this will be discussed in detail later in this paper.In conjunction, the soil water is measured by the gravimetric method in the same location under specific circumstances.Finally, the calibration equation is derived by relating the measured values to the estimated ones by interpolation and fitting methods.
Calibration Problems.The calibration of electromagnetic devices is subjected to 2 kinds of problems: the first kind of problems occurs due to inaccurate field setting or sampling conditions, while the second kind of problem occurs due to faulty calibration equation, that is, the existence of one or more of faulty fitting parameters in the equation.The problems due to sampling conditions involve the following: (1) calibration in repacked soils when soil structure has an important effect on sensor readings; (2) calibration under constant temperature conditions when soil temperature has an important effect on sensor readings; (3) Calibration under constant soil salinity conditions when soil bulk electrical conductivity has an important effect on sensor readings.
On the other hand, the problems due to faulty fitting parameters involve (1) missing or faulty readings of   and/or   , (2) incorrect sensor readings in soil   , (3) incorrect derivation of the parameters of the fitting model, or (4) using an incorrect set of calibration parameters (including the default or preset calibration of the device).
Through experience, we found that most of the farmers and landowners reckon that their devices do not need to be calibrated at all.It is also our experience that the aforementioned users regard the use of electromagnetic probes as giving more accurate measures of soil water content than gravimetric methods!Regrettably, part of this problem is due to the lack of knowledge of some users who do not have a background in soil science.This has resulted in the collection of multiple faulty readings over extended periods of time (up to years).
The aim of this work was to demonstrate the importance of calibration and the level of error that can occur when using the incorrect calibration and to develop some mathematical procedures that assist in correcting the faulty or inaccurate readings if found.The study concentrated on the Sentek EnviroSCAN electromagnetic probe owing to the widespread use of this device.

The Capacitance Probe Calibration
Procedure.The capacitance probe consists of several sensors placed on a plastic electronic board at multiplies of 10 cm apart as shown in Figure 1.Each probe should be connected to a data logger which preserves readings for up to months depending on the readings frequency.To calibrate the probe, each sensor should be calibrated separately; for each sensor, two basic readings should take place initially: the reading in air (  ) and the reading in pure water (  ).To take readings in pure water, a special box is needed; Figure 2, which is constructed by installing a pipe (similar in material and diameter of the probe's access tubes) in the middle of the box, so that water can surround it radially.The attached sensors to the probe are being tested one by one; the sensor under test is the one which is in the middle of the tube.Readings in air can be measured the same way in the calibration box after it is emptied from water and perfectly dried.Some users prefer to take the in-air readings while the probe is hung in air with nothing surrounding it, but the reading may interfere with any nearby moist object like plants.In addition to   and   , some in-soil readings (  ) are required in dry soil, moist soil, and almost saturated soil.For best results, these readings must cover both extremes of volumetric soil-water content and the mid values [10].Exactly around the location of each water sensor, four volumetric soil samples (in a cross-shape around the pipe) would be taken to measure the volumetric water content () by the gravimetric method.For each insoil reading of each sensor of the probe, a ratio called scaled frequency (SF) is calculated, where As recommended by the manufacturer, SF and  values are then fitted to a shifted power fitting model (see ( 2)) using any curve fitting software (we used CurveExpert Pro v1.6, [11]): where , , and  are the fitting parameters.
It is preferable that this equation be site dependent.However, if there is high variance of soil texture at a particular site, a separate set of calibration parameter values should be used for each probe or related group of probes.
After the parameters , , and  are calibrated, they should be inputted to the data acquirement software in order to get direct readings from the device logger (in this study we used the IrriMAX software version 8.0).Note that use of the manufacturer's software requires this specific form of (2), but other calibration equation forms may be used [12], in which case the user may work with the data using other software such as conventional spreadsheets.The benefit of the manufacturer's software is that it converts the readings from the sensors to volumetric water content through the following formula: The software includes some calibration parameter values for specific soil textures obtained from the literature in addition to the default values, as shown in Table 1.

Mathematical Solution to Correct Calibration Problems.
The use of the   and   readings within the calibration process is called "air/water calibration" or "sensor calibration, " while the determination of the , , and  parameters in (2) is called "soil calibration." As mentioned before, the   ,   , , , and  parameters are sometimes faulty or missing, resulting in the device monitoring and logging incorrect  values.There are three alternatives causing incorrect readings to occur.These alternatives, Table 2, depend on some combinations of two sets of parameters: the sensor-specific parameters (  and   ) and the fitting parameters (, , and ).Alternative 1 involves that the two sets are incorrect, Alternative 2 if only the sensor parameters set is incorrect, and Alternative 3 if only the fitting parameters set is incorrect.
In subsequent descriptions of the methods, the known parameter values (through current correct measurement and calibration) will be designated with the normal symbols as described previously, while unknown measures from past incorrectly calibrated measures are designated with a "∼" symbol over the normal symbol.Hence, if the calibration parameters are correct, we will use the symbols   ,   , , , , and ; while if the symbols are incorrect, the following symbols will be used, respectively: R , R , Ã, B, C, and θ.Assume that we have a historical  value, which was computed from faulty values, and we have obtained or calculated the correct parameters of   ,   , , , and , but we have no idea of what the   value was; notice that the   value is not affected by the calibration equation; hence, the   Fitting formula's parameters , , and [a] Parameters are considered "incorrect" if one or more of them are not correct. [b] Incorrect values indicate either default calibrations or other incorrect values.
from the wrong calibration parameters is considered correct.By backward analysis, solving (1) and ( 2 Next, substitute in (1) to get the correct SF value: Finally, substitute in (3) to get the corrected value of : In all cases, the corrected water content should be reasonable within the normal range according to the values in Table 3; that is, the value should not exceed the maximum saturation water content and should not be less than the minimum permanent wilting point (extreme values are shaded in the table).If it happens that the corrected value violates this rule, then there must be an error in the calculated   value, (5), or one of its parameters.probe in the soil of the King Saud University's educational farm: the soil was sandy textured (sand 98.5%, silt 1.0%, clay 0.5%, and bulk density 1.5 g cm −3 ).The result of calibration is shown in Figure 3.All the resulting calibration parameters were placed in Table 1, Case 9.

Statistical Comparison
Measures.Some statistical comparisons were performed between  values resulting from correct and faulty calibration equations.One measure was used to compare individual readings, that is, the estimation error (), (8); while four measures were used to evaluate full cases, that is, the mean percent error (MPE), ( 9), the root mean squared error (RMSE), (10), the normalized root mean squared error (NRMSE), (11), and the coefficient of variation of the root mean squared error (CVRMSE), (12): where  and  are the forecasted/estimated and actual/measured values, respectively;  is the number of readings;  is a counter; and  max ,  min , and  avg are the maximum, minimum, and average measured values, respectively.

Mathematical Correction of Calibration Parameters.
In order to demonstrate the effect of incorrect calibration, some common scenarios for incorrect or missed loggings are presented, Table 4.One of the famous errors is the error that occurs when the manufacturer's software is used, by mistake, without changing any of the default values (Table 4, Scenario 1); that is, R , R , Ã, B, and C equaled 65535, 0, 1, 1, and 0, respectively.Hence, after obtaining the correct calibration parameters (, , ) and the correct air/water sensor calibrations (  ,   ), we can get the correct values of the water content, , by applying a reduced form of ( 7), ( 13), over the faulty logged water content values, θ: On the other hand, if the users calibrated the air/water parameters but they used the default in-soil parameters instead of the correct in-soil parameters, Scenario 2, Table 4, then the correction equation should be as follows: Another error when the users forgot to change the air/water parameters ( R and R equal 65535 and 0, resp.) while they selected an in-soil calibration equation which is not the correct one; probably the general (built-in) equation which is bundled in the manufacturers' software.For the used capacitance probe, the manufacturer provided an equation which they fit to several soils with various texture classes, this is called the default Sentek calibration (DSC); where Ã, B, and C equal 0.196, 0.404, and 0.0285 (Table 4, Scenario 3).In this case, the correction of  is made by substitution in (7) which will be reduced to the following form.
Similar scenario, (Table 4, Scenario 4), but when the air/water values are correct and the DSC in-soil calibration is used, then the correction equation is reduced to (16), where Ã, B, and C as shown in the previous scenario.

𝜃 = (
Ã θB + C −   ) Finally, where the correct calibration was used (corrected valued of , , and ) while R , and R are wrong (set to defaults), Table 4 Scenario 5, the correction formula is reduced to In addition to the aforementioned scenarios, there are many other scenarios to consider based on incorrect calibration selection, for example, to apply the DSC on a soil whose insoil calibration parameters are different, like the soils which are shown in Table 1 (items 3 to 9).The effect of such faulty application will be shown in the following.Eleven scenarios were considered to study the effect of different types of mathematical errors during the calibration process.Five scenarios show different wrong calibrations to a sandy soil with a known set of calibration parameters; and six scenarios for applying the DSC calibration on certain soils having known calibration parameter values.The eleven scenarios are listed in Table 4.
The studied Scenarios 1 and 2 reflected the usage of the manufacturer's software without entering any in-soil parameters; that is, the parameters Ã, B, and C had values of 1, 1, and 0, respectively, and the air/water calibrations were either wrong (Scenario 1) or correct (Scenario 2).In the two scenarios, the uncalibrated  values from the software were too low for all of the ranges of the scaled frequencies values (SFs), as shown in Figure 4.The  values were almost zero, hence, the estimation error () ranged from −85% to as high as −98.5% for Scenario 1 with MPE = −96.4%.On the other hand, for Scenario 2,  ranged from −91% to −97.5%, and MPE = −96.1%.Although these error values are high, the actual indication of error varied according to the SF value.For low values of SF, the correct  was already small (about 0.035) compared to the uncalibrated value which read 0.005.In contrast, for higher SF values, the  values were too high compared with the readings of the software (0.366 compared to 0.006).The overall statistics also reflect very bad matching, as seen in Table 5.The root mean square error (RMSE) for both scenarios was >18, with a CV of 137% and NRMSE of 0.55.These substantial error values for all SF values reflect the risk of using the manufacturer's software without feeding it with the calibration parameters.
On the other hand, many users are using the default calibration of the manufacturer (DSC in our study).The next two scenarios are about the usage of DSC as an in-soil calibration, while the air/water calibration is either wrong (Scenario 3) or correct (Scenario 4).The effects of both scenarios are shown in Figure 5.As expected, the two charts show that using the incorrect sensor calibration (Scenario 3) led to errors larger than those that occurred when the default calibration was used (Scenario 4).For low to middle values of SF in Scenario 3, the readings overestimated the calibrated values by up to 150%, while the scene is reversed for higher SF values with underestimation of up to −70%.The uncalibrated   values range from 0.094 to 0.144, while the calibrated values range from 0.050 to 0.366 for the same SF range as shown in Figure 5.The error levels decreased somewhat when using the DSC with the proper air/water calibration (Scenario 4).

Correct calibration Wrong calibration Error
Here, the error values range from −40% to 25% in the full range of the SF, and the MPE = 17.2%.Although the errors  in Scenario 4 are less than those in Scenario 3, but still we have unacceptable error percentage in the middle to higher range of SF, which is the range from below the field capacity to the saturation, where the sensitivity of the readings is vital to a reliable irrigation scheduling process.In Scenario 5, Table 4, the correct in-soil parameters were fed to the software, while the air/water parameters were left to their default (wrong) values.This is the inverse of Scenarios 2 and 4, where the correct air/water parameters were fed and the in-soil parameters were incorrect.The results of Scenario 5 are shown in Figure 6.The scenario showed larger levels of error ranging from −67.5% to 129.5% with MPE = −36.5%.
In the irrigation range of the SF (middle to higher values of it), the uncalibrated values rigorously underestimate the correct  values.The levels of error in Scenario 5 and Scenario 3 appear to be alike, as both of them represent air/water calibration errors.
To summarize the impacts of the errors in the in-soil and air/water calibrations, the RMSE values of the aforementioned scenarios are plotted in Figure 7.It is obvious through the figure that the absence of in-soil calibration (applying the default values in the software) led to massive values of error, as the RMSE = 0.18, regardless of whether the air/water calibration was correct or not.On the other hand, when we apply the manufacturers' recommended calibration (the DSC in our study), the RMSE is reduced significantly.If the air/water calibration is correct, the RMSE is 0.040, while the value is 0.099 when the air/water calibration is not correct.Finally, when the in-soil calibration is correct and the air/water calibration is not correct, the RMSE value is 0.112.These results indicate that using the no-calibration parameters of the in-soil calibration results in massive error regardless of the air/water calibration, but selecting the DSC calibration reduces the error dramatically.It is also noticed that the air/water calibration has larger effect on the readings error when selecting any in-soil calibration rather than the no-calibration parameters.One can notice that the RMSE obtained for the uncalibrated air/water case was better for the DSC calibration (Scenario 3) than it was for the correct soil calibration equation (Scenario 5), as the RMSE values were 0.099 and 0.112, respectively.The reason for this is that the air/water calibration directly affects the SF, which changes the base of the data.In contrast, the soil calibration equation only changes how the data appears.In other words, because the soil calibration equation is a relationship between  and SF, the effect of the equation is limited if the SF values are correct, but the soil calibration effect will be unpredictable when the incorrect SF values are used.Hence, the instance of the low RMSE values obtained using the DSC calibration compared with the value obtained using the proper calibration is due to a numeric conflict caused by incorrect SF values and does not necessarily reflect the suitability of the DSC, which will be discussed in the next paragraph.Furthermore, the values of the RMSE in Figure 7 reflect the comparison between Scenarios 1 and 5 compared to the application of the correct air/water parameters and the correct in-soil parameters.Hence, the zero value reflects the RMSE between the control scenario and itself which must be zero; however, this is a theoretical value and does not mean that no errors in sampling or measuring.As mentioned before, the DSC calibration is widely used by several farmers and landowners due to lack of awareness about the importance to perform an in-site soil calibration test.The studied Scenarios 6-11 illustrate the effect of using the DSC instead of the proper calibration of six different soils equations (Table 4).In these scenarios, we studied only the effect of the in-soil calibration; that is, the air/water calibration was unified and set to the correct values for all scenarios to remove its effect.All of these scenarios are plotted in Figure 8.For clay textured soil (Scenario 6), applying the DSC always underestimates , with error from −82.9% to −33.4%, MPE = −52.9%,and RMSE = 0.210.These results reflect a large degree of error and prove the inappropriateness of using the DSC in soils with such texture class.However, the results of using the DSC with coarse sand (Scenario 7) were different; the estimation error ranged from −36.9% to 51.8% with MPE = −9.4% and RMSE = 0.037.These values show that the errors in coarse texture are smaller than that with fine texture.
In Scenario 8, the soil under test is a mixed soil like that of the DSC; however, it led to estimation error ranging from −29.0% to 8.3%.In Table 5, all error values of the studied scenarios are listed; the table shows that the scenario with the lowest RMSE was Scenario 9 (RMSE = 0.018), followed by Scenarios 8, 11, 7, 10, and 6 in order of best to worst, with RMSE values of 0.035, 0.037, 0.037, 0.051, and 0.210, respectively.Comparing Scenario 3 with the above, as it also used the DSC while the correct calibration was calibration 9-Table 1. Scenario 3 comes in the order just before the worst scenario (Scenario 6) and after Scenario 10 (as its RMSE = 0.099).The RMSE values of these scenarios are plotted in Figure 9.These results show that the DSC gives smaller error with soils of light to medium texture like sand, sandy loam, and silty loam.The DSC is not suitable for heavy textured soils owing to the large error occurred.
For all textures, if the EnviroSCAN is used for scientific research purpose, it is highly advised to perform a specific calibration for each soil.

Conclusions
The capacitance probes are easy to use devices for continuous monitoring of soil water content.Due to their sensitivity to variations in soil structure and soil bulk electrical conductivity (EC), several investigators recommend not to use them in scientific research which require accurate measurements of soil water [2,3,[13][14][15].However, the probes ease of use and reasonable prices urge scientists to use them all around.In that case, it is highly recommended to perform rigorous insoil calibration of their devices wherever they are installed.These calibrations should be repeated whenever there is a change in the soil structure or the bulk conductivity.On the other hand, for landowners and farmers who use the devices for irrigation scheduling and similar activities, it

Figure 1 :
Figure 1: Calibration scheme of the capacitance probe.

Figure 2 :
Figure 2: The calibration box of the capacitance probe to measure readings in water.

Figure 3 :
Figure 3: Fitting equation of the -SF relationship.

Figure 4 :
Figure 4: Comparison between calibrated and faulty readings of EnviroSCAN probe for Scenarios 1 and 2.

Figure 5 :Figure 6 :
Figure 5: Comparison between calibrated and faulty readings of EnviroSCAN probe for Scenarios 3 and 4.

N o ca li(
b ra ti o n A ir /w at er ca li b ra ti o n u fa c tu re r' s

Figure 7 :
Figure 7: Effect of different calibration schemes on the RMSE for Scenarios 1-5, compared to the control scenario.

Figure 8 :
Figure 8: Calibrated versus uncalibrated results of some studied scenarios.

Table 1 :
Sample soil calibrations from different sources.

Table 2 :
Possible alternatives of incorrect readings.

Table 4 :
The studied scenarios to compare correct versus incorrect calibration parameters.

Table 5 :
Values of the statistical measures of the studied scenarios.
min : the minimum estimation error;  max : the maximum estimation error; MPE: the mean percent error; RMSE: the root mean squared error; NRMSE: the normalized root mean squared error; CVRMSE: the coefficient of variation of the root mean squared error.

table 4 )
Figure 9: RMSE values of the studied scenarios.