Type-II Fuzzy Decision Support System for Fertilizer

Type-II fuzzy sets are used to convey the uncertainties in the membership function of type-I fuzzy sets. Linguistic information in expert rules does not give any information about the geometry of the membership functions. These membership functions are mostly constructed through numerical data or range of classes. But there exists an uncertainty about the shape of the membership, that is, whether to go for a triangle membership function or a trapezoidal membership function. In this paper we use a type-II fuzzy set to overcome this uncertainty, and develop a fuzzy decision support system of fertilizers based on a type-II fuzzy set. This type-II fuzzy system takes cropping time and soil nutrients in the form of spatial surfaces as input, fuzzifies it using a type-II fuzzy membership function, and implies fuzzy rules on it in the fuzzy inference engine. The output of the fuzzy inference engine, which is in the form of interval value type-II fuzzy sets, reduced to an interval type-I fuzzy set, defuzzifies it to a crisp value and generates a spatial surface of fertilizers. This spatial surface shows the spatial trend of the required amount of fertilizer needed to cultivate a specific crop. The complexity of our algorithm is O(mnr), where m is the height of the raster, n is the width of the raster, and r is the number of expert rules.


Introduction
Combining fuzzy sets and logic with geospatial information opens up a new dimension for scientist. Natural phenomena are mostly fuzzy in nature. They show a degree of uncertainty or vagueness in their extent and attribute, which cannot be expressed by a crisp value. Fuzzy sets, introduced by Zadeh [1], provide a mechanism for communication between computing systems and humans [2]. A fuzzy control system is developed on the basis of fuzzy set theory and fuzzy logic [3]. Many fuzzy inference systems and defuzzification techniques have already been developed. These techniques are useful in obtaining crisp output from a fuzzy input. The crisp output values are calculated using fuzzy rules applied in an inference engine using defuzzification methods [4]. A fuzzy logic system (FLS) includes a fuzzifier, an inference engine, and a defuzzifier [5]. Quite often, the knowledge used to construct the membership function is uncertain. These uncertainties can occur due to the following [6]: (i) the word used in defining the membership function of antecedent and consequent of rules means different to different people; (ii) the training data set may be noisy; (iii) the classification used to define these words can be expressed by different people as different functions, that is, trapezoidal, triangle, or Gaussian.
All these uncertainties should be translated into the membership function of antecedent and/or consequent. Type-I fuzzy sets cannot model these uncertainties [7]. This is due to the crisp nature of their membership function. In 1975, Zadeh introduced the concept of type-II fuzzy sets [8]. Type-II fuzzy sets are an extension of type-I fuzzy sets in which membership functions are themselves type-I fuzzy sets. They are very useful in those scenarios where it is difficult to find a crisp or exact membership function. Type-II fuzzy sets provide an additional degree of freedom in Mamdani and Assilian [9] and Takagi-Sugeno-Kang (TS) [10] fuzzy inference systems. These inference systems can be very useful where a lot of uncertainties are present [11]. Fuzzy type-II sets have the potential to provide more flexibility to tackle uncertainties and hence give better results and performance, for example, [12][13][14][15]. The Scientific World Journal Gale [2], Pipkin [16], and Leung [17] were pioneers in introducing the fuzzy logic in the geographical domain. Much work has been published on the use of fuzzy logic in a spatial domain especially in land suitability modeling [18][19][20][21][22][23]. Most of them model a membership function through (1) a deterministic formula, (2) the use of a regression equation, or (3) the use of clustering procedure like fuzzy c-mean. Fertilizer, one of the important elements in crop yield, is an organic, inorganic natural, or synthetic material, when added to a soil surface, it provides one or more nutrients which are essential for the plants growth [24]. It is estimated that around 30%-50% of crop production are attributed to fertilizer [25]. The use of fertilizer depends on the soil nutrient spatial variation. Soil spatial variation is expressed as membership in soil classes [26]. Generally, membership in soil classification is derived in two ways [27], that is, classification derived from data and knowledge based semantic model. Lagacherie [28] proposed a method to translate soil class description which is based on possibility theory and fuzzy pattern matching. Qi et al. [29] developed a prototype based on soil knowledge as fuzzy membership functions which is used in fuzzy soil mapping system. Zhu et al. [19] present a method using descriptive knowledge to construct fuzzy membership functions on soil-landscape relationships. Membership function was derived from 22 field samples collected using purposive sampling approach. Zhu et al. [20] predict soil properties using fuzzy membership values. Their results show that regression with fuzzy membership values can be used where soil terrain relationships are more complicated. Bogataj et al. [21] also used regression analysis with fuzzy approach to land valuation. They effectively use a fuzzy membership function for determining the independent variable of the regression function.
In this paper we have introduced a fuzzy decision support system for modeling a spatial surface of fertilizer. This work is an extension of fuzzy system based on type-I fuzzy sets. There was an ambiguity in defining the membership function of nutrients in type-I fuzzy sets. To overcome this ambiguity, we developed the membership function of nutrients based on type-II fuzzy sets.
The paper is divided into four sections. The first section describes the preliminaries of type-II fuzzy set. The second section describes the basic structure and algorithm of our system. The third section explains the different parts of our proposed fuzzy system, that is, fuzzifier, fuzzy inference engine, and defuzzifier. The fuzzifier uses a membership function and the foot print of uncertainty based on the classification of the nutrients defined by Soil Fertilizer Research Institute (SFRI) of Pakistan. SFRI has a number of laboratories all over the country, which takes soil sample from farmers, test the nutrient composition of the sample, and suggest fertilizers based on these 95 rules that have defined in our fuzzy inference engine. The last section is on conclusions and future research direction.

