APPLICATION OF ARTIFICIAL NEURAL NETWORKS AS AN ALTERNATIVE TO VOLUMETRIC WATER BALANCE IN DRIP IRRIGATION MANAGEMENT IN WATERMELON CROP

Precision irrigation seeks to establish strategies which achieve an efficient ratio between the volume of water used (reduction in input) and the productivity obtained (increase in production). There are several studies in the literature on strategies for achieving this efficiency, such as those dealing with the method of volumetric water balance (VWB). However, it is also of great practical and economic interest to set up versatile implementations of irrigation strategies that: (i) maintain the performance obtained with other implementations, (ii) rely on few computational resources, (iii) adapt well to field conditions, and (iv) allow easy modification of the irrigation strategy. In this study, such characteristics are achieved when using an Artificial Neural Network (ANN) to determine the period of irrigation for a watermelon crop in the Irrigation Perimeter of the Lower Acaraú, in the state of Ceará, Brazil. The Volumetric Water Balance was taken as the standard for comparing the management carried out with the proposed implementation of ANN. The statistical analysis demonstrates the effectiveness of the proposed management, which is able to replace VWB as a strategy in automation.


INTRODUCTION
Irrigation is one of the farming practices that most influence agricultural production.However, for it to be economically successful, it is necessary to identify three basic concepts: when, how and how much to irrigate.These concepts are defined based on the water storage capacity of the soil and water consumption by the plants.
Precision irrigation aims at an increase in water use efficiency, and achieving this goal often requires the use of intelligent systems.The recent use of intelligent systems in the area o f agriculture, introduced through a view of the computer and robotics, and such control systems as artificial neural networks (ANN), has promoted interesting responses in production systems (MURASE, 2000).The same author also reports that application of these new technologies is increasing, with the cost of implementation undergoing a steady decrease, allowing their use in rural areas.The application of ANNs in particular is directly related to their high versatility, with uses being found in several areas, and is seen as a very promising technology for the development of agricultural applications (GUISELINI et al., 2010).
Examples of the application of artificial neural networks are widely found in the literature, such as: obtaining meteorological data (MOREIRA and CECÍLIO, 2008;SOBRINHO et al., 2011), evaluating water quality (ASADOLLAHFARDI et al., 2011), and irrigation management (UMAIR and USMAN, 2010).
These examples show the potential of ANNs in the solution of problems which require many calculations and speed of execution.Accordingly, this method can be a substitute for the traditional method of volumetric water balance.Despite the latter being the most accurate in the field, there are complications in its application in automated systems due to the complexity of the calculations.The aim of this study therefore, was to develop an ANN capable of estimating the irrigation depth more easily.

MATERIAL AND METHODS
This study was developed in the Irrigated Perimeter of the Lower Acaraú, in the town o f Marco, 210 km from Fortaleza, at 3°07'13"S and 40°05'13"W, and divided into two stages.The first related to testing and choosing the best performing neural networks, and the second to field application of the chosen neural network and to comparing its performance to that of the method of volumetric fluid balance.

