An Optimized RBF Neural Network Based on Beetle Antennae Search Algorithm for Modeling the Static Friction in a Robotic Manipulator Joint

Friction is a nonlinear effect that occurs in all mechanical systems which may cause limit cycles, tracking errors, and other undesirable effects. Traditional static friction models cannot characterize all the friction situations. In recent years, neural network (NN) technique has been widely used to approximate the nonlinear function. In this paper, a newmethod which combines radical basis function neural network (BRFNN) with beetle antennae search (BAS) algorithm for modeling friction in a robotic joint is proposed. Velocity, load, and temperature are considered as the three factors that influence the static friction. It is shown that the proposed BAS-RBFNN possesses better performance in terms of faster convergence rate and higher accuracy.


Introduction
Friction can be defined as a kind of force resisting the relative motion of two surfaces in contact. It can be influenced by many factors, including greases, contact materials, temperature, relative velocity, wears, and load [1]. It may cause limit cycles, tracking errors, and other undesirable effects in control [2,3].
Generally, friction models can be divided into two categories: static models and dynamic models [8,9]. In this paper, static friction is studied based on experiments in a robotic manipulator joint. Many static friction models have been proposed in the past, among which viscous and Coulomb are two typical ones describing the friction as a function of velocity: where F is the friction force, _ θ is the relative velocity of the surfaces, F c is the Coulomb friction force, β is the coefficient of the viscous friction, and sign(·) is the sign function.
Stribeck [10] observed that the friction decreases as the velocity increases in the low-velocity Stribeck region and modeled the friction as below: where F s is the extra break-away force to start the movement and v s is the Stribeck velocity that defines the region in which such an effect is present. e Coulomb friction coefficient is linear with the load, whereas the viscous coefficient and Stribeck velocity keep steady when the load varies [11,12]. erefore, load should also be considered.
en, the joint load extended friction model M sk model was proposed: where τ L is the load in the joint and F sk and F ck are the incremental parameters describing the changes in F s and F c , respectively.
In addition, recent research shows that temperature has great influence on friction. In [13], a new mathematical model which describes the velocity, temperature, and load torque dependent friction torque for collaborative industrial robot joints is built: However, no model is more effective than the other since many factors can significantly affect the practical implementation and the performances of each scheme [6].
erefore, a universal model is needed. In recent years, neural network (NN) has been widely employed to build the relationship, especially nonlinear relationship between inputs and outputs [14]. A friction compensation method using the fuzzy neural network for friction compensation is proposed in [15], where the simulation is conducted using a 3DOF planar robot manipulator. In [16], friction and the disturbance are identified by a neural network. e PID controller with neural network is designed. In [17], an adaptive control method for hybrid position/force control of robot manipulators based on neurofuzzy modeling is presented. Adaptive control with Artificial Neural Network-(ANN-) based compensation of dynamic uncertainties such as friction was proposed in [18]. Unlike many approaches for ANN-based control, parameter update equations for the ANN model and for the parametric adaptive model are driven by both the tracking error and the system identification error. In [19], an adaptive neural network friction compensator was presented for servocontrol of hard disk drives. e abovementioned control methods identify the friction and the disturbance simultaneously which leads to a decrease in the accuracy of friction models. erefore, some researchers proposed a genetic algorithm-optimized BP neural network to model the relationship between velocity, joint load, and the static friction [20]. It is shown that the GA-BPNN model has a higher prediction precision and better generalization capability compared with the M sk model. However, the effect of temperature is not considered in this model and the training speed of the BP network is slow and the convergence is difficult. us, we propose to use radical basis function neural network (RBFNN) which can increase the training speed by using a local transfer function so that only a few neurons have a nonzero response and become active to each input value. Numerical analysis has proved that compared with the BP neural network, RBFNN is superior in approximating continuous functions [21].
However, RBFNN also suffers from the problem that its performance depends heavily on the input data and initial values of the parameters. is paper employs the beetle antennae search (BAS) algorithm to optimize the parameters of RBFNN in order to minimize the required time and effort. Furthermore, temperature is also considered in this model. e rest of the paper is organized as follows. In Section 2, the experimental method to obtain velocity, load, temperature, and friction is proposed. And the setting approaches of the velocity, load, and temperature are described in detail.
e BAS-RBFNN model is presented in Section 3 and validated in Section 4. In Section 5, conclusions and future works are presented.

