Modeling Renewable Energy Systems by a Self-Evolving Nonlinear Consequent Part Recurrent Type-2 Fuzzy System for Power Prediction

: A novel Nonlinear Consequent Part Recurrent Type-2 Fuzzy System (NCPRT2FS) is presented for the modeling of renewable energy systems. Not only does this paper present a new architecture of the type-2 fuzzy system (T2FS) for identiﬁcation and behavior prognostication of an experimental solar cell set and a wind turbine, but also, it introduces an exquisite technique to acquire an optimal number of membership functions (MFs) and their corresponding rules. Using nonlinear functions in the “Then” part of fuzzy rules, introducing a new mechanism in structure learning, using an adaptive learning rate and performing convergence analysis of the learning algorithm are the innovations of this paper. Another novel innovation is using optimization techniques (including pruning fuzzy rules, initial adjustment of MFs). Next, a solar photovoltaic cell and a wind turbine are deemed as case studies. The experimental data are exploited and the consequent yields emerge as convincing. The root-mean-square-error (RMSE) is less than 0.006 and the number of fuzzy rules is equal to or less than four rules, which indicates the very good performance of the presented fuzzy neural network. Finally, the obtained model is used for the ﬁrst time for a geographical area to examine the feasibility of renewable energies.


Introduction
Renewable energy is expanding rapidly around the world. There are two main reasons for this: one is the issue of fossil fuel pollution and the other is the high cost of fossil fuels. Therefore, research in this field should be developed and supported. One of the powerful tools in data analysis and inference is computational intelligence. Neural networks share lots of significant benefits such as landmark computation ability, parallel processing and adaptation. The fuzzy systems are able to utilize the expert knowledge entitled "if-then rules" and possess actual parameter concepts. As is well known, mathematical modeling is a substantial preliminary step in many control issues. On the other hand, prediction, simulation and modeling of complicated systems established upon physical and chemical principles appear industrious in such a way that they will not yield consolidated mathematical forms [1]. One may suggest system identification as a solution to cope with this problematic issue. This method puts the mathematical equations at the access point, utilizing input-to-output data analysis to increase the efficiency of dynamic process calculations [2]. Computational intelligence lies among the most efficient methods with excellent fulfillment. Many papers have recently been published on fuzzy modeling and identification. Nonlinear system identification, founded on fuzzy and neuro-fuzzy models, was surveyed [3]. Computational intelligence becomes extremely feasible in the area of renewable energy [4]. For design MPPT control [5], solar water heater selection [6], photovoltaic system failure diagnosis [7] and solar power plant location alternatives [8], computational intelligence has been used. Neural networks were also used by Grahovac et al. [9] in order to model and anticipate bio-ethanol generation from the intermediates and byproducts yielded in the beet-to-sugar procedure. The productivity of the neurofuzzy controller in extraction of the maximum yield by flow and energy optimization was demonstrated by Khiareddine et al. [10] in comparison with fuzzy and algorithm controllers. It was asserted that the neuro-fuzzy control system is worthy of being executed in an experimental setup in Tunisia. Ocario et al. [11] testified wind power forecasts in the Portuguese system, exploiting a novel hybrid evolutionary-adaptive methodology. Etemadi et al. [12] predicted the wind power produced by data-driven fuzzy modeling.
Type-2 fuzzy (T2F) logic, which appears more capable and flexible in comparison to type-1, has been investigated for the last ten years. A novel method was suggested for general T2F clustering by Doostparast et al. [13]. Some other applications of T2F sets can be found in textile engineering [14] and aerospace engineering [15]. Fuzzy c-means clustering and high order cognitive map were exerted by Lu in order to model and predict time series by T1FS [16]. T2FS identification has engrossed many researchers [17][18][19][20][21][22][23]. Abiyev et al. [17] took advantage of T2F clustering to organize construction of a wavelet TSK-based T2FS. They brought forth an adaptive law to update the parameters of the antecedent part and ultimately, they employed a gradient learning algorithm to bring parameters of the descendant part up to date. T2FSs were applied for elicitation of fuzzy rules and casting derogatory features off [24]. The proposed mechanism took advantage of the self-evolution capability in such a way that identification of the integral structure of the network would become efficient and there would be no requirement for initial start-up of the network structure. The antecedent part and modulation parameters are trained in order to hold parameter learning in the network true, utilizing back-propagation errors. Tuning parameters of the resultant part, the rule-ordered Kalman filter algorithm assists in network sharpness amelioration. The genetic algorithm [25] and PSO [26] are among the learning mechanism of T2F neural networks which have been conversed and scrutinized so far. Research development on T2F systems has brought about their vast usages in various fields such as time-series prediction [27], DC motor control [28], clinical practice guideline encryption [29], pattern recognition [30], robot control [31] and control of nonlinear systems [32,33]. A new smart type of reduction is held forth in [34]. A T2FS is optimized by its type-1 counterpart in [35]. The learning process was held true, merging and extending the type-1 membership functions. Henceforth, the novel constructed T2FS went under implementation on a programmable chip.
It is worth noting that most of the control engineers and system analyzers consider actual systems represented in nonlinear dynamics; not only do these system outputs momentarily turn dependent upon the input, but also, they appear reliant on the delayed inputs/outputs. This leads to a responsible consideration of both external and internal dynamics as a non-negligible essential remark in system modeling. Delayed inputs/outputs have to be used in external dynamics. Another feedback, denoted as "recurrent neuron", has to be exerted in internal dynamics. Wu et al. [36] presented the solution of recurrent FSs for problematic classification. Not only does this paper contribute to minimization of the cost function utilizing a recurrent fuzzy neural network, but it also proposes maximization of the discriminability of adopting a novel approach. Some modern recurrent fuzzy systems are presented in [37]. This special kind of neural network in the resultant part functions input variables in a nonlinear manner. There have hardly been any studies on recurrent T2F systems so far. Some of them are surveyed in the following. A contributive recurrent interval T2FS is presented in order to identify nonlinear systems in [30]. The novel technique requires initial information about plant order and input numbers as well.
Furthermore, the convergence issue in the learning algorithm is not taken into consideration and conversed even theoretically. Juang et al. [15] put forth another contributive recurrent T2F neural network to model dynamical systems. There is not any rule pruning, which leads to extremely overlapped fuzzy sets. Soft switching of the nonlinear model is superior to the linear one in order to identify nonlinear systems [1]. Consequently, our suggested technique is established upon the nonlinear resultant part in fuzzy rules. Rarely may one find comprehensive works on nonlinear consequent parts in fuzzy systems; however, some of the studies in this arena are shortly surveyed in the following. A reduction in the number of rules was carried out by Moodi in a fuzzy system using the TSK fuzzy model accompanied by a nonlinear consequent part [38]. The result of a rule is supposed to comprise a linear term and a nonlinear one. In their attempts, the numerous rules decrease and model precision simultaneously shows an increase at the cost of complication abundance in the fuzzy model. The NFNN was constructed applying fuzzy rules which merge nonlinear functions. The linear consequent part requires more rules to achieve the desired precision during the modeling of complicated nonlinear processes. The increasing number of rules represents the increasing number of neurons [39]. Some recent works on T2F neural networks can be seen in many applications such as 2DOF robot control [40], 3 parallel robots control [41], PMSM control [42], water temperature control [43,44], environmental temperature control [45] and UAV control [46]. Tavoosi and Badamchizadeh [47] proposed a T2S with linear "then part" for dynamic modeling. Their pivotal contribution was rule pruning in such a way that an increase in learning speed would be targeted to attain a reduction in the parameters in both MF parameters and descendant parts. Tavoosi et al. [48,49] have made another contribution to the issue, bringing forth a novel technique for analyzing the stability of one class of T2F systems. Another analysis method for stability was also suggested by Jahangiri et al. [50]. Suratgar and Nikravesh [51] proposed a modern technique of fuzzy linguistic modeling as well as integral stability analysis. In [52], a fuzzy neural network has been used for wind speed forecasting. In [53], a comparison between ANFIS and an autoregressive method for wind speed/power prediction has been performed. In [54], a fuzzy control on the basis of a predictive technique for a governing system has been presented. In [55], a multilayer perceptron is combined with an adaptive fuzzy system to forecast the performance of a wind turbine. Some disadvantages and shortcomings of the works studied above are: lack of convergence proof, long training time (not usable in online applications), high complexity of the model, lack of proper accuracy. On the other hand, so far, no applied research has been conducted to use renewable energies in the Ilam region. Unfortunately, there are no wind turbines in this area, and solar cells have also not been used on a large scale to supply electricity to a neighborhood or even several houses. Due to this issue, the main innovation of this paper is the feasibility study of new energy use in the Ilam region.
Therefore, this paper proposes NCPRT2FS for nonlinear system identification. The nonlinear systems here are the same as solar cells and wind turbines. The objective of identifying the system is to use it to specify the efficiency of the renewable energy system in the Ilam region. The innovations of this article are as follows: (1) Using a nonlinear consequent part in the rules. (2) Introducing a new mechanism in structure learning. (3) Using an adaptive learning rate (different from the other studies in the literature). (4) Convergence analysis of the T2F neural network learning algorithm. Finally, (5) New optimization techniques (including pruning fuzzy rules, initial adjustment of MFs, etc.). The paper is divided into six sections. Section 2 presents a short surveying of T2F logic. Section 3 entails an inspection of the structure of NCPRT2FS. The learning convergence of NCPRT2FS is subsumed relying upon Lyapunov theory in Appendix A. Section 4 presents simulative identification studies, taking into account a solar photovoltaic cell and a wind turbine as the case studies and utilizing their experimental data.

