# FPGA-Based Methodology for Detecting Positional Accuracy Degradation in Industrial Robots
## 2 Materials and Methods
### Robot Overview  
The robot used for this paper is the UR5 robot by Universal Robotics; a graphic representation of the robot is presented in Figure 1a,b. It comprises six rotational joints providing six degrees of freedom. To approximate the robot motors' currents, the robot's dynamic model and the torque-current relationship are proposed to estimate the currents synthetically. The Denavit-Hartenberg (DH) parameters presented in Table 1 allow the description of the robot through four characteristics that enable the calculation of the positions of the different joints of the robot using transformation matrices obtaining the kinematic model, for which it is recommended to review the following source for the forward and inverse models [36]. For Table 1 values, using DH notation Figure 1c:  
* \(\theta_{i}\) is the angle between the axes \(x_{i-1}\) and \(x_{i}\) around \(z_{i-1}\), taken as positive in a counter-clockwise rotation. The \(y_{i}\) axis is located according to the right-hand rule. * \(d_{i}\) is the coordinate of \(O_{i}^{\prime}\) along the axis \(z_{i-1}\). * \(a_{i}\) is the distance from \(O_{i}\) to \(O_{i}^{\prime}\). * \(\alpha_{i}\) is the angle between \(z_{i-1}\) and \(z_{i}\) around \(x_{i}\), taken positive in a counter-clockwise rotation. Figure 1: (a) UR5 robot arm (figure generated using the library Robotics Toolbox for Python [35]). (b) DH parameters for robot link lengths (c) Standard DH graphical representation. On the other hand, the dynamic model of the robot allows for estimating the robot's behavior considering the forces present in the system. Equation (1) describes the motion of the robot  
\[D(q)\ddot{q}+C(q,\dot{q})\dot{q}+g(q)=\tau, \tag{1}\]  
and it is composed by the inertia matrix \(D(q)\), Coriolis and centrifugal matrix \(C(q,\dot{q})\), gravity vector \(g(q)\), torque vector \(\tau\),the articular position \(q\), velocity \(\dot{q}\), and acceleration \(\ddot{q}\) vectors. To implement the model, it is necessary to know additional information about the physical properties of the joints and motors. Table 2 shows each joint's mass parameters, the center of mass coordinates, and the corresponding inertia tensor. Table 3 shows the parameters corresponding to the motor inertia \(Jm\), gear ratio \(G\), drive viscous friction \(B\), and Coulomb friction \(Tc\). Note that the manufacturer provides all the parameters, except the drive viscous friction \(B\), in different media and can be consulted in summary form in [37]. Parameter \(B\) has been proposed in a heuristic way since the calculation and modeling of the friction for the joints of the robot are outside the main objective of this work. From the Equation (1) \(\tau\) also can be expressed in terms of the relationship between torque and current (2):  
\[\hat{\tau}=K_{ti}ia_{i}, \tag{2}\]  
where \(\hat{\tau}\) is the estimated torque of the model considering the effects of friction and without the intervention of external forces, \(K_{ti}\) and \(ia_{i}\) are the torque constants, and the motor \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Joint** & \(\theta_{i}\) **(rad)** & \(d_{i}\) **(m)** & \(a_{i}\) **(m)** & \(\alpha_{i}\) **(rad)** \\ \hline
1 & \(\theta_{1}\) & 0.089159 & 0 & \(\pi/2\) \\
2 & \(\theta_{2}\) & 0 & \(-0.425\) & 0 \\
3 & \(\theta_{3}\) & 0 & \(-0.039225\) & 0 \\
4 & \(\theta_{4}\) & 0.10915 & 0 & \(\pi/2\) \\
5 & \(\theta_{5}\) & 0.09465 & 0 & \(-\pi/2\) \\
6 & \(\theta_{6}\) & 0.0823 & 0 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Denavint-Hatenberg parameters for a UR5 manipulator.