Type-II Fuzzy Set.
Type-II fuzzy sets generalize type-I fuzzy sets to handle more uncertainties. This is done by using fuzzy membership functions. Zadeh [8] defines type-II fuzzy sets that have membership functions that themselves are fuzzy set. He explains this change as: "motivated by the close association which exists between the concept of a linguistic truth with truth-values such as true, quite true, very true, more or less true, and so forth, on the one hand, and fuzzy sets in which the grades of membership are specified in linguistic terms such as low, medium, high, very low, not low and not high, and so forth, on the other. " Definition 1 (fuzzy sets). Adopted from [1], a fuzzy set, , defined over universe , is a function defined as follows: where ∈ , = [0, 1] is a unit interval and ∈ is the membership grade of the element in the fuzzy set .
Definition 2 (type-II fuzzy sets). Adopted from [30], a type-II fuzzy set,̃, over the universe , is defined by the following function:̃: There are two categories of type-II fuzzy sets (1) generalized and (2) interval type-II fuzzy sets. The difference between the two categories is in the way of modeling the fuzzy membership function. The former models the fuzzy membership grade as a fuzzy number between zero and one, whereas the later models the fuzzy membership grade as a crisp interval between zero and one.
Definition 3 (generalized type-II fuzzy sets). Adopted from [31], a generalized type-II fuzzy set,̃, is defined by the following function: where The membership grade of a generalized type-II fuzzy set is known as the secondary membership function. This function maps the primary membership grades,̃( ), to their respective secondary membership grades.
( ). This secondary function maps the value [0, 1] to the values in {0, 1}. This crisp value of the secondary membership function allows interval type-II fuzzy sets to be processed more efficiently than the generalize type-II fuzzy sets.

Basic Structure of the Proposed Model
The system takes the amount of soil nutrients and time of crop production as input. The nutrient includes potassium, phosphorus, and nitrogen. The proposed system fuzzifies these values based on type-II membership functions. The fuzzified values are passed to the fuzzy inference engine where IF-THEN fuzzy rules are applied to get a fuzzy type-II output. This output is passed through the type reducer and reduced to type-I, which is defuzzified to a crisp value. A new surface is generated which provide us the pattern of the use of fertilizer in our area of interest. The algorithm for these steps is given in Algorithm 1 and our system is explained in the diagram in Figure 1

Material and Analysis
The dataset consists of four inputs, that is, nitrogen, phosphorous, potassium, and crop time and generates two outputs, that is, urea and DAP. The nitrogen, phosphorous, and potassium are in the form of spatial surfaces that are classified according to the ranges defined by SFRI. These ranges are shown in Tables 1 and 2 These surfaces, along with crop time, are fed into the type-II fuzzy system for processing and interpretating linguistic values and the system results into the development of new surfaces showing the use of fertilizers, that is, urea and DAP.
The type-II fuzzy system uses the Mamdani inference method [9]. It consists of the following units: (ii) fuzzy inference engine;   (iv) defuzzifier.    is fuzzified to only a type-I degree of membership as it has no FOU. the type-II fuzzy inference engine is the same as that of the type-I fuzzy inference engine. The only difference is in the antecedents and consequents of the rules that are represented by the type-II fuzzy sets. These rules are defined in the form of IF ⟨fuzzy type-II preposition⟩ THEN ⟨fuzzy type-II preposition⟩ .