A Review on T2FSs
Firstly, Zadeh brought forward type-1 fuzzy logic, and introduced the T2F logic in order to provide solutions to some problems of type-1 ten years later. He deemed a fuzzy set where its MF was fuzzy and entitled a "type-2 fuzzy set". T2F sets may typically be exploited when the determination of accurate membership function becomes arduous. For instance, some time series predictions lie among problematic cases, which necessitate the usage of T2F sets. Hence, exploiting T2F sets emerges as advantageous in order to describe some system behaviors.
Certain defects with type-1 fuzzy sets were scrutinized by Castro et al. [56]. Research on T2F systems was limited before the years of 1998. Critical and controversial questions and debate on T2F logic and its usage commenced after publication of a book which contained the solidarity and intersection of T2F sets [57]. Extensive information on T2FS computation, such as defuzzification and type reduction, was suggested by Mendel [58]. A general T2F set, A, may be specified by (1): denotes a secondary membership. The primary and secondary MFs in Gaussian form are illustrated in Figure 1. Note that the secondary MFs lead to interval T2F ones, while f x (µ) = 1 , ∀µ ∈ J x ⊆ [0, 1]. For more explanation, a crisp number would be fuzzified in two stages supposing that Gaussian MF was exerted to attain a T2F number. First, where µ 1 is the primary membership and M and σ x are the primary mean and spread of Gaussian MF, respectively; then, where µ 2 (x, µ 1 ) is the secondary degree, a ∈ [0, 1] is the domain of the secondary MF for each x, and σ m is the secondary spread of the Gaussian MF.
Simple and special kinds of general T2F sets change the same as the interval T2F one. Figure 2 depicts two interval T2F sets. A fuzzy set specified by a Gaussian MF by mean/width m/[σ 1 , σ 2 ] is demonstrated in Figure 2a. Two T2F sets are given in Figure  2. Figure 2b illustrates a fuzzy set with an MF of Gaussian form encompassing a distinct standard deviation of σ. However, the mean value is quite uncertain and adopts values in the interval of [m 1 , m 2 ]. An MF of Gaussian form with determined σ and uncertain m, as seen in Figure 2a, is applied through all of this paper.