Testing Stage
In this study, Multilayer Perceptron (MLP) networks were tested, Figure 1, comprised of an input layer, an intermediate or hidden layer and a response or output layer (SANTOS et al., 2013).At the input layer of the network, values for soil moisture were used, obtained with capacitive sensors in land cultivated with irrigated watermelon.The intermediate or hidden layer was made of neurons, their amount being defined by tests carried out to meet the demands of the desired application, receiving as stimuli the responses obtained with the previous layer (input layer).The response or output layer consisted of one neuron.These responses represent the irrigation time.Odílio C. da Rocha Neto, Adunias dos S. Teixeira, Arthur P. de S. Braga, et al. Eng. Agríc., Jaboticabal, v.35, n.2, p.266-279, mar./abr. 2015 268 For training the MLP, management data were used from a watermelon crop evaluated by REBOUÇAS NETO (2010) in a study aimed to assess the effect of irrigation frequency on the development of the watermelon.In that experiment four treatments were carried out, defined by the number of irrigations on any one day.
Irrigation time was defined by readings from capacitive sensors, applying the soil water balance.From this data, the responses of the sensors as frequencies (kHz) were correlated with the irrigation times (minutes), and 470 sets of data were obtained, applicable in the development of the ANN; 295 pieces of data then being used for training the ANN, and 175 for validation.Each pair of data corresponds to the responses of the capacitive soil-moisture sensors (entry), and to the irrigation times defined by the sensor readings (output).
The crop cycle was divided into two phases: the first phase consisted of data on the irrigation times of the crop up to the 30 days after sowing (DAS), taking in germination and the initial stage of vegetative growth.In this phase, 230 data sets were obtained, with 145 being used for training and 85 for validation.The second phase covered the period of highest water consumption by the plant, including the final stage of vegetative growth, flowering and fruiting, covering 31 to 62 DAS.In this phase, 240 sets of data were used: 150 for training and 90 for validation.
Different network architectures were tested, varying the number of inputs, the number of neurons in the intermediate layer and the number of learning epochs.
Networks having two and four inputs were evaluated, with two inputs corresponding to one pair of sensors (one located at a depth of 0.1 m and the other at 0.3 m) and four inputs corresponding to two pairs of sensors.When evaluating the number of neurons in the intermediate layer, networks with 5, 10 and 20 neurons were tested.To evaluate the number of learning epochs, networks were subjected to 1,000, 5,000 and 10,000 iterations.
The back-propagation algorithm was used for training.This consists of two stages: the first feed-forward, where the outputs for each layer are calculated; the next step is known as backpropagation, where the weights for all layers of the network are updated.For evaluation of the neural networks, the mean squared error (equação 1) and linear regression were used, comparing results from the obtained networks with actual validation values.For the neural network with the best performance in each phase, an application, called "Neural", was developed in object-oriented C++, using the Borland C++ compiler, Builder.This application (Figure 2) calculates the irrigation time from data obta ined with the sensors.Using the "Phase 1" and "Phase 2" buttons, the user obtains the response of the neural network for irrigation time in the respective phases of the cycle.

Field Stage
The ANN with the best performance was used to determine the irrigation time in a field experiment, taking as standard the management procedure employing volumetric water balance.The experiment was conducted from November 10th to December 12th of 2010, covering the second crop phase of 30 to 62 DAS.The experimental area consisted of 1.0 ha, cultivated with watermelon of the Crimson Sweet variety, spaced 0.9 m between plants and 3.0 m between rows, giving a total of 3,704 plants, with 0.5 ha being managed with the volumetric water balance method (area 1) and 0.5 ha under management with the developed ANN (Figure 3).For irrigation, STREAMLINE (NETAFIM, 2010) drippers were used, giving 1.49 L h -1 at an operating pressure of 8 mwc, with a spacing of 0.30 m between emitters and 3 m between rows, resulting in a flow rate of 15.89 m³ h -1 .The management procedure was carried out with two irrigations daily, the first being at 07:00 and the second at 14:00, these parameters being based on the management already adopted in the area.
Four batteries of capacitive-type sensors were installed in each of the areas (Figure 4), developed at the Electronics and Agricultural Mechanics Laboratory (LEMA) of the Federal University of Ceará (CRUZ et al., 2010); three consisting of one pair of sensors (at a depth of 0.10 m ,0.30 m), and one of three sensors, the third being installed at a depth of 0.45 m.These batteries were installed in drip lines 4, 7, 10 and 12, at the end of the first third of each line, which is where the average pressure of the tubing is found (Figure 3).To calculate irrigation time by the method of volumetric balance, a spreadsheet was used, where the values for frequency were converted into values for volumetric water content using the calibration equations presented in Figure 5, and obtained by CRUZ (2009) for sensors used and applied in the same experimental area.The irrigation time was then calculated using [eq.( 2)].
(2) where, T is the irrigation time in hours; θ CC the volumetric water content at field capacity in cm 3 cm -3 ; θ Atual , the actual volumetric water content in cm 3 cm -3 ; h, the representative depth of the sensor (m); LS, the spacing between lines (m); EE, the width covered by the emitter (m); Q, the flow per emitter in m 3 h -1 , and Ea, the application efficiency.
To assess the treatments for productivity, five plants were selected from each treatment and their total fruit weighed.The following nonparametric tests were then applied: the Kolmogorov-Smirnov test of normality, the Levene test for the normality of variance, and the unpaired t-test for means comparison.All statistical procedures were carried out using the SPSS statistical software (TECHNOLOGIES, 2012).

