# Application of External Torque Observer and Virtual Force Sensor for a 6-DOF Robot
## 4 Experiment and Results
### Hybrid Position/Force Control Experiment Result  
In the experiment on force control, the hybrid position/force control was applied to the grinding motion and the position and constant force were controlled during the grinding motion. The experiment planned to grind on the XY plane after touching the platform (see Figure 13). The trajectory was planned at the speed of 100 mm/s, the position control was performed on the X and Y directions and the \(F_{z}\) applied to the Z direction was controlled by a constant force controller.  
Figure 11: Flowchart of the safety collision detection algorithm.  
Figure 12: (**a**) Results of collision detection with safety control; (**b**) safe collision detection.  
Figure 13: (**a**) Contact situation; (**b**) contact and force control.  
This experiment validated the feasibility of the hybrid controller by utilizing a virtual force sensor to execute the mixed control of position and force. The experiment planned to validate the hybrid controller through a reciprocating grinding experiment. The experiment first compared the results of controlling pressure under the same target using a personal computer (see Figure 14) and a Raspberry Pi (see Figure 15). The MAE (Mean Absolute Error) for the personal computer was 9.2406 N, and the RMSE (Root Mean Square Error) was 14.6020 N. The mean absolute error (MAE) for the Raspberry Pi was 9.6231 N, and the root mean square error (RMSE) was 11.1620 N. It can be seen that compared to the personal computer, the results of the Raspberry Pi control had a more impressive RMSE. This is because the Raspberry Pi system established in this paper could provide a higher control command update rate compared to the personal computer, resulting in higher control efficiency. Therefore, this paper continued to use the Raspberry Pi to control under different pressure conditions and evaluate the results.  
The external forces applied to the Z direction \(F_{z}\) = 20, 30, 40 were compared in this experiment. In this experiment, the force sensor and the target constant force MAE and RMSE were evaluated for the force controller part, and the RMSE of the X and Y directions with or without the position controller were evaluated for the position controller part.  
Table 7 gives an evaluation of the effect of Raspberry Pi controlling different compressive pressures. It can be seen that the experimental results generated for 30 N and 40 N are superior to those of the other two groups, with more accurate virtual force values and better control force. From the experimental results, it can be seen that although the control accuracy of the force controller is limited by the accuracy of the virtual force value,  
Figure 14: Results of the contact force control experiment on PC.  
Figure 15: Results of the contact force control experiment on Raspberry Pi.  
this experimental result can still meet the low-precision force control requirements for different forces.  
Figure 16 shows the results of the contact force control experiment, and we can see that when the robotic arm moved to the turning point and the speed approached zero, the virtual force sensor was inaccurate, as in the previous experiment. Therefore, the force controller proposed in this system avoids the noise of inaccurate prediction at the turning point.  
Based on the above experiments, the results generated by applying this system to Raspberry Pi were better. The reason is that the Raspberry Pi system established in this paper could provide a higher control command update rate compared to a personal computer. It also achieved higher control efficiency and verified the feasibility of applying this system to lower precision force control.