Microsoft Word - 2_V17No2_Compiled_v2_24Nov16.docx IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 185 AN INTELLIGENT NEURO-FUZZY TERMINAL SLIDING MODE CONTROL METHOD WITH APPLICATION TO ATOMIC FORCE MICROSCOPE SEIED YASSER NIKOO, BEHROOZ REZAIE*, ZAHRA RAHMANI AND SEIED JALIL SADATI Faculty of Electrical and Computer Engineering, Babol University of Technology, Shariati Ave., Babol, Mazandaran, Iran. *corresponding author: brezaie@nit.ac.ir (Received: 9th Jun. 2015; Accepted: 19th Aug. 2016; Published on-line: 30th Nov. 2016) ABSTRACT: In this paper, a neuro-fuzzy fast terminal sliding mode control method is proposed for controlling a class of nonlinear systems with bounded uncertainties and disturbances. In this method, a nonlinear terminal sliding surface is first designed. Then, this sliding surface is considered as an input for an adaptive neuro-fuzzy inference system, which is the main controller. A proportional-integral-derivative controller is also used to assist the neuro-fuzzy controller in order to improve the performance of the system at the beginning stage of the control operation. In addition, a bee algorithm is used in this paper to update the weights of the neuro-fuzzy system as well as the parameters of the proportional-integral-derivative controller. The proposed control scheme is simulated for vibration control in a model of atomic force microscope system and the results are compared with conventional sliding mode controllers. The simulation results show that the chattering effect in the proposed controller is decreased in comparison with the sliding mode and the terminal sliding mode controllers. Also, the method provides the advantages of fast convergence and low model dependency compared to the conventional methods. ABSTRAK: Dalam kertas ini, kaedah mod kawalan terminal jenis gelongsor cepat neuro-kabur adalah dicadangkan untuk mengawal sejenis kelas sistem tak linear dengan ketidaktentuan dan gangguan terbatas. Dalam kaedah ini, permukaan terminal gelongsor yang tak linear adalah pertama direka. Kemudian, permukaan gelongsor ini dianggap sebagai input bagi sistem inferens neuro-kabur penyesuaian yang merupakan pengawal utama. Sebuah pengawal berkadar-penting derivatif juga digunakan untuk membantu pengawal neuro-kabur dalam usaha untuk memperbaiki prestasi sistem pada peringkat permulaan operasi kawalan. Di samping itu, algoritma lebah digunakan dalam kertas kerja ini untuk mengemaskini wajaran sistem neuro-kabur serta parameter pengawal berkadar-penting derivatif. Skim kawalan yang dicadangkan adalah simulasi untuk mengawal getaran dalam model sistem mikroskop daya atom dan keputusan dibandingkan dengan pengawal mod gelongsor konvensional. Keputusan simulasi menunjukkan bahawa kesan chattering dalam pengawal yang dicadangkan itu menurun berbanding dengan mod gelongsor dan pengawal terminal mod gelongsor. Selain itu, kaedah ini mempunyai kelebihan dari segi penumpuan cepat dan kebergantungan model rendah berbanding dengan kaedah konvensional. KEYWORDS: terminal sliding mode controller; adaptive neuro-fuzzy inference system; bee algorithm; atomic force microscope; nano manipulation IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 186 1. INTRODUCTION Nonlinear control methods have significantly developed in terms of theory and practice. Important theoretical developments have been obtained in the fields of nonlinear robust control methods such as sliding mode control. The Sliding Mode Controller (SMC) has attracted the interests of many researchers due to its fast response and robustness against disturbance, noise, and uncertainty. The main reason for choosing this controller is its acceptable control performance in a wide range of operation conditions. Also, two main challenges in control, namely stability and robustness, can be effectively solved using this method [1-3]. In conventional SMC, the sliding surface is usually a linear surface that only guarantees the asymptotic stability. Thus, error dynamics cannot converge to zero in finite time. By tuning the parameters of SMC, faster error convergence can be achieved. However, this increases the control gain and thereby leads to a chattering phenomenon on the sliding surface that may damage the system [4]. Terminal SMC (TSMC) has been proposed in [5], for the first time, in order to solve the finite time asymptotic stability problem. In this method, a nonlinear sliding surface is used to obtain finite time asymptotic convergence. TSMC design includes two parts: choosing an appropriate sliding surface and choosing an appropriate control law that steers the system states of this sliding surface and makes them remain on it [5-7]. In order to have a good performance in SMC-based controllers, obtaining and formulating the acceptable nonlinear dynamics of the system is very important. However, determining the nonlinear dynamics of the system is usually a very difficult task. In addition, one of the disadvantages of such controllers is their sensitivity to noise, when the control signal is close to zero. Another important problem in SMC-based methods is the chattering effect that leads to high frequency oscillations in the controller’s output and may damage mechanical components. To remove, or at least decrease, the chattering effects, various methods have been reported by many researchers [1, 8, 9]. Artificial intelligence algorithms have been applied in SMC-based methods to improve them. For example, neural networks, fuzzy logic systems and neuro-fuzzy systems have been combined with the sliding mode control method for controlling nonlinear systems with uncertainties. The Fuzzy Logic Controller (FLC) is one of the most important applicable systems, which can be utilized for uncertain nonlinear systems. It can convert the experimental science into the mathematical formulation. However, FLC, by itself, cannot guarantee the stability condition and the acceptable performance [10]. Some researchers have used fuzzy logic in SMC to reduce the chattering effect in pure sliding mode control methods. Their proposed controller is called a Fuzzy SMC (FSMC) [11-13]. FSMC is a SMC that is combined with a fuzzy logic system to reduce or remove the high frequency oscillations. Furthermore, it is utilized to compensate for the unknown dynamics of the model and also to tune the sliding surface slope. For example, Sarailoo et al. have proposed a fuzzy-based SMC [11]. Moreover, Wong et al. have combined a FLC with SMC and a PI controller to overcome the chattering effect [12]. A fuzzy system has been used in [13] to combine SMC and a state feedback controller for reducing the chattering effect. Some studies have also utilized fuzzy logic systems in TSMC [14-18]. In [14], an adaptive fuzzy system has been used in TSMC to reduce the chattering. Adaptive TSMC using a fuzzy system has been developed in [15]. Also, in [16], fuzzy TSMC has been proposed for fault-tolerant control. A combination of the state feedback controller and TSMC using a fuzzy system has also been investigated in [17]. Many researchers have used the sliding mode control method in a fuzzy controller, called Sliding Mode Fuzzy Controller (SMFC), to improve the stability of the system. IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 187 Stability is the most important challenge in pure FLC. The SMFC method is a SMC-based FLC that is used for reducing fuzzy rules and improving closed-loop stability of the system. Research in the field of SMFC has been significantly performed as an applicable program. For example, this method has been used for robot control in [3, 8, 18, 19]. Moreover, adaptive fuzzy methods have been applied in the SMC for nonlinear systems in order to obtain accurate tracking and to remove the chattering effects [20, 21]. Hwang et al. have proposed an adaptive FSMC based on type-2 fuzzy systems for nonlinear systems with uncertainties and external disturbances. In this method, the type-2 fuzzy controller has been utilized to obtain the linear feedback control law and an impulse controller has been used to compensate the error approximation between the control law and type-2 fuzzy controller [20]. Benbrahim et al. have proposed an adaptive FSMC with a type-2 fuzzy controller for unknown nonlinear systems with uncertainties and external disturbances. In this method, two type-2 fuzzy logic systems have been applied for approximating the dynamics of the unknown system [21]. The main disadvantage of FSMC is the lack of systematic methods for designing the fuzzy rules and membership functions. Adaptive FSMC can cope with this shortcoming. An Adaptive Neuro-Fuzzy Inference System (ANFIS) is an effective modeling method that provides the benefits of both a fuzzy inference system and neural networks [22]. ANFIS involves two types of tunable parameters, i.e., antecedent parameters and conclusion parameters. The training and parameter updating in ANFIS is mostly based on the gradient and computation of gradient at each stage, which is a complicated task. Also, the chained rules that are used in this method may lead to local optimums. In the gradient- based method, the convergence of the parameters is slow and depends on the initial value of the parameters. Also, finding the best learning gain is difficult. Shoorehdeli has proposed different hybrid methods for training parameters in ANFIS [23-28]. In these hybrid methods, a Particle Swarm Optimization (PSO) algorithm with descending gradient [27], a Recursive Least Square (RLS) method [25], and Extended Kalman Filter (EKL) [23] have all been used for training. In these studies, the PSO algorithm has been used to train antecedent parameters, while the other methods have been used to train conclusion parameters. In a different study, Shoorehdeli has used a Forgetting Factor Recursive Least Square (FFRLS) method to train conclusion parameters [26]. In this work, the stability of the algorithm has been investigated based on the Lyapunov stability theory. Moreover, Shoorehdeli has applied a PSO algorithm for the entire parameters of the neuro-fuzzy network [27]. Chatterjee et al. have introduced an extended type of Takagi-Sugeno type neuro-fuzzy system for modeling robot manipulators in [28]. This type of neuro-fuzzy system has been trained by a PSO algorithm. Lin et al. have proposed a hybrid training algorithm based on fuzzy entropy clustering, modified PSO, and recursive singular value decomposition method [29]. Cus et al. [30] have proposed an approach that uses ANFIS to represent the manufacturer objective function and an ant colony optimization algorithm to obtain the optimal objective value. Gunesekaran et al. [31] have integrated ANFIS with an artificial immune algorithm. Training the neuro-fuzzy system is important for satisfactory operation of ANFIS and finding new algorithms for updating the weights of ANFIS is an open challenge. The conventional sliding mode control method has also combined with ANFIS in [32- 35]. These adaptive FSMC methods have the advantages of robustness and stability of the SMC, the model-free feature of fuzzy systems, and the learning capability of ANFIS. In such hybrid configurations, the common sliding surface is a linear surface which only guarantees asymptotic stability. However, the error dynamic may not converge to zero in finite time. Moreover, by tuning the parameters of SMC, although fast convergence of the IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 188 error may be achieved, the control gain is then increased which results severe chattering on the sliding surface. These problems motivate the current research to improve the existing results. In the present paper, a combination of Fast TSMC (FTSMC) and ANFIS are proposed to overcome the above mentioned problems. In the proposed scheme, both finite-time asymptotic convergence and chattering-free results can be achieved simultaneously. In fact, the nonlinear sliding surface is considered as the input of ANFIS. Then an adaptive intelligent law is utilized to tune the weights in order to obtain the best weights with stable convergence property. To satisfy the Lyapunov condition, an intelligent control law is applied for tuning the weights such that the most optimum value with a stable convergence property is achieved and thereby the Lyapunov condition is satisfied. In this paper, a bee algorithm is used to determine the adaptive optimal control law. The bee algorithm is simple and fast in comparison with conventional descending gradient-based methods and can lead to satisfactory results. In the proposed scheme, a PID is also used in parallel with ANFIS to assist it by providing an additional control action. This PID controller is also tuned using the bee algorithm. By using this PID controller, the response of the ANFIS, in the beginning stages of control, will be improved. The advantage of the proposed controller, compared to the FTSMC, is its high robustness against uncertainties and undesirable disturbances. This robustness is due to the use of the terminal sliding surface as the input in the ANFIS structure. Therefore, the network structure becomes simpler and the error converges to the sliding surface in less time. Although the benefits of the fast terminal sliding surface are achieved, the chattering effect does not exist. Moreover, improvement in the closed-loop stability and finite time asymptotic stability are the other advantages of the proposed controller with respect to the purely neuro-fuzzy controller. This method is applicable for the cases where the dynamic of a system is not available or the system is unknown. In this paper, the proposed control scheme is applied to an atomic force microscope (AFM) system and the results are compared with conventional SMCs. Simulation results show the effectiveness and improved performance of the proposed controller. The paper is organized as follows. In Section 2, the system description and control goals that are considered in this paper are explained. Moreover, in this section, a mathematical model of the AFM system is introduced as a case study to verify the theoretical results using simulations. In Section 3, the fast terminal sliding mode control method is introduced and its stability for the considered class of nonlinear systems is proven. Then, the neuro-fuzzy controller is introduced, after which the hybrid configuration of this network with TSMC is investigated. Also, in this section, a bee intelligent algorithm is used instead of classical methods to tune the parameters of the proposed controller. In Section 4, by applying the proposed method to the AFM model, the simulation results are presented. Finally, conclusion remarks are drawn in Section 5. 2. PROBLEM FORMULATION 2.1 System Description In this paper, a Neuro-Fuzzy FTSMC (NFFTSMC) is proposed for a class of nonlinear systems. Consider a nonlinear dynamic system as follows: IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 189 1 1 for 1 -1 ( ) ( ) ( ) ( ) i i n d x i n dt d f f g u d t dt y x x x         x x x (1) where x(t)=[x1(t) x2(t) ... xn(t)]TϵRn is the state vector of the system, which is assumed to be measurable. ( ) and g(x) are nonlinear continuous functions and y is the output of the system. ∆ ( ) and ( ) represent uncertainty and bounded external disturbance respectively. Also, uϵR denotes the control input of the system. Moreover, it is assumed that the system (1) is controllable and g(x)≠0. 2.2 Control Objective The control objective is that the state vector of the above system, x(t), tracks the desired vector, xd(t)=[xd1(t) xd2(t) ... xdn(t)]T, which is known in [ , ∞). Let the tracking error be: 1 1 2 2 1 2 ( ) ( ) ( ) [ ( ) ( ) ( ) ( ) ( ) ( )] [ ( ) ( ) ( )] d T d d n dn T n t t t x t x t x t x t x t x t e t e t e t        e x x   (2) To achieve the objective vector, a controller is designed such that tracking error satisfies the following equation: 0)()(lim)(lim   ttt dtt xxe (3) 2.3 AFM System for Nano Manipulation Model In this paper, after designing the controller for the system described by Eq. (1), it is applied to a model of an AFM system as a case study. The AFM system is a well-known system that is widely used for nano manipulation in many industrial applications of nano technology. One of the goals in nano technology is to control material with high accuracy in nano dimensions in order to produce special materials and devices. Thus, control of AFM vibration behavior and construction of a micro-cantilever tip, which tracks a certain goal, is essential for particle manipulation in nano dimensions. The sharp tip of the AFM is used for pressing, pulling, cutting, and indenting materials and surfaces. The AFM includes a micro-cantilever, with a sharp tip at its end that is used for scanning the instance surface. Figure 1 shows the structure used for this device. The AFM cantilever is connected to a piezoelectric actuator with a photo detector. The photo diode provides a feedback signal for the controller by receiving a reflected laser beam to make the feedback from the cantilever deflection. The controller provides the input signal for the actuator based on the feedback signal received from the photo detector. The dynamics of the interaction of the micro-cantilever tip with the surface is proposed in [36, 37]. The main idea of the AFM system is that the changes in vertical oscillation of the cantilever are measured when the vibrating tip scans the surface of the sample. The characteristics of the oscillation, such as frequency, amplitude, and phase, are recorded. In fact, while the sample is scanned using the vibrating tip, a feedback control loop adjusts the tip-sample separation to maintain the cantilever amplitude at a reference value [38]. IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 190 Fig. 1: Atomic force microscope (AFM). In [39], the AFM setup has been modeled as a mass-spring element in which the effect of the tip and the instant force has been obtained by molecular potential. This AFM model can be considered as a special case of Eq. (1) and is described using a non- dimensionalized autonomous form as below: 1 2 22 1 2 1 1 2 ( , ) cos( ) ( )n n dx x dt dx x x h x f t u t dt y x              (4) where x1 and x2 are the position and speed of the cantilever tip and y is a measurement from the position of the cantilever tip while ωn is the natural frequency of the cantilever. ξ denotes the system damping, u(t) is the system control input and h is the interaction force between the surface and the cantilever tip. Also, δ is a parameter for determining the distance between the instance and the equilibrium point from the cantilever tip in the absence of instance. Finally, )cos( ~ tf  is the bounded external disturbance. A type of force that is usually used for modeling the interaction between a molecular pair is known as the Lennard-Jones potential [39] that is defined as follow: 1 2 2 8 1 1 1 max( ) ( ) ( , ) a a nomx xh x           (5) where a1 and a2 are constant parameters and δnom and δmax are the nominal value and the maximum value of δ respectively. This model demonstrates both attraction and repulsion intermolecular forces. Parameter δ depends to the distance between the tip as a controller and the nano material and can be considered as an uncertainty in the model. 3. THE PROPOSED METHOD 3.1 Fast Terminal Sliding Mode Controller One of the main drawbacks of classical SMC is that the control gain must be increased to compensate for the unknown dynamics of the system. Moreover, this control method cannot guarantee the asymptotic convergence of the error. This means that the tracking error cannot converge to zero in finite time. To overcome this problem, the IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 191 FTSMC method is used instead of conventional SMC. In this section, control of a class of nonlinear systems is introduced to track a desired trajectory based on FTSMC. Consider a nonlinear system with uncertainty and disturbance in the form of Eq. (1). The aim is that the state vector x(t) must track the objective vector xd(t). It is also assumed that |d(t)| ≤ δ1 and |f(x)| ≤ δ2 where δ1, δ2 > 0. The sliding surface is defined recursively as: 0 0 1 1 2 2 /0 1 0 0 0 0 /1 2 1 1 1 1 /2 1 2 2 2 2 n n q p q p q pn n n n n n ds s s s dt ds s s s dt ds s s s dt                       (6) where s0 = x1 - xd1 and qi > pi , qi and pi are positive odd numbers and also αi ≥ 0 and βi ≥0, for i = 0, 1, ... , n-2 are the parameters of the sliding surface. For Eq. (1), by considering the structure in Eq. (6), if the control law u is designed as follow: 1 12 /1 11 1 0 ( ) ( ) ( ) ( ) ( )i i nn i n in q p d i i i i nn i n i n i d xd d u g x f x s s lsign s dt dt dt                         (7) where l > δ1+ δ2, then the states of the system (1) converges to the sliding surface, sn-1 = 0, in finite time, tn., then the tracking condition in Eq. (3) can be satisfied. To prove this, consider the following Lyapunov function: 2 1 1 2 n V s  Its derivative is, 1 1 n n dsdV s dt dt   Substitute Eq. (7) into Eq. (6), while considering the dynamics of Eq. (1), we have: 2 2 3 3 2 2 2 /1 2 2 2 2 22 3 2 2 / /3 3 3 3 3 2 2 2 23 2 2 1 1 /0 1 1 ( ) ( ) ( ) ( ) ( ) ( ) n n n n n n i i q pn n n n n n q p q pn n n n n n n n n n n i n i q p i i i in n i n i i ds d s d d s s dt dt dt dt d s d d d d s s s s dt dt dt dt dt d s d d s s dt dt dt                                                        2 0 1 12 /1 1 1 0 1 ( ) ( ) ( ) ( ) ( ) i i n nn n i n in q pd i i i in n n i n i i n d xd x d d s s dt dt dt dt f d lsign s                              x x Thus, we have: 1 1 1 2 1[ ( ) ( )] [ ( )] 0n n n dV f d x s l s l s dt            x IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 192 This shows that convergence to sn-1 = 0 will be satisfied in the following finite time [40]: )( )0( 21 1     l s t nn (8) FTSMC has attracted much attention because of its robustness against disturbance, noise, and uncertainty, and also due to its fast and finite-time convergence. However, FTSMC has some systematic drawbacks in real applications. Some of these shortcomings are emerging chattering effect, the full-dependency of this method to the dynamic equations of the system and also the sensitivity of the method to noise when the input signal is very close to zero. Therefore, in order to overcome these problems, a hybrid configuration of ANFIS and PID controller is used instead of the control law in Eq. (7) to remove the chattering effect and also to remove the dependency of the controller to the accurate dynamic model of the system. 3.2 Neuro-Fuzzy Fast Terminal Sliding Mode Control Method In this section, the FTSMC method is extended by ANFIS in order to obtain an equivalent control through adaptation of the weights. Accordingly, advantages of FTSMC and an adaptive controller design are combined into a neuro-fuzzy system. Thus, a variable sliding surface is considered as the input of ANFIS and then the weights of the ANFIS are determined by an intelligent algorithm. 3.2.1 ANFIS Structure Both fuzzy logic and neural networks are model-free approximators that share their ability to deal with uncertainty and noise. Fuzzy logic architecture can be converted to a neural network and vice versa. Moreover, one can gain the benefits of both neural networks and fuzzy logic by combining these two methods. The network achieved by this method, similar to neural networks, possesses the capability of training and parameter adaptation. Moreover, the obtained network has the ability inherent to fuzzy logic for interpreting in terms of linguistic variables. ANFIS is combination of neural network and fuzzy logic methods [22]. ANFIS network structure includes two parts. The first part involves an antecedent section, which is formed based on the IF part of fuzzy rules. The second part involves the conclusion section, which is based on the THEN part of fuzzy rules. Therefore, antecedent and conclusion parts are connected to each other as a network through fuzzy logic. These parts have some adjustable parameters that can be tuned, similar to weights in neural networks. The structure of ANFIS includes five layers as depicted in Fig. 2. This figure illustrates one example of ANFIS structure that involves two inputs (x, y) and one output (z). There are four rules in the following form: IF x is Aj and y is Bk THEN z=fi (for i=1,2,3,4 and j,k=1,2) where Aj and Bk are fuzzy sets with membership functions of ( ) jA x and ( ) kB x and fi is a linear function of x and y. IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 193 Fig. 2 ANFIS structure with two inputs and one output The layers of the ANFIS are as follow:  Layer 1: This layer is called the fuzzifier layer. This layer provides the membership functions (MFs) of each input. In this paper, triangular membership function is used as described in Eq. (9). The parameters ai, bi, ci are the set of parameters that change the shape of the membership functions. Parameters of this layer are called antecedent parameters. ( ) ( ; , , ) max(min( , ), 0), for 1, 2 ( ) ( ; , , ) max(min( , ), 0), for 1, 2 and 2 i i i i i i i j j i j j j j x a c x A i i i b a c a x a c x B j j j b a c a x trimf x a b c i x trimf x a b c i j i                   (9) The output of this layer can be written as: 2 1 1 ( ), for =1,2 ( ), for =3,4 i i i A i B O x i O x i      (10)  Layer 2: This layer is called the rule layer. The rule layer indicates firing strength for each rule that is generated in fuzzifier layer. The output of this layer is: 2 ( ). ( ) 1, 2, 3, 4 and , 1, 2 j ki i A B O w x x i j k     (11)  Layer 3: This layer is called the normalization layer. It normalizes the firing strength for each input. This normalization is the ratio of the i-th rule firing strength to the total firing strength as defined in Eq. (12): 3 1 2 3 4 1, 2, 3, 4ii i w O w i w w w w       (12)  Layer 4: This layer is called the defuzzifier layer. The output of each node in this layer is achieved by multiplying a polynomial with normalized firing strength and is calculated as below: 4 ( ) 1, 2, 3, 4i i i i i i iO w f w m x n y l i     (13) The output of this layer is normalized. Also, mi, ni and li in this layer denote the conclusion parameters.  Layer 5: This layer is called the summation layer. This layer is obtained from the sum of all received signals. The overall output of ANFIS becomes: overall output 1, 2, 3, 4 i i i i i w f i i w i z w f i      (14) IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 194 3.2.2 Neuro-Fuzzy Control Scheme In this section, in order to remove the chattering effect, ANFIS is used for nonlinear mapping approximation between the terminal nonlinear sliding surface and the control output. The neuro-fuzzy network used in this paper has one input (sn-1) with five membership functions and one output (u) as depicted in Fig. 3. Fig. 3: ANFIS structure with single input and single output. Five fuzzy rules are of the following form: IF sn-1 is Ai THEN u=mix +li (for i=1,...,5) where Ai are fuzzy sets with membership functions of ( ) iA x with antecedent parameters of ai, bi and ci, and mi and li are conclusion parameters. The main problem in this neuro-fuzzy network is to tune the entire parameters of this algorithm to obtain the best value with stable convergence property. The training method I ANFIS is mostly based on the gradient. In the gradient method, due to its complicated calculation at each iteration, the convergence of the parameters is very slow and is dependent to the initial value of the parameters. Also, the chained derivative rules used in this method may lead to local minimum and finding the best learning gain is very difficult. Here, a method is proposed for updating all parameters that is simpler and faster than the descending gradient method. According to the Lyapunov theorem, the nonlinear sliding surface of the terminal sliding must satisfy the condition sn-1ṡn-1 ≤ 0. To satisfy the Lyapunov condition, an intelligent algorithm, namely the bee algorithm, is used for tuning the parameters such that the best value with the stable convergence property can be achieved. This algorithm determines the best weights wi, fi to obtain sn-1ṡn-1 ≤ 0. Also, in the proposed method the initial value of the parameters and the learning rate is not required. The intelligent control scheme for controlling the system (1) is depicted in Fig. 4. During this procedure, the best value of the antecedent and conclusion parameters of ANFIS are achieved through the bee algorithm. Also, a NFFTSMC has a poor performance in the beginning of the control operation, thus a PID controller is used to improve the control performance in this period and to have a total acceptable performance. After a short period of time, PID is replaced by NFFTSMC controller and the output of PID controller (uPID) is reduced to zero. IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 195 Fig. 4: Block diagram of the proposed NFFTSMC system. According to Fig. 4, total control input is as below: ANFISPIDtotal uuu  (15) The bee algorithm is utilized to tune the coefficients of both the PID controller and the ANFIS antecedent and conclusion parameters. As a result, the bee algorithm will optimize all unknown parameters in utotal. 3.3 Combining NFFTSMC and Bee Algorithm One of the important challenges in ANFIS is its training and parameter updating. In this section, we propose a simple and fast method for updating the parameters of ANFIS. 3.3.1 Bee Algorithm The bee algorithm [41] is inspired from behavior of the honey bee in nature. In this algorithm, bees are divided into three categories: employed bees, onlooker bees, and scout bees. Employed bees bring nectar from the explored source. These bees bring information such as distance, direction, and profitability of a location to the hive and share it with other bees. Onlooker bees use a complex communication system. This system enables them to obtain information about the location and quality of nectar which is outside the hive. Communication between the bees is performed by a dance called waggle dance that includes information about the quality, location, and position of the food source. Scout bees search randomly for the food in the vicinity of the hive. These bees move from one location to another randomly. Bees need high energy for flying. Thus they try to find the shortest and the best path among swarms of flowers. In evolutionary algorithms, the main goal is the minimization of the objective function. This algorithm searches for the optimal points in the search space with inspiration from the bees’ dance. Each point in the search space is considered as a food source. The scout bee randomly searches the space through a fitness function and by sampling from visited locations and ranking them in terms of quality. Other bees search the best points ranked by fitness function. The bees of the algorithm promise the best solution and minimization of the cost function according to the measurement of the cost function. In the space dedicated to the solution interval defined as U={xRn; mini < xi < maxi; i=1, 2, ... , n} and a fitness function as f(x):U→R, each solution candidate is defined as a n-dimensional variable x=[x1, ... , xn]. Table 1 shows the parameters in the bee algorithm. IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 196 Table 1: Parameters of bee algorithm Parameter Description ns Number of scout bees ne Number of elite sites nb Number of best sites nre Recruited bees for elite sites nrb Recruited bees for remaining best sites ngh Initial size of neighborhood The algorithm can be described as below [41]: A constant population of scout bees, ns, is selected. Then, this population is randomly and uniformly spread throughout the solution space. Each scout bee evaluates its position according to the fitness function, and then the algorithm enters into the main loop which includes four steps. At the end, the algorithm stops when the stopping criterion is met. ns is the visited site, and it is ranked according to the fitness information obtained by the scout bee. Then, nb sites with best fitness (the measured minimums by the objective function) are chosen, for local exploration. This local exploration is performed by a class of other bees, called foragers, that steer to the vicinity of the site chosen by the scout bees. For each chosen location, the number of allocated foragers is defined as below: each scout bee that comes back from one of the best chosen sites, nb, performs a waggle dance that attracts foragers for a local search. For each ne first top-rated elite site that a scout bee visited, among nb best available sites, nre forager bees are sent to search in the neighborhood of these sites. Then, for each nb-nre remaining sites, where nrb ≤ nre, forager bees are sent for searching in that vicinity. According to the above method, most of the bees are allocated for searching in sites with the highest fitness. Thus, a local search is performed with more accuracy in the vicinity of elite sites that are hopefully sites of the search space for finding the optimal solution. The bees, employed by a scout bee, are located randomly with uniform distribution in the neighborhood of the specified site with high fitness. This flower patch is specified as an n-dimensional vector of sites to the center of the scout bee site. For each flower patch, the fitness of each visited site by an employed bee is evaluated. If the fitness of one of the employed bees is more than that of the scout bee, the selected bee is chosen as the new scout bee. In the end, the best bee (with maximum fitness) is achieved from each patch. In the global search process, ns-nb bees are spread randomly in the search space of the new flower patch. Selection of scout bee in a random process is for exploring better sites by bee algorithm. At the end of each iteration, a new population of the bee colony is composed of two groups. The first group includes nb scout bees corresponding to the center (the best available solution) of each flower patch and denotes the local search. The second group includes ns-nb scout bees corresponding to solutions that are generated randomly and denotes the global exploration. The stopping criterion depends on the problem dimensions and can be a threshold considered for fitness such that if a site satisfies this condition, then it can be introduced as the optimal site. It can also be considered as a prescribed number of full cycles (for a certain number of algorithm iterations). Figure 5 shows the flowchart of the bee algorithm. 3.3.2 Training NFFTSMC Based on the Bee Algorithm The goal of designing NFFTSMC is to obtain a control law, u, such that it can steer all the states of an uncertain nonlinear system (1) to the sliding surface s in finite time IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 197 Fig. 5: Flowchart of the bee algorithm. without chattering. To achieve this goal, a fast terminal sliding surface is first calculated, and then intelligent ANFIS is gained to obtain the control law u. The advantage of combining such methods is the appropriate chattering-free control action in the presence of bounded external disturbances and uncertainties. In the conventional ANFIS training methods, input-output data is usually required. However, in the proposed method, intelligent bee algorithm is used in on-line mode, and therefore, the best values of the ANFIS parameters are obtained, without any information about the system input and output. Also, to help the ANFIS controller in the beginning of the control operation, a PID controller is utilized as depicted in Fig. 4. As an initial time elapses, the control law of this controller converges to zero, as shown in Fig. 6. Fig. 6: Control effort of the PID. 0 2 4 6 8 10 -40 -30 -20 -10 0 time (s) PI D c on tr ol in pu t IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 198 In this section, training and updating ANFIS and PID controllers, using a bee algorithm, is explained. ANFIS involves three antecedent parameters, ai, bi and ci and two conclusion parameters, mi and li for each fuzzy rule. Thus, the total number of parameters is equal to the parameters associated with all fuzzy rules. In Fig. 3, ANFIS includes five rules and each rule involves three antecedent parameters and two conclusion parameters. Therefore, fifteen parameters are optimized in the antecedent part of ANFIS, and ten tunable parameters are adjusted in the conclusion part of ANFIS. On the other hand, there are three tunable parameters in a PID controller kp, ki and kd that must be obtained by bee algorithm. As a result, a bee algorithm is utilized in this paper to tune the antecedent and conclusion parameters in ANFIS and PID coefficients. Thus, there are twenty eight tunable parameters in this controller that are determined by bee algorithm. 4. SIMULATION RESULTS The proposed method is applied to the model of an AFM described by Eq. (4). The simulation results are performed in MATLAB/SIMULINK. To obtain the nano manipulation goals, the cantilever tip of the AFM must be able to strongly track a reference signal in the presence of uncertainties and disturbances. In this simulation, the unit step and periodic pulse inputs are considered as the reference signals. The pulse input oscillates between 0.8 and 1.2 with a period of 10 s. The parameters of the system described in Eq. (4) are considered same as [42], i.e.: 1 ,2 ~ ,2.1 ,8.0 ,66.3 ,148.0 ,02.0 ,1 maxnom21  fen  (16) where δ is an uncertain parameter with a nominal value δnom and maximum value δmax (δnom < δ < δmax). First, conventional SMC is applied to this model with uncertainty and disturbance. The results for the unit step and periodic pulse inputs are shown in Fig. 7. It can be seen that chattering occurs for the control input signal. However, the output follows the inputs favorably. Although the satisfactory results for this condition, as SMC cannot guarantee a finite-time convergence, it is quite possible that for different conditions, a long time may be required for convergence. At the next step, the FTSMC method is used to solve the problem of finite time asymptotic stability. Similarly, the FTSMC method is applied to this model with uncertainty and disturbance. The simulation results are illustrated in Fig. 8. According to Fig. 8, the output converges to the reference signals in less time in comparison with the SMC method. Also, FTSMC guarantees finite time asymptotic stability, but the control input signal still has chattering. In FTSMC, by appropriate selection of the sliding surface parameters, fast responses can be achieved. However, reducing the convergence time in this method may lead to chattering in the control signal, as can be observed in Fig. 8. In order to remove the chattering effect, an ANFIS+PID control scheme is applied to this model with uncertainty and disturbance. The simulation results of pure ANFIS are illustrated in Fig. 9. As can be seen from this figure, the results reveal less chattering compared with SMC and TSMC, but the tracking performance is getting worse. In fact, without exact adjustment in the parameters of ANFIS, it may be difficult to achieve satisfactory tracking performance. Moreover, the pure ANFIS cannot guarantee the stability condition and acceptable performance especially at the beginning of the operation [10]. It can be observed that the response performance of ANFIS is not desirable enough when the periodic pulse signal is applied as the reference input. Therefore, the ANFIS IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 199 (a) (b) (c) (d) Fig. 7: Simulation results for conventional SMC (a) tip position for step reference input (b) control input for step reference input (c) tip position for periodic pulse reference input (d) control input for periodic pulse reference input. (a) (b) (c) (d) Fig. 8: Simulation results for FTSMC (a) tip position for step reference input (b) control input for step reference input (c) tip position for periodic pulse reference input (d) control input for periodic pulse reference input. 0 2 4 6 8 10 0.5 1 1.5 2 2.5 3 time (s) ti p po si tio n (n m ) 0 2 4 6 8 10 -10 -5 0 5 10 15 20 time (s) co nt ro l i np ut (n N ) 0 5 10 15 20 25 30 0.5 1 1.5 2 2.5 3 time (s) tip p os it io n (n m ) 0 5 10 15 20 25 30 -40 -20 0 20 40 time (s) co nt ro l i np ut ( nN ) 0 2 4 6 8 10 0.5 1 1.5 2 2.5 3 time (s) ti p po si tio n (n m ) 0 2 4 6 8 10 -20 -10 0 10 20 time (s) co nt ro l i np ut (n N ) 0 5 10 15 20 25 30 0.5 1 1.5 2 2.5 3 time (s) ti p po si tio n (n m ) 0 5 10 15 20 25 30 -20 -10 0 10 20 time (s) co nt ro l i np ut (n N ) IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 200 (a) (b) (c) (d) Fig. 9: Simulation results for the ANFIS controller (a) tip position for step reference input (b) control input for step reference input (c) tip position for periodic pulse reference input (d) control input for periodic pulse reference input. controller by itself is not able to completely track sudden changes in the reference signal, and the system performance may be deteriorated. However, by exactly adjusting its parameters, a better performance can be attained. Finally, the NFFTSMC method is applied to overcome all shortcomings of the aforementioned methods. In fact, by combining these methods, finite time asymptotic stability, together with stability requirements and acceptable performance, can be obtained. Also, the chattering effect is removed completely. Moreover, due to the application of one input variable in the NFFTSMC network, the number of fuzzy rules is less than other fuzzy-based method. Also, fast convergence is obtained in comparison with previous methods. The simulation results of NFFTSMC in Fig. 10 verify these statements. It can be seen that the tip position tracks rapidly with the desired reference inputs and the proposed controller makes the effect of uncertainty and disturbance negligible. In addition, due to the use of ANFIS, it provides a chattering-free control action. The simulations reveal that the presented method has better tracking performance with negligible chattering in control action when compared with the other control methods. For comparison of all methods, the responses on unit step and periodic pulse reference signals are depicted in Fig. 11. Responses of all controllers are performed in the presence of the same uncertainty and disturbance as modeled in Eq. (4). As can be seen from this figure, the value of overshoot for the ANFIS controller, due to its weak stabilty, is more than the other controller. It has been improved using the proposed NFFTSMC. On the other hand, comparing the response time of the controllers, it can be stated that the proposed NFFTSMC has a best response speed among the controllers. As expected, FTSMC converges more quickly than SMC, but there is significant chattering in the control action (as shown in Figs. 7 and 8). In the proposed NFFTSMC, due to the use of 0 2 4 6 8 10 0.8 1 1.2 1.4 1.6 1.8 2 time (s) tip p os it io n (n m ) 0 2 4 6 8 10 -15 -10 -5 0 5 10 time (s) co nt ro l i np ut ( nN ) 0 5 10 15 20 25 30 0 0.5 1 1.5 2 time (s) ti p po si tio n (n m ) 0 5 10 15 20 25 30 -15 -10 -5 0 5 10 time (s) co nt ro l i np ut (n N ) IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 201 the bee algorithm for adjusting ANFIS parameters, the poor performance of ANFIS is improved while the control action is smoother than the other controllers. Hence, the proposed method is obviously more efficient in comparison with the other control techniques, because of its acceptable control performance. (a) (b) (c) (d) Fig. 10: Simulation results for NFFTSMC (a) tip position for step reference input (b) control input for step reference input (c) tip position for periodic pulse reference input (d) control input for periodic pulse reference input. (a) (b) Fig. 11: Comparison of the outputs of SMC, FTSMC, ANFIS and NFFTSMC (a) tip position for step reference input (b) tip position for periodic pulse reference input. 5. CONCLUDING REMARKS In this paper, a NFFTSMC method has been proposed for a class of nonlinear systems to remove the chattering effect, to have finite-time asymptotic convergence, and to reduce fuzzy rules. In this method, an ANFIS network has been proposed to approximate between the terminal nonlinear sliding surface and the control law. A bee algorithm has been also used in this paper, which is fast and simple compared with the conventional descending 0 2 4 6 8 10 0.8 1 1.2 1.4 1.6 1.8 2 time (s) ti p po si tio n (n m ) 0 2 4 6 8 10 -20 -15 -10 -5 0 5 10 time (s) co nt ro l i np ut (n N ) 0 5 10 15 20 25 30 0.8 1 1.2 1.4 1.6 1.8 2 time (s) ti p po si tio n (n m ) 0 5 10 15 20 25 30 -20 -10 0 10 20 time (s) co nt ro l i np ut (n N ) 0 2 4 6 8 10 0.5 1 1.5 2 2.5 3 time (s) ti p po si ti on ( nm ) SMC FTSMC ANFIS NFFTSMC 0 5 10 15 20 25 30 0 0. 5 1 1. 5 2 2. 5 3 time (s) ti p po si ti on ( nm ) SMC FTSMC ANFIS NFFTSMC IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 202 gradient method. In fact, by using the intelligent bee algorithm, all weights of the neuro- fuzzy network have been optimized such that the stability condition, sn-1ṡn-1 ≤ 0, has been satisfied. The simulation results of the NFFTSMC method, for an AFM model, illustrate the effectiveness of the proposed control scheme and verify that the chattering effect has been totally removed in comparison with conventional SMC and FTSMC. Also, faster convergence has been observed with respect to other methods. In fact, by combining FTSMC with ANFIS, finite time asymptotically stability and acceptable performance have been achieved. Moreover, due to application of one input variable in NFFTSMC, the number of fuzzy rules is less than fuzzy-based methods. Therefore, compared with the other conventional controllers, the proposed control method has advantages in the aspect of convergence time, chattering, implementation cost, response performance, and robustness. In this paper, the proposed controller has been applied to a mathematical model of AFM using software simulations. Future research will include experimental implementation of the proposed control method for a real application of the AFM system. REFERENCES [1] Slotine JJE, Li W. (1991) Applied nonlinear control. Prentice-Hall Inc., New Jersey. [2] Utkin IV. (1992) Sliding mode in control optimization. Springer-Verlag, New York. [3] Iordanov N, Surgenor BW, Choi YH. (1997) Experimental evaluation of the robustness of discrete sliding mode control versus linear quadratic control. IEEE Trans. Control Sys. Tech., 5(2):254-260. [4] Lee SH, Park JB. (2007) Terminal sliding mode control of nonlinear chaotic systems using self-recurrent wavelet neural network. Proc. Int. Conf. Control, Automation and System, 1671-1676. [5] Man Z, Paplinski AP, Wu HR. (1994) A robust MIMO terminal sliding mode control scheme for rigid robotic manipulators. IEEE Trans. Autom. Control, 39:2464-2469. [6] Man Z, Yu XH. (1997) Terminal sliding mode control of MIMO linear systems. IEEE Trans Circuits Syst. I: Fundam. Theory Appl., 44:1065-1070. [7] Yu XH, Man Z. (1996) Model reference adaptive control systems with terminal sliding modes. Int. J. Control, 64:1165-1176. [8] Bartolini G, Ferrara A, Usani E. (1998) Chattering avoidance by second-order sliding mode control. IEEE Trans. Autom. Control, 43(2):241-246. [9] Levant A. (2007) Principles of 2-sliding mode design. Automatica, 43(4):576-586. [10] Wang LX. (1993) Stable adaptive fuzzy control of nonlinear systems. IEEE Trans. Fuzzy Syst., 1(2):146-154. [11] Sarailoo M, Rahmani Z, Rezaie B. (2012) Fuzzy sliding mode control for hyper chaotic Chen system. Adv. Electrical Computer Eng., 12:85-90. [12] Wong LK, Leung FHF, Tam PKS. (2001) A fuzzy sliding controller for nonlinear systems. IEEE J. Indust. Electronics, 48(1):32-37. [13] Khari S, Rahmani Z, Rezaie B. (2016) Designing fuzzy logic controller based on combination of terminal sliding mode and state feedback controllers for stabilizing chaotic behaviour in rod-type plasma torch system. Trans. Inst. Meas. Control, 38(2):150-164. [14] Tao CW, Taur LS, Chan ML. (2004) Adaptive fuzzy terminal sliding mode controller for linear systems with mismatched time varying uncertainties. IEEE Trans. Syst. Man. Cybern., 34(1):255-262. [15] Nekoukar V, Erfanian A. (2011) Adaptive fuzzy terminal sliding mode control for a class of MIMO uncertain nonlinear systems. Fuzzy Sets Syst., 179(1):34‐49. [16] Xu SSD, Liu YK. (2014) Study of Takagi‐Sugeno fuzzy‐based terminal‐sliding mode fault‐ tolerant control. IET Control Theory Appl., 8(9):667-674. [17] Khari S, Rahmani Z, Rezaie B. (2016) Controlling chaos based on a novel intelligent integral terminal sliding mode control in a rod-type plasma torch. Chinese Phys. B, 25(5), 050201:1-12. IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 203 [18] Lhee CG, Park JS, Ahn HS, Kim DH. (2001) Sliding mode like fuzzy logic control with self-tuning the dead zone parameters. IEEE Trans Fuzzy Syst., 9(2):343-348. [19] Zhang X, Su H, Chu J. (2003) Adaptive sliding mode-like fuzzy logic control for high order nonlinear systems. Proc. IEEE Conf. on Intelligent Control, 788-792. [20] Hwang JH, Kwak HJ, Park GT. (2011) Adaptive interval type-2 fuzzy sliding mode control for unknown chaotic system. Nonlinear Dyn., 63:491-502. [21] Benbrahim M, Essounbouli N, Hamzaoui A. (2013) Adaptive type-2 fuzzy sliding mode controller for SISO nonlinear systems subject to actuator faults. Int. J. Autom. Computing, 10 (4):335-342. [22] Jang JS. (1993) ANFIS: Adaptive-network-based fuzzy inference system. IEEE Trans. Syst. Man. Cybern., 23(3):665-685. [23] Shoorehdeli MA, Teshnehlab M, Sedigh AK. (2009) Training ANFIS as an identifier with intelligent hybrid stable learning algorithm based on particle swarm optimization and extended Kalman filter. Fuzzy Sets Syst., 160:922-948. [24] Shoorehdeli MA, Teshnehlab M, Sedigh AK. (2009) Identification using ANFIS with intelligent hybrid stable learning algorithm approaches. Neural Computing Appl., 18(2):157- 174. [25] Shoorehdeli MA, Teshnehlab M, Sedigh AK. (2007) Novel hybrid learning algorithms for tuning ANFIS parameters using adaptive weighted PSO. Proc. IEEE Conf. on Fuzzy System, 1-6. [26] Shoorehdeli MA, Teshnehlab M, Sedigh AK, Khanesar MA. (2009) Identification using ANFIS with intelligent hybrid stable learning algorithm approaches and stability analysis of training methods. Appl. Soft Computing, 9(2):833-850. [27] Ghomsheh VS, Shoorehdeli MA, Teshnehlab M. (2007) Training ANFIS structure with modified PSO algorithm. Proc. Mediterranean Conf. on Control and Automation,1-6. [28] Chatterjee A, Watanabe K. (2006) An optimized Takagi-Sugeno type neuro-fuzzy system for modeling robot manipulators. Neural Computing Appl., 15(1):55-61. [29] Lin CJ, Hong SJ. (2007) The design of neuro-fuzzy networks using particle swarm optimization and recursive singular value decomposition. Neurocomputing, 71(1):297-310. [30] Cus F, Balic J, Zuperl U. (2009) Hybrid ANFIS-ants system based optimisation of turning parameters. J. Achievements Materials, 36(1):79-86. [31] Gunasekaran M, Ramaswami KS. (2011) A fusion model integrating ANFIS and artificial immune algorithm for forecasting indian stock market. J. Appl. Sci., 11:3028-3033. [32] Masumpoor S, Yaghobi H., Khanesar MA. (2015) Adaptive sliding-mode type-2 neuro- fuzzy control of an induction motor. Exp. Syst. Appl., 42(19):6635-6647. [33] Li Q, Zhang W, Han G, Yang Y. (2014) Adaptive neuro-fuzzy sliding mode control guidance law with impact angle constraint. IET Control Theory Appl., 9(14):2115-2123. [34] Cerman O, Husek P. (2012). Adaptive fuzzy sliding mode control for electro-hydraulic servo mechanism. Exp. Syst. Appl., 39(11):10269-10277. [35] Manceur M, Essounbouli N, Hamzaoui A. (2012) Second-order sliding fuzzy interval type-2 control for an uncertain system with real application. IEEE Trans. Fuzzy Syst., 20(2):262- 275. [36] Ashhab M, Salapaka MV, Dahleh M, Mezic I. (1999) Dynamical analysis and control of micro-cantilevers. Automatica, 35:1663-1670. [37] Basso M, Bagni G. (2004) Controller synthesis for stabilizing oscillations in tapping-mode atomic force microscopes. Proc. IEEE Int. Symp. Computer Aided Control Systems Design, 372-377. [38] Pishkenari HN, Jalili N, Meghdari A. (2006) Acquisition of high-precision images for non- contact atomic force microscopy. Mechatronics, 16(10):655-664 [39] Basso M, Giarre L. (2000) Complex dynamics in harmonically excited Lennard-Jones oscillator: Microcantilever-sample interaction in scanning probe microscopes. ASME J. Dyn. Syst. Meas. Control, 122:240-245. [40] Yu X, Man Z. (2002) Fast terminal sliding-mode control design for nonlinear dynamical systems. IEEE Trans Circ. Syst., 49(2):261-264. IIUM Engineering Journal, Vol. 17, No. 2, 2016 Nikoo et al. 204 [41] Pham DT, Koc E, Ghanbarzadeh A, Otri S, Rahim S, Zaidi M. (2006) The bees algorithm - a novel tool for complex optimisation problems. In Intelligent Production Machines and Systems. Edited by Pham DT, Eldukhri EE, Soroka AJ. Elsevier Ltd, Cardiff, UK, 454-459. [42] Sadeghpour M, Salarieh H, Alasty A. (2013) Controlling chaos in tapping mode atomic force microscopes using improved minimum entropy control. Appl. Math. Modelling, 37(3):1599-1606.