# Low-Cost Data-Driven Robot Collision Localization Using a Sparse Modular Point Matrix
## 2 Materials and Methods
### Optimal SMPM Structure  
In conducting a comprehensive structural analysis and optimization of the SMPM across the entire collision point matrix template, significant computational costs are incurred. In this study, we mitigate these computational challenges by decomposing the SMPM optimization problem into distinct local regions. This subdivision results in a substantial reduction in the workload for the optimal SMPM structure selection method. The proposed optimal SMPM structure selection method consists of two main steps: firstly, various forms of sparsification are applied to the MPM distributed in the four-corner region. Collision localization is then performed on the SMPMs using multiple models. Based on the accuracy of the localization results, SMPMs with superior performance are initially identified. Subsequently, the position of the SMPM relative to the collision point matrix template is adjusted, and further collision localization using multiple models is conducted on the initially screened SMPMs to select those with the optimal structure. In terms of model selection, the proposed CE-SVM method from this study is employed, along with the DCNN-SVM method introduced in [3], as well as the ESN-SVM, LSTM-SVM, and GRU-SVM methods mentioned in [4]. Additionally, based on our previous findings, the effective handling of collision point localization in the testing set when a particular collision point in the collision point matrix template is present in both the training and testing sets has been validated. Therefore, in the SMPM selection process, greater attention can be directed towards evaluating the performance of collision localization for zero-shot points. Consequently, in the SMPM selection process, we employ all points in datasets D1, D2, and D3 that meet the definition of zero-shot points as the testing set. Simultaneously, all points in datasets D1, D2, and D3 that conform to the definition of fully observable points are utilized as the training set. The distribution of MPMs in four corner regions of the collision point matrix template are illustrated in Figure 5. To introduce a certain level of similarity interference, four MPMs are set in each region, and are tightly connected to form a square area. These MPMs are labeled for collision localization. Specifically, we defined the regions in the four corners as I, II, III, and IV. Subsequently, we assigned numerical labels from 1 to 4 to the MPMs within each region. Then, different forms of sparsification were applied to the MPMs, as shown in Figure 2. Based on these various sparsification forms, collision localization tests were conducted to preliminarily identify preferable sparsification forms. Building upon the aforementioned preferable configurations, we further displaced the SMPM to occupy different positions on the collision point matrix template. As illustrated in Figure 6, there are three types of movements: vertical (up and down), horizontal (left and right), and toward the center. A collision localization test was conducted each time the SMPM was shifted by a distance equivalent to one collision point. Based on the results of these tests, we refined the selection of the optimal SMPM structure. To facilitate the explanation, we defined the following situations: horizontal movement by one collision point as LR1 and by two collision points as LR2; vertical movement by one collision point as UD1 and by two collision points as UD2; and movement toward the center by one collision point as CT1 and by two collision points as CT2. As shown in Figure 7, the average collision localization accuracy results for the SMPM positioned at the corners of the collision point matrix template are presented. The results labeled \"models with CNN\" represent the average collision localization accuracy of fusion models incorporating convolutional modules, specifically the DCNN-SVM and CE-SVM methods.