Constant Force PID Control for Robotic Manipulator Based on Fuzzy Neural Network Algorithm

. The increased demand for robotic manipulator has driven the development of industrial manufacturing. In particular, the trajectory tracking and contact constant force control of the robotic manipulator for the working environment under contact condition has become popular because of its high precision and quality operation. However, the two factors are opposite, that is to say, to maintain constant force control, it is necessary to make limited adjustment to the trajectory. It is diﬃcult for the traditional PID controller because of the complexity parameters and nonlinear characteristics. In order to overcome this issue, a PID controller based on fuzzy neural network algorithm is developed in this paper for tracking the trajectory and contact constant force simultaneously. Firstly, the kinetic and potential energy is calculated, and the Lagrange function is constructed for a two-link robotic manipulator. Furthermore, a precise dynamic model is built for analyzing. Secondly, fuzzy neural network algorithm is proposed, and two kinds of turning parameters are derived for trajectory tracking and contact constant force control. Finally, numerical simulation results are reported to demonstrate the eﬀectiveness of the proposed method.


Introduction
Nowadays, the increased involvement of robotic manipulators in various industrial manufacturing facilities, such as precision assembly, and polishing in the field of ceramic sanitary ware or aircraft engine, precision surgery, and automobile manufacturing lead to new and innovative developments in the domain of dynamic modeling of mechanisms and control [1][2][3]. According to the working conditions of the robotic manipulators, there are two types: contract and noncontact. e vital features of the contact working condition are highly precise trajectory tracking capabilities; at the same time, it should have the ability to adjust the contact force/twist flexible [4,5]. Along with the complexity and nonlinearity issues, the robotic manipulator suffered from various uncertainties, external disturbances, payload variations, and parameter variations during their operations [6,7]. erefore, it is not possible for the traditional proportional-integral-derivative (PID) controllers to provide effective control for trajectory tracking and constant force/twist control simultaneously.
According to the given value r(t) and the actual output value c(t), the traditional PID control combines the deviation e(t) � r(t) − c(t) by proportion (P), integration (I), and differentiation (D) to form the control quantity. e control law is given by where K p is proportionality coefficient, T i is integral time constant, T d is differential time constant, andK i � K p /T i is integral coefficient and K d � K p · T d is differential coefficient. e parameter selection of a traditional PID controller must take into account the dynamic and static performance requirements. By using the method of closed-loop response, a heuristic tuning method of PID parameters is proposed by Ziegler and Nichols in the 1940s. In recent times, an overwhelming development in the terrain of advantage PID control schemes for parameters tuning has encouraged various control engineers to work in this developing field. Differential evolution (DE), genetic algorithm (GA), and particle swarm optimization (PSO) were used to determine the optimal gains of the position domain PID controller, and three distinct fitness functions were also used to quantify the contour tracking performance of each solution set in [8]. In order to expand the robustness and adaptive capabilities of conventional PID controller, a neural network-(NN-) based PID controller which is tuned when the controller is operating in an online mode for highperformance magnet synchronous motor position control was proposed by Kumar et al. [9], and the training algorithm for the PID controller gain initialization based on the minimum norm least square solution was also proposed. For the last few years, several works have been cited on the intelligent algorithm as well as online policy iterative approach, adaptive optimal control, sliding mode control, and neural network control for different processes or plants such as uncertain nonlinear systems [10,11], autonomous under water vehicle (AUV) [12], mobile robot [13], permanent magnet synchronous motor drivers [14], and many others [15][16][17][18][19].
Recently, real-time trajectory optimization of robotic manipulators has received a lot of attention and research due to the increasing demand to improve movement speed, accuracy, and lower energy consumption when executing tasks. Several authors have been working toward intelligent PID control techniques of trajectory tracking for robotic manipulators, such as global asymptotic saturated PID control [20], fuzzy PID for enhanced position control in surgery robot [21], mobile robot [22][23][24][25], and flexible joint robot [26]. However, trajectory tracking is not the only factor to ensure the accuracy of the operation during the contact working conditions of the robotic manipulator, such as high precision flexible assembly, surface polishing, and location of clamp in minimally invasive surgery (shown in Figure 1).
With the changes of the pressure, temperature, friction, and wear of the contact surface, the contact force/twist between the robot and the work piece will also change. Although the robotic manipulator can run accurately according to the present trajectory, the machining quality or assembly quality on the contact surface will decline. By using a modified hybrid computed torque method based on the principle of orthogonalization, Sanchez presented an improving force tracking control structure to reduce the number of sensors with a velocity observer [27]. Cortesao proposed double active observer architecture to tackle precise force control in the presence of heart motion, and one controls the desired interaction force, and the other one is responsible for compensating heart motion autonomously [28]. An adaptive fuzzy backstepping position tracking control scheme was proposed for multirobot manipulator systems, and extra terms were also added to the control signals to consider the force tracking problem by utilizing the properties of internal forces in [29]. Accurate and robust force/twist control is still a great challenge for robot-environment contact applications, such as in drilling operations [30], polishing [31][32][33], welding [34], and surgical tasks [35].
In general, the traditional PID controller helps in eliminating the steady state error. However, this controller does not provide effective control in presence of nonlinearities and uncertainties. Moreover, motivated by the research studies carried out in [36,37]. We proposed in this paper fuzzy neural network proportion-integration-differentiation (FNN-PID) constant force/twist control of the robotic manipulator for contact working conditions. e main contributions of the current paper are summarized as follows: (1) By using Lagrange energy function, the precise dynamic model of two-link robotic manipulator is built. Compared with the literature [38], it completely represents the relationship between actuated torque and displacement and velocity and acceleration in joint space. (2) For the contact working condition, the change of contact force will reduce the machining quality, so it is important to keep the contact constant force during manufacturing process. However, constant contact force and trajectory tracking are opposite to each other. In order to tune PID controller parameters quickly and effectively, a fuzzy neural network algorithm is proposed for two kinds functions of PID controller, that is, trajectory tracking and limited change online while contact constant force control.
is paper is organized in the following manner. Section 2 presents the precise dynamic modeling method, and the precise dynamic model of two types of planar robotic manipulator with RR (revolute joint) and RP (prismatic joint) are derived. Section 3 describes the PID controller with fuzzy neural network, and its stability is analyzed. Section 4 discusses the relationship between the contact force/twist with the trajectory according to the contact working conditions, and numerial simulation results are reported to demonstrate the effectiveness of the proposed method. Finally, conclusions are given in Section 5.