RESULTS AND DISCUSSION
The results are presented below in two parts.The first part represents the results for the different MLP compositions, and determination of the neural network with the best performance.
The second shows the results of this neural network when applied in the field.

Network adjustme nt and validation
In the first phase, the ANN with four inputs produced lower values for mean squared error (MSE) than did those of two inputs.For the ANN with four inputs, the MSE reached values below 0.0012 before even completing 250 training epochs, while the ANN with 2 inputs did not reach errors lower than 0.0068 in 5,000 training epochs.
In the second crop phase, the lowest squared error obtained with the ANN of two inputs was 0.1685 in 5.000 learning epochs, whereas for the neural network with four inputs the MSE was lower than 0.001 after less than 1.700 training epochs.This may be due to the ANN with two inputs not having converged to the global minimum of the error surface and having stuck at a local minimum, but also due to the low precision obtained with an insufficient number of inputs not leading to the global minimum, and the increase in the number of inputs having redirected more easily to this global minimum.
In Figure 6 can be seen the regression curves between the irrigation times obtained via VWB, used for validation, and the times obtained with the ANN.It can here be seen that the ANNs with four inputs performed better than the networks with two inputs in estimating values for irrigation time, reaching an R² of 0.9962 and 0.9816, while the network with two inputs obtained an R² of 0.6267 and 0.3848 for the first and second phases respectively.From these results, it can be concluded that the ANN with four inputs was more accurate in determining the irrigation times.Evaluating the number of training epochs, it was seen that 1,000, 5,000 and 10,000 epochs showed no representative differences in performance.Values for MSE of less than 0.001 were reached even before completing 200 training epochs.The minimum error on reaching 1,000, 5,000 and 10,000 training epochs was 0.00045, 0.00022 and 0.00013 respectively.For the second crop phase, it can be seen that the increase in the number of epochs proved bene ficial in reducing the squared error up to around 1700 epochs, and that above this number of iterations, there was no significant reduction in this error.However, at the validation stage (Figure 7), a small improvement is seen in the ANN for the first crop phase with the increase in the number of epochs, where the network with 10,000 training epochs produced greater convergence (R² = 0.9961) than that obtained with the network trained with 1000 epochs (R² = 0.9856).In the second phase, there is a gain in response precision for the ANNs with 5,000 and 10,000 epochs, with values for R² greater than 0.979, while the network with 1,000 epochs had an R² of 0.9669, confirming the results obtained by evaluation of the mean squared error.
It is important to determine the optimal number of training epochs, because if an incorrect parameter is established, the network may lose its capacity for generalisation due to the phenomenon known as overtraining, making the ANN expert at one given data set (SANTOS et al., 2012).In this study therefore, for the first phase, an ANN with 10,000 and 5,000 training epochs is recommended for the first and second crop stages respectively.
The validation results indicate no improvement in the response of the ANNs with the increase in the number of neurons in the intermediate layer from 5 to 20 (Figure 8).However, there was a reduction in yield with the increase in this number, with the network with five neurons in the intermediate layer having a best and worst performance demonstrated by an R² equal to 0.9968 and 0.9823 respectively, while for the ANN with 20 neurons in the intermediate layer, the respective R² values were 0.9947 and 0.9748.One of the main features of an ANN is its power of generalisation, which is the capacity of a neural network to respond appropriately to previously unseen cases.A very large network, with a number of neurons much higher than necessary for the problem being analysed, will not respond correctly to these unknown patterns, and will lose its capacity to generalise.This is due to adaptation of the synaptic weights to the input vector, and to the noise which occurs during training.Due to this, the networks with an intermediate layer of 5 neurons got better results when compared to the other architecture s under test, this number being recommended for determining the irrigation time.
Application of artificial neural networks as an alternative to volumetric water balance Eng.Agríc., Jaboticabal, v.35, n.2, p.266-279, mar./abr. 2015 . Linear relation between observed irrigation time and that estimated using artificial neural networks with 1,000 (A) 5,000 (B) and 10,000 (C) training epochs for t he first crop phase and 1,000 (D) 5,000 (E) and 10,000 (F) for the second crop phase.