Type-2 Fuzzy Systems
One may gain a certain number by defuzzifying a T1FS [59], whereas T2FS yields a T2F set. This is the reason one has to endeavor to succeed in the reduction in fuzzy set type from two to one in a process entitled "Type Reduction". The process is a challenging issue of high significance in T2F systems [60]. Figure 3 displays the structure of a T2F system. As can be easily grasped through Figure 4, construction of the T2FS will be the same as the organization of type-1 if the "Type-Reduction" block is neglected.

The Proposed NCPRT2FS
Section 3 tries to consolidate the nonlinear descendant or resultant part of recurrent T2F systems into a formula. Taking into account two informative and useful points that are mentioned later, the descriptive equation of (1) establishes the kth rule:
This study recommends a novel NCPRT2FS, of which its total construction is illustrated in Figure 4. As one may see, the system clearly embodies seven layers. Generally speaking, the kth rule would be demonstrated in the following terms in a first-order T2FS with a TSK model by M rules and n inputs: R k : i f x 1 is A k 1 and . . . and x n is A k n then y k = C k,0 + C k,1 x 1 + . . . + C k,n x n where k = 1, . . . , M is the number of rules, x i (i = 1, . . . , n) are inputs, and y k is the output of the kth rule. y k is an interval T1F set and A k i are antecedent sets; C k,i ∈ [c k,i − s k,i , c k,i + s k,i ] represent consequent sets, where c k,i represents the center of C k,i and s k,i is the spread of C k,i .
In this paper, the nonlinear consequent part is taken into account. The resulting kth rule in NCPRT2FS, which has two antecedent variables and three outputs with delayed time shift ranging from one unit to three in the descendant part, is demonstrated in (2): One may make an extension to fuzzy rule (2) considering n antecedent variables and time-delayed outputs in the descendant part with a delaying shift in time ranging from one unit to m units. n may be designed remarking nonlinearity degree and complexity of the unknown system, which is going to be identified next.
The layers' details are as: Layer 0: This layer denotes the inputs.

