# A Trajectory Optimisation-Based Incremental Learning Strategy for Learning from Demonstration
## 3 Research Methodology
### Case Study 2--Unscrewing Nuts and Battery Cell Disassembly
#### 4.5.3 Demonstration and Implementation  
To ensure the safety of the operator, only the nut at position No. 3 was unscrewed during the demonstration, as shown in Figure 16a. The demonstration adhered strictly to the disassembly rules: moving the multi-purpose adaptor from the start point to the target position (nut), unscrewing it, and then returning to the start place. Figure 14: Experimental platform for unscrewing nuts and battery cell removal. (**a**) Experimental platform. (**b**) Multi-purpose adaptor. (**c**) Vacuum chuck. (**d**) Generalisation issues. Figure 15: The usage of different end-effectors. (**a**) The usage of the multi-purpose adaptor. (**b**) The usage of the vacuum chuck. The diameter of the multi-purpose adaptor is 25 mm, and the length of the groove is 28.5 mm, as shown in Figure 15(c). If the distance between the central area of the nut and the endpoint of the DMP-generated trajectory exceeds the threshold value of 1.75 mm, the unscrewing nuts task is likely to fail due to collisional interference, as highlighted in the red ellipse in Figure 15(c). Figure 15(b) illustrates the generated trajectory via DMP. Positions No. 1 to No. 8 corresponding to the light blue trajectories generated by DMP were able to complete the unscrewing nuts task. In contrast, positions from No. 9 to No. 14 (purple trajectories) failed to complete the task due to excessive errors. Thus, the EV battery is categorised as having a successful area and a failed area. Table 1 shows the error associated with each position. In this scenario, 1D-SEG and G-RPM are used to segment the demonstration and generate \(Tra_{gen}\). The outcomes of 1D-SEG are shown in Figure 16(a). Typically, the new target point for \(Tra_{gen}\) is selected to be at the centre of the failed nut positions, marked by the brown pentagram in Figure 16(b). This position provides better coverage of the working area. The yellow trajectory in Figure 16(b) shows the \(Tra_{gen}\)-based complete demonstration. Subsequently, Bi-DMP is trained based on the force item of previously constructed DMP. The trajectories generated by Bi-DMP are used to re-execute the unscrewing nuts task in the failed area as shown in Figure 16(c). According to the error analysis provided in Table 2, all errors are smaller than the threshold. Therefore, the remaining tasks can be executed successfully. Figure 18 shows the implementation of unscrewing nuts. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & & & & & & & \\ \hline
**Error (mm)** & **No. 1** & **No. 2** & **No. 3** & **No. 4** & **No. 5** & **No. 6** & **No. 7** \\ \hline  & 0.404 & 0.260 & 0 & 0.989 & 1.023 & 1.069 & 1.487 \\ \hline  & & & & & & & \\ \hline
**Error (mm)** & **No. 8** & **No. 9** & **No. 10** & **No. 11** & **No. 12** & **No. 13** & **No. 14** \\ \hline  & 1.431 & 1.751 & 1.760 & 1.787 & 2.760 & 2.743 & 2.730 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: 1. Error between the central area of nut and the target point generated by DMP. 2. Error between the central area of nut and the target point generated by DMP (Continued). Figure 16: Measurement of success and failed areas. (**a**) Demonstration process. (**b**) Generated trajectory via DMP. (**c**) The successful and failed areas in unscrewing nuts. Another significant application is the removal of battery cells. However, due to the height difference between the battery cells and nuts, the shape of the generated trajectories shows deviation, as shown in the purple trajectories in Figure 19a. To address the issue, the \(Bi\)-DMP previously used for unscrewing nuts needs to be updated. The 1D-SEG and G-PRM are adopted to generate new \(Tragen\) for battery cell removal based on the yellow trajectory as shown in Figure 17b. The red trajectory in Figure 19c presents the new \(Tragen\)-based complete demonstration for removing the battery cell, and the new target point for this demonstration is positioned at the geometric centre of B6, as illustrated in Figure 19b.