Field application of adjusted ANNs
When applying the trained networks in the field, the values for irrigation times defined by the management procedures were converted to values for irrigation depth, mm day -1 .Figure 9 illustrates the depth of irrigation applied daily throughout the second crop phase for each type of management carried out.
Eng. Agríc., Jaboticabal, v.35, n.2, p.266-279, mar./abr. 2015  As can be seen in Figure 9, the most critical period, that which demanded the application of large irrigation depths, was between 33 and 57 days after planting, from November13th to December 7th, when applications greater than 7.5 mm day -1 were recorded.This period covers the accelerated increase in growth of the branches of the plants, and the formation and filling out of the fruit.This shows the importance of monitoring soil moisture, especially during this period, when water consumption is more intense and there is even a greater need for division of irrigation throughout the day, to meet the needs of the plant but without there being losses from deep percolation.FIGURE 9. Comparison Chart of the applied irrigation depth (mm day -1 ) between the areas managed using an artificial neural network (ANN) and using the method of volumetric water balance (VWB).
Figure 10 shows that the management procedure which employed the artificial neural network obtained values for irrigation depth which were close to those from the management using volumetric balance, with an R 2 of 0.9229; on some days, there were both higher and lower variations in application.These variations are due to the observed values for moisture being different from those used for training and validatio n, with higher values having been observed during application in the field.This shows that the network performed well in dealing with previously unseen input values, maintaining application trends relative to the VWB and with no loss in yield, thereby demonstrating the robustness of the neural algorithm for this application.
Figure 11 illustrates the behaviour of soil moisture throughout the experiment in the 0 to 0.20 and 0.20 to 0.40 m layers for both management algorithms adopted.The values for soil moisture were obtained prior to irrigation at 07:00, using the capacitive sensors installed at a depth of 10 and 30 cm.The responses of the capacitive sensors, converted into soil moisture using the calibration curves of the sensors, can be seen in the two figures.In Figure 11A, it can be seen that the moisture in the 0 to 0.20 m layer remained between 0.08 and 0.10 cm³ cm -3 until 52 DAS, and that after this period the moisture in the layer increased, reaching 0.19 cm³ cm -3 at 62 DAS.This shows the positive effect of plant cover on the conservation of moisture in the topsoil.In Figure 11B is shown the increase in soil moisture in the 0.20 to 0.40 m layer up to 43 DAS, with moisture around 0.14 cm³ cm -3 , remaining at about 0.11 cm 3 cm -³ until 56 DAS.FERREIRA et al. (2013) found similar behaviour in an experiment where there was less moisture in the soil around 40 to 50 DAS, and observed that for that period evapotranspiration in the watermelon exceeds the reference evapotranspiration, thereby noting an increase in water consumption by the plant.This period coincides with a time of more intense fruit growth, and determines its final size.This is the most critical period, when soil moisture should always be kept close to field capacity, since it is at this stage that the fruit uses the water resources of the soil for weight gain; yield and profitability of production being directly related to the weight of the fruit produced.
In Figure 12 can be seen the reduction in soil moisture in the period between 46 and 54 DAS, despite the increase in irrigation depth applied in response to the increased water requirement of the plant.After this period, under both managements, there was an increase in soil moisture in response to the decrease in the irrigation depth applied.Similar results were found by BRAGA et al. (2011), where the maximum growth reached by the fruit was seen up to 55 DAS.This increase in consumption therefore, is due to the intense growth of the fruit from 46 to 54 DAS.
The yields reached with the management employing the ANN was of the order of 33.4 t ha -1 , with 657 m³ of water being applied in order to achieve those yields, resulting in a water productivity of 0.051 kg L -1 .For DOORENBOS and KASSAN (1994), in regions of tropical climate with high usage of agricultural inputs, and under conditions of irrigated agriculture, yields of the order of 25 and 30 t ha -1 are considered good in the area of marketing.Table 1 shows the results obtained with the one-sample Kolmogorov-Smirnov test for normality (KS) at 5% significance.In this test, if the significance is less than 0.05, a null hypothesis should be rejected, as this indicates that the sample does not have a normal distribution, if however it is greater than 0.05, which indicates that the sample shows a normal distribution, the null hypothesis should be accepted.As can be seen, the test demonstrated normality for the analysed sample.Table 2 shows the results of the Levene test for normality of variance.In a similar manner to the KS test, the responses in the significance column should be observed, where if this result is greater than 0.05, homogeneity between the variances of the two areas is assumed.It can thus be concluded from the data that the variances between the two treatments do not differ.
It therefore follows that the two basic requirements for carrying out the unpaired t-test for means comparison have been met.The data obtained from the application of this test are shown in Table 3, and similar to the other tests, the responses in the column showing the values for significance should be observed.For this test, if the value obtained for significance is greater than 0.05, it can be concluded that there is no difference between the two means being evaluated, if not, a null hypothesis should be rejected and a difference should be assumed between the means being evaluated.Here the results show that there is no statistical difference between the two means under evaluation.From the obtained results, it can be seen that the neural program performed well in the field tests, and can fully replace managements which adopt the volumetric water balance.The efficiency obtained in this study from the ANN is dependent on the amount of training data for each of the crop phases.Thus, in order to obtain precision in training an artificial neural network for any crop, at least one further cycle is necessary using the method of volumetric balance, confirming that suggested by ZANETTI et al. (2008), according to whom much data on the phenomenon is needed for a neural network to adequately replace another method.

