INTRODUCTION
Soil moisture measuring can effectively understanding soil humidity, is essential
basis of agricultural irrigation and crop water requirement case studies (Sun
et al., 2012). Soil moisture measurements consist of TDR (Time Domain
Reflectometry) measurement method and FDR (Frequency Domain Reflectometry) measurement
method (Jiang et al., 2013). FDR method is more
simple and safe, accurate, save electricity, less calibration etc., and widely
used. Most of the soil moisture sensor is nonlinear relationship between input
and output, in order to improve the measurement precision of sensors, many correction
methods at home and abroad are put forward. Software calibration method with
lookup table method, artificial neural network, polynomial fitting, Support
Vector Machine (SVM) and wavelet analysis methods such as (Zhou,
2002; Cai, 2004; Ni et
al., 2008; Liu and Wang, 2011; Xie
et al., 2007; Kizito et al., 2008).
This article first analyzes the main factors influencing the moisture measurement
and BP (back propagation) neural network method is used for the compensation
for the actual use of SM series FDR soil moisture sensor, which are compared
with the least squares fitting method. The results show that the BP neural network
method can make error reduced to 1.9%, satisfy the requirements of farmland
measurement.
SOIL MOISTURE SENSORS MEASURING PRINCIPLE
Measuring principle of FDR type soil moisture sensor: FDR (Frequency
Domain Reflectometry) type sensor is mainly composed of parallel arrangement
of metal bar as a capacitor. In which the soil acts as a dielectric, the capacitor
and oscillator is composed of a high frequency tuning circuit. The electromagnetic
wave through coaxial cable arrive the probe, the resonance frequency is detected
by frequency sweep circuit. The dielectric constant of the soil can be measured,
so that the soil water content is obtained. The dielectric constant of water
is 80 F m^{1} and the soil solid dielectric constant is 2~5 F m^{1},
the dielectric constant of water is much bigger than soil’s. Therefore,
the dielectric constant of soil is mainly affected by soil moisture content.
Moisture content increases, the soil dielectric constant will increases accordingly,
the frequency of the electromagnetic wave propagation will change. The relationship
between capacitance and apparent dielectric constant, resonance frequency and
the capacitance, respectively (Lu et al., 2008)
as follows:
Here, g_{ar} is constant which is related to the distance between the
electrodes and geometry shape of the electrode; ε is the apparent dielectric
constant of soil.
Soil moisture sensors in different soil moisture content of the normalized
frequency SF, such as Eq. 3:
Frequency variation relationship with the soil volumetric water content such
as shown in Eq. 4:
Here, F_{a} is the frequency values for the probe measured in air,
F_{w} is frequency values measured in water, F_{s} is frequency
value in the soil. a and b is coefficient related to soil properties; θ
for soil volumetric water content (m^{3} m^{3}).
Main factors affecting soil moisture measurement: Sensor are greatly
influenced by external factors in practical application, such as soil temperature,
soil hardness, soil viscosity, conductivity and the voltage supply of the sensor
itself. All these lead to the difference of measurement results:
• 
The node voltage supply has obvious influence on measurement
data. Because the soil moisture sensor is a high integration level of capacitive
transducer. Soil dielectric constant is related to capacitance and capacitance
is determined by charging time, at the same time charging time is influenced
by testing electrode geometry factor g, the resistance R and the voltage
supply. Therefore, the change of the voltage supply, will naturally reflect
changes in the soil dielectric constants, lead to sensor output voltage
is different, affected the humidity measurement. Node voltage change around
1V, the maximum relative error of humidity sensor can reach more than 15%
(Zhang et al., 2010) 
• 
The FDR sensor had obvious temperature effect. The dielectric constant
of the soil influenced by the amount of water, water temperature and the
electrical conductivity of soil particles, when the temperature changes,
the dielectric constant is bound to change. So the measurement result will
affect. The practice shows that when the temperature in 5~60°C changes,
FDR’s humidity error within 6~9% (Gao et al.,
2010) 
• 
Different soil hardness may also affect humidity sensor measurement, experiments
have shown that the increase of soil hardness results in increase of measuring
humidity value (Sun et al., 2012) 
ANALYSIS OF NONLINEAR COMPENSATION METHOD
Nonlinear compensation principle: Sensor’s
nonlinear relation between input and output as follows:
Here, x as the parameter to be measured; y for the sensor output.
To calibration of sensor nonlinear error, at the output end series a compensating
link, as shown in Fig. 1.