Layer 1:
The outputs of fuzzification are written as: where m k,i ∈ 1 m k,i , 2 m k,i and σ k,i are the uncertain mean and spread for kth rule and ith input.

Layer 2:
The T-norm and S-norm are computed as:

Layer 3:
The rule firings ( f k and f k ) are: Layer 4: The left-most/right-most firing are obtained as: where w are adjustable weights.
Additionally, for generation of a new MF, find: For every incoming data → x = {x 1 , . . . , x n }, calculate: For newly generated rules: where M(t) is the existing number of rules at time t. If I ≤ ∅ th , the system generates a new rule, where ∅ th ∈ (0 1) is a threshold that is defined [63]. If I i > ρ, where ρ ∈ [0 1] is a previously defined threshold, then use the existing fuzzy set A I i i as the antecedent part of the new rule in input variable i. Otherwise, one could produce a novel MF in input variable i and hold the equation, k i (t + 1) = k i (t) + 1, true. The number of MFs is defined by the parameter ρ in each input variable. Fuzzy clustering is a technique to structure a fuzzy model [64]. A new T2F clustering technique, which is a development of Krishnapuram and Keller Possibilistic C-Mean (PCM) [65], is suggested and described by: S.T : (21) where µ ij is type-2 MF in the j th data for the i th cluster. Moreover, the symbols D ij , c, and N are the Euclidean distance of the j th data in the i th cluster center, clusters and input data numbers, respectively. η i is also a positive number. D ij has to be as small as possible as the first term. On the other hand, the memberships in a cluster have to be greater as much as possible. They have to stay in the interval of [0, 1] and their sum is confined to become smaller than the number of input data. Equation (21) appears as the descriptive term. That η i corresponds to ith cluster, and is of the order of D ij , is greatly welcomed [65]. The distance to the cluster's center must be as low as possible (first term). It is desirable that η i relate to i th cluster and be of the order of D ij [63].
Using (20), the optimal values of the centers of the clusters are achieved. The initial m k,i and σ k,i for the k i (t + 1) th interval T2F set are: where v i is the optimal value of the cluster's center; β > 0 denotes the degree of overlap between 2 fuzzy sets. In this study, β is considered to be 0.5 [61]. The parameters of the consequent part are initialized as: where yd is the target signal for input → x = {x 1 , . . . , x n }. All the other consequent parameters are zero.
By repeating the above process for each training dataset, new rules are created one after the other until NCPRT2FS is finally complete. The network output is calculated for each input applied. The calculated output is then compared to the target to obtain an error. Assume that the input-output data pair x p : t p ∀p = 1, . . . , q, where p represents the data numbers and x/t is the input/output, respectively. The NCPRT2FS output error can be expressed as follows: The gradient-based learning algorithm is used for updating the parameters. The mathematical relation of the gradient-based update algorithm is as follows.
See Appendix A for more details on the parameter update formulation. We choose the initial η as: After all the data have been applied, the variable learning rate is determined by the following form.
where l is the number of iterations. The RMSE formula is as follows: where t p andŷ p are actual and model (NCPRT2FS) outputs at p moment, respectively. The total number of data is denoted by N.