Dynamic Modeling of Two-Link Robot
e dynamic mathematical model for a rigid planar robotic manipulator having two links and a contact surface and the external force acted on the surface, as shown in Figure 2. According to the coordinate system o − xy , it consists of two links having link length l 1 and l 2 with their center of mass m 1 and m 2 lying at the middle of links, respectively. e length of center of mass are p 1 and p 2 , respectively. Different from the literature [39], the Lagrange method is used to build the precise dynamic model of two-link robotic manipulator with their nominal values as listed in Table 1.
e location coordinates and the square of velocity of 1 # center of mass can be derived as follows: 2 Complexity e total potential energy of the two-link robotic manipulator is   Complexity 3 e Lagrange function is constructed as follows: e dynamic equation of the two-link robotic manipulator can be calculated by e torque of joint 1 τ 1 can be derived as follows: zL where Meanwhile, the torque of joint 2 τ 2 can be also derived as Combined (8) with (10), the robotic plant can be rewritten with the following mathematical model: Comparing with the literature [39], (12) completely represents the relationship between actuated torque and displacement and velocity and acceleration in joint space. e issues with D 11 and D 22 represent the moment of inertia caused by the acceleration of joint 1 and joint 2, respectively. e issues with D 12 and D 21 represent the moment of inertia of the acceleration coupling between two joints. e issues with D 122 and D 211 represent the coupling moment term of the centripetal force caused by the velocity between two joints. e issues with D 112 and D 212 represent the coupling moment term of the Coriolis force between two joints. D 1 and D 2 represent the gravity moment term. Considering the effect of centroid inertia, (12) can be modified by Furthermore, to consider the effect of contact force act on the end-effector, right side of (12) can be replaced by where h e is the force and moment vector applied by the endeffector in the working environment, and J T (q) is the velocity Jacobian matrix, which yields to