Fig. 1: 
Humidity sensor acquisition and compensation schemes 
Least squares fitting method: According to the input and output data
of the test, get a set of nonlinear curve v = f (θ), n times polynomial
is used to approximate the nonlinear curve θ = f (v), by the least square
principle to determine the polynomial coefficients.
Column write n times polynomial: Assuming that ntimes polynomial equation
is:
Considering the accuracy requirement of the actual farmland, n = 3, then the
equation rewritten as:
Determine the coefficient of polynomial: According to the principle
of the least squares, each θ_{i} (v_{i}) and standard humidity
value θ_{i} with the corresponding minimum mean square error and
a_{0}, a_{1}, a_{2}, a_{3} can determined coefficient,
namely:
F (a_{0}, …, a_{3}) function of four variables for partial
derivatives, respectively and make it to zero, are:
Get relations function values and actual values: Through the Cramer’s
rule to calculate the equation, which can solve coefficients a_{0},
a_{1}, a_{2}, a_{3} and the fitting equation is obtained.
BP neural network compensation algorithm: The BP (Back Propagation)
neural network is a kind of efficient feed forward neural network, it can best
approximation to arbitrary complex nonlinear system, simple structure, fast
training speed (Longjun and Junyan, 2012). If the data
in the input samples is sufficient and accurate, it doesn’t need to know
the internal mechanism. Through its selflearning and adaptive ability, the
neural network can get very good output.
BP network usually consists of input layer, output layer and several hidden
layers (Zhu et al., 2012), this study used the
BP network model with 1 m^{1}. As shown in Fig. 2,
one input layer, m implicit layers and one output layer. Input layer is collected
by measured value of the sensor, output layer is a standard instrument value
and the number of hidden layer node according to actual needs to be modified.
The learning process of BP neural network by the forward propagation and error
back propagation process. Information from the input layer through the hidden
layer to output layer. If the output layer didn’t
get the desired output values, error along the original path will return and
modify the weights of neuron in each layer, so that the error can be reached
the minimum. Ultimately achieve expected effect. The specific calculation process
is as follows:
Forward propagation:
• 
Input layer: This layer for the neurons of the output
is equal to the input x_{i} 
• 
Hidden layer: Hidden layer neuron input value net_{j} is
the weighted sum of first layer output value x_{i}: 
The output value as:
Among them:
where, w_{ij} is the weights between input layer to hidden layer. θ_{i}
is the threshold value of hidden layer.
• 
Output layer: Output layer adopts linear function,
the output value of y_{k} is the weighted sum of the input value: 
Among them, v_{kj} is the weight between hidden layer to output layer.
a_{k} is the threshold value of the output layer.
Back propagation process: Error function is defined as:
Gradient descent method is used to adjust the output layer weights of the Δw_{ji},
output layer threshold Δw_{ji}, hidden layer weights of the Δw_{ij}
and hidden layer threshold Δθ_{k}.
SOIL HUMIDITY SENSOR TEST RESULTS COMPENSATION ANALYSIS
Test samples: Take w = 30 kinds of different humidity of soil sample.
The actual standard soil humidity value θ_{i} (i = 1, 2, ..., w)
can be acquired by using Zhejiang TZS humidity sensor, the uncompensated measured
value v_{i} be acquired by the FDR humidity sensor nodes, the measured
relationship with v_{i} and θ_{i} as shown in Fig.
3.

Fig. 3: 
Humidity relationship of soil sample real and measured values 

Fig. 4: 
Least squares fitting result of soil humidity 
Table 1: 
Soil sample humidity value for two types of sensor (v_{i}
FDR humidity value; θ_{i} standard humidity value) 

The 30 samples of humidity value of FDR sensor and standards TZS sensor measuring
as shown in Table 1.
RESULTS
Results of the leastsquare method
The least squares fitting coefficient: The coefficient is determined
based on the least squares fitting equation:

Fig. 5: 
Least squares humidity compensation error 

Fig. 6: 
Back Propagation neural network fitting result of soil humidity 
The being fitting the nonlinear curve as shown in Fig. 4.
According to Eq. 15, the relationship between the measured
values and standard values can be achieved through PC software programming.
Fitting error analysis: The relative error curve after correction of
sensor is shown in Fig. 5. Error within +6.1% to 5.6% range,
the mean error is 3.6%, basic meet the requirements of actual fields measuring.
Neural network analysis results: The above samples after neural network
calibration curve as shown in Fig. 6, measurement error as
shown in Fig. 7. Within ±2.8%, the average error is
1.9%
CONCLUSION
The sensor nonlinear phenomena appear in the condition of different workplace
because of the influence of temperature and supply voltage etc. In this article,
through analysis of factors affecting measurement, using the method of BP neural
network for nonlinear correction, measurement of average error less than 1.9%,
had a better fitting affect compared with the least square method. The BP neural
network method improved the precision of soil moisture measurement, for intelligent
agricultural irrigation and agricultural research provides a reliable guarantee.