An SVM-Based Neural Adaptive Variable Structure Observer for Fault Diagnosis and Fault-Tolerant Control of a Robot Manipulator

Featured Application: Fault diagnosis and fault-tolerant control. Abstract: A robot manipulator is a multi-degree-of-freedom and nonlinear system that is used in various applications, including the medical area and automotive industries. Uncertain conditions in which a robot manipulator operates, as well as its nonlinearities, represent challenges for fault diagnosis and fault-tolerant control (FDC) that are addressed through the proposed FDC technique. A machine-learning-based neural adaptive, high-order, variable structure observer for fault diagnosis Estimating normal and abnormal signals based on the neural adaptive high-order variable structure observer has four principal sub-blocks: (i) designing the variable structure observer (VSO), (ii) implementing a high-order VSO to reduce chattering, and evaluating it using the super-twisting method, (iii) evaluating the accuracy of the high-order super-twisting VSO (HVSO) using a neural-network technique, and (iv) improving the reliability and robustness of the neural higher-order super-twisting variable structure observer (NVSO) using the adaptive approach. Detection and identiﬁcation of faults based on the support vector machine (SVM) algorithm has three main sub-blocks: (i) generation of the residual signal based on the di ﬀ erence between the original and estimated signals, (ii) characterization of windows by the energy feature for position and torque signals, and (iii) the detection and classiﬁcation of the fault types using the SVM technique. Fault-tolerant control of the robot manipulator using the adaptive, modern (ANHVSO), fuzzy, backstepping variable structure controller has ﬁve main sub-blocks: (i) the variable structure controller (VSC) is designed, (ii) a backstepping control algorithm to reduce chattering is expressed and evaluated using a backstepping variable structure controller (BVSC), (iii) the di ﬃ culty of determining a system’s BVSC dynamics under uncertain conditions is evaluated using a fuzzy procedure, (iv) the accuracy and extent of fault-tolerance in the fuzzy BVSC (FBVSC) is evaluated using a modern (ANHVSO) approach, and (v) the robustness and reliability of the fault-tolerant controller in the modern FBVSC (MFBVSC) is improved using an adaptive procedure. The main contributions of this research can be summarized as follows: of the fault-tolerant control in the fuzzy variable structure controller of a robot manipulator using three important algorithms: (a) backstepping control technique, (b) neural adaptive high-order variable structure observer and (c) an adaptive technique.


Introduction
Robot manipulators have been used in diverse applications, including the medical, scientific, military and industrial fields. The development of fault diagnosis and fault-tolerant control (FDC) for robot manipulators is a challenging task because of the nonlinearities and coupling effects of the robot's dynamics [1]. Numerous types of failures may occur in robot manipulators, and these can be divided into three main categories: actuator faults, sensor faults and plant faults [2]. The condition monitoring of a robot manipulator can be achieved through different techniques. This research focuses on a torque and position signature analysis method, because these signals are suitable for FDC in robot manipulators.
Diverse methods have been introduced for fault diagnosis and can be classified into four groups: (a) model-based techniques [2,3], (b) signal-based approaches [4,5], (c) artificial intelligence [6,7] and (d) hybrid-based methods [8]. Various model-based techniques have been proposed for fault estimation (FE) in industrial components, with observation-based techniques being some of the most important algorithms. These techniques can be categorized into two main groups: linear (e.g., PI observer) and nonlinear approaches (e.g., variable structure observer (VSO), feedback linearization observer, and backstepping observer) [2,3,[8][9][10]. Compared to linear observers, nonlinear observers have more edges, such as accuracy and reliability [9]. Due to the lack of robustness in the feedback linearization observers and backstepping observers, a VSO is used in this research. The VSO is reliable and robust, but is prone to high-frequency oscillations, especially in faulty conditions. These oscillations can be reduced using a high-order VSO [3,9]. To modify the performance of high-order VSOs, various techniques have been introduced, including the quasicontinuous, high-order VSO [11], suboptimal high-order VSO [12], and the twisting high-order VSO [13]. These techniques encounter a challenge at the first-order derivative of the variable structure surface. To address this issue, a super twisting high-order VSO (HVSO) is recommended in this work. Despite its satisfactory stability, robustness and high-frequency attenuation, the fault estimation accuracy of this method must be increased to improve the rate of fault identification [9]. To increase the fault estimation accuracy and fault identification performance, a neural network algorithm is used in parallel with the HVSO to design a neural HVSO (NHVSO) for FE in the robot manipulator. The main challenge of the VSO, HVSO, and NVSO is in finding the optimal value for the variable structure surface slope in unknown (faulty) conditions. In this research, this issue is resolved using an online tuning algorithm in parallel with the NHVSO to design an adaptive NHVSO (ANHVSO).
In the past decade, different machine learning solutions that utilize statistical feature parameters as attributes to learn how to solve various fault diagnosis problems, have been proposed. The most popular approaches reported in the literature include k-nearest neighbor (k-NN) classification algorithms (fault diagnosis) [14], classification and regression trees (CARTs) (fault diagnosis and prognosis) [15,16], artificial neural networks (fault diagnosis) [17,18], and other various types of regression algorithms (fault prognosis) [19]. However, these fault diagnosis methods have some limitations. Specifically, k-NN does not learn any specific mathematical function during its training, so the classification result is completely dependent on the quality and scale of the features used in the training set. Moreover, the value of k and the distance function used in this algorithm must be chosen, and a proper tradeoff between accuracy and the time needed for training must be found. Similarly, CART algorithms are also sensitive to the quality of the features used for training; however, they are insensitive to the scale of the data. Like k-NN, CART methods do not manipulate the input data during training, and in cases of overlapping feature spaces, the classification performance of the decision trees can be poor. During the training stage, ANNs may neglect some data problems while adjusting the weights and hyperparameters. However, ANNs have some limitations, such as gradient pitfalls and longer training times for large data sets that may not allow for an optimal solution.
To avoid these issues and to address the problem of fault diagnosis, the support vector machines (SVMs) [20][21][22][23] machine learning algorithm is utilized in this paper. This algorithm has a strong mathematical background, and better addresses feature dimensionality due to the availability of the different types of kernels that can be used for training. For this paper, a linear kernel [24] was chosen as the kernel function due to the small number of extracted features and the linear separability of the available data. To extend the capabilities of SVM and solve the multiclass classification problem, a "one-against-one" [25] strategy was employed for training.
Numerous procedures have been introduced for fault-tolerant control (FC). These strategies are classified into two groups: a) active fault-tolerant control and b) passive fault-tolerant control [3]. The active fault-tolerant control includes two steps. First, the fault is detected and identified. Then, the effect of the fault is reduced. In the passive fault-tolerant control, the impact of the fault is decreased directly based on control techniques [10]. In this investigation, active fault-tolerant control is adopted for fault-tolerant control in the robot manipulator. The active fault-tolerant control is classified into two main groups: a) linear and b) nonlinear. Linear procedures lead to unsatisfactory fault-tolerant control due to coupling effects parameters, noisy conditions, and increased gear. To address these issues, the use of a nonlinear fault-tolerant controller is suggested. Various nonlinear active fault-tolerant controllers have been presented in the literature, including model-based [3], artificial intelligence-based [26] and hybrid [10]. The model-based active fault-tolerant controllers have numerous advantages, such as stability, robustness and reliability, but its performance under unknown conditions is the main argument against its use. To address this weakness, artificial intelligence-based and hybrid controllers can be used. However, artificial intelligent active fault-tolerant controllers procedures have many issues concerning robustness and reliability. To address the faults in model-based and artificial intelligence, a hybrid fault-tolerant controller was presented in [10]. Various hybrid algorithms have been defined for fault-tolerant control in robot manipulators, such as the modern fuzzy feedback linearization technique [8], fuzzy sliding mode controller [10] and neuro sliding mode approach [27]. In this research, the adaptive modern (adaptive neuro observation) fuzzy backstepping variable structure controller is selected for fault-tolerant control of a robot manipulator. A variable structure controller (VSC) is a robust and reliable model-based technique, and is one of the most suitable candidates for fault-tolerant control of robot manipulators. Three basic problems must be addressed: (a) the chattering phenomenon, (b) the system's dynamic dependency and c) robustness in faulty conditions [3]. Based on the literature, to decrease chattering, multiple procedures, such as the boundary layer method, sliding mode fuzzy technique, and PID sliding mode control algorithm, have been devised [10]. Similarly, the robustness of a VSC can be improved using the adaptive techniques reported in [10]. Therefore, to improve robustness and reduce high-frequency oscillations (chattering phenomenon) under faulty conditions, the backstepping algorithm is used in parallel with the VSC to design a BVSC. Further, to address the system's dynamic dependency, the proportional-integral-derivative (PID) fuzzy technique is used along with a BVSC to design an FBVSC. To design a PID fuzzy controller with a minimum rule-base, the PD-fuzzy-plus-PI-fuzzy algorithm is used. To allow for fault modification in the controllers, the active fault-tolerant control is suggested. Thus, the proposed neural adaptive observer (ANHVSO) is applied to the FBVSC to design a modern FBVSC (MFBVSC). Furthermore, to increase robustness and decrease chattering, the adaptive technique is used to fine-tune the variable structure parameters in faulty conditions. The adaptive MFBVSC (AMFBVSC) is used to reduce the effects of faults in the robot manipulator. Figure 1 shows a block diagram of the SVM-based neural adaptive, high-order variable structure observer fault diagnosis and fault-tolerant control for a robot manipulator. The diagram has four main parts: (a) modeling the dynamic behavior of the robot manipulator based on the Lagrange technique [28], (b) estimation of the normal and abnormal signals based on the neural adaptive high-order variable structure observer, (c) detection and identification of faults based on the machine learning (SVM)   Estimating normal and abnormal signals based on the neural adaptive high-order variable structure observer has four principal sub-blocks: (i) designing the variable structure observer (VSO), (ii) implementing a high-order VSO to reduce chattering, and evaluating it using the super-twisting method, (iii) evaluating the accuracy of the high-order super-twisting VSO (HVSO) using a neural-network technique, and (iv) improving the reliability and robustness of the neural higher-order super-twisting variable structure observer (NVSO) using the adaptive approach. Detection and identification of faults based on the support vector machine (SVM) algorithm has three main sub-blocks: (i) generation of the residual signal based on the difference between the original and estimated signals, (ii) characterization of windows by the energy feature for position and torque signals, and (iii) the detection and classification of the fault types using the SVM technique. Fault-tolerant control of the robot manipulator using the adaptive, modern (ANHVSO), fuzzy, backstepping variable structure controller has five main sub-blocks: (i) the variable structure controller (VSC) is designed, (ii) a backstepping control algorithm to reduce chattering is expressed and evaluated using a backstepping variable structure controller (BVSC), (iii) the difficulty of determining a system's BVSC dynamics under uncertain conditions is evaluated using a fuzzy procedure, (iv) the accuracy and extent of fault-tolerance in the fuzzy BVSC (FBVSC) is evaluated using a modern (ANHVSO) approach, and (v) the robustness and reliability of the fault-tolerant controller in the modern FBVSC (MFBVSC) is improved using an adaptive procedure. The main contributions of this research can be summarized as follows: (1) Improved estimation accuracy of normal and abnormal signals based on the neural adaptive, high-order, variable structure observer. (2) Implementation of the SVM-based neural adaptive, high-order, variable structure observer to improve fault detection and identification accuracy in a robot manipulator. The rest of this research paper is organized as follows. In Section 2, the dynamic formulation of the Programmable Universal Machine for Assembly (PUMA) robot manipulator is briefly presented. The proposed method for fault diagnosis and fault-tolerant control is presented in Section 3. This section includes three main parts. In the first, the fault/signal is estimated accurately using the neural adaptive high-order variable structure observer. In the second, the faults are detected and identified based on the machine learning approach. In this technique, a support vector machine (SVM) algorithm is introduced to increase the accuracy of fault detection and identification. In the third, to design the fault-tolerant control algorithm, an adaptive modern fuzzy backstepping variable structure controller is proposed. In Section 4, the results and a discussion related to fault diagnosis and fault-tolerant control are presented. Finally, the work is concluded in Section 5.

Robot Manipulator Modeling
A robot manipulator is a highly nonlinear, uncertain, complex, multi-degree-of-freedom (DOF) system. Therefore, modeling this system is a major challenge in the design of a model-based technique for FDC. The mathematical model of a robot manipulator based on the Lagrange equation is represented as follows: τ Here, τ, τ f , α(q), β q, q , γ(q), Θ, and q are the torque, fault torque, inertial matrix, Coriolis and centrifugal (nonlinear) matrix, gravity vector, robot manipulator fault and manipulator joint vector, respectively.Therefore, based on Equation (1), the expression for τ − τ f requires the acceleration of the robot manipulator. To rule out the need for acceleration, a low pass filter (LPF) and the integral term of Equation (1) are used to derive the following equation: where τ LPF , T and ψ are the torque LPF, the difference between the torque and fault torque, and the coefficient to find the cut-off frequency, respectively. Based on Equations (1) and (2), the acceleration matrix is represented as follows: Based on the skew-symmetry of q , and according to [28], it follows that: .
Thus, the LPF torque is represented by Equation (5): In a real application, the LPF torque can be calculated using the following equation: Here,τ LPF ,α(q), −β q, . q ,Θ, andγ(q) are the estimated LPF torque, the estimated inertial matrix, the estimated Coriolis and centrifugal (nonlinear) matrix, the fault estimation based on the system model, and the estimated gravity vector, respectively. Therefore, the actual and estimated low pass filter torque can be used to find the torque in the robot manipulator without any need to find the acceleration. Based on Equation (6), the mathematical modeling of the robot manipulator includes uncertainties and unknown conditions. To address this drawback, and to increase the accuracy of the signal estimation, an adaptive neuro structure variable observer (ANSVO) can as described in the following section.

Fault Diagnosis: Machine Learning-based Adaptive Neuro High-Order Variable Structure Observer
Based on Figure 1, the SVM-based, adaptive, neuro variable structure observer fault diagnosis and fault-tolerant control for a robot manipulator are presented in this research. Therefore, the main objectives of this research are fault diagnosis and fault-tolerant control. The fault diagnosis of the robot manipulator based on the proposed algorithm has two main steps. To increase the fault detection and classification, the signal estimation accuracy of the normal and abnormal signals based on the neural adaptive variable structure observer is presented in the first step. The VSO is a robust observer that can be used for signal estimation. A high-order super twisting technique is used to mitigate the issue of chattering in VSO. In addition to effectively estimate the signal, accuracy is the other challenge that needs to be addressed. To increase the signal estimation accuracy, a neural-network technique is introduced. Moreover, the adaptive technique is used to improve the reliability and robustness. The second step for fault diagnosis is fault detection and classification. To increase the fault detection and identification accuracy, SVM is considered in this research.
A variable structure controller (VSC) is a robust and reliable control algorithm, and is one of the most suitable candidates for the fault-tolerant control of robot manipulators. This technique has three basic problems: (a) the chattering phenomenon; (b) the system's dynamic dependency; and (c) robustness in faulty conditions. A backstepping control algorithm is used in the work to address the chattering issue. Next, the difficulty of determining a system's dynamics under uncertain conditions is evaluated using a fuzzy algorithm. Moreover, the robustness and reliability of the fault-tolerant controller is improved using an adaptive procedure.

Adaptive Neuro High-Order Variable Structure Observer
Based on Figure 1 and the robot manipulator model, an adaptive neuro high-order variable structure observer (ANHVSO) can be designed to estimate faults in the presence of uncertainties and external distortion. Based on Equations (5) and (6), the state-space robot manipulator model is represented by the following equation: Here, (X 1 , X 2 ), . X 1 , . X 2 and Y are the state estimation, the change of the state estimation, and the measured output state-space signal for the robot manipulator, respectively. The robust classical VSO technique used to estimate the faulty signal is as follows [3,9].
The VSO for fault (Θ) estimation is represented by the following equation: Here, (µ 1 , µ 1 , µ 3 ), X 1−VSO ,X 2−VSO ,Ŷ VSO ,Θ VSO , and T are variable structure coefficients, the observation state estimation based on the VSO, the estimated output based on the VSO, the fault estimation based on the VSO technique, and the coefficient for the output estimation based on the VSO, respectively. To reduce high-frequency oscillations in the VSO, application of the higher-order VSO (HVSO) is recommended. The super-twisting (ST) technique for the HVSO is represented by the following Equation [9]: Here, , ∆, and (µ 4 , µ 5 ) are the performance enhancement function of the VSO, a variable in the ST function to reduce the estimation error, and a coefficient, respectively. Thus, the following equation is used to represent the HVSO in a robot manipulator to reduce chattering in the VSO: The fault can be estimated and represented using the HVSO as described in the following equation: Here, (µ 6 , µ 7 ), X 1−HVSO ,X 2−HVSO ,Ŷ HVSO andΘ HVSO are high-order variable structure coefficients, the observation state estimation based on the HVSO, the estimated output based on the HVSO, and the fault estimation based on the HVSO technique, respectively. The HVSO reduces high-frequency oscillations in the classical VSO, but suffers in terms of accuracy for signal estimation and fault identification. To improve signal estimation and reduce estimation error in the HVSO, use of a neural network (NN) is recommended. Thus, a three-layer NN with a nonlinear hidden layer and a linear output layer is used to improve the observation-based signal estimation, creating a neuro HVSO (NHVSO). The activation function based on the tangent hyperbolic and the derivative of the function can be defined through the following equations, respectively [27]: .
The NN-based LPF torque is represented by the following equation: Here x j , and m are the estimated filtered torque for every joint based on the neural network algorithm, the weight of the first layer, the weight of the second layer, the input and the number of hidden layer neurons, respectively. To optimize the biases and weights of the NN robot dynamic estimation, a backpropagation algorithm (BP) is applied. Thus, the following equation is used to represent the NHVSO in the robot manipulator to improve the estimation accuracy in the HVSO: The fault can be estimated based on the NHVSO and represented by the following equation: Here, X 1−NHVSO ,X 2−NHVSO ,Ŷ NHVSO , andΘ NHVSO are the observation state estimation based on the NHVSO, the estimated output based on the NHVSO, and the fault estimation based on the NHVSO technique, respectively. To increase robustness and reliability in the presence of unknown parameters, system uncertainties and faulty conditions, the adaptive (online tuning) technique is added to the NHVSO to produce the proposed ANHVSO. From Equation (17), µ 3 and µ 7 are the main coefficients used to estimate the signals and faults in unknown conditions. To optimize these coefficients, the adaptive technique, based on a fuzzy algorithm, is implemented as follows: where (µ 3−New , µ 7−New ) and Υ are the adaptive tuning coefficients for improving the fault and signal estimation accuracy, and the output of the fuzzy technique that is used to tune the NHVSO coefficients.  Consequently, the following equation is used to represent the ANHVSO in the robot manipulator to improve the estimation accuracy of the NHVSO: The fault is estimated based on the ANHVSO and denoted by the following: Here, X 1−ANHVSO ,X 2−ANHVSO ,Ŷ ANHVSO andΘ ANHVSO are the observation state estimation, the estimated output, and the fault estimation based on the ANHVSO technique, respectively. When the accuracy of the signal estimation increases, the estimated output Ŷ ANHVSO converges to the measured output Y. This means that the difference between these two signals converges to zero. Thus, the residual signal can be calculated as follows: where r is the residual signal.

Fault Diagnosis Using Support Vector Machine
Based on Figure 1, after estimating the normal and abnormal signals using the ANHVSO technique and finding the residual signals, the decision-making ability can be introduced into the pipeline using a support vector machine (SVM) technique. A SVM has two main steps: a) residual signal characterization, and b) SVM-based fault detection and identification (FDI). The residual signals obtained for normal and abnormal conditions are utilized for the FDI of the robot manipulator. First, numerical attributes such as feature parameters are used for SVM-based FDI [20][21][22][23][24][25]. Various types of features can be used. For this research, the energy of residual signals was selected. The value of the energy attribute can be computed as follows: where E, M and r xi are the energy of the residual signals in different conditions, the total number of instances, and the residual signal, respectively. After extracting the feature (e.g., energy) from the position and torque signals in normal and abnormal conditions, the SVM technique is used for FDI. The soft margin SVM is defined by the following equation: where (x i , y i ), (ω, b), ρ(x i ), and ϑ i are the inputs, outputs, features and maximum distance, respectively. Thus, the primal problem is defined by the following equation: Here, ∅ is a penalty coefficient. To solve the primal problem, two Lagrange coefficients (α i , µ i ) are defined, and then the minmax (saddle) point can be represented as follows: where L p is the saddle point which should be minimized with respect to ω, b, ϑ i and maximized with respect to α i , µ i . First, ω, b, ϑ i are removed to find the maximum of α i , µ i . Thus, the dual problem of (25) can be defined as Therefore, the dual of the saddle point can be defined as follows: where ρ(x i ) T ρ x j = K x i , x j is a nonlinear kernel function, If y i y j K x i , x j = h ij , (26) can be represented as follows: Therefore, the dual problem can be represented by the quadratic programming problem defined in Equation (32): min After finding α, the Karush-Kuhn-Tucker (KKT) optimization algorithm is defined by the following equation: Based on Equation (33), the KKT has various conditions. These conditions are represented by Equations (34)-(36). The non-support vector (NSV) is defined by the following equation: The outlier can be defined as: The support vector (SV) can be defined as: Therefore, ω and b can be defined based on the following equations, respectively: Here, S are support vectors and are defined by the following equation: The output based on the SVM leveraging soft margin and the kernel trick is defined as In this research, the Gaussian technique is used to define the nonlinear kernel function.

Fault Tolerant Control Using an Adaptive Modern Fuzzy Backstepping Variable Structure Controller
After designing a machine learning (SVM)-based ANHVSO for fault detection and identification, an active, modern, adaptive, fuzzy, backstepping, variable structure controller (AMFBVSC) is designed for fault tolerance. Based on Figure 1 (iv) To increase robustness and reduce chattering in faulty conditions, an adaptive algorithm is used for the online tuning of the coefficient in the MFBVSC to design the AMFBVSC. Based on [28], the mathematical definition of the VSC technique is obtained by the following equation: where U VSC , U f , and U M are the VSC output, the function based on the VSC, and the dynamic model based on the VSC, respectively. To improve robustness and unmodeled disturbance, a backstepping technique is used in parallel with the VSC and the designed BVSC.
Here, U BVSC , and U B are the BVSC output and the backstepping technique to find the robot output, respectively. In order to obtain an accurate response and a finite-time convergence based on the BVSC, the sliding surface is defined as the following equation.
Here, k 1 and k 2 are coefficients. The integral term is used to reduce the effect of the transient response and to reduce the steady state error. Therefore, when the sliding surface S converges to zero, we have: Appl. Sci. 2020, 10, 1344 13 of 26 The first and second derivative of the sliding surface can be defined as follows: Therefore, based on Equations (43) and (45), the order of the system is changed from second-order to third-order.
To design an effective control input of system (46), and based on (42), the backstepping technique is proposed. Therefore, the Equation (46) can be rewritten by: where 1 and 2 are virtual controllers. Hence, the derivative of ϑ 1 can be defined by: The Lyapunov function and the derivative of the Lyapunov function can be introduced: So, if ϑ 2 = 0, then ϑ 1 will be stable. The derivative of ϑ 2 is .
The Lyapunov function and the derivative of the Lyapunov function are So, if ϑ 3 = 0, then ϑ 1 and ϑ 2 will be stable. The Lyapunov function is defined by the following equation.
Based on Equations (46) and (47), the derivative of the Lyapunov function is defined by the following equation.
So, the ϑ 1 , ϑ 2 and ϑ 3 converge to the zero in the finite time. Therefore, it can be concluded that the BVSC is stable. To reduce the effects of uncertain conditions, a PID fuzzy technique is designed and implemented in the robot manipulator. The classical PID fuzzy technique has three inputs; i.e., error (e), differential of the error . e , and an integral of the error ( e). Therefore, the number of rules in the classical PID fuzzy controller is dramatically increased, causing an increase in the computational load. To design a minimum, rule-based, PID fuzzy controller, the PD-fuzzy-plus-PI-fuzzy algorithm is introduced. If the number of linguistic variables for the error, the differential of the error, and the integral of the error, is defined by (N), the number of rules for the classical PID fuzzy controller is N 3 , but the number of rules for the PD-fuzzy-plus-PI-fuzzy algorithm is 2N 2 . Thus, by applying this technique, the number of rules is reduced. However, while the number of rules is reduced, the PD-fuzzy-plus-PI-fuzzy approach requires a separate technique to design the PD and PI rule tables. To address this, a PI-like fuzzy algorithm can be designed based on the PD fuzzy technique. In this method, the integral term is used to change the PD-like fuzzy controller into a PI-like fuzzy controller by implementing the following steps. The membership functions of the PD fuzzy set for the system estimation of the error (e) in the interval −0.  Table 2 illustrates the PD fuzzy rule table used to improve the performance of the fuzzy BVSC (FBVSC). Therefore, the FBVSC is represented by the following equation: After improving the performance of the BVSC based on the FBVSC technique, to reduce the effects of faults and chattering, an SVM-based ANHVSO is used in parallel with the FBVSC to design a modern FBVSC (MFBVSC) technique. In this scenario, the proposed observer is used to estimate and identify a fault and its location. To improve the fault-tolerant control scenario, the MFBVSC is represented as follows: Here, U O and U MFBVSC are observation feedback to improve the performance of the fault-tolerant control algorithm in uncertain and unknown conditions and the output of the MFBVSC, respectively. In addition, to increase robustness and reduce chattering in uncertain and faulty conditions, an adaptive algorithm is used for the online tuning of the coefficients in the MFBVSC, thus defining the AMFBVSC.
In this scenario, based on Equation (56), various coefficients are used to tune U FBVSC . Of these, the coefficients used to reduce chattering, increase stability and improve reliability of the variables in U VSC play the main roles. Therefore, the adaptive technique is used for online tuning of µ 1 and µ 2 . A fuzzy algorithm can be used to accomplish this. Therefore, the AMFBVSC is represented by the following equation: A PD-like fuzzy algorithm is used for online tuning of the coefficients as in the following equation: Here, U AMFBVSC , U AVSC , µ 1(adaptive) & µ 2(adaptive) , and ∂ f are the output of the proposed algorithm for fault-tolerant control of the robot manipulator, the output of the online tuning VSC technique, the online tuning coefficients to reduce chattering, the fuzzy output for tuning the coefficients based on the error, and the derivation of the error, respectively. This is a powerful algorithm for reducing the effects of faults in the robot manipulator, and is based on the variable structure observer, a backstepping technique, a fuzzy algorithm, the proposed observation method, and an adaptive algorithm. Algorithm 1 shows the 12 steps used to design the proposed algorithm for fault detection, estimation, identification and fault-tolerant control.

Results and Analysis
The effectiveness of the proposed ANHVSO, NHVSO and VSO methods for fault detection and identification was evaluated using a 6-DOF PUMA robot arm. The same robot manipulator was used to test the effectiveness of the proposed AMFBVSC, FBVSC and VSC methods for fault-tolerant control. The mathematical model of this 6-DOF PUMA robot manipulator can be found in [1] and [28]. Sinusoidal signals for all joints are defined as desired reference signals. To test the accuracy and robustness of the proposed algorithm, three different faults were seeded on the desired signal at different locations: actuator, sensor, and actuator-sensor. The results are presented in two parts: a) fault detection and identification, and b) fault-tolerant control analysis.

Training and Testing Subset Configuration
For analyzing the fault detection and fault identification capabilities of the proposed methodology, the modeled dataset consisting of 2,000,000 samples (500,000 data instances per class) was randomly split into training and testing subsets. Specifically, 1,500,000 samples (375,000 instances per class) were used for training SVM classification algorithms, whereas the remaining previously unobserved 500,000 samples (125,000 instances per class) were utilized for the testing process. The similar dataset perturbations were applied to the residual signals obtained by the referenced NHVSO and VSO methods in order to perform the comparison between them and the proposed technique used in conjunction with the SVM classification algorithm.

Fault Detection and Fault Identification
To analyze the effectiveness of the proposed algorithm for fault detection and identification, normal and abnormal operating conditions (actuator fault, sensor fault, and actuator-sensor fault) are considered. Figure 2 illustrates the torque and position of the robot manipulator's joint in normal and faulty actuator conditions. The actuator fault, sensor fault and actuator-sensor fault for the PUMA robot manipulator are defined by Equations (59)-(61), respectively.
where Θ a and Θ s are actuator fault and sensor fault values, respectively. To test the accuracy, robustness and repeatibility of the proposed algorithm, three different faults were seeded on the desired signal at different locations and absolute value: actuator, sensor and actuator-sensor.
To test the robustness of the proposed ANHVSO, NHVSO and VSO methods under noisy conditions, Gaussian noise was added to the original signals in the normal and faulty conditions. Figures 3-5 illustrate the position and torque joint residual signals in normal and faulty conditions based on the VSO, NHVSO and ANHVSO for the robot manipulator, respectively. Regarding Figure 3, the VSO is prone to high frequency oscillation, especially under faulty conditions. To improve the robustness and accuracy, and to reduce the high frequency oscillation, NHVSO is used in the current work. Figure 4 illustrates the torque and position residual signals in the presence of noise for the robot manipulator under normal and faulty conditions. According to the residual signals computed through Equation (22) and illustrated in Figures 3 and 4, we can see that the VSO and NHVSO have problems to effectively estimate the signals under normal and abnormal conditions. Specifically, it means that the residual signals corresponding to some system states that were derived by the aforementioned methods have severe overlap (i.e., they are not discriminative enough). This problem can affect the final fault classification accuracy and increase the misclassification rates. From these figures, it can be observed that the residual signals are well differentiable in normal conditions, which means that they can be used for fault detection (i.e., differentiation between normal and abnormal conditions); but these techniques are not suitable for classification of the faults. Figure 5 illustrates the position and torques residual signals under the proposed ANHVSO algorithm, considering the normal and abnormal conditions of the PUMA robot manipulator. 1 Robot manipulator modeling based on the Lagrange method (6). 2 Run the second order VSO (8,9). 3 Improve the performance of the second order based on the HVSO (11,12). 4 Increase the reliability of this HVSO based on the neural algorithm and design the NHVSO (16,17). 5 Increase the fault estimation reliability and accuracy in the NHVSO with the ANHVSO (18,20,21). 6 Run the residual signal characterization by energy (22,23). 7 Run the learning process for SVM and apply the SVM classification technique for fault detection and identification (24-40). 8 Run the robust FTC based on the VSC (41). 9 Increase the robustness of the VSC based on a backstepping technique to design the BVSC (42). 10 Increase the accuracy of the BVSC in uncertain conditions using a fuzzy algorithm and design FBVSC (55).

11
Reduce the effects of faults and increase the reliability of the FBVSC based on the proposed observation technique and the designed MFBVSC (56).

12
Increase the robustness, stability, accuracy and performance, and reduce chattering in the MFBVSC using the adaptive technique and the designed AMFBVSC (57,58).
In Figure 5, there is a clear difference among residual signals used for differentiating normal and abnormal signals for fault detection and identification. In view of Figures 3-5, the ANHVSO algorithm allows more accurate and more differentiable residual signals compared with the ones obtained through the NHVSO and VSO algorithms. The energies of torque and position residual signals are illustrated in Figure 6. Based on this figure, in the normal condition, the residual signals of position and torque are lower than the ones corresponding to abnormal conditions. In sensor faulty conditions, the position residual signal is bigger than the one corresponding to the actuator fault, but the torque residual signal is smaller than the one corresponding to the actuator fault. For fault detection and classification, the types of faults such as actuator fault, sensor fault and actuator-sensor fault, SVM is used in this research. Therefore, the SVM+VSO, SVM+NHVSO and SVM+ANHVSO methods are used for fault detection and identification. The results are presented in Figure 7 and Table 3. The confusion matrices from Figure 7 demonstrate that all of the methods show high fault detection accuracies (i.e., differentiating between normal and abnormal states). Regarding the fault identification (i.e., differentiating between types of faults), it can be seen that the SVM+ANHVSO method resulted in the smallest numbers of misclassified samples for all of the signal classes in comparison with the SVM+VSO and SVM+NHVSO methods.
where Θ and Θ are actuator fault and sensor fault values, respectively. To test the accuracy, robustness and repeatibility of the proposed algorithm, three different faults were seeded on the desired signal at different locations and absolute value: actuator, sensor and actuator-sensor. 1 Robot manipulator modeling based on the Lagrange method (6).
2 Run the second order VSO (8,9).   The results shown in Table 3 indicate that the SVM+ANHVSO method outperforms the SVM+VSO and SVM+NHVSO techniques in terms of average accuracy with a value of 98.7%. Moreover, from Table 3, it can be observed that for all of the signal classes, the accuracy of fault detection and identification through the SVM+ANHVSO method is higher compared to the one of the aforementioned methods.
Overall, it can be concluded that the SVM-based ANHVSO (SVM+ANHVSO) method is highly effective in detecting and identifying the operating conditions of the robot manipulator. The best results shown by the ANHVSO technique outperform the best results achieved by the NHVSO and VSO approaches by 27% and 29.2%, respectively.
In addition, we compare our proposed approach with the following state-of-the-art methods: ARX-Laguerre fuzzy PID observer (ALFPIDO) [2], fuzzy ARX-Laguerre fuzzy extended feedback linearization observer (FALFEFLO) [8], ARX-Laguerre fuzzy extended PI observer (ALFEPIO) [10], fuzzy PI feedback linearization observer (FPIFLO) [29] and ARX-Laguerre extended PI observer (ALEPIO) [30] in terms of performance. As shown in Table 4, the proposed method for robot fault diagnosis outperforms the state-of-the-art ALFPIDO method, FALFEFLO technique, ALFEPIO procedure, FPIFLO algorithm and ALEPIO method, yielding average performance improvements of 13.2%, 5.5%, 7.8%, 13.1% and 15.6% for three faults, respectively.    In Figure 5, there is a clear difference among residual signals used for differentiating normal and abnormal signals for fault detection and identification. In view of Figures 3-5, the ANHVSO algorithm allows more accurate and more differentiable residual signals compared with the ones obtained through the NHVSO and VSO algorithms. The energies of torque and position residual signals are illustrated in Figure 6. Based on this figure, in the normal condition, the residual signals of position and torque are lower than the ones corresponding to abnormal conditions. In sensor faulty conditions, the position residual signal is bigger than the one corresponding to the actuator fault, but the torque residual signal is smaller than the one corresponding to the actuator fault. For fault detection and classification, the types of faults such as actuator fault, sensor fault and actuator-sensor fault, SVM is used in this research. Therefore, the SVM+VSO, SVM+NHVSO and SVM+ANHVSO methods are used for fault detection and identification. The results are presented in Figure 7 and Table 3. The confusion matrices from Figure 7 demonstrate that all of the methods show high fault detection accuracies (i.e., differentiating between normal and abnormal states). Regarding the fault identification (i.e., differentiating between types of faults), it can be seen that the SVM+ANHVSO method resulted in the smallest numbers of misclassified samples for all of the signal classes in comparison with the SVM+VSO and SVM+NHVSO methods.

Fault-Tolerant Control
After designing an SVM-based ANHVSO for fault detection and identification, an active modern adaptive fuzzy backstepping variable structure controller (AMFBVSC) is designed for fault tolerance. Figure 8 shows the performance of the algorithm: AMFBVSC, FBVSC and VSC, in abnormal conditions. It is clear from the figure as to the efficiency of the AMFBVSC method in reducing the effects of the FBVSC and VSC techniques. From Figure 8 and Equation (42), it can be seen that the BVSC method is weak regarding the properties of robustness and accuracy, especially in faulty conditions. To improve the robustness and accuracy, FBVSC is applied in the study. According to the power of fault-tolerant control computed through Equations (42,55) and demonstrated in Figure 8, we can see that the BVSC and FBVSC have problems reducing the effect of actuator-sensor fault in the joint position. Based on Figure 8 and From Figure 8 and Equation (42), it can be seen that the BVSC method is weak regarding the properties of robustness and accuracy, especially in faulty conditions. To improve the robustness and accuracy, FBVSC is applied in the study. According to the power of fault-tolerant control computed through Equations (42,55) and demonstrated in Figure 8, we can see that the BVSC and FBVSC have problems reducing the effect of actuator-sensor fault in the joint position. Based on Figure 8 and Equation (57), the proposed fault-tolerant control algorithm (AMFBVSC) has effectively reduced the effect of the fault. Regarding Figure 8, the fault-tolerant control algorithm based on the AMFBVSC method is more powerful compared to the BVSC and FBVSC methods. The efficiencies under various faulty conditions of the fault-tolerant control algorithms based on the AMFBVSC, FBVSC and BVSC are presented in Figures 9-11.      Figure 9 shows the error of the position for the fault-tolerant control based on the AMFBVSC, FBVSC and BVSC methods in the presence of an actuator fault. It is evident that the AMFBVSC method is more robust than the other two. According to this figure, the difference between the normal and actuator faulty joint position when using the algorithm based on the AMFBVSC is close to zero (e.g., ≅ 0.2 × 10 −3 ). Figure 10 shows the performance of the three fault-tolerant control algorithms in reducing the effects of a sensor fault in the robot manipulator. The effectiveness of the sensor fault tolerant control in the robot manipulator when using the AMFBVSC is higher compared to the one corresponding to the other two methods. According to Figure 10, the difference between the normal and sensor faulty joint position when using the algorithm based on the AMFBVSC is about 1 × 10 −3 . Figure 11 shows the actuator-sensor (multi) fault reduction in the robot manipulator for the algorithms based on the AMFBVSC, FBVSC and BVSC. As in the previous cases, it can be seen that the power of actuator-sensor fault reduction based on the AMFBVSC algorithm is better than the one of the other two methods. According to Figure 11, the difference between the normal and actuatorsensor faulty joint position when using the algorithm based on the AMFBVSC is close to zero (≅ 0.25 × 10 −3 ). Overall, it can be concluded that the AMFBVSC is highly-effective in controlling various types of faults (e.g., actuator fault, sensor fault and actuator-sensor fault) in the robot manipulator.

Conclusions
This paper proposed a fault diagnosis and fault-tolerant controller for a robot manipulator using an SVM-based neural adaptive, high-order, variable, structure observer and an adaptive modern (ANHVSO) fuzzy backstepping variable structure controller, respectively. To increase the signal estimation accuracy, a neural adaptive, high-order, variable, structure observer is implemented. This technique improves the robustness, reliability and accuracy in unknown (faulty) conditions. A residual signal is generated and characterized by energy. In addition, a machine learning technique known as SVM is used for fault detection and identification. To improve the effectiveness of the faulttolerant control algorithm, an adaptive modern fuzzy backstepping variable structure controller is suggested in this research. Chattering in the VSC is addressed through a backstepping technique. The fuzzy technique reduces the effect of the BVSC. The new observation technique improves fault reduction in the FBVSC. Moreover, an adaptive technique is used to improve the robustness and reliability of the MFBVSC. The effectiveness of the selected algorithm was validated using a PUMA robot manipulator.  Figure 9 shows the error of the position for the fault-tolerant control based on the AMFBVSC, FBVSC and BVSC methods in the presence of an actuator fault. It is evident that the AMFBVSC method is more robust than the other two. According to this figure, the difference between the normal and actuator faulty joint position when using the algorithm based on the AMFBVSC is close to zero (e.g., 0.2 × 10 −3 ). Figure 10 shows the performance of the three fault-tolerant control algorithms in reducing the effects of a sensor fault in the robot manipulator. The effectiveness of the sensor fault tolerant control in the robot manipulator when using the AMFBVSC is higher compared to the one corresponding to the other two methods. According to Figure 10, the difference between the normal and sensor faulty joint position when using the algorithm based on the AMFBVSC is about 1 × 10 −3 . Figure 11 shows the actuator-sensor (multi) fault reduction in the robot manipulator for the algorithms based on the AMFBVSC, FBVSC and BVSC. As in the previous cases, it can be seen that the power of actuator-sensor fault reduction based on the AMFBVSC algorithm is better than the one of the other two methods. According to Figure 11, the difference between the normal and actuator-sensor faulty joint position when using the algorithm based on the AMFBVSC is close to zero 0.25 × 10 −3 . Overall, it can be concluded that the AMFBVSC is highly-effective in controlling various types of faults (e.g., actuator fault, sensor fault and actuator-sensor fault) in the robot manipulator.

Conclusions
This paper proposed a fault diagnosis and fault-tolerant controller for a robot manipulator using an SVM-based neural adaptive, high-order, variable, structure observer and an adaptive modern (ANHVSO) fuzzy backstepping variable structure controller, respectively. To increase the signal estimation accuracy, a neural adaptive, high-order, variable, structure observer is implemented. This technique improves the robustness, reliability and accuracy in unknown (faulty) conditions. A residual signal is generated and characterized by energy. In addition, a machine learning technique known as SVM is used for fault detection and identification. To improve the effectiveness of the fault-tolerant control algorithm, an adaptive modern fuzzy backstepping variable structure controller is suggested in this research. Chattering in the VSC is addressed through a backstepping technique. The fuzzy technique reduces the effect of the BVSC. The new observation technique improves fault reduction in the FBVSC. Moreover, an adaptive technique is used to improve the robustness and reliability of the MFBVSC. The effectiveness of the selected algorithm was validated using a PUMA robot manipulator.
The use of the ANHVSO improved the average fault identification performance for various types of faults by about 27% and 29.2% compared with the NHVSO and VSO, respectively.
Author Contributions: All of the authors contributed equally to the conception of the idea, the design of experiments, the analysis and interpretation of results, as well as the writing of the manuscript. All authors have read and agreed to the published version of the manuscript.