FUZZY MODELING OF THE EFFECTS OF IRRIGATION AND WATER SALINITY IN HARVEST POINT OF TOMATO CROP. PART I: DESCRIPTION OF THE METHOD

1 São Paulo State Faculty of Technology (FATEC)/ Presidente Prudente SP, Brasil. 2 São Paulo State University (UNESP), School of Sciences and Engineering/ Tupã SP, Brasil. 3 São Paulo State University (UNESP), School of Agriculture/ Botucatu SP, Brasil. 4 Federal University of the Triângulo Mineiro/ Iturama MG, Brasil. Received in: 7-11-2018 Accepted in: 3-26-2019 Engenharia Agrícola, Jaboticabal, v.39, n.3, p.294-304, may/jun. 2019 Doi: http://dx.doi.org/10.1590/1809-4430-Eng.Agric.v39n3p294-304/2019


INTRODUCTION
Imported from the Andean region to Europe in the 16th century, today tomato is widespread throughout the world (Bergougnoux, 2014) and additionally, it has easy adaptation to a wide variety of climates, except those where frosts are present (Rosa et al., 2011). "The table tomato or for consumption in natura is produced in almost all Brazil regions and at different times under different cropping systems and different levels of management"  also stands out "as the second most widely grown vegetable in the world exceeded only by potato" (Santos et al., 2011). Santana et al. (2009) state that the tomato crop is demanding in cultural practices such as irrigation and that the water deficit is responsible for affecting the tomato production, and according to Filgueira (2013), also influences the quality of the fruit and even reduces the incidence of physiological abnormalities, especially the apical rot.
Regarding the water used for tomato irrigation, Alvarenga (2004) infers that should be of good quality, free of biological contaminants in addition, the salt content should be less than 1.5 g L -1 (equivalent to electrical conductivity less than 2.2 dS m -1 ). "In extreme salinity situations, the tomato crop is not able to perform the osmotic adjustment required to meet its water demand, and therefore for nutrient, causing decrease in turgor and productivity" (Silva Junior, 2012). In general, the salts of irrigation water reduces significantly, plant height, leaf area, production of shoot dry matter and fruit production of tomato crop (Oliveira et al., 2007).
In agricultural experimentation, which aims to investigate causes and effects of new technologies, resource optimization, reuse of solid and liquid waste among others, use statistical techniques to infer the best results, but to express the intermediate values, which are not tested experimentally, regression models are usually employed (Putti, 2015).
Engenharia Agrícola, Jaboticabal, v.39, n.3, p.294-304, may/jun. 2019 One way of modeling that is gaining prominence is the one that uses of fuzzy logic, introduced in scientific circles by Zadeh (1965), which makes use of mathematical and computational theories with more refined adjustments in relation to regression. This type of modeling brings the ease of understanding phenomena in many areas becoming an important theory in the analysis of results.
Examples of applications of different uses of this theory in agricultural engineering are characterized in models on cattle body mass (Gabriel Filho et al., 2011, dynamic quality of agricultural soils in relation to their biological, physical and chemistry characteristics (Rodríguez et al., 2016.), development of irrigated lettuce with different types of water (Putti, 2015), commercialization of cassava (Gabriel Filho et al., 2015), estimate the effects of global warming on the vitality of Laelia purpurata orchids , crop classification (Murmu & Biswas 2015), land use planning of agricultural production systems (Mishra et al., 2014), agro-meteorological models for yield estimation (Luydmila et al., 2017) and agricultural optimal cropping pattern determination (Neamatollahi et al., 2017) Several models are developed using area experts for the development of rules base, system core based on fuzzy rules. However, many conducted agronomic experiments can, from their measured data, provide such information that field experts would do it, and with a degree of accuracy according to the data. With this, it creates a reverse phenomenon: the data themselves provide rules that expert would provide. This is one of the proposals in this methodology applied in the behavior of the tomato biometric variables front of different water tensions in soil and doses of water salinity.
Thus, the aim of this study was to characterize a method of fuzzy modeling from an agronomic experiment to evaluate the effects on the growth and productivity of hybrid tomato (Licopersicum esculentum) at different water tensions in soil and different salinity irrigation doses to 120 days after sowing.

Experiment description
The experimental data used for fuzzy modeling of this study were statistically analyzed in Silva Junior (2012). The experiment was carried out between June and October of 2011, in a protected environment installed in an area with an average altitude of 786 m, latitude 22°5'03" South, longitude equal to 48°25'37" West and situated in the Department of Rural Engineering of the School of Agriculture of São Paulo State University (UNESP) in Botucatu SP.
The irrigation management was established to supply water to the crop in three conditions of potential soil water matrix (Ψ = -60, -30 and -10 kPa). Furthermore, the water used for irrigation had electrical conductivity (EC) of 0.08 (no salt added) and the concentrations of 3 and 5 dS m -1 . Thus, we used three doses of salinity in the experiment. Therefore, the experimental design was completely randomized, double factorial design with three replications, three water tensions on the ground and three levels of salinity.

Fuzzy modeling
From the experiment conducted by Silva Junior (2012), which was used the management of different water tensions in soil (irrigation) and different irrigation salinity doses (salinity) along the tomato cycle, it was held a fuzzy modeling to study the effects on the biometric variables and productivity in the harvest point of this crop that occurred 120 days after sowing (DAS).
Therefore, it was considered the following model to represent the agronomic experiment in study: : × ⊆ ℝ ⟶ ℝ , ( , ) ↦ = ( , ), where = [−60, −10], = [0,08; 5], ℝ is the set of real numbers, represents the soil water tension (kPa) and the salinity dose in irrigation (dS m -1) . Extremes of the ranges and are in accordance with the minimum and maximum values used in the experiment. Additionally, = ( , ) = ( , , … , ) defined by the tomato median biometric and productivity variables and = P , For the development of the Fuzzy Rule-Based Systems (FRBS), was defined an input processor (or fuzzyficator), a set of linguistic rules, a method of fuzzy inference and an output processor (or de-fuzzyficator) generating as output a real number (Figure 1).

Fuzzy sets of the input variables
The FRBS input variables developed were irrigation and salinity. For both variables were defined three fuzzy sets called Low (L), Medium (M) and High (H) according to Table 1, whose numerical values were taken from the analysis of the experiment data held in Silva Junior (2012).
The pertinence functions were prepared so that the soil water tensions adopted in the experiment (-60, -30 and -10 kPa) presented degree of pertinence equal to 1 in the fuzzy sets L, M and H respectively. The same procedure was used for the salinity doses in the irrigation adopted in the experiment (0.08; 3 and 5 dS m -1 ). Thus, it was adopted for the "L" set in its first delimiter the point − 1, so that the degree of pertinence 1 occurs either for the soil water tension at -60 kPa as for the soil salinity irrigation dose of 0.08 dS m -1 , since it is experimentally observed points. Similarly, it was adopted for "H" set in its last delimiter the + 1 point. Thus, both the soil water tension of -10 kPa as the salinity irrigation dose of 5 dS m -1 obtained degree of pertinence 1. This procedure was used by Cremasco et al. (2010), Gabriel Filho et al. (2011), Pereira et al. (2008, Putti et al. (2014, Putti (2015) and Gabriel Filho et al. (2016).

Fuzzy sets of output variables
It was elected all the above output variables as they presented significant differences between the soil water tensions and / or salinity irrigation doses 120 days after sowing and / or interactions between these factors, according to Silva Junior (2012), with level of significance = 5%.
Generalizing the methodology of the FRBS output variables 9 fuzzy sets were defined called Low 1 (L1), Low 2 (L2), Low 3 (L3), Medium 1 (M1), Medium 2 (M2), Medium 3 (M3), High 1 (H1), High 2 (H2) and High 3 (H3), seeking with such a large number of fuzzy sets increase the accuracy of the model. In order to reduce complexity, the triangular fuzzy sets were adopted as they are commonly used and need only determine the peak value and the width of its base. Therefore, it was necessary to create delimiters that enabled to define in a triangular shape each of the pertinence functions of each of these fuzzy sets in question.
The following calculations for determining such delimiters are similar to the methodological procedures adopted in Putti (2015) and Gabriel Filho et al. (2016).
In this case, the triangular pertinence functions require the calculation of 9 delimiters, which were defined as percentiles of the data set being measured in each output variable. These percentiles %, denoted by ( %), depend on a constant , once the 9 necessary delimiters are of the form ( ), 0 ≤ ≤ 8. The constant was calculated as follows: Table 2 and Figure 3 show the definition of pertinence functions for the output variables using percentiles varying in 12.5%. It is noteworthy that for the pertinence functions L1 and H3, one of two disjoint intervals holder whose points have not degree of pertinence 1 was defined with amplitude equal to 1.

Fuzzy Rules Base
We considered the 9 (3 × 3) combinations among the fuzzy sets of the two input variables to obtain the rules base. Thus was created 9 pairs of the form Irrigation × Salinity according to methodology developed in Cremasco et al. (2010), Gabriel Filho et al. (2011), Putti (2015 and Gabriel Filho et al. (2016). Table 3 shows the points of each variable considered and the combinations of the fuzzy sets described. The association of fuzzy sets combinations of the input variables with a fuzzy set of each output variable, which fully characterizes the rules base, was carried out by determining the greater degree of pertinence of the median value obtained from the 3 repetitions measured in experiment in each combination (Table 3).
It also highlights that the greatest degree of pertinence was adopted since, except for points with degree of pertinence 1, all other points of the interval [ (0%), (100%)] belong to two fuzzy sets of the output variables.
Thus, assuming that a combination shown in Table 3 may result as median value (from 3 measurements) that belongs to the fuzzy sets L3 and M1 of some output variable, and assuming that this value was located in the subinterval ( %) ( . %) , ( . %) ( %) showed in Figure 3, then such combination would be associated with the fuzzy set M1, since there is a greater degree of pertinence to this set.
In order to generalize the other associations, Table 4 shows the fuzzy sets related to their respective intervals. This relationship indicates that certain points of the range have greater degree of pertinence to the fuzzy set related. The intervals are related to domain partitions of each output variable.  Alternative nomenclature is adopting for the output fuzzy sets (only as a generalization), denoting by O1, O2, O3, O4, O5, O6, O7, O8, O9 the fuzzy sets L1, L2, L3, M1, M2, M3, H1, H2, H3, respectively, we have that Table 4 can be represented by Table 5.   TABLE 5. Generalization of the intervals of points with greater pertinence degree associated with the fuzzy sets O1, O2, O3, O4, O5, O6, O7, O8 and O9, representing respectively the fuzzy sets Low 1, Low 2, Low 3, Medium 1, Medium 2, Medium 3, High 1, High 2 and High 3 for the output variables.

Output variables
Associated fuzzy set It is noteworthy that the present method of using percentiles of experimental data was adopted in order to avoid subjectivity in the delimiters choice of the pertinence functions, creating also a generalization form of establishment of these functions for all variables. In addition, it is emphasized that the present system refers to the experiment information of this research, which does not prevent the use of the same methodology in other crops.
In addition, a rules base shown in the notation of Table 5 classify all output combinations associated with numbers from 1 to 9, thus facilitating the visualization by the system users (researchers and farmers) of the rules generated by this method, featuring as an extractor method of rules base.

Software used
For the preparation of the FRBS were used an electronic spreadsheet and the Matlab ® software, that the Faculty of Science and Engineering -FCE / UNESP, has the license to use. Also it was used the Toolbox Fuzzy Logic of software Matlab ® determining the pertinence functions.

RESULTS AND DISCUSSION
With the determination of the measured data percentiles (Table 6) in the agronomic experiment conducted by Silva Junior (2012) and using the proposed methodology, the pertinence functions of the fuzzy sets of the output variables of this study were prepared (Figures 4 and 5).  Figures 4 and 5 establish all partitions of the contradictions of the output variables, with the aid of the 9 fuzzy sets for each variable. Thus, any simulation of the fuzzy system will generate some result that will belong to some of these sets. It is important to note that, with the proposed methodology, it was possible to establish with precision all delimiters (Table 6) of the pertinence functions of these fuzzy sets. This enabled the creation of Table 7 intervals.
It is worth noting that many modeling works use a smaller amount of fuzzy sets in the output variables. This, of course, requires a limitation on the number of classes, partitions, and possibilities for the response (output) of rule bases, naturally decreasing the accuracy of the model. These characteristics (and with 5 fuzzy sets) can be found in the field of agrarian sciences in Luydmila et al. (2017) studying applications in agrometeorological models for productivity estimation, in Giusti & Marsili-Libelli (2015) creating a support system for irrigation and water conservation in agriculture, in Mamann et al. (2018) in simulation of wheat production by nitrogen and hydrogel, and in Lima et al. (2010) to control soil matrix potential.
Moreover, keeping the nomenclature of output fuzzy sets similar to the input (Low, Medium and High), adding the numerals 1, 2 and 3, favors the understanding of the rule base.
More specifically, according to Tables 4 and 6, it was possible to determine the intervals indicating the greatest degree of pertinence of each item of the output variables of a given fuzzy set (Table 7).
It is noting that the process of the present paper is not supervised by specialists (unsupervised system). Nevertheless, generated fuzzy models taken from interviews witch specialists are extremely useful for advancing the understanding of phenomena in the agrarian sciences, such as models for estimate the effects of global warming on the vitality of orchids , determination of the agricultural optimal cropping pattern (Neamatollahi et al., 2017), elicitation of expert knowledge for evaluation of agricultural production systems (Cornelissen et al., 2003), scheduling tillage operations (Thangavadivelu & Colvin, 1997) and evaluation of uncertainty in cassava chain (Gabriel Filho et al., 2015).
However, for models that must be generated from experimentally measured data, it is appropriate to propose a modeling method that will fit directly to the data, such that as proposed in the present work, generating a rule base such as Table 8.
Models of this type, in which the system based on fuzzy rules have their rules generated with computational, mathematical and/or statistical methods are called unsupervised models and can be observed in the works of Yang et al. (2003) in development of a herbicide application map, Cremasco et al. (2010) in applications for the energy evaluation of poultry industry companies, Gabriel Filho et al. (2011) in evaluation of livestock slaughtering, Murmu & Biswas (2015) in crop classification, Daneshmand et al. (2015) modeling minimum temperature for analysis of climate indices and Viais Neto et al. (2018) in evaluation of cherry tomato seedlings production.
Furthermore, the form of rule generation (rules of the if / then type) makes it possible to use the system's own rules in the form of a practical result for farmers.

Input variables
Output variables Irrigation Is noteworthy that for the determination of the fuzzy system rules (Tables 8 and 9), in which are related the fuzzy sets of the input with the output variables; calculating the median values for each combination of input fuzzy sets. Additionally, the classifications presented in these tables are possibly invariant or have no significant changes if an experiment was carried out under the same conditions during the same period described which makes the result relevant.
For plant height output variable, we have the following values (Table 10) measured for some combinations of input fuzzy sets (for other output variables and other combinations of input fuzzy sets, the procedure performed was analogous).  Therefore, for the combination of the fuzzy sets L of the variable irrigation and L of the salinity variable, we have from Table 10 that the average value of 3 repetitions (by the database corresponds to the value 50 cm) belongs to two fuzzy sets of plant height variable, namely, L3 and M1. This situation can be seen in Figures 4 (a) and 6. As this value has greater degree of pertinence to the fuzzy set M1, the rule is created: "If irrigation is L and salinity is L, then height is M1".

CONCLUSIONS
The fuzzy modeling developed will analyze intermediate regions to trial levels and weave other conclusions about the tomato growth and productivity.
For the preparation of this fuzzy model, it should be noted that it has not used the expert opinion for the development of rules base, and that the established methodology allows developing it from the response data sets of the trial.
Finally, in agreement with the theoretical results presented, the developed mathematical model can be used for other crops on which it has collected data in a trial, since the appropriate methodological adjustments are made such as experimental factors, input variables, output variables and numbers of input fuzzy set.