A Proposal to Speed up the Computation of the Centroid of an Interval Type-2 Fuzzy Set
This paper presents two new algorithms that speed up the centroid computation of an interval type-2 fuzzy set. The algorithms include precomputation of the main operations and initialization based on the concept of uncertainty bounds. Simulations over different kinds of footprints of uncertainty reveal that the new algorithms achieve computation time reductions with respect to the Enhanced-Karnik algorithm, ranging from 40 to 70%. The results suggest that the initialization used in the new algorithms effectively reduces the number of iterations to compute the extreme points of the interval centroid while precomputation reduces the computational cost of each iteration.
Type-2 fuzzy logic systems (T2-FLS) theory and its applications have grown in recent years [1–3]. One of the main problems related to the implementation of these systems is type reduction, which computes the generalized centroid of a type-2 fuzzy set (T2-FS) [4–6]. This operation becomes computationally simpler when performed over a particular class of T2-FS, namely, interval type-2 fuzzy set (IT2-FS) [5, 7]. Basically, the centroid of an IT2-FS is an interval [3, 8]. Therefore, computing this centroid can be considered as an optimization problem that finds the extreme points that define the interval .
Fast computation of type reduction for IT2-FSs is an attractive problem, which is critical since type-reduction procedures for more general type-2 fuzzy sets (T2-FSs) make use of interval type-2 fuzzy computations [4, 9–11]. Up-to-date, several iterative approaches to computing type reduction for IT2-FSs have been proposed [5, 12–18]. The Karnik-Mendel (KM) algorithms are the most popular procedures used in interval type-2 fuzzy logic systems (IT2-FLS) . It has been demonstrated that the KM algorithms converge monotonically and superexponentially fast. These properties are highly desirable in iterative algorithms . However, KM procedures converge in several iterations and demand a considerable amount of arithmetic and memory look-up operations [7, 8, 12, 19], for real IT2-FLS implementations.
In the case of IT2 fuzzy controllers, the computational cost of type reduction is an important subject [20, 21]. The overall complexity of the controller largely depends on the type-reduction and defuzzification stages. Thus developing strategies for reducing the computational burden and necessary resources for implementing these two stages is highly convenient. In addition, there are other applications of IT2-FLS in which the complexity of the hardware and software platforms should be reduced in order to guarantee the fastest possible execution of fuzzy inferences [22, 23].
Noniterative type reduction of IT2-FS can be achieved by means of uncertainty bounds ; however, this method is approximate and involves relatively complex computations. Other methods for computing the centroid of an IT2-FS have been proposed, for example, geometric type-reduction , genetically optimized type-reducers , interval-analysis-based type-reduction , and sampling defuzzification and collapsing defuzzification . Although these alternative methods exhibit interesting properties, they are not as popular as the KM algorithm.
An enhanced version of the KM algorithm (EKM) was presented in . This version includes a better initialization and some computational improvements. Experimental evidence shows that the EKM algorithm saves about two iterations, which means a reduction in computation time of more than 39% with respect to the original algorithm. By the time the EKM algorithm was presented, and the iterative algorithm with stop condition (IASC) was also introduced by Melgarejo et al. [14, 15, 19]. This algorithm deals with the problem of computing type-reduction for an IT2-FS by using some properties of the centroid function [13, 19]. Experimental evidence showed that IASC is faster than the EKM algorithm in some cases.
Recently, IASC has been enhanced by Wu and Nie  leading to a new version called EIASC, which proved to be the fastest algorithm with respect to the IASC and EKM algorithms for several type-2 fuzzy logic applications. The improvement introduced in EIASC mainly deals with modifying the iterative procedure for computing the right point of the interval centroid. Although IASC and EIASC outperform the EKM algorithm, the initialization of the IASC-type algorithms is somewhat trivial and does not provide an appropriate starting point, which can limit the convergence speed of these algorithms when calculating the points of the type-reduced set. An extensive and interesting comparison of several type-reduction methods is provided by Wu in . This study confirmed the convenience of EIASC over the EKMA for reducing the computational cost of an IT2-FLS. The experiments that were limited to interpreted language implementations also showed that EIASC and the enhanced opposite direction searching algorithm (EODS) exhibited similar performance over different applications; however, the EODS outperformed EIASC in low-resolution cases .
Regarding the aforementioned problem, this work considers a different initialization perspective for iterative type-reduction algorithms based on the concept of inner-bound set for a type-reduced set . This kind of initialization has not been tried in type-reduction computing until now. As it will be analyzed later, the inner-bound initialization reduces the distance that the algorithms need to cover in order to find the optimal points of the interval centroid. In addition, bearing in mind the computational burden of iterative algorithms, this paper also focuses on proposing an alternative strategy to speed up their computation based on the concept of precomputing. Precomputation in algorithmic design is a powerful concept that reduces the necessary arithmetic operations. Current literature does not report the use of precomputation in the type-reduction stage in IT2-FLSs.
Using inner bound sets initialization and precomputation, Both the IASC and KM algorithms have been restated, leading to faster algorithms hereafter refered to IASC2 and KMA2. Our experiments considering two different implementation perspectives (i.e., interpreted language and compiled language) show that IASC2 and KMA2 outperform EKMA and EIASC. In fact, timing results suggest that IASC2 may be the best option for implementing IT2-FLSs in dedicated hardware, whereas EKMA may support the computation of large-scale simulations of IT2-FLSs over general purpose processors.
The paper is organized as follows. Section 2 provides some background about the centroid of an interval type-2 fuzzy set. IASC2 and KMA2 are presented in Section 3. Section 4 is devoted to a computational comparative study of iterative type-reduction methods which considers two types of implementation: compiled-language-based and interpreted-language-based. Finally, we draw conclusions in Section 5.
The purpose of this section is to provide some basic information about the centroid of interval type-2 fuzzy sets. The reader who is not familiar with this theory is invited to consult [3, 5, 13] among others.
2.1. Type-2 Fuzzy Sets
According to Mendel  a type-2 fuzzy set, denoted , is characterized by a type-2 membership function where and :
2.2. Interval Type-2 Fuzzy Sets
An IT2-FS is a particular case of a T2-FS whose values in are equal to one . An IT2-FS is fully described by its footprint of uncertainty (FOU) . Note that an IT2-FS set can be understood as a collection of type-1 fuzzy sets (i.e., traditional fuzzy sets). The membership functions of these sets are contained within the FOU; thus, they are called embedded fuzzy sets [5, 13].
2.3. Centroid of an IT2-FS
Let be an IT2-FS, and its centroid is an interval given by : where and are the solutions to the following optimization problems: where the universe of discourse as well as the upper and lower membership functions have been discretized in points.
A simpler way to understand the centroid of an IT2-FS is to think about it as a set of centroids that are computed from all the embedded fuzzy sets [3, 5]. Clearly, in order to characterize an interval set, it is only necessary to find its minimum and maximum. The Karnik-Mendel iterative algorithms [5, 16, 17] are the most popular procedures for computing these two points.
2.4. Computing the Centroid of an IT2-FS
It has been demonstrated that and can be computed in terms of the upper and lower membership functions of the footprint of uncertainty (FOU) of [3, 5] as follows: where and are the values of the lower and upper membership functions, respectively, considering that the universe of discourse has been discretized into points . In addition and are two switch points that satisfy the following:
2.5. Uncertainty Bounds of the Type-Reduced Set
The type-reduced set of an interval type-2 fuzzy given in (2) can be approximated by means of two interval sets called inner- and outer-bound sets . The end and points of the type-reduced set of an interval type-2 fuzzy set are bounded from below and above by where  and  are the inner- and outer-bound sets, respectively. For the purposes of this paper only the inner bound set is considered, so it is computed as follows:
2.6. Properties of the Centroid Function
The definition and corresponding study of the continuous centroid function are provided by Mendel and Liu in . Theoretical studies derived from (6) can be legitimated for the discrete centroid function . Regarding this fact, Mendel and Liu demonstrated several interesting properties of the continuous centroid function, which are applicable also to the discrete one. Some of these properties can be summarized saying that the centroid function decreases or has flat spots to the left of its minimum, and it increases or has flat spots to the right of this value. Additionally, this function has a global minimum when . The right-centroid function has similar properties since this function has a global maximum when . Thus, it increases to the left of the maximum and decreases to the right.
3. Modified Iterative Algorithms for Computing the Centroid of an Interval Type-2 Fuzzy Set
The IASC-2 algorithm is presented in Table 1. The algorithm consists of four stages: sorting, precomputation, initialization, and recursion. Sorting and precomputation are the same for computing and . Precomputation stores the partial results of computing (8); only two divisions are required. Those results will be used along the other stages of the algorithm.
The initialization of IACS2 is characterized by its dependence from the inner-bound set. This feature introduces a big difference with previous algorithms since they use fixed initialization points (e.g., EKMA, IASC, and EIASC); however, regarding this particularity, IASC2 is similar to the KMA, because both algorithms include a FOU-dependent initialization.
The IASC2 works with the switch points starting inside the centroid, iterating similarly as IASC type algorithms but from the toward left side while the minimum is reached, it is in the opposite sense to IASC and EIASC. The procedure for computing the maximum begins in and goes to the right side until it is found, and the search direction is the same of IASC but opposite to the proposed in EIASC. The advantage of this initialization for computing the centroid is that always the switch points start close to the and ; therefore, less iterations are used.
Figure 1 depicts a uniform random FOU with its , or and the or , and the arrows show the direction of the search of each procedure from the initial switch point to the minimum or maximum. Also, in this example, it is possible to see the space scanned by every algorithm, suggesting that this space is proportional to the amount of iterations required to converge. Note that IASC2 has the shortest arrows, which mean few iterations.
In Table 1 (21), corresponds to the minimum of the inner-bound set; thus according to (6) . Therefore Table 1 (21) provides an initialization point that is always greater than or equal to the minimum extreme point ; In addition, it is possible to find an integer so that . It is easy to show that Table 1 (22)–(24) is computing the left centroid function with , which fixes the starting point of recursion from the values obtained in the precomputation stage.
Recursion Table 1 (28)–(31) computes the left centroid function with initial point in , and each decrement in leads to a decrement in . By doing some algebraic operations, it is easy to show that . If sums are computed recursively, it leads to .
Condition 1. If , then increases when decreases.
Condition 2. If , then increases when increases.
Note that is greater than which implies that ; thus, it is guaranteed that satisfying Condition 1. Therefore, it can be concluded that a decrement in will induce a decrement in .
Finally, the stop condition is stated from the properties of the centroid function . They indicate that the left-centroid function has a global minimum in , so it is found when the functions start to increase.
The procedure to compute is only analyzed in this section. The full demonstration of this procedure is provided in the appendix for the readers who are interested in following it. The computation of obeys similar conceptual principles, and it can be understood by using the ideas suggested above or those provided in the appendix.
The KM2 algorithm is presented in Table 2. This algorithm uses the same conceptual principles of KMA for finding and . The algorithm includes precomputation, initialization, and searching loop. Precomputation and initialization of KMA2 are the same for IASC2, having always the initial switch points near to the extreme points and . The searching loop corresponds to steps 4–7. The core of the loop is Table 2 (53)–(55) and –, which can be easily demonstrated by making equal to or . These equations calculate or with few sums and subtractions taking advantage of pre-computed values. Finally, the stop condition is the same for the EKMA algorithm, which was stated in .
4. Computational Comparison with Existing Iterative Algorithms: Implementation Based on Compiled Language
4.1. Simulation Setup
The purpose of these experiments is to measure the average computing time that a type-reduction algorithm takes to compute the interval centroid of a particular kind of FOU when the algorithm is implemented as a program in a compiled language like C. In addition, complementary variables like standard deviation of the computing time and the number of iterations required by each algorithm to converge are also registered. The algorithms considered in these experiments are IASC , EIASC , and EKMA , which are confronted against IASC2 and KMA2. For the sake of comparison, the EKM algorithm is regarded as a reference for all the experiments.
Four FOU cases were selected to evaluate the performance of the algorithms. All cases corresponded to random FOUs modified by different envelopes. The first one considered a constant envelope that simulated the output of a fuzzy inference engine in which most of the rules are fired at a similar level. In the second one, a centered envelope was used to simulate that rules with consequents in the middle region of the universe of discourse are fired. The last two cases were proposed to simulate firing rules whose consequents are in the outer regions of the universe of discourse. For the sake of clarity, several examples of the FOUs considered in this work are depicted in Figure 2.
The following experimental procedure was applied to characterize the performance of the algorithms over each FOU case described above: we increased from 0 to 100 with step size of 10, and then was increased from 100 to 1000 with step size of 100. For each , 2000 Monte Carlo simulations were used to compute and . In order to overcome the problem of measuring very small times, 100.000 simulations were computed in each Monte Carlo trial; thus, the time of a type-reduction computation corresponded to the measured time divided by 100.000.
The algorithms were implemented as C programs and compiled as SCILAB functions. The experiments were carried out over SCILAB 5.3.1 numeric software running over a platform equipped with an AMD Athlon(tm) 64 × 2 Dual Core Processor 4000 + 2.10 GHz, 2 GB RAM, and Windows XP operating system.
4.1.1. Results: Computation Time
The results of computation time for uniform random FOUs are presented in Figure 3. IASC2 exhibited the best performance of all algorithms for between 10 and 100. For greater than 100, KMA2 was the fastest algorithm followed by IASC2. The percentage of computation time reduction (PCTR) with respect to the EKMA (i.e., where and are the average computation times of a particular algorithm and EKMA, resp.) of IASC2 was about 30% for , while in the case of KMA2, the largest PCTR was about 40% for . Note that IASC and EIASC exhibited poorer performance with respect to EKMA when grows beyond 100 points; however EIASC was the fastest algorithm for points. The standard deviation of the computation time for IASC2 and KMA2 was always smaller than that of the EKMA.
Figure 4 presents the results for centered random FOUs. IASC2 exhibited the largest PCTR for smaller than 100 points, about 40%. When was greater than 100, KMA2 was the fastest algorithm. This algorithm provided a maximum PCTR of about 50% for . The standard deviation of the computation time for all algorithms was often smaller than that of EKMA.
In the case of left-sided random FOUs (Figure 5), IASC was the fastest algorithm for smaller than 100 points. This algorithm provided a PCTR that was between 70% and 50%. Here again KMA2 was the fastest algorithm for greater than 100 points with a PCTR that was about 45% for this region. In this case, EIASC exhibited the worst performance and, in general, the standard deviation of the computation time was similar for all the algorithms.
The results concerning right-sided random FOUs are presented in Figure 6. IASC2 was the algorithm that provided the largest PCTR for smaller than 100 points. This percentage was between 55% and 60%. KMA2 accounted for the largest PCTR for greater than 100 points. The reduction achieved by this algorithm was between 50% and 60%. IASC exhibited the worst performance in this case. The standard deviation of the computation time was similar in all algorithms for smaller than 100; however, a big difference with respect to EKMA was observed for greater than 100 points.
4.1.2. Results: Iterations
The amount of iterations required by each algorithm to find was recorded in all the experiments. In Figures 7–10, results for the mean of the number of iterations regarding each FOU case are presented. A comparison of the IASC-type algorithms and also of the KM-type algorithms are provided for discussion.
In the case of a uniform random FOU (Figure 7), IASC2 reduced considerably the number of iterations when compared to the IASC and EIASC algorithms. The percentage reduction was about 75% for with respect to EIASC. On the other hand, no improvement was observed for KMA2 over the EKMA in this case; however, the computation time was smaller for KMA2 as presented in previous subsection.
In the case of a centered random FOU, the IASC2 provided a significant reduction in the number of iterations compared to the IASC and EIASC algorithms, as shown in Figure 8. The percentage reduction was about 88% for with respect to EIASC. Regarding the KM-type algorithms, the KMA2 reduced the number of iterations with respect to the EKMA for smaller than 50 points. However, the performance of KMA2 is quite similar to that of EKMA for greater than 100 points.
Regarding the results from the left-sided random FOU case (Figure 9), an interesting reduction in the number of iterations was achieved by IASC2 compared to the IASC and EIASC algorithms. The reduction percentage is around 90% for with respect to EIASC. KMA2 displayed a reduction percentage ranging from 30% for to 83% for with respect to EKMA.
The IASC2 algorithm outperformed the other two IASC-type algorithms for a right-sided random FOU (Figure 10), as observed in the previous cases. Considering the KM-type algorithms, KMA2 provided the largest reduction in the number of iterations with respect to EKMA for points. The reduction percentage was about 80% in this case. KMA2 also outperformed EKMA for greater resolutions.
We believe that the four experiments reported in this section provide enough data to claim that IASC2 and KMA2 are faster than existing iterative algorithms like EKMA, IASC, and EIASC as long as the algorithms are coded as compiled language programs. The experiments are not only limited to one type of FOU, instead, typical FOU cases that are expected to be obtained at the aggregated output of an IT2-FLS were used. IASC2 may be regarded as the best solution for computing type-reduction in an IT2-FLS when the discretization of the output universe of discourse is smaller than 100 points. On the other hand, KMA2 might be the fastest solution when discretization is bigger than 100 points. Thus we believe that IASC2 should be used in real-time applications while KMA2 should be reserved for intensive applications.
Initialization based on the uncertainty bounds proved to be more effective than previous initialization schemes. This is evident from the reduction achieved in the number of iterations when finding (similar results were obtained in the case of ). We argue that the inner-bound set is an initial point that adapts itself to the shape of the FOU. This is clearly different from the fixed initial points that pertain to EIASC and EKMA, where the uncertainty involved in the IT2-FS is not considered. In addition, a simple analysis of the uncertainty bounds in  shows that the inner-bound set largely contributes to the computation of the outer-bound set, which is used to estimate the interval centroid.
5. Computational Comparison with Existing Iterative Algorithms: Implementation Based on Interpreted Language
5.1. Simulation Setup
The same four FOU cases of the previous section were used to characterize the algorithms implemented as interpreted programs. Since an interpreted implementation of an algorithm is slower than a compiled implementation, the experimental setup was modified. In this case, 2000 Monte Carlo trials were performed for each FOU case; however only 100 simulations were computed for each trial, so the time for executing a type-reduction is the measured time divided by 100.
The algorithms were implemented as SCILAB programs. The experiments were carried out over SCILAB 5.3.1 numeric software running over a platform equipped with an AMD Athlon(tm) 64 × 2 Dual Core Processor 4000 + 2.10 GHz, 2 GB RAM, and Windows XP operating system.
5.2. Results: Execution Time
The results of computation time for uniform random FOUs are presented in Figure 11. KMA2 achieved the best performance among all algorithms with a PCTR of around 60%, and the IASC2 PCTR was close to 50%. The standard deviation of the computation time for the IASC2 and KMA2 was always smaller than that of EKMA. Thus, considering an implementation using an interpreted language, KMA2 should be the most appropriated solution for type-reduction in an IT2-FLS.
Figure 12 is similar to Figure 13. These figures present the results for centered random FOUs and left-sided random FOUs, respectively. KMA2 was the fastest algorithm, followed by IASC2, EIASC, IASC, and EKMA as the slowest. The IASC2 PCTR was almost similar to the KMA2 PCTR for greater than 20, which was about 60%. When , the IASC2 PCTR was about 46%. The standard deviation of computation time was similar for all algorithms for smaller than 300 although it was significantly different with respect to the EKMA for greater than 300 points.
The results with right-sided random FOUs in Figure 14 show that KMA2 was the fastest algorithm in all the cases, followed by IASC2 with a similar performance. The PCTR for greater than 30 was about 76% with KMA2, while, with IASC2, it was about 74% over the EKMA computation time. For the other cases the reduction was around 70% and 64%, respectively. The standard deviation of the computation time for all algorithms was often smaller than that of EKMA.
Two new algorithms for computing the centroid of an IT2-FS have been presented, namely, IASC2 and KMA2. IASC2 follows the conceptual line of algorithms like IASC  and EIASC . KMA2 is inspired in the KM and EKM algorithms . The new algorithms include an initialization that is based on the concept of inner-bound set , which reduces the number of iterations to find the centroid of an IT2-FS. Moreover, precomputation is considered in order to reduce the computational burden of each iteration.
These features have led to motivating results over different kinds of FOUs. The new algorithms achieved interesting computation time reductions with respect to the EKM algorithm. In the case of a compiled-language-based implementation, IASC2 exhibited the best reduction for resolutions smaller than 100 points between 40% and 70%. On the other hand, KMA2 exhibited the best performance for resolutions greater than 100 points, resulting in a reduction ranging from 45% to 60%. In the case of an interpreted-language-based implementation, KMA2 was the fastest algorithm, exhibiting a computation time reduction of around 60%.
The implementation of IT2-FLSs can take advantage of the algorithms presented in this work. Since IASC2 reported the best results for low resolutions, we consider that this algorithm should be applied in real-time applications of IT2-FLSs. Conversely, KMA2 can be considered for intensive applications that demand high resolutions. The following step in this paper will be focused to compare the new algorithms IASC2 and KMA2 with the EODS algorithm, since it demonstrated to outperform EIASC in low-resolution applications .
AppendixThe proof of the algorithm IASC-2 for computing is divided in four parts.(a)It will be stated that Table 1 (21) fixes a valid initialization point.(b)It will be demonstrated that Table 1 (22)–(24) computes the left centroid function with .(c)It will be demonstrated that recursion of step 4 computes the left centroid function with initial point in , and each decrement in leads to a decrement in .(d)The validity of the stop condition will be stated.
Proof. (a) From Table 1 (15)–(21), it follows that
It is clear that in Table 1 (21) corresponds to the minimum of the inner-bound set , so according to (6) . Thus Table 1 (21) provides an initialization point that is always greater than or equal to the minimum extreme point . In addition, It is possible to find an integer so that .
(b) From Table 1 (22), it follows that From Table 1 (23), it follows that Therefore from Table 1 (24)
(c) First we show that recursion computes the left centroid function with initial point and decreasing . Considering Expanding it without altering the proportion It can be observed that (A.10) is a proportion composed by initial values and and two terms that can be computed by recursion and , so Sums are computed by recursion as Since given that in Table 1 (21), iterations decrease from according to (A.10).
It has been demonstrated that (A.14) is the same (A.8) computed recursively from initial point . So, by performing a decrement of in step 5, a decrement is introduced in ; that is,
In , it is demonstrated that Note that is greater than which implies that ; thus from the centroid function properties, it is guaranteed that , satisfying (A.17). Therefore, it can be concluded that a decrement in as (A.15) will induce a decrement in .
(d) The stop condition is stated from the properties of the centroid function. Since the centroid function has a global minimum in , once recursion has reached , will increase in the next decrement of because (A.17) is no longer valid. So by detecting the increment in , it can be said that the minimum has been found in the previous iteration.
Conflict of Interests
The authors hereby declare that they do not have any direct financial relation with the commercial identities mentioned in this paper.
J. Mendel, Uncertain Rule-Based Fuzzy Logic Systems: Introduction and New Directions, Prentice Hall, Upper Saddle River, NJ, USA, 2001.
D. Wu and W. W. Tan, “Computationally efficient type-reduction strategies for a type-2 fuzzy logic controller,” in Proceedings of the IEEE International Conference on Fuzzy Systems, pp. 353–358, May 2005.View at: Google Scholar
K. Duran, H. Bernal, and M. Melgarejo, “Improved iterative algorithm for computing the generalized centroid of an interval type-2 fuzzy set,” in Proceedings of the Annual Meeting of the North American Fuzzy Information Processing Society (NAFIPS '08), New York, NY, USA, May 2008.View at: Publisher Site | Google Scholar
K. Duran, H. Bernal, and M. Melgarejo, “A comparative study between two algorithms for computing the generalized centroid of an interval Type-2 Fuzzy Set,” in Proceedings of the IEEE International Conference on Fuzzy Systems, pp. 954–959, Hong Kong, China, June 2008.View at: Publisher Site | Google Scholar
D. Wu and M. Nie, “Comparison and practical implementation of type-reduction algorithms for type-2 fuzzy sets and systems,” in Proceedings of the IEEE International Conference on Fuzzy Systems, pp. 2131–2138, June 2011.View at: Google Scholar
D. Wu, “Approaches for reducing the computational cost of logic systems: overview and comparisons,” IEEE Transactions on Fuzzy Systems, vol. 21, no. 1, pp. 80–90, 2013.View at: Google Scholar