## 2 Materials and Methods
### Experimental Principles  
After obtaining the coordinates of the plasma bag for the input tube end \((X_{A},Y_{A})\) and the circle center fitted on the rotating platform \((X_{O},Y_{O})\), the system calculated a straight-line function to draw a continuous extension line. Subsequently, we used a loop function to determine the intersection point \((X_{B},Y_{B})\) between the extension line and the disc edge. This intersection point determined the distance between the plasma bag and the disc. Figure 2 illustrates the measurement principle. The Euclidean distance between the end position of the plasma-bag input tube \((X_{A},Y_{A})\) and the coordinates of the intersection point \((X_{B},Y_{B})\) was calculated using the formula : \(d_{AB}=\sqrt{\left(X_{A}-X_{B}\right)^{2}+\left(Y_{A}-Y_{B}\right)^{2}}\). As the detected corner points exhibited a certain degree of symmetry, we calculated the midpoint coordinates of the outermost pair of corner points. Subsequently, we iteratively calculated the midpoint coordinates of the corner points, with eight iterations in total. Finally, we drew a line connecting the two midpoint coordinates to approximate the central line. We then drew a line perpendicular to the central line through point A and determined the intersection point as point C. The distance between points A and C represents the distance from the input-tube endpoint to the central line. Although this method may have a relatively large measurement error, it is sufficient if cutting with longer blades, meeting the required cutting precision. In addition, the system faced recognition errors due to the stainless-steel material of the background, which had a color similar to that of the plasma bag and produced reflection under the light source. To address this issue, we continuously sampled the residual-input tube when it was in the camera's field of view and took average of the collected data to  
Figure 1: Various types of plasma bags: (**a**) unused plasma bags, (**b**) frozen plasma bags, (**c**) input-tube random-distribution chart, and (**d**) input-tube cutting effect. Figure 2: Distance measuring schematic. obtain the final cutting position. After being frozen, the residual-input tube of a blood plasma bag was randomly dispersed. In general, it moved freely with the bag, but in some instances, the end of the input tube came into contact with the supporting surface, resulting in new deformation when the bag was moved. If we used the common approach of sampling with the camera and then averaging all of the results to eliminate camera errors, we could see a significant deviation in the final cutting point from the end in such cases. When the input tube came into frictional contact with the supporting surface, it underwent deformation in three stages. The first stage was the pre-deformation of the input tube before the plasma bag rotated. The second stage was the deformation that occurred when the plasma bag moved and the input tube experienced some deformation due to friction with the surface. The third stage was when the input tube, affected by the force of friction, moved uniformly with the plasma bag until it reached a stable state. Therefore, it was necessary to obtain the positional information of the input tube after the third stage of deformation in the system and to take the average to obtain a more accurate position of the end of the input tube. As the residual-input tube was in a state of ice-water mixture and had flexible characteristics, soft body dynamics analysis was required [15]. Before performing soft body dynamics analysis, we needed to establish the global and relative coordinate systems. The center of the supporting plate was obtained by segmenting the background in the images and fitting the circular contour. We then used the supporting plate surface as the origin plane for the global coordinate system \([X,Y,Z]\) and the center of the supporting plate as the origin.