Simulation Results
Two real renewable energy systems are used for identification. The structure is shown in Figure 5. The inputs to the NCPRT2FS-based identifier are the main input and delayed system output. The parameters of the NCPRT2FS structure should be adjusted to minimize plant output yd and identification yieldŷ for all input values of x.
Example 1: Real data of a 660kw wind turbine (see Figure 6) have been taken from the Iran Renewable Energy Organization (SUNA) (http://www.suna.org.ir/en/home/ 1 March 2021). The model of the wind turbine is S47-660kw, made by VESTAS (Denmark), and information is given in Table 1. In this example, u(k), k = 1, . . . , 365 is wind speed that is fed to the wind turbine system and obtains the 365 samples of y(k), which is the output power of the wind turbine. The other conditions are the same as example 1. Figure 7 exhibits the identification performance of the NCPRT2FS. Here, the output (solid line) and the NCPRT2FS identifier output (dashed line) are shown.  The trained NCPRT2FS is used to calculate wind power in a place called Ilam (A city in the west of the Islamic Republic of Iran). Figure 8 shows the wind speed of Ilam for a year. Figure 9 shows the predicted wind power in Ilam.  The final values of the parameters of NCPRT2FS are shown in Table 2.  Example 2: A real solar cell system is shown in Figure 10.
In this example, u(k), k = 1, . . . , 600 is solar radiation that is fed to the real solar cell system and 600 samples of y(k) are obtained. The other conditions are the same as in examples 1 and 2. Figure 11 shows the identification performance of the NCPRT2FS for three solar radiations. Here, the plant output (solid line) and the NCPRT2FS identifier output (dashed line) are shown.  After structure learning, for NCPRT2FS, three rules are generated and the RMSE value for the NCPRT2FS and IT2-TSK-FNN for the training and test are shown in Table 3. The final parameters are given in Table 3.   The trained NCPRT2FS is used to calculate the solar power of Ilam. Figure 12 shows the solar radiation of Ilam for a year. Figure 13 shows the predicted solar power in Ilam.   Table 4. presents the comparison of our proposed method with another method (method of [46]). Simulations verify that the presented NCPRT2FS has high performances in function approximation and system identification. Table 4 shows that the number of rules of the proposed NCPRT2FS is almost less than the method of [53]; accuracy of identification is better than [53], but the training time in 10 runs (MATLAB 2011a; Dual CPU T3200 @ 2.00; RAM: 2.00 GB; GHz 2.00 GHz) is more than [53]. The references [23,46] presented two different T2F neural structures. They have also been used and evaluated only to identify some theory systems. In the present paper, however, the T2F neural network structure is different from references [23] and [53] and several experimental energy systems have been used for modeling.

Conclusions
In this paper, a novel Nonlinear Consequent Part Recurrent T2FS (NCPRT2FS) for identification and prediction of renewable energy systems was proposed. The nonlinear consequent part helps to better model highly nonlinear systems. Recurrent structure is a useful choice for the identification of dynamical systems. The self-evolving structure helps to obtain a simpler structure of the NCPRT2FS by ending up with a minimum number of fuzzy sets and fuzzy rules in the end. Simulations showed that the NCPRT2FS based on the backpropagation algorithm and adaptive optimization rate performs better than IT2-TSK-FNN [53] in identification. An S47-660 kw wind turbine (VESTAS company Denmark) and a solar cell were selected as case studies. After data gathering, the proposed method was finally used with the experimental data for the purpose of identification. The RMSE was less than 0.006 and the number of fuzzy rules was equal and less than 4 rules; therefore, the results easily demonstrated the remarkable capability of the NCPRT2FS developed in the paper. In order to continue the work and look to the future, we can use the evolutionary algorithms as a complement to the proposed method for the development of the fuzzy neural network (to increase accuracy, increase convergence, etc.). Different case studies (types of solar cells, types of wind turbines, etc.) should be identified and the appropriate renewable system can be extracted for each geographical location.

Conflicts of Interest:
The authors declare that they have no conflict of interest. = 1 2 ∆e p (k) 2 e p (k) + ∆e p (k) = ∂e p (k) ∂W T ·η·e p (k) · ∂ŷ(k) ∂W · e p (k) + 1 2 In order for ∆V p (k) < 0, then: If (A40) holds for every parameter W = σ k,i , 1 m k,i , 2 m k,i , c k,i , s k,i , then the algorithm is definitely convergent.