Modeling sprinkler irrigation infiltration based on a fuzzy-logic approach

In this study, the irrigation water infiltration rate (IR) is defined by input variables in linguistic terms using a fuzzy-logic approach. A fuzzy-logic model was developed using data collected from published data. The model was trained with three fuzzy membership functions: triangular (‘trimf’), trapezoid (trapmf), and pi (‘pimf’). The fuzzy system considered the number of irrigation events, applied water depth, polyacrylamide application rate, water application time, water electrical conductivity, soil surface slope, and soil texture components as input variables. The inputs were classified in terms of low, medium, and high levels. The output variable (i.e., IR) was rated in terms of five levels: very low, low, medium, high, and very high. Using statistical analysis, the values of IR resulting from the developed fuzzy-logic model were compared with the observations from the experiments. The results confirm that the agreement between the observations and predictive results was acceptable, except for fuzzy 'trimf'. The coefficient of determination provided the greatest value when using the 'trapmf' and 'pimf', with the value estimated for the 'pimf' slightly higher than that of 'trapmf'. Based on the results that were obtained, irrigation managers can use the fuzzy-logic approach to modify their field practices during the growing season to improve on-farm water management.


Introduction
The infiltration of irrigation water has an important role in the process of water management and the effects of soil ponding on the uniformity of irrigation distribution. There are many economic possibilities for improving water infiltration, including the application of polyacrylamide (PAM) (Santos & Serralheiro, 2000;Sepaskhah & Mahdi-Hosseinabadi, 2008). Anionic PAM, having a high molecular weight and a negative charge, has been advocated as a valid soil conditioner for use in irrigation as a complement to other conservation practices. Anionic PAM is used mainly in two forms: dry (granular) or liquid (oil emulsion). The latter is ideal for injection into sprinkler irrigation systems. Several PAM application schemes have been designed: (1) continuous application throughout the irrigation period; (2) application immediately before furrow irrigation or at the beginning of the irrigation via sprinkler application; (3) intermittent application following an initial treatment; and (4) the application of concentrated solutions to the soil surface before the initiation of irrigation (Ajwa & Trout, 2006).
Whereas various types of PAM have been used since the 1950s, its expansion was not seen until the last decade (Green & Stott, 2001;Ajwa & Trout, 2006). When applied to soil, PAM improves the aggregate stability, pore distribution, and soil permeability (Lentz et al., 2001;Leib et al., 2005). This application stabilizes the soil structure, reduces the sealing of surface soil, and improves water infiltration and redistribution (Bjorneberg et al., 2003). The effects of PAM application through irrigation water via sprinkler droplets have been studied in laboratories using rainfall simulators; however, few field studies have investigated these effects. Several studies have noted increased infiltration rates when PAM is added to sprinkler irrigation water (Bjorneberg & Aase, 2000;Bjorneberg et al., 2003). McElhiney & Osterli (1996) demonstrated that PAM, when applied to a fine-textured soil, resulted in a 10 to 40% increase in infiltration rates. Leib et al. (2005) and Chávez et al. (2010) reported that PAM dissolved in irrigation water improved the final water infiltration by as much as seven to eight times compared to the control in furrow irrigation. In other applications, reduced sediment generation with PAM through laboratory sprinkler irrigation water has been attributed to a reduction in runoff caused by the increased infiltration . Recent research by Sepaskhah & Bazrafshan-Jahromi (2006) with PAM under simulated rainfall indicated that PAM is useful as it reduces runoff and soil erosion; however, greater quantities could be required on steeper slopes to enhance infiltration.
The application timing and type of PAM may correspondingly affect water infiltration. It is likely that any reduction in soil infiltration is a result of the timing of the application and/or of an incorrect dosage of PAM. Sojka et al. (2007) cited various research studies that concluded that on damaged structure soils, PAM has minimal or no effect on infiltration and may even reduce infiltration. Although the chemical composition of water can affect infiltration rates and the hydraulic conductivity of soils, limited information is available on the effect on the infiltration rate of interactions between PAM and the salts in irrigation water. Water quality could interact with the chemical structure of PAM (Wallace & Wallace, 1996) and change its behavior in the soil.
With the rapidly evolving technologies in the field of irrigation measurement, it is desirable to merge the experience of many irrigation schemes with algorithms that may aid in difficult forecasting situations. Fuzzy logic is one such method that has been used in an emerging set of problem-solving algorithms.
In recent years, many researchers have used artificial intelligence techniques such as fuzzy logic. It is proposed and elaborated by Zadeh (1965Zadeh ( , 1973 in different areas including agricultural applications. Fuzzy logic is presented in soft computing using a linguistic description of variables rather than with numbers. These variables are defined as a fuzzy set (Yen & Langari, 1999). In fuzzy set theory, which is based on fuzzy logic, a particular object has a degree of membership in a given set that may be anywhere within the range of zero (completely not in the set) to one (completely in the set) (Tsoukalas & Uhrig, 1997). Linguistic relationships allow the use of IF-THEN logic rules to describe the output's behavior. The outputs are converted to "crisp" numerical values using a defuzzification process.
Fuzzy logic is a more flexible and intuitive approach that uses simple mathematical concepts and is tolerant to inexact data. A fuzzy system can be created to match any set of input-output data. Fuzzy-logic system applications have been used in estimating the daily reference evapotranspiration with fewer parameters for irrigation scheduling (Odhiambo et al., 2001), evaluating the water quality in rivers (Ocampo-Duque et al., 2006), developing rainfallrunoff models to describe the nonlinear relationship between rainfall (as an input) and runoff (as an output) of a real system (Jacquin & Shamseldin, 2006), and predicting the suspended sediments in a river (Demirci & Baltaci, 2013). Fuzzy logic has been used to control the steering of a tractor (Alonso-Garcia et al., 2011), to design fuzzy databases, to store and process environmental (mainly on soils) and agricultural data (Delgado et al., 2008).
Considering the cost of human operators and the instability of human behavior, an automatic approach can be a preferred alternative for controlling a highefficiency irrigation system. Therefore, the objective of the present research is to develop a fuzzy-logic model to predict the irrigation water infiltration rate (IR) with PAM under sprinkler irrigation to improve on-farm irrigation efficiency.
The published experiments were conducted in a laboratory using five soil textures with relatively high proportions of silt and sand (Table 1) at various surface slopes under a sprinkler simulator that was a metal soil box. Many such boxes were constructed for these experiments. The boxes were 1.25-1.4 m long, 0.75-1.4 m wide, and 0.09-0.25 m deep. The soils were air dried after the removal of large clods by sieving through a 5-8 mm screen. The dry soils were then placed inside the boxes and compacted in layers until the desired height was attained. The resulting average bulk density varied between 1.0 and 1.43 g/cm 3 according to the soil texture type. The soil water content was measured and was found to be nearly constant before each run based on soil type. Spray nozzles, fitted with regulator valves, were installed on a pipeline at a convenient height above the surface soil box to prevent water loss. This type of nozzle is used on low-pressure center-pivot sprinkler irrigation systems. The pipeline was connected to the water supply tank. Various levels of water electrical conductivity (0.41-1.9 dS/m) were used in these experiments. Water was pumped using an electrical pump to provide different applied water depths for various applied times (Table 1) at an operating pressure of 100 kPa.
PAM, a water-soluble high-molecular-weight anionic polymer, was prepared in solutions of approximately 0-25.5 μg/mL (Murtha, 1995;Sepaskhah & Bazrafshan-Jahromi, 2006) for application rates varying between zero and 6 kg/ha. These solutions were pumped to the irrigation line and, by extension, the spray nozzle and then applied to the soil surface in the first irrigation event only. All treatments were irrigated and repeated three times in 2-8 day intervals based on the soil water content.
The metal soil boxes had collectors at the downslope side to provide runoff to convey water into each container at different times for estimating the infiltrated volume as the difference between the applied water volume and the measured runoff volume (Murtha, 1995;Sepaskhah & Bazrafshan-Jahromi, 2006;Sepaskhah & Shahabizad, 2010). Therefore, the soil infiltration rate in mm/h was determined by dividing the infiltrated volume by the applied time. The infiltration rate at the end of the irrigation water application for the three irrigation events was considered the measured final infiltration rate in these experiments.

Infiltrated water rate representation
With no application of PAM, the data reflected the effect of the sequence of irrigation events using different water qualities on the infiltration rate for various soil types with varying surface slopes ( Table 1). The results of experiments published by Abo-Ghobar (1993), Sepaskhah & Bazrafshan-Jahromi (2006), and Sepaskhah & Shahabizad (2010) indicate that the soil infiltration started at its highest rate, dropped to a much lower rate, and then decreased to its final quasi-steady rate as the surface layers became wetter for all test soils. [1] Cl = clay particles in soil texture, Si = silt particles in soil texture, Sa = sand particles in soil texture, R = number of irrigation events, D w = applied water depth for each irrigation, PAM = polyacrylamide application rate, T w = water application time, E C = water electrical conductivity, S = soil surface slope.
This phenomenon was considerable in the first runs; slightly increasing the surface slope decreased the soil infiltration significantly. Overall, with decreasing water application and successive irrigation, the infiltration tended to decline. The soil infiltration rate decreased with increasing electrical conductivity of the irrigation water, as indicated in Table 1. This result was attributed to the formation of a crust on the soil surface, the clogging of soil particle pores by suspended solids based on the chemical and physical properties of the soil, and the amount of water applied (Clanton & Slack, 1987;Mamedov et al., 2000).
The application of PAM improved the infiltration properties of all the soils in the first irrigation. In the presence of sufficient sand particles (sandy loam soil) and a high application rate of PAM (6 kg/ha), the infiltration increased significantly with different water qualities, especially in the first irrigation. However, in silt clay loam soil, the relatively high percentage of clay and silt particles corresponded to a negligible response to PAM due to soil pore blockage and crusting, which were due, in turn, to the impact of water droplets that enhanced the clay dispersion and movement (Shainberg et al., 1991). The PAM application could manage with the greater slope and enhanced infiltration throughout the irrigation event, which was most apparent in the first irrigation. A full representation of these experimental data is provided by Abo-Ghobar (1993), Sepaskhah & Bazrafshan-Jahromi (2006), and Sepaskhah & Shahabizad (2010).

Construction of the fuzzy-logic model
The fuzzy-logic system was formulated in the fuzzylogic toolbox of MATLAB software using the Mamdani minimum-maximum inference engine. The main idea behind the Mamdani engine is to describe the process states by linguistic variables, which are defined as variables (the values of which are sentences), and to use these variables as inputs to the control rules.
To build a fuzzy system, fuzzy sets are derived solely from experience. The flowchart of the fuzzy-logic for modeling the water infiltration rate is represented schematically in Fig. 1. The crisp inputs (the soil texture components (clay (Cl)%, silt (Si)%, and sand (Sa)%), number of irrigation events (R), water applied depth (D w ), PAM application rate, water application time (T w ), water electrical conductivity (E c ), and soil surface slope (S)) are transformed into fuzzy variables. These variables are described in linguistics terms (low (L), medium (M), and high (H)) to address all possible fuzzy inputs (Fig. 2). The IR is categorized into five fuzzy variables (very low (VL), low (L), medium (M), high (H), and very high (VH)) to describe all possible fuzzy outputs. Table 2 lists the summary descriptive statistics for the inputs and outputs that are used for the developed fuzzy-logic model. The table lists some of the statistical parameters including the mean value (x mean ), minimum value (x min ), maximum value (x max ), standard deviation (S d ), kurtosis coefficient (k x ), and skewness coefficient (C sx ). The fuzzy variables were used as fuzzy sets. Fuzzy sets are functions that map a value that might be a member of the set to a number between zero and one indicating its actual degree of membership. The degree of membership is known as the membership or truth function because it establishes a one-to-one correspondence between an element in the domain and a truth value, indicating its degree of membership in the set. The functions are generally trapezoids, although simpler functions such as triangles and rectangles are frequently used (Murtha, 1995). The triangular membership function ('trimf') is the most frequently used function and the most practical; however, other functions are used, such as the trapezoid membership function ('trapmf'), which contains more information than the 'trimf'. In this study, 'trimf', 'trapmf', and the  [1] Cl = clay particles in soil texture, Si = silt particles in soil texture, Sa = sand particles in soil texture, R = number of irrigation events, D w = applied water depth for each irrigation, PAM = polyacrylamide application rate, T w = water application time, E C = water electrical conductivity, S = soil surface slope, IR = water infiltration rate. [2] x mean = mean value, x min = minimum value, x max = maximum value, S d = standard deviation, k x = kurtosis coefficient, and C sx = skewness coefficient.
The developed fuzzy-logic model relies on 55 rules when using the 'trimf' and 53 rules for both 'trapmf' and 'pimf'. The number of rules represents all possible combinations of the categorized system inputs. The product of these fuzzy sets forms a fuzzy patch, which is an area that represents the set of all associations that the rule forms between those inputs and outputs. The fuzzy rules define a set of overlapping patches that relate a full range of inputs to a full range of outputs. All uncertainties or nonlinear relationships are included in the descriptive fuzzy inference procedure in the form of IF-THEN statements.
Fuzzy logic is based on rules of the form IF-THEN that convert inputs to outputs. The IF portion of a rule refers to the degree of membership in one of the fuzzy sets. The THEN portion refers to the consequence or the associated system's output fuzzy set. For fuzzy inference, the Mamdani system was used, which is considered an AND method that is used as a min (minimum) activation operator (Mamdani, 1974). Interpreting an IF-THEN rule involves distinct steps. First, the premise (antecedent) is evaluated, which involves the fuzzy inputs, and the fuzzy operators are applied. Then, the result was applied to the consequent (known as implication). Next, the implication method modified the fuzzy set to the degree specified by the antecedent and was truncated with the min function. The output of each rule is a fuzzy set. The output fuzzy sets for each rule were then combined into a single output fuzzy set (known as aggregation). The aggregation method is explained as the max (maximum) composition. Finally, the center of gravity (COG) was calculated; this is the most popular defuzzification method for obtaining the real-valued (crisp) output as a normalized combination of membership values (Jantzen, 1999;Allahverdi, 2002).

Statistical criteria
The coefficient of determination (R 2 ) expressed below measures the degree of correlation among the observed and predicted values (from the fuzzy-logic model) of the variable IR, with values close to 1.0 indicating a good model performance: where x o,i is the observed value, x p,i is the predicted value, x̄o are the averaged observed values, x̄p are the averaged predicted values, and N is the number of observations.
The root-mean-squared error (RMSE) was used as a criterion to judge the accuracy and reliability of the model. The RMSE has the advantage of expressing the error in the same units as those of the variable, thus providing more information regarding the efficiency of the model (Legates & McCabe, 1999). The RMSE between the values of IR was calculated as The mean absolute error (MAE) measures the average magnitude of the errors in a set of forecasts without considering their direction. The MAE is given by [3] The RMSE and MAE can be used together to diagnose the variation in the errors in a set of forecasts.
The RMSE will always be greater than or equal to the MAE; the greater the difference between them, the greater is the variance in the individual errors in the set. If the RMSE equals the MAE, then all of the errors are of the same magnitude. The values of RMSE and MAE can range from zero to ∞, and lower values indicate a more accurate model.
A model efficiency (ME) value of 1.0 indicates a perfect fit between the measured and predicted data. This value can be negative and was calculated using the following equation (Nash & Sutcliffe, 1970): [4] The overall index of model performance (OI) combines the normalized root-mean-square error (which is the RMSE divided by the range of observed values) and the model efficiency indicators to verify the performance of the mathematical models. An OI value of one for a model indicates a perfect fit between the observed and predicted data (Alazba et al., 2012;Mattar & Alamoud, 2015). This index is calculated as follows: [5] where x o,max is the maximum observed value and x o,min is the minimum observed value.

Performance of the fuzzy-logic model
The steadiness of the developed fuzzy-logic model of the IR was verified by comparing to the results obtained by experimental measurement. Fig. 3 depicts the measured values of IR versus the corresponding fuzzylogic-predicted output data; three graphs are presented representing the three fuzzy membership functions used to predict the values of IR. These graphs confirm that the predicted IR values using the 'trapmf' and 'pimf' were consistent with the observations, whereas the predicted IR values deviated slightly from the observed values when using the 'trimf'.
As can be observed, an acceptable agreement is illustrated in Fig. 3 between the measured and predicted values of IR using 'trapmf' and 'pimf'. The R 2 value was 88.2% for the IR values modeled from 'trimf' and approximately 93.1% for the other two functions.  Fig. 4a indicates that the RMSE has the relatively low values of 2.88 and 2.76 mm/h for 'trapmf' and 'pimf', respectively. Fig. 4a further indicates that the MAE has the relatively low values of 2.4 and 2.3 mm/h when IR values were obtained with the 'trapmf' and 'pimf', respectively. The fuzzy-logic model obtained using the 'trimf' yielded relatively high values for the statistical parameters RMSE and MAE, equal to 3.53 and 3.0 mm/h, respectively. These results illustrate that the values of RMSE were greater than those of MAE, which indicates a clear contrast in the error values in the data. These variations in error are substantial when smaller values of IR were compared with larger values. In Fig.  4b, the statistical parameters ME and OI also fall between 0.879 and 0.90 for 'trapmf' and 'pimf', respectively. The corresponding values when using the 'trimf' were 0.818 and 0.852 for ME and OI, respectively.
The above statistical parameters indicate that the 'trapmf' and 'pimf' performed the best, with an R 2 value that was approximately 5.5% better than that from the 'trimf'. The RMSE value for the fuzzy-logic model using 'trimf' was 22.5 and 28.2% less accurate than those using the 'trapmf' and 'pimf', respectively. For the ME and OI calculations, the 'trapmf' was 7.4 and 4.8% more accurate, respectively, than that of 'trimf'. While the 'pimf' was 8.7 and 5.7% more accurate, respectively.
The aforementioned results illustrate that the values of IR evaluated by the fuzzy-logic model using the 'pimf' were more exact than those using the 'trapmf'. Thus, the selection of membership functions in terms of shape and boundary had an obvious effect on the determination of the IR values. Therefore, the fuzzy-logic model is considered acceptable for the prediction of IR values and may lead to significant improvements in field water management by its inclusion in automated irrigation systems.

Illustrating example
There are nine input variables (R, D w , PAM, T w , E C , S, Cl, Si, and Sa) and one output variable (IR) using the 'trimf' (Fig. 2). In the first step, the degrees of membership were determined in each of the fuzzy sets for each input. Fig. 5 indicates that R, T w , S, and Si values of 2, 15 min, 7.5%, and 49.1% were medium, low, high, and high sets, respectively, with degrees of membership (μ) of one. E C and Cl, which were equal to 0.5 dS/m and 23.2%, were low and medium sets with degrees of membership of 0.85 and 0.93, respectively. The remaining antecedents are D w and PAM, which were equal to 23.9 mm and 4 kg/ ha and were members of the medium (μ = 0.57 and 0.58) and high (μ = 0.18 and 0.17) sets, respectively. Similarly, a value of Sa of 27.7 is part of the low and medium sets with different degrees of membership of 0.5 and 0.25, respectively. The fuzzy rules assume the following structure: • Rule 12: IF (R is M) and (D w is not L) and (T w is L) and (E C is L) and (PAM is not L) and (S is H) and (Cl and

(E C is L) and (PAM is not L) and (S is H) and (Cl is M) and (Si is H) and (Sa is not H) THEN (IR is H).
In the second step, Fig. 5 displays the fuzzy inference procedure for the production of a crisp output. The ten plots across the top of the figure represent the antecedent and consequent of the first rule. Each rule is a row of plots and each column is a variable (Fig. 5). From the Mamdani engine, the truth degrees of the rules were determined from the firing strength for each previous rule using the weakest or least value (implication method). To illustrate this, in the first rule above, the least value of its antecedents is 0.85 (low E C ). The rule strength is then 0.85. Similarly, the second rule strength is 0.85.
The third step is the combination of the working rules (aggregation method) that were produced from the implication method. If the several sets of rules above share the same consequence or output, the value of the output is assigned by the value of the strongest rule. The limiting values for both rules associated with a medium and high probability of IR are then assigned the value 0.85. These values were used for each output fuzzy set. Fig. 5 indicates that an individual output membership function is controlled in height by its corresponding limiting value.
Finally, a value of IR of 23 mm/h was obtained after the use of the COG defuzzification method (Fig. 5). This value was derived by calculating the remaining area and the weighted average of the centroid (weighting factor) of each membership function and was then calculated as where Y is a crisp value of the output and n is the number of membership functions.  As conclusions, the use of a fuzzy-logic system as a decision-making technique was introduced for predicting IR under a sprinkler system. The fuzzy-logic model was developed by employing triangular, trapezoid, and pi membership functions ('trimf', 'trapmf', and 'pimf') for the input and output variables. The nine input variables included the number of irrigation events (R), applied water depth (D w ), polyacrylamide application rate (PAM), water application time (T w ), water electrical conductivity (E C ), soil surface slope (S), and percentage of clay (Cl), silt (Si), and sand (Sa) particles in the soil texture. The statistical criteria indicated that the compatibility between the experimental and computed data was acceptable, which confirmed that simulations are capable of successfully reproducing the values of IR using a fuzzy-logic model when using the 'trapmf' and 'pimf' only. The 'pimf' produced the best results. Thus, the developed fuzzy-logic model can effectively estimate IR values using the previous input variables. This model is attractive for use as part of an intelligent irrigation management system.