AN INTELLIGENT NEURO-FUZZY TERMINAL SLIDING MODE CONTROL METHOD WITH APPLICATION TO ATOMIC FORCE MICROSCOPE

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.


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][2][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][6][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][12][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][15][16][17][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.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 gradientbased 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][24][25][26][27][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][33][34][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 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.

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: where

xn(t)]
T ϵR n 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.

Control Objective
The control objective is that the state vector of the above system, x(t), tracks the desired vector, Let the tracking error be: To achieve the objective vector, a controller is designed such that tracking error satisfies the following equation:

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].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 nondimensionalized autonomous form as below: 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( ~t f  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: 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.

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 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: 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: 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: 7) into Eq.( 6), while considering the dynamics of Eq. (1), we have: Thus, we have: This shows that convergence to sn-1 = 0 will be satisfied in the following finite time [40]: 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.

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.

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 ( ) and fi is a linear function of x and y.

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 The output of this layer can be written as:  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  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): 1, 2,3, 4  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: 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

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. where Ai are fuzzy sets with membership functions of ( ) 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.According to Fig. 4, total control input is as below: 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.

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.

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R n ; 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.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.

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 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.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.

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] 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  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 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.

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 gradient method.In fact, by using the intelligent bee algorithm, all weights of the neurofuzzy 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.

Fig. 7 :Fig. 8 :
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.

Fig. 9 :
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.

Fig. 10 :Fig. 11 :
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.

Table 1 :
Parameters of bee algorithm