|Computers, Materials & Continua |
Optimization of Interval Type-2 Fuzzy Logic System Using Grasshopper Optimization Algorithm
1Institute of Computing, Kohat University of Science and Technology, Kohat, Pakistan
2Department of Mechanical, Materials and Manufacturing Engineering, Faculty of Engineering, University of Nottingham, UK
3College of Computer Sciences and Mathematics, Tikrit University, Iraq
4Division of Information and Computing Technology, College of Science and Engineering, Hamad Bin Khalifa University, Qatar
5Department of Computer Science, Sir Syed University of Engineering and Technology, Pakistan
6Institute of Numerical Sciences, Kohat University of Science and Technology, Kohat, Pakistan
*Corresponding Author: Samir Brahim Belhaouari. Email: email@example.com
Received: 24 July 2021; Accepted: 06 October 2021
Abstract: The estimation of the fuzzy membership function parameters for interval type 2 fuzzy logic system (IT2-FLS) is a challenging task in the presence of uncertainty and imprecision. Grasshopper optimization algorithm (GOA) is a fresh population based meta-heuristic algorithm that mimics the swarming behavior of grasshoppers in nature, which has good convergence ability towards optima. The main objective of this paper is to apply GOA to estimate the optimal parameters of the Gaussian membership function in an IT2-FLS. The antecedent part parameters (Gaussian membership function parameters) are encoded as a population of artificial swarm of grasshoppers and optimized using its algorithm. Tuning of the consequent part parameters are accomplished using extreme learning machine. The optimized IT2-FLS (GOAIT2FELM) obtained the optimal premise parameters based on tuned consequent part parameters and is then applied on the Australian national electricity market data for the forecasting of electricity loads and prices. The forecasting performance of the proposed model is compared with other population-based optimized IT2-FLS including genetic algorithm and artificial bee colony optimization algorithm. Analysis of the performance, on the same data-sets, reveals that the proposed GOAIT2FELM could be a better approach for improving the accuracy of the IT2-FLS as compared to other variants of the optimized IT2-FLS.
Keywords: Parameter optimization; grasshopper optimization algorithm; interval type-2 fuzzy logic system; extreme learning machine; electricity market forecasting
The ability of processing noisy and uncertain data has made the use of fuzzy sets in numerous applications a vital option. One such application is the fuzzy logic system (FLS) that is solving prediction, classification and control problems effectively. Initial version of the FLS, known as type-1 fuzzy logic system (T1-FLS), is based on fuzzy set that has crisp membership values. Modification and extension to the fuzzy sets were mainly studied over the past few decades. These include interval-valued fuzzy set , general Type-2 fuzzy set  and interval T2-fuzzy set . Type-2 fuzzy logic system (T2-FLS) with the presence of footprint-of uncertainty can model and handle the uncertainty very well . However, current research of the T2-FLS has been dominated by the research applications of IT2-FLS, due to its simpler structure and reduced computational cost, as compared to a general T2-FLS . Fuzzy membership functions like Gaussian, triangular and trapezoidal are used to define a fuzzy set. Every membership function has its own parameters to be selected for defining fuzzy rules. T1-FLSs use crisp values of these parameter, however, using an exact membership value for may not be the best way to deal with uncertainty in data. A T2-FLS with fuzzy membership functions can handle any type of uncertainty by the concept of blurring a T1 membership function. However, this blurring approach to form a secondary membership, the third dimension, in T2-FLS is a complex and computationally expensive task. Instead of fuzzy or blur membership, IT2-FLS uses interval values for membership function parameters, ignoring the third dimension of the T2-FLS, that eventually simplifies the computation. The rules (If-then parts), shape and operators are different components of a FLS that is described as the fuzzy system's parameters. Learning of these parameter is needed to be adaptively constructed in order to handle the prevailing uncertainties and imprecision of nonlinear dynamic systems. Among various approaches to handling uncertain data, it is observed that most studies on IT2-FLSs are confronted with determining the optimal parameters .
Generally, both premise part and consequent part of a FLS can be optimized, however; optimization of the parameters of a fuzzy inference has attracted much attention of the research community . Fuzzy inference system (FIS) consists of if-then rules that represent the antecedent part (AP) and the consequent part (CP), respectively. Artificial neural networks being the simplest method has been utilized to determine the FIS , however, such neuro-fuzzy model does not guarantee the convergence and/or effectiveness of the optimal FIS. In order to tackle this issue, optimization of the FIS was tackled by incorporating the population information of the evolutionary algorithms . T1 and T2-FLS have a history to be optimized with various population based optimization algorithms, for example, some of the recent work of these optimization algorithms can be found in [8–10]. Likewise, appropriate parameters and structure of the IT2-FLS can also be optimized using different optimization algorithms. A general framework for the design of IT2-Fuzzy controllers based on various bio-inspired algorithms was presented in . A concise review of bio-inspired algorithms namely particle swarm optimization (PSO), genetic algorithm (GA) and Ant colony optimization to tune IT2-FLS parameters for different applications can be found in . Optimization of an IT2-FLS has also been carried out using artificial bee colony (ABC) optimization , PSO , and Cuckoo search algorithm . A comparative analysis of two optimized IT2-FLS with the randomly and manually generated parameters of IT2-FLS was presented in  with noise-free and noisy Mackey-glass time series prediction. The results revealed better performance of the optimized IT2-FLS with noisy dataset as compared to other approaches. Grasshopper optimization algorithm (GOA) is a newly proposed  population based meta-heuristic algorithm that mimics the swarming behavior of grasshoppers in nature. The main feature of GOA is the movement of swarm, which is defined based on the position of all individual grasshoppers in the swarm. GOA for various optimization problems has shown its efficiency as compared to existing optimization algorithms. A GOA based parameter optimized PI controller has proved its enhanced performance over PSO and Whale optimization algorithm based controller . Kernel function and penalty factor of a support vector machine (SVM) was optimized using GOA and was evaluated for a regional power load forecasting .
Our previous works presenting hybrid intelligent approaches to tune the parameters of IT2-FLSs are hybrid of ABC and extreme learning machine (ELM)  and hybrid of GA and ELM . Hybrid methods demonstrate superior performance as an intelligent optimizer is used for AP and a computational approach is utilized to train the linear parameters. Use of hybrid methods makes it possible to skip local minima which naturally exist when optimizing the AP. Hybrid algorithms have already shown their superior priority over several other state-of-the-art optimization algorithms in literature including PSO , discrete heuristic particle swarm ant colony optimization , mine blast algorithm , and symbiotic organisms search . The probability of this heuristic approach to deal with local minima is investigated in different benchmark optimization problems including convex optimization problems, non-convex optimization problems, and the ones with several local minima . The superior performance of the GOA over other optimization algorithm has motivated us to propose a new variant of our previous work, where the Gaussian membership function parameters are optimized using GOA for the electricity load and price forecasting.
This paper presents hybrid of GOA and ELM to tune the parameters of the IT2-FLS. The GOA is for the first time used to optimize the APs of an IT2-FLS. Optimization of the CPs using ELM (IT2FELM) can be seen in  with random generated APs. This research work is the continuation of our previous work , where GA and ABC were utilized for the parameter optimization of the IT2FELM.
The structure of the rest of this paper is as follows. The background studies of the methods used is given in Section 2. Methodology of the proposed hybrid learning algorithm is presented in Section 3. Data and results are discussed in Section 4. The paper is concluded with some remarks and recommendation in Section 5.
This section defines IT2-FLS including some relevant concepts along well defined mathematics are provided so as to report these sets in an effectual manner. In order to begin, the taxonomy of T1 fuzzy set followed by T2 fuzzy set expressed mathematically so as to facilitate the discussion of this article.
Definition 1. IF is a collection of objects denoted generically by x, then a fuzzy set F in X is defined as . is the membership function (MF) and the degree of membership of x in F is , .
Definition 2. A type-2 fuzzy set, denoted by is characterized by a type-2 membership function , where and , i.e.,
in which . When is continuous then can be expressed as
where denotes union over all admissible x and u.
is known as the primary MF of x in . At each value of x say , the two-dimensional plane, whose axes are u and , is called a vertical slice of . A secondary MF is a vertical slice of . It is for and , i.e.,
Because , the prime notation on can be referred to as a secondary set .
Definition 3. The Interval Type-2 (IT2) Fuzzy Sets is a special case of T2 fuzzy set. A T2 fuzzy set with a uniform secondary MF is called an IT2 fuzzy set, i.e., for all . IT2 fuzzy set in accordance to Eq. (2) can be expressed as
The uncertainty in the IT2 fuzzy set due to the presence of an upper MF and lower MF called the footprints of uncertainty (FOUs) and are denoted by and (e.g., see Fig. 1b). It is the Union of all primary MFs.
2.1 Interval Type-2 Fuzzy Logic System
The idea of Fuzzy Set Theory was given by Zadeh  to cater the ambiguities and uncertainties present in real world problems. Elements belong to a set based on the MF which gives real values in interval [0,1]. Since the introduction, fuzzy sets faced criticism that MF used in traditional or T1 fuzzy set are not fuzzy numbers so there is no uncertainty in that and thus opposing the concept of fuzzy logic. To address the issue Zadeh  proposed another type of fuzzy sets which he called T2 fuzzy set. A T2 fuzzy set handles this issue by incorporating fuzziness or uncertainty in the MF. A T2 fuzzy set has a MF which is fuzzy and has three dimensions. Membership of each element of this fuzzy set is itself another fuzzy set in the range [0,1]. This third dimension in T2 fuzzy set provides extra degree of freedom to cater additional information about the value. These fuzzy sets are used when it becomes difficult to find out exact MF of a fuzzy set. The IT2-FLS are computationally less expensive as compared to general T2-FLS as the secondary MF of IT2 MF is equal to 1. The structure of an IT2-FLS is given in Fig. 2.
The fuzzifier in an IT2-FLS maps an input vector into d IT2 fuzzy sets . In order to choose the type of MF, Gaussian MF is preferred as it cover the entire input domain and hence guarantee continuity during the input-output mapping. A Gaussian MF with a fixed mean and uncertain standard deviation is considered here :
where mean and spread of the Gaussian MF are represented by , respectively. of Eq. (5) has upper MF, , and lower MF, , as follows:
A TSK fuzzy rule () in the rule set with N rules of an IT2-FLS can be expressed as :
: IF is is is THEN
where and are crisp numbers. The total firing interval of the IT2 fuzzy set is described as:
The output of the THEN-part (consequent part) of the rule is a crisp value that can be written as:
The output sets received from the rule firing interval and the corresponding rule consequents are IT2 fuzzy sets. A Type reducer computes the IT2 fuzzy sets using
The Karnik-Mendel (K-M) algorithm  as a centroid type reduction is used to obtain T1 fuzzy sets. Finally, the crisp output for each output variable can be obtained during defuzzification as:
2.2 Grasshopper Optimization Algorithm (GOA)
The Grasshopper Optimization Algorithm (GOA) is a modern steepest meta-heuristic optimization algorithm based on natural swarms of grasshoppers. The two aspects of any metaheuristic algorithm are exploration in which the agents freely move to explore the search space and exploitation where the neighborhood is exploited to reach optimal solution [17,29]. The basic inspiration of GOA mimics two concepts of grasshopper swarm; the first is the slow motion of grasshopper larvae swarms in order to find the food and exploit the region fully, the second is the adult grasshoppers which move quickly and suddenly by individuals or swarms to explore to find new places contains food. The principles of exploration and exploitation are thus implemented in GOA in this way. The mathematic model of GOA is described below: If the current position of the ith grasshopper in swarm is represented by , the social interaction of grasshopper as , the gravity force on ith grasshopper as and the wind advection as than
The social interaction between the grasshopper and grasshopper with the Euclidian distance in Eq. (13) is calculated as:
where represents a unit vector for distance between and grasshopper. The strength of social forces s with intensity of attraction f and attractive length scale l is calculated as a function as follows
Similarly, the gravity component G of Eq. (13) with the gravitational constant g and a unity vector towards the center of earth is computed as:
The last component wind direction in Eq. (13) with a constant drift u and a unity vector in the direction of wind is calculated as follows
Substituting Eqs. (14), (16) and (17) in (13) the extended form of is obtained as follows
Since various grasshoppers reach the comfort zone very soon and contribute less towards optimization so the Eq. (18) cannot be used directly. To solve the issue of optimization for comprehensive convergence, i.e., the arrival of grasshopper flock to the goal and converge there in the target area, the previous equation can be modified as
where , are the upper and lower bound and is the target value in the dimension. The parameter c is called a decreasing coefficient and it is responsible for reducing the comfort zone, repulsion zone and the attraction zone. c it is calculated as follow
where l is the current iteration, , are the maximum and minimum value which are assume in the begining and the L is the maximum number of iterations. It is evident from Eq. (19) that for every grasshopper agent the next position is determined by using the current position of agent along with target position and other agents’ positions. Eq. (19) also shows that the first component takes into account the position of current agent with respect to other agent. Moreover, the positions of all agents are taken into account for defining positions of search agents around the target.
2.3 Extreme Learning Machine (ELM)
ELM as a tuning-free algorithm for SLFN was proposed in , where the input weights and hidden biases are chose randomly. Brief mathematics of ELM for SLFNs is described as follows.
Given an arbitrary D training samples , where and , the output of an SLFNs with hidden nodes and activation function is modeled as:
where and are parameters of the activation function . Eq. (21) in a matrix form can be rewritten as:
Here is known as the hidden layer output matrix generated randomly with parameters and . is the output weight matrix, is the transpose of vector . An optimal solution of under the constraint of minimum least square and of the linear system in Eq. (22) can be calculated as
where is the Moore-Penrose generalized inverse of matrix .
3 Methodology of the Hybrid Learning Algorithm (GOAIT2FELM)
The AP parameters appear nonlinearly in the output and the CP parameters appear linearly. The problem which is addressed in this paper involves the training of IT2-FLS parameters using hybrid of GOA and ELM. The proposed hybrid learning algorithm tune the CPs using ELM with randomly generated APs initially. The APs are then encoded in a population of artificial swarm and optimized using GOA in the direction of having best candidate solution. Fig. 3 shows the flowchart of the design of IT2-FLS using hybrid learning algorithm of GOA and ELM. As can be seen from the flowchart, the proposed estimation method is mainly an iterative approach in which the parameters which appear non-linearly in the CP are trained using GOA and the linear parameters are trained using ELM.
3.1 Data Preprocessing and Input Selection
The data pre-processing techniques reduces the complexity in data, and will enable the Proposed models trained with this data to exhibit better predictive performance. Data is normalized in a range between [0,1] using the following equation
where represents the normalized data. The data sets used are divided into two sets of training and testing. Training data set is used during the training of proposed model whereas the model performance is evaluated with the testing data set. The proposed model utilizes multi-inputs to the system. A partial autocorrelation analysis is utilized as input-selection method, that selects the influential inputs for a model. The time-delays of the data set which have significant coefficients are selected as inputs to the model.
3.2 Structure of the Interval Type-2 Fuzzy Logic System
The hybrid learning algorithm is proposed for a TSK based IT2-FLS. The IT2-FLS described in Section 2.1, also known as A2-C1, is utilized here to approximate the input-output relationship of the problem. Here “A” and “C” are short for antecedent and consequent, respectively. This indicates that the Aps of this IT2-FLS are T2FSs and the CP are T1FSs.
3.3 Antecedent Parameter Generation Using GOA
The IT2 Gaussian MF with uncertain standard deviation and fixed mean are the parameters that need to be learnt using GOA. Therefore, these APs are encoded into a swarm of artificial grasshopper and computed using Eqs. (13), (14), (16) and (17). While learning any fuzzy system, encoding of the parameters into corresponding optimization algorithm is the main task. The APs here are encoded as the population of grasshopper. Let ), represents the grasshopper in the population. Then can be initialized randomly as:
where P, d and M are the population size, number of inputs and number of membership functions, respectively. Considering the three parameters of the IT2 Gaussian MF, the total length of the solution size becomes . Encoding of the IT2 fuzzy APs into a population of grasshopper in a vector form is represented in Eq. (29) and is illustrated in Fig. 4 as follows:
3.4 Consequent Parameter Tuning Using ELM
In order to determine rule consequent in the hybrid algorithm GOA-ELM, ELM is employed as in [24,32]. Setting and tunning of the CPs are done accordingly as our previous work .
3.5 Cost Function
With the aim of learning the APs of the IT2-FLS, fitness of the individual grasshopper population is evaluated with a cost function in the hybrid learning algorithm. Lower the value of the cost function higher will be the fitness of the candidate solution. Individual swarm of grasshopper produces a modification on the IT2 fuzzy Aps in each iteration and evaluate it with the RMSE (Eq. (31)) as a cost function.
In order to verify, performance of the proposed hybrid learning algorithm, test data-set is used and evaluated with the following error-based measures.
where N is the size of test data-set. is the actual output and is the forecasted output.
4 Simulation Results
The comparative study of the proposed hybrid GOAIT2FELM vs. current state-of-the-art hybrid intelligent methods including the original version of IT2FELM for the electrical load demand prediction and its price prediction are presented in this section. The First problem is to find an IT2-FLS which predicts the behavior of electrical energy price at Victoria region. The dataset is collected from the Australian National Electricity Market (NEM) which include six months of data. The data samples are treated as a time series whose future values are solely dependent upon its current and past values. The total number of samples in this dataset corresponds to Jan-2019 to June-2019. The percentage of this dataset used for training and testing are and , respectively. As the second real-world prediction example, the electrical load forecasting problem for Queensland region over six months period time is considered. The dataset in this case is available from Jan-2019 to June-2019. The electrical power price values associated with this dataset are predicted as the third dataset. The total number of samples in this dataset corresponds to the same dates as the previous two dataset. The split percentage for this dataset is considered to be the same as the previous two dataset as well.
The proposed hybrid training method based on GOA is compared against other hybrid training methods of ABCIT2FELM , GAIT2FELM  as well as original version of IT2FELM .
4.1 Electrical Power Price at Victoria Region
The overall number of training samples for this case study is of the whole dataset consist of samples, and number of samples are used for testing. The data sample split ratio between train and test samples is . The data is treated as a time series whose future minute value depends on the current and three consecutive previous delayed values of data with the same sample time of minutes.
Tab. 1 presents statistical values corresponding to the dataset which shows that the electricity power price at Victoria region covers a wide range of real values with its minimum value and its maximum value being equal to and , respectively. The standard deviation value associated with data is which shows that data varies highly around its mean value.
Tab. 2 presents the parameter values associate with ABCIT2FELM, GOAIT2FELM and GAIT2FELM for performing optimization. It is clear from these values that the population size and the number of epochs are kept the same for all algorithms. This is mainly because the population size and number of iterations in these algorithms plays an important role in the analysis. The experiments are conducted times and mean values and standard deviations are reported in Tab. 3. The comparisons are made in terms of RMSE and SMAPE obtained for all algorithms. The results obtained in Tab. 3 for the proposed algorithm outperforms other investigated algorithms including IT2FELM, GAIT2FELM, and ABCIT2FELM in terms of the mean value of the results as well as the consistency of the results which is demonstrated by the standard deviation of the results. The performance of the proposed predictor is demonstrated in Fig. 5. It can be seen that the results of IT2FELM are the furthest signal from the original data. This is mainly because this algorithm does not provide any tool to estimate the APs. This is the main motivation for the use of nonlinear optimization techniques for these parameters. However, among the three approaches used to optimize the APs including ABC, GA and GOA, the results obtained by GOA are the closest to the target electrical power prices. The histogram of error associated with the proposed algorithm is presented in Fig. 6 which shows that error values follow a Gaussian histogram. This type of histogram is desirable and validates the results obtained using the proposed algorithm.
4.2 Electrical Power Load Demand at Queensland Region
As the second dataset, electrical power load demand at Queensland region is predicted using the proposed approach. The overall number of samples for this case study is which split into train and test data samples with ratio of 70/30 for train and test data samples. Similar to the previous case, data is treated as a time series whose future minute values depend on the current and three consecutive previous time delayed values of data.
The statistics associated with this dataset are presented in Tab. 1. The minimum value associated with this electricity load demand is and its maximum is . The mean value and the standard deviation of this load demand are and , respectively. Hence similar to the previous case, this dataset is a highly varying dataset.
Tab. 4 presents the comparison result between the proposed algorithm and ABCIT2FELM, GAIT2FELM, and IT2FELM. The proposed algorithm outperforms the other mentioned algorithm (reported in Tab. 4.) except GAIT2FELM both in terms of mean values and standard deviations of RMSE as well as SMAPE. This means that not only the proposed approach acts better than the two other methods but also it is more consistent. Forecast performance of the proposed algorithm vs. ABCIT2FELM, GAIT2FELM and IT2FELM are presented in Fig. 7. Forecasting with good performance can be seen in Fig. 7.
Fig. 8 demonstrates the probability distribution function of the error associated with the proposed GOAIT2FELM. As can be seen from the figure that the probability distribution function of error is close to a Gaussian function which is highly desirable.
The evolution of RMSE during the optimization using the proposed GOAIT2FELM vs. other two algorithms of ABCIT2FELM and GAIT2FELM is depicted in Fig. 9. The evolution of the proposed approach is faster that the other two optimization algorithms.
4.3 Electricity Power Price at Queensland Region
As the third dataset, electricity power price at Queensland region is predicted using the proposed approach. Similar to the previous two cases, the total number of samples in this case is equal to which split between train and test data samples of 70/30. The inputs taken for the predictor are similar to the previous case, i.e., taking the future 30 min values to be dependent upon the current and three consecutive previous time delayed values of data with the sample time of minutes.
The statistics specification of electricity power price in Queensland region are presented in Tab. 1. These statistics show that this dataset is a highly varying dataset with its minimum value equal to and its maximum being equal to . The mean value and the standard deviation of this electricity price dataset are and , respectively.
Tab. 5 illustrates the comparison result between the proposed algorithm and ABCIT2FELM, GAIT2FELM, and IT2FELM in terms of RMSE and SMAPE. Tab. 5 reports that using GOAIT2FELM, it is possible to forecast data with higher performance in terms of mean values and standard deviations over 10 times of run of programs. It is further noticed during simulation that IT2FELM failed to perform the optimization in one run over times run of programs which resulted in a very large RMSE. Overall Tab. 5 shows that the proposed approach acts better than the three other methods and it is a more consistent algorithm. Hence, it is expected that the proposed approach result in a superior performance than the other two approaches in every single run of program with a high probability. Forecast performance of all algorithms are presented in Fig. 10. It can be seen that the proposed model's prediction is achieved with high performance . Moreover, it can be inferred from Fig. 10 that the results obtained by IT2FELM are the furthest from the electrical power demand at Queensland area. This result is what we expect from this training algorithm as it does not provide any means to estimate the AP parameters.
Probability distribution function associated with the proposed GOAIT2FELM is presented in Fig. 11 which demonstrates the probability distribution function of the error associated with the proposed GOAIT2FELM has the properties of a Gaussian function which basically having a very large value close to its mean value and gradually decreases to a very small value.
The general trend of RMSE during the optimization using the proposed GOAIT2FELM vs. other two algorithms of ABCIT2FELM and GAIT2FELM is depicted in Fig. 12. This shows that the proposed approach is faster that the other two optimization algorithms as well.
A hybrid parameter estimation method is proposed for IT2-FLSs which is a modified version of IT2FELM. IT2FELM is a two stage parameter estimation algorithm for the parameters of IT2-FLSs. However, IT2FELM does not include any means to estimate the AP parameters of IT2FELM. In this paper, GOA which is a recent optimization algorithm is used for the AP parameters and IT2FELM is used for the CP parameters. Simulation results demonstrate that using GOA for the AP parameters improves the the overall prediction performance using IT2-FLSs. The proposed hybrid algorithm is called GOAIT2FELM and is compared with ABCIT2FELM, GAIT2FELM and IT2FELM. The proposed algorithm is used for the prediction problem of electricity power price of Victoria region in Australia, electricity load demand for Queensland region and electricity power price of the same region. The simulation results demonstrated the superior performance of the proposed approach over ABCIT2FELM, GAIT2FELM and IT2FELM on these applications in terms of RMSE and SMAPE. Not only the results obtained using the proposed approach are better than that of the three other algorithms, they are more consistence which means that in future trials, it is expected to gain superior performance in a single run of the algorithm. The evolution of the proposed GOAIT2FELM is compared against the two estimation algorithms namely ABCIT2FELM and GAIT2FELM which shows that the speed of the convergence of the proposed algorithm is higher than the two other investigated algorithms namely ABCIT2FELM and GAIT2FELM.
Funding Statement: The publication of this article is funded by the Qatar National Library. The authors would like to acknowledge the library for supporting the publication of this article.
Conflicts of Interest: The authors declare that they have no conflicts of interest to report regarding the present study.
|This work is licensed under a Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.|