## 4 Experiment Setup and Results  
### Ur3 Robotic Arm  
UR3 (Figure 4(b)) is a six-degrees-of-freedom collaborative robot with the maximum payload of 3 kg and 500 mm reach. The motion controller of the robot is easily accessible with an external computer and it can also be replaced with a custom one. In this work, the standard motion controller with predefined commands was used. The controller supports commands for interpolation in Cartesian space (movec-arc segment, movel-line segment), and movej for interpolation in joint space. For the experiment, we chose arbitrary collision-free point-to-point movements. Using the movej command, the trajectory generation is based on path planning with trapezoidal timing. This provides a smoothly interpolated movement of all joints with the same duration. Trajectory that was generated with this command was used as a benchmark to compare the efficiency with the suggested optimization method. In order convert the optimized trajectory generated as a set of position data into a robot movement, the movej command is not appropriate, because it is a command for rest-to-rest or blend-connected movements. For real-time control, the servoj and speedj commands are needed. The speedj command offers velocity control and provides a trajectory without exceeding the maximum limits for acceleration and jerk during movement. Based on the input data, we used the servoj command, which can move the robot to the desired joint position configuration with an input update rate of 8 ms. Figure 6 shows a comparison of the measured angle of the 2 nd joint (shoulder)--this joint was chosen because it lifts the weight of the whole arm. The movej command shows a smooth change of the angle, while a set of servoj commands with different timing frequencies report a deviation with an amplitude of approximately one degree (0.02 rad). By comparing the frequencies, we can see that there is not a significant difference, except for the measurement with 8 ms timing, which is closer to the movej data. We applied a floating average in the graph to filter the noise from the measurements. Figure 7 shows a measurement of the electric current, which is the base for computing the energy  
Figure 5: Experimental measurement setup: (**a**) Simulation environment in CoppeliaSim, (**b**) UR3 robot mounted to the table. consumption. The measured currents are very similar during the whole movement, even while using lower frequencies, which assures results similar to the movej command. The shortest timing (8 ms) is on the edge of the communication capabilities of the robot and it causes some issues with the stability of communication, especially during longer movements. Thus, we decided to avoid this timing. The desired trajectory generated with the Bezier curve based optimization provides position data for the servoj command. The control program consists of a set of servoj commands with a time step of 80 ms. There is a time delay before the robot starts a movement, which is caused by a shift between the measured data and movej benchmark data. The recording is postponed until a movement is detected. To reach the full dynamic performance of the robot, it is necessary to disable the collaborative restrictions and set the maximum operation parameters; otherwise, the measured data might be distorted. For communication with the internal motion controller, we used a TCP/IP real-time client that supports a 125 Hz update rate. The client communicates with the manipulator via the URX library. We made slight modifications to this library for the instant reading of joint currents. The real-time data exchange module is used in order to collect the actual state of the manipulator. The URX library provides a preset connection setup and the most important commands to control the robot and obtain  
Figure 6: Position deviation of the 2 nd joint (shoulder) between measurements with different movement prescription during the movement A (Figure 7(a)).