PID Controller with Fuzzy Neural Network Algorithm
In order to design a fuzzy neural network PID (FNN-PID) controller for trajectory tracking and constant force control of the robotic manipulator, it is essential to derive the absolute error and the rate change of the external force act on the end-effector as the inputs for the fuzzy controller, which are calculated as where Δe 1 is the error of trajectory tracking, r(t) is the given planning trajectory, y(t) is output trajectory at time t, Δe 2 is the error of contact force, c(t) is the given contact constant force, and τ(t) is the output contact force. A block diagram illustrating the proposed FNN-PID controller is shown in Figure 3. e fuzzy control algorithm comprises the following three units: fuzzification, fuzzy rules, and defuzzification: (i) When the error is large, in order to maintain a rapid response and make the absolute or errors reduce with the maximum speed, K p should be bigger and K I and K D should be smaller. As the error decreases, to prevent an excessively large overshoot, K D should be added, and K p and K I should be decreased uniformly. (ii) When the system is over the steady state and the error is increasing, in order to decrease the overshoot, K D should be bigger and K I and K D should be smaller. (iii) When the system is tending toward a steady state, K P should be assigned a bigger value in order to enhance the response speed and access the steady state quickly. K D should be added to decrease the overshoot and K I should be reduced to avoid the oscillations caused by integral overshoot. (iv) When the overshoot of the system is negative and the error is increasing, K D should be assigned a bigger value. When the error reaches the maximum and the system tends toward a steady state, K D should be decreased and K P and K I should be increased. Forty-nine fuzzy rules are obtained for the proposed fuzzy algorithm as follows:

Rule three: if (e is NB) and (ec is NS) then (K P is PM), (K I is NM), and (K D is NB)
· · · · · · · · · Fuzzy rule setting for K p , K I , and K D is given by Table 2.
(3) Defuzzification: defuzzification was performed to extract the values from all of the rules given above, where the number of rules was transformed into the number of variables by using a membership function. A center of gravity method is employed for defuzzification in this paper [40].
Furthermore, in order to accelerate the trajectory tracking and constant force control by the fuzzy PID controller, the NN is utilized in the proposed method previously.
Neural network function solves nonlinear problems, which change into linear ones, by mapping the low-dimension original space to the high-dimension feature space and approximating any continuous function with the weighted sum of multiple basis functions. e neural network structure is shown in Figure 5.
In the network structure, m ] T is the vector of radial basis, and h j is usually the Gauss function: where C j � [c j1 , c j2 , · · · , c jn ] T is the center vector of the nth node and B � [b 1 , b 2 , · · · , b m ] T is the width of the basis vector; the weight vector of network is selected as W � [w 1 , w 2 , . . . , w m ] T . e output of the neural network is given by  Complexity 5 e optimization objective function is given by According to the gradient descent method, the iteration algorithm of the neural network parameters is satisfied as follows:     Complexity where η is the learning rate and α is the momentum factor. Regarding the sensitivity of the output to input changes, the algorithm is given as follows:

Simulation and Discussion
In this section, numerical simulation is conducted to demonstrate the performance of the proposed controller. e initialization parameters are determined as η � 0.25 and α � 0.04. e initial value of the weight vector, the node center, and the width value of the basis function are shown as follows: Surface schematic representations of the gain control parameters comprising K P , K I , and K D are shown in Figure 6. e contact constant force is loaded as 10N, and the response curves of two control strategies are shown in Figure 7. e constant force traction error in the stability interval (1.5-10 s) is shown in Figure 8 Figure 10. It shows that the maximum error is 0.03 mm, and the error is close to balance position and keeps stabilities after 0.8 s.
In order to test the dynamic characteristics of the proposed system, step function is used as an external disturbance at 5 s, and the displacement tracking of directions x and y is shown in Figure 11.
It shows that the tracking performance is convergence behind 0.85 s for x direction and 0.25 s for y direction,   respectively. Furthermore, the constant force tracking is also adjusted convergence with external disturbance, as shown in Figure 12.

Conclusions
e framework of the fuzzy-neural-network PID (FNN-PID) control of the robotic manipulator has been presented in this article. By using Lagrange energy function, a precise dynamic model of two-link robotic manipulator is built, and the relationship among actuated torque, displacement, velocity, and acceleration in joint space is presented. In order to tune PID controller parameters quickly and effectively, a fuzzy neural network algorithm is proposed for two kinds of PID controller, that is, trajectory tracking and limited change online while in contact with constant force control. Numerical simulations are conducted and analyzed to illustrate the effectiveness of the proposed method.

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

Conflicts of Interest
e authors declare that they have no conflicts of interest.  Complexity