## 2 Materials and Methods
### Optimization Criterion  
In this work, we consider only the wear of the robot drive chain (see the previous section). We will also restrict the following notation to rotational joints (which are much more common than translational joints in robotics) and to six degrees of freedom (the most common number in robotics); however, the principles can be applied in general. An industrial or collaborative robot in a robotized workplace usually performs a limited set of movements. Typically, there is a given trajectory that the robot end-point should follow during the work cycle, and the robot joints are controlled using inverse kinematics to adhere to this trajectory. The idea of wear being caused by a torque acting over a trajectory corresponds with the concept of mechanical work, which can be expressed as  
\[W=\int_{\phi_{1}}^{\phi_{2}}\tau d\phi, \tag{1}\]  
where \(\tau\) is the magnitude of the torque vector, \(\phi\) is the angle of rotation about the vector representing the joint axis, and \(\phi_{1}\) and \(\phi_{2}\) are the starting and ending angles of rotation, respectively. The integral (1) is path-dependent and the mechanical work is defined as the change of energy. Thus, if we assume \(\phi_{1}=\phi_{2}\), which is true for a closed-loop trajectory of the robot end-point (all individual joints have to start and end in the same angle of rotation), the resulting value of \(W\) would always be equal to zero. It is, thus, more convenient to express mechanical work as the integral of mechanical power over time \[W=\int_{\varphi_{1}}^{\varphi_{2}}\tau d\varphi=\int_{t_{1}}^{t_{2}}\tau\omega dt, \tag{2}\]  
where \(\omega\) is the angular velocity of motion and \(t_{1}\) and \(t_{2}\) are the starting and ending time, respectively. However, this integral (2) is still path-dependent, and the calculation would result in \(W=0\). Thus, it is necessary to introduce the absolute value of both the torque and the angular velocity  
\[W=\int_{t_{1}}^{t_{2}}|\tau\omega|dt, \tag{3}\]  
which allows us to calculate the work over the whole trajectory, while in fact, considering the trajectory divided into segments separated by the change of direction of movement or the change of the sign of \(\tau\). This modification moves away from the concept of the conservation of energy toward the concept of wear caused by mechanical work. The idea is that the drive chain of a robot joint is worn down even when the torque is negative (the motor is actively braking) or when the angle of rotation is decreasing or moving back. The simulation is numerical with a definitive value of \(\Delta t\) (simulation step size) instead of \(dt\). Therefore, the integral (3) is replaced by a sum  
\[W=\sum_{i=0}^{n}|\tau_{i}\omega_{i}|\Delta t, \tag{4}\]  
where \(i=0,1,\ldots,n\) is the simulation step, \(\tau_{i}\) is the instant torque, and \(\omega_{i}\) is the instant angular velocity in the \(i\)-th simulation step. The mathematical meaning of the value \(W\) is shown in an example in Figure 1.  
The value of \(W\) was calculated individually for each joint over the whole robot trajectory, yielding \(W_{1},W_{2},\ldots,W_{6}\) for the most common number of 6 degrees of freedom. We attempted to optimize two factors:  
* to minimize the overall wear of all joints, and
* to balance the wear of all joints. Therefore, it is necessary to consider the values \(W_{j}\) together. However, the joints of a robot manipulator are typically not equal from the mechanical point of view, and  
Figure 1: Example of the time progression of joint torque \(\tau\) and angular velocity \(\omega\); the dotted area represents the meaning of the value \(W\) calculated as the integral of absolute value \(|\tau\omega|\). their capabilities are different--the lower joints are larger and stronger, and the joints near the end-effector are lighter. The same magnitude of \(W\) could, in reality, mean much higher stress and wear for a smaller joint than for a larger one.