# Nonlinear Nonsingular Fast Terminal Sliding Mode Control Using Deep Deterministic Policy Gradient
## 2 Manipulator Model  
According to [5; 22; 31], the dynamic differential equation model of n-DOF manipulator system is as follows:  
\[\mathrm{M(q)\ddot{q}+C\left(q,\ \dot{q}\right)\ \dot{q}+G(q)+F\left(\ \dot{q}\right)+\tau_{d}(t)=\tau(t)} \tag{1}\]  
where: \(q,\ \dot{q},\ddot{q}\ \in\ R^{n}\) correspond to the position, velocity, and acceleration of the manipulator, \(\mathrm{M(q)=\widetilde{M}(q)+\delta M(q)\in R^{n\times n}}\) is the actual inertia matrix of order \(n\times n\), \(C\left(q,\ \dot{q}\right)\)\(=\widetilde{C}\left(q,\ \dot{q}\right)+8C\left(q,\ \dot{q}\right)\)\(\in R^{n\times 1}\) is the \(n\times 1\) order inertia matrix of centrifugal force and Coriolis force, \(\widetilde{M}(q),\ \widetilde{C}\left(q,\ \dot{q}\right)\) is the standard model, \(\delta M(q),\ \delta C\left(q,\ \dot{q}\right)\) is the error of the real dynamic model. \(G(q)\in R^{n\times 1}\) is the inertia vector of order \(n\times 1\) and represents the gravity matrix; \(F\left(\ \dot{q}\right)\) is the \(n\times 1\) order inertia vector, which represents the friction force and disturbance load; \(\tau_{d}(t)\in R^{n\times 1}\) is interference term and uncertainty term; \(\tau(t)\) is the system control input.  
The actual dynamic equation of the manipulator can be written as follows:  
\[\widetilde{M}(q)\ddot{q}+\widetilde{C}\left(q,\ \dot{q}\right)\ \dot{q}+D=\tau(t) \tag{2}\]  
where:  
\[D\left(q,\ \dot{q}\,\ddot{q}\right)=\delta M(q)\ddot{q}+\delta C\left(q,\ \dot{q}\right)\ \dot{q}+G(q)+F\left(\ \dot{q}\right)+\tau_{d}(t) \tag{3}\]  
The change of joint rotation, angular velocity and angular acceleration are defined as: \(q_{d},\ \dot{q}_{d},\ \ddot{q}_{d},\) then the tracking position error of the system is:  
\[e=q(t)\ -\ q_{d}(t) \tag{4}\]  
The speed error is:  
\[\dot{e}=\dot{q}(t)-\ \dot{q}_{d}(t) \tag{5}\]  
The dynamic error corresponding to Equation (2) is:  
\[\left\{\begin{array}{l}\dot{e}_{1}=e_{2}\\ \dot{e}_{2}=-\widetilde{M}(q)^{-1}\widetilde{C}\left(q,\ \dot{q}\right)\dot{q}+ \widetilde{M}(q)^{-1}\tau+D-\ddot{q}_{d}\end{array}\right. \tag{6}\]  
where: \(D=-\ d\ \widetilde{M}(q)^{-1}\) is the vector of uncertainty (including unknown disturbance, uncertainty, and approximation error).  
According to the physical characteristics of industrial robot [9; 31; 32], the following hypotheses are put forward:  
**Assumption 1.**\(M(q)\) _is a positive definite, invertible symmetric matrix and bounded:_  
\[\phi_{1}\leq M(q)\leq\phi_{2} \tag{7}\]  
**Assumption 2.**_The uncertainty \(D\) in the set is a bounded function satisfying the constraint:_  
\[||D||\leq A_{0}+A_{1}||q||+A_{2}\ ||\dot{q}|| \tag{8}\]  
_where: \(\phi_{1},\phi_{2},A_{0},A_{1},A_{2}\) are unknown constants, and \(\phi_{1},\phi_{2},\Lambda>0;\ ||D||\) represents the Euclidean norm of a matrix._  
In this paper, the control strategy is proposed to improve the tracking control accuracy of the manipulator with uncertain dynamic models further. The nonlinear sliding surface is established by using dynamic error, then the feedback control loop is developed. DDPG algorithm is used to adaptively approximate the uncertainties of the system. Therefore, for the control system with uncertainties, the tracking error can converge to zero synchronously and remain stable for a finite amount of time.