CONCLUSIONS
From these results, it can be concluded that artificial neural networks in irrigation management are seen to be efficient, being able to substitute the method of volumetric balance and bringing the advantages of speed of response and ease of implementation in automation.
Two different architectures should be used, one for each phase of the crop cycle.For the first phase, 0-30 DAS, the architecture with the best performance was a 4-5-1 network, with a learning rate of 0.9 and 10,000 training epochs.For the second crop phase, 30-60 DAS, the network with the best response was the 4-5-1, with a learning rate of 0.9 and 5,000 training epochs.
In the application of artificial neural networks to determine irrigation depth, data from at least one crop cycle should be used for adjusting the network, using water balance as the standard method.

FIGURE 1 .
FIGURE 1. Example of an MLP network.
squared error; , response for irrigation time obtained by the artificial neural network during training, Minutes; , values observed for irrigation time with the validation samples, minutes, and N, total samples.

FIGURE 2 .
FIGURE 2. Program developed in C ++ with parameters for the neural network with best response.

FIGURE 3 .
FIGURE 3. Layout of the experimental area.

FIGURE 4 .
FIGURE 4. Capacitive soil-moisture sensor developed at the Federal University of Ceará.
FIGURE 5. Relation between the volumetric water content of the soil and the response of the capacitive sensors at depths of 10 cm (A) and 30 cm (B) (CRUZ, 2009).

FIGURE 6 .
FIGURE 6. Linear relation between observed times and those estimated using artificial neural networks with two inputs (A) and four inputs (B) for the first crop phase and two inputs (C) and four inputs (D) for the second crop phase.

FIGURE 8 .
FIGURE 8. Linear relation between observed irrigation time and that estimated using neural networks with 5 (A), 10 (B), 15 (C) and 20 (D) neurons in the hidden layer for the first crop phase and 5 (E ), 10 (F), 15 (G) and 20 (H) neurons for the second crop phase.

FIGURE 10 .
FIGURE 10.Linear relation between observed irrigation times obtained when employing volumetric water balance (VWB), and estimated times when using an artificial neural network (ANN) in the field.

FIGURE 11 .
FIGURE 11.Behaviour of soil moisture prior to irrigation at 07:00 in the 0-20 cm (A) and 20-40 cm (B) layers, for areas managed by an artificial neural network (ANN) and volumetric water balance (VWB).
FIGURE 12. Behaviour of soil moisture at 0-20 cm and 20-40 cm for areas managed using the volumetric water balance (A) and an artificial neural network (B), in response to irrigation at 07:00.

TABLE 1 .
Kolmogorov-Smirnov test for normality of the production data (kg/plant) for each management adopted.

TABLE 2 .
Levene test for homogeneity of variance of production data (kg/plant) for managements employing ANN and VWB.

TABLE 3 .
Unpaired t-test for means comparison of productivity (kg/plant) between the VWB and ANN treatments.