# Development of an Adaptive Force Control Strategy for Soft Robotic Gripping
## 3 Results and Discussion
### Visual Force Sensor  
#### 3.1.1 Force Sensor Training  
A finite element analysis model was generated to train the autoencoder using objects of different shapes to deform the gripper. Five shapes were used: three circles of diameter 10 mm, 25 mm, and 50 mm, two rectangles of 25 mm, and one much longer than the gripper. Data were generated for each object at five points along the gripper, starting from the tip of the finger, moving 80 mm into the fin, with 500 images collected for each test. A design objective of this work was to address the issue of the changing stiffness along the length of the fin; as such, the point on the finger does not affect the estimation accuracy, as long the object is within 80 mm of the tip. The images were then filled in so the gripper was viewed as a solid white shape over a black background in a binary image. Overall, 11,100 images were generated using FEA. In the real operation of the robot, there will be times when the gripper is not completely visible to the camera. Before training, the input images were stochastically obscured by circles of random size and location on the fin to attempt to deal with this. The output images were left unobscured during training. The obscuring process was conducted on the original data, creating a total dataset of 33,300 samples. The training configuration is shown in Table 3.  
The data were split into 521 batches of 64 images during training. The network with the structure outlined in Figure 6 was trained for approximately nine minutes over five epochs, using binary cross-entropy as a loss function. Less data could be used to achieve similar results, but, for this case, the data were available, and the training was not extensive, meaning that large quantities of data could be used with minimal effort. Figure 9 plots loss across the epochs during the training process.  
As seen in Figure 9, the loss converges reasonably quickly in about three epochs. Extra training time allowed the model to reduce the loss slightly, but it appears to have had a minimal effect. The autoencoder was evaluated using five-fold cross-validation, holding 6660 images as the validation dataset. The results of the autoencoder training process are summarized in Table 4. Figure 10 shows a sample set of the test results. The figure shows that the model can effectively recreate the shape of the gripper, even in the presence of large obstructions. The mean squared error of the test set was calculated to be 0.172 pixels.  
In Figure 10, the first row shows the original image, the second row shows the occlusions, and the bottom row shows that the model could reconstruct the fin's original shape in this test set while ignoring the image's occlusion. Some failure cases were found, especially when a larger occlusion covered most of the tip of the gripper.  
\begin{table}
\begin{tabular}{c c} \hline Learning Rate & 0.001 \\ \hline Epochs & 5 \\ \hline Batch Size & 64 \\ \hline Batches & 521 \\ \hline Optimizer & Adam \\ \hline GPU & NVIDIA T1000 8 GB (NVIDIA, Santa Clara, CA, USA) \\ \hline CPU & 13 th Gen Intel(R) Core(TM) i7-13700 2.10 GHz (Intel, Santa Clara, CA, USA) \\ \hline RAM & 64 GB \\ \hline \end{tabular}
\end{table}
Table 3: Training configuration.