## 7 Conclusions  
In summary, the main goals have been achieved. An analysis of inner and outer control loops has been made, working with equations oriented to collaborative robots, unlike the proposals made for rigid robots [18, 19, 20, 21]. The study was made with a practical approach to identify the inner loops when their characteristics are unknown. This is easier to implement than the works in [PERSON] et al. [16] and [PERSON] et al. [17] because they measured all the variables of the robot, like torques, motor position, etc. The article also explains how that information may be used to define the external loop in order to obtain better results. The importance of the concept of the stiffness matrix, applied to robot control, has been proved in theory and practice. After completing the previous steps and making experiments, the absolute position inner loop obtains the worse results. Theoretically, the incremental position loop and the velocity loops are equivalent. However, in practice, this equivalence depends on the way the internal loop is implemented and the gains of the inner control. According to the way of the coordinate transformation is made by the robot controller (Jacobian transpose vs. Jacobian inverse), the stiffness matrix changes considerably. The Jacobian transpose gives a constant stiffness matrix, which causes stable contact force in all the working area of the robot, while the Jacobian inverse method gives a cartesian stiffness matrix that depends on the joint stiffness and the position of the robot. Figure 12: Polishing with Force control with reference force 10 N. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Reference** & \multirow{2}{*}{**Mean**} & **Standard** & \multirow{2}{*}{**Error**} & \multirow{2}{*}{**Max**} & \multirow{2}{*}{**Min**} & \multicolumn{2}{c}{**N\({}^{\circ}\)****Picks**} & \multicolumn{1}{c}{**N\({}^{\circ}\)****Picks**} \\
**Force** & & & **Deviation** & & & **<4/9 N** & **>6/11 N** \\ \hline
5 & 4.9525 & 0.2591 & 0.95\% & 5.6617 & 3.9617 & 1 & 0 \\
10 & 9.9666 & 0.2975 & 0.33\% & 11.056 & 8.4562 & 33 & 4 \\ w/o & 3.4416 & 0.5915 & 31.26\% & 4.9181 & 1.6181 & 8460 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Results for polishing task. As a rule, the user does not have the information on the way the inner loop was implemented. However, it can be deduced experimentally. To prove this, an experimental verification was made with a UR3 CB3 robot. Despite the limitations of this robot (as slow sampling frequency and low joint stiffness), the theoretical results have been mostly verified. Summarizing, the results on the UR3 robot show that the variations in the performance of the different external controllers are small. Using a PV over a proportional (P) in the outer loop improves the impacts, while the PD action confirms a worse performance in force control, as observed in the paper of [PERSON] and [PERSON] [21]. A feedforward term (FF) achieves better force tracking than an integrator (PI)--in this case, it is an improvement compared to the methods exposed in the book [PERSON], [PERSON] et al. [33]. However, it has more peaks. It may be enhanced if the stiffness matrix is introduced. Regarding the inner control, the inner velocity loop gives the best results, probably because it is implemented using the Jacobian transpose in the UR3. The force control is affected by the stiffness of the tool, as is the case with the polishing tool, where its more flexible material lets reducing the number of oscillations obtained during the execution of the task. This fact decreases the effect of the problem explained in [PERSON], [PERSON] et al. [3]. Several problems remain for future works, and three stand out. Experiments should be repeated with a robot with better performance, such as increased joint stiffness and a faster sampling period, to prove their influence in the improvement of the force control. The feedforward term should be implemented considering the stiffness matrix; in this way, the force error can be cancelled.