Measurement of Static Friction.
For a manipulator, the dynamic model can be described as where M(θ) is the inertial matrix, C(θ, _ θ) is the Coriolis and centrifugal terms, τ g (θ) relates to the gravitational torque and τ f ( _ θ) is the friction torque in the joint, and u is the input torque.
When the joint rotates in a constant velocity, the Coriolis force and inertial force can be ignored. us, the dynamic model can be expressed as follows: where J is the moment obtained by the motor, € θ is the angular acceleration of the motor, τ m is the motor torque, τ f is the friction torque, and τ g is the gravitational torque which can be expressed as where θ is the position of a joint and p x and p y are the coefficients which can be obtained by the least-squared based method. us, equation (6) can be simplified as follows: We make two trajectories in opposite directions with constant velocity and obtain the actual motor torque τ + m and τ − m . Since the gravitational torque τ g (θ) is basically equal around the same θ, we have en, we have Since the RV reducer is of high precision, friction forces in both directions are approximate. Dividing the two sides of equation (10) by 2 yields

Parameters Settings of Load, Velocity, and Temperature.
In this paper, velocity, load, and temperature are considered as influence factors of friction torques. us, the data samples of friction should be obtained under different velocities, loads, and temperatures. Furthermore, the number of samples is of great significance for the training process and performance of the neural network. Too many or too few samples will lead to overfitting or underfitting.
For joint load samples, the gravitational torque is considered as the joint load and changes with different θ: According to equation (7), the gravitational torque fitting curve in which p x � 0.2011 and p y � 0.06175 is in Figure 1. en, we set 21 joint positions ranging from − 60°to − 20°with 2°step size to obtain the load samples.
Since the Stribeck phenomenon at a low speed is very prominent, the velocity sampling should be denser. In the viscous area, it can be distributed loosely [20]. us, the following 15 joint velocities are selected: 0.1, 0.3, 0.5, 1.0, 2.0, 4.0, 6.0, 9.0, 13, 18, 24, 31, 38, 44, and 50 degree/s. For temperature samples, the range should be wide enough for current application. erefore, it is set from 5°C to 45°C with 2°C step size. e joint torque τ m is obtained as where I is the motor current and K is a torque constant. e sampling frequency is 0.25 kHz.
In the sampling process, measurement noise, which may cause uncertainty and bias errors, is assumed to be an additive normally distributed zero-mean stochastic disturbance. erefore, we set the joint move periodically for 10 times. All the data samples are obtained by averaging. Moreover, the current data in the joint motor is further filtered by median filtering.

Design of RBFNN for Modeling the Static Friction.
BPNN is the most commonly used artificial neural network (ANN) due to good generalization capability and robustness. Compared with BPNN, RBFNN has the advantages of approximation, category, and convergence velocity. e radial basis function neural network which is composed of three layers is a kind of feed-forward neural network. e input layer transfers the data to the hidden layer and the hidden layer is the basis function layer which is composed of a basis function. e most common basis function is a Gaussian function as below: where x ∈ R is a vector of n dimensions, c i ∈ R is the center of the ith unit in the hidden layer, σ i determines the extent of the basis function, and ‖x − c i ‖ means the distance between x and c i . Only a small part of inputs is activated near x. e output can be expressed as the linear-weighted sum of the basic functions in the hidden layer, which is shown as below: e error of kth neuron in the output layer is where Y k and O k are the desired and actual value of the ith neuron in the output layer. e total error of the output layer is where m is the number of neurons in the output layer. e experiment takes load, velocity, and temperature as inputs and static friction torques as the outputs. e structure of the RNN is shown in Figure 2.