Fuzzy Inference
The fuzzy type-II preposition defined in the form is where is the linguistic variable and is the linguistic value defined in the form of lower and upper bounds and . In this engine, we have used the rules defined by SFRI Pakistan listed in Table 3.

Type
Reducer. This unit takes the output of fuzzy inference engine, which is of in the form of a type-II fuzzy set, and converts it into a type-I fuzzy set. We have used the center of sets type reduction, which produces the output in interval form. The center of type reduction is expressed as It is a fact that centroid of interval type-II fuzzy set is an interval type-I fuzzy set. Karnik and Mendel developed a KM algorithm for type reducer which is fast monotonically and exponentially [33].

Defuzzifier.
This unit maps the type-I fuzzy set into a crisp number. For defuzzification, we calculate the centroid [34] of the left and right end points of the type reduced set calculated by the KM algorithm, as follows: The centroid defuzzifies ( ) into two outputs, that is, urea and diammonium phosphate (DAP). The membership functions for the two outputs are shown in Figure 6. The defuzzifier estimates the crisp output value according to the center of gravity method using the mathematical equation ∫ ⋅ ⋅ / ∫ ⋅ . This output is then assigned to the corresponding pixel of the output surface. Figure 7 shows the surface of the fertilizer for irrigated wheat at the irrigation time, prepared using type-II algorithm in Section 3. Figure 7 shows the spatial trend for the use of fertilizers. These images are shown in blue to red ramp. The reddish the area is, the more the fertilizer is needed, and the bluish the area, the less the fertilizer is needed. The range of urea within our area of interest is from 0.5 to 0.85. It means that the red area in the image requires around 0.85 bag of urea and blue area requires 0.5 bag of urea. Similarly, the range of DAP is from 1.76 to 1.84; that is, red area requires 1.76 bags of DAP and blue area requires 1.84 bags of DAP. Please note that these quantities of fertilizers are required at the time of first irrigation, which is the third month after sowing. 6 The Scientific World Journal

Complexity of Algorithm
The running time of algorithm is ( ), where is the height of the raster, is the width of the raster, and is the number of expert rules. From  Tables 1 and 2) used for fuzzification. Similarly, the running time of lines 11 and 13 depends upon the number of rules, , mentioned in Table 3 and the number of output classes shown in Figure 6, respectively. Thus, the running time of the block of lines 9-14 is ( + + ). As this block is nested under loops with growth rate ( ), therefore, the running time of the block including loops is ( ( + + )). Since in our case and are small constants, therefore, the running time of algorithm is ( ).

Conclusions
Most of the spatial entities and phenomena are defined in linguistic terms. These uncertain behaviors of spatial entities can only be defined by fuzzy sets and their generalizations. A type-II fuzzy set is an extension of the fuzzy set that represents uncertainty by an additional dimension. This extra dimension gives more freedom for representing uncertainty.
In this paper, we have shown the use of type-II fuzzy sets for developing a fuzzy system for the generation of a fertilizer surface within a specified spatial extent, given nutrients of soil and cropping time. The type-II fuzzy system provides the capability of handling a higher level of uncertainty in defining the linguistic classes of nutrients in soil. Though the analysis presented in this paper is only for irrigated wheat crop, they clearly depict that the use of a type-II fuzzy inference system in a GIS can help identify the spatial patterns of the requirement of fertilizers for any crop. This paper has presented a basic platform for the development of spatial surfaces using a type-II fuzzy inference engine based on human linguistic values. The running time of Algorithm 1 is ( ), where is the height of the raster, is the width of the raster, and is the number of expert rules. 95 rules were used in this fuzzy inference system, resulting in slow execution time. Research can be conducted on reducing the rules using different available methods like SVD, combo, or singleton. We have also used Mamdani type fuzzy system which can also be tested and compared with Sugeno type fuzzy system.