Beetle Antennas Search Algorithm.
e beetle antennae search algorithm (BAS) is a metaheuristic algorithm that is inspired by the searching behavior of longhorn beetles [22,23]. A vector x t at tth time instant (t � 1, 2, . . .) denotes the position of the beetle. At position x, f(x) is defined as the fitness function to represent the concentration of odour. Normally, we can use two rules to simplify the algorithm, where rands(·) represents a random function and m is the number of dimensions of the position. x r and x l are defined to imitate the searching behavior of both the right and left antennae: where d is the sensing length of antennae. An iterative form is proposed to model the detecting behavior: where δ is the step size and sign(·) represents a sign function. e antennae length d and step size δ are updated according to the following formula:

e RBFNN Optimized by BAS.
e validity and accuracy of RBFNN may be reduced if the weights and biases are improperly selected. e BAS algorithm is used to optimize the network parameters of RBFNN. In this section, the BAS-RBFNN method is proposed to overcome the shortcomings of low accuracy. e process is shown in Figure 3

Validation and Discussion
All experiments were made on joint 2 of Robot SIASUN SR4C as seen in Figure 4(a). e D-H model is in Figure 4(b). e desired temperature was carefully held constant in a thermostatic laboratory, as shown in Figure 5. Before the experiments, the desired equilibrium joint temperature should be reached by running the second joint continuously.

e Effects of Velocity, Load, and Temperature on Static
Friction. In this section, the effects of velocity, load, and temperature on the static friction are investigated, respectively. Based on the constant-speed tracking experiment, two combined factors dependence of friction is plotted in Figure 6.
As shown in Figure 6(a), the Stribeck phenomenon is very prominent and the viscous friction plays a heavy role at high speed [9]. e static friction decreases obviously with the increasing temperature, as shown in Figure 6(b). e reason is that the limiting shear stress decreases nonlinearly as the temperature rises [24]. According to [11], the friction is proportional to force between two surfaces in contact. e theory can be extended to a robot joint. Obviously, with the increase of gravity load, the value of friction increases, as shown in Figure 6(c). e goodness-of-fit and errors between actual friction and model prediction for three kinds of models from equation (2) to equation (4) are presented in Table 1.
e normalized value of errors are presented in Figure 7, which indicates that both temperature and load have large influence on friction. Many researchers have only investigated two of these factors [20,25,26]. erefore, it is of great significance to investigate all three factors.

Prediction Effects of BAS-RBFNN, RBFNN, and Velocity-Load-Temperature Model.
To compare the prediction effects of three models, we take all the data as the train set and compare the prediction effects with the analytical model in equation (4), the related parameters of which are listed in Table 2. Figure 8 shows that the mean error predicted using BAS-RBFNN is about 0.0011 Nm, which is lower than 0.0029 using RBFNN and 0.0058 Nm using the analytical model. Details are shown in Table 3. Compared with RBFNN, BAS-RBFNN has advantage in data fitting, especially for a higher accuracy prediction.

Comparison of Prediction Effects between GA-RBFNN and BAS-RBFNN.
Genetic Algorithm (GA) is widely used for optimization. In this section, GA-RBFNN and BAS-RBFNN for friction modeling are compared. Table 4 shows that the accuracy of the two methods is nearly the same. In the training process, the mean squared error (MSE) is set to 0.0001. Figure 9 shows the training process of GA-RBFNN and BAS-RBFNN about the mean squared error (MSE). For GA-RBFNN, the target MSE is obtained at epoch 356, while for BAS-RBFNN, the target MSE is obtained at epoch 257. It can be seen that the proposed BAS-RBFNN possesses better performance in terms of faster convergence rate compared with GA-RBFNN.              Figure 10. It is shown that the maximum and average errors are 0.0063 Nm and 0.0012 Nm, which indicates that the proposed BAS-RBFNN has good generalization capability in unseen areas.

Conclusion and Future Work
In this paper, we propose a BAS-RBFNN method to describe the relationship between velocity, load, temperature, and friction. It is shown that the proposed BAS-RBFNN model has a better prediction precision and a higher convergence rate than RBFNN. In the future, some other influencing variables for static friction will be considered to improve the generalization capability. Furthermore, dynamic friction will be studied.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request. Mathematical Problems in Engineering 9