**3. Results**

The results related to the proximity measurements on the various tissue samples, obtained by experimental steps described in the previous section, are shown in this section. Due to the lack of synchronization between the start signal of the robotic arm and the Arduino board containing the proximity sensor, it was necessary to proceed with a manual evaluation of the first useful point at which the sensor returns a non-zero proximity value. To do this, the tissue sample was positioned on the plate as shown in section III, and the robotic arm was moved manually to detect the first significant data by acting on the coordinates of the individual joints. As shown in Figure 14, the sensor returned a series of null proximity values when it was too close to the sample. Starting from the fixed initial position P1 (position of the robotic arm closest to the sample), the sensor, positioned at the end-effector of the robot, was slowly moved away from the tissue sample by taking steps equal to 0.5 mm. In this way, it was possible to evaluate and display on the real-time graph relating to the sensor the first non-zero proximity value detected, and the corresponding

distance of the sensor from the sample. The real distance was known to the user who programmed the robotic arm. By repeating this experiment for all three types of tissues, it was possible to precisely define the first useful proximity value for each sample. Regarding the liver, the first useful proximity value was detected at two centimeters from the sample, while for the stomach and intestine, the first non-zero proximity value was shown at 3.5 cm.

The characteristic curves for each tissue are shown in Figure 14. In this way, it was possible to relate the real distance due to the movement of the robotic arm with the proximity values derived from the sensor. As previously mentioned, the proximity measurement by the sensor took place thanks to the detection of the IR energy reflected by the tissue on the photodiode. Consequently, since this measurement was influenced by the reflectivity of the sample surface, it was reasonable to think that tissues of different colors could give a different characterization curve. This concept is clearly shown in Figure 14d, where the stomach and intestines with a very similar color returned the first non-zero value at the same distance. The liver characterization curve, on the other hand, had a different trend than that of the stomach and gut. It should be mentioned that for all three types of tissues, it was possible to note that as the robotic arm moved away from the sample, the readings of the proximity sensor were accompanied by a part of noise.

**Figure 14.** Characteristic curves relating to the proximity of the three tissues analyzed. (**a**) Stomach. (**b**) Gut. (**c**) Liver. (**d**) Superposition of the curves of the intestine and stomach.

To ensure the repeatability of the experiment, four different tests were carried out for each of the three tissues examined. For each organ, as shown in Figures 15–17, the sensor characterization curves were practically the same for the four tests. This allows us to conclude that it is possible to extend this argument to any tissue sample, and therefore, to be able to consider the curves obtained as being representative for the tissue to which they refer in relation to the sensor used.

**Figure 15.** The proximity values recorded for the liver during the movement of the robot in four tests.

**Figure 16.** The proximity values recorded for the stomach during the movement of the robot in four tests.

**Figure 17.** The proximity values recorded for the gut during the movement of the robot in four tests.

During the following analysis, the stomach curve was taken as a reference, but similar results can also be easily extended to the other two tissues. By analyzing the curve, an initial flat area that describes the locations where the sample was too close to the sensor, and therefore, was unable to return proximity values, was pointed out. Continuously, a linear area was highlighted by the green rectangle in Figure 18.

**Figure 18.** Characteristic curve relative to the stomach, with highlighted areas.

This linear part just mentioned was well approximated by a first-degree polynomial, as demonstrated with the help of MATLAB's Curve Fitting Toolbox (Figure 19). The linear polynomial model that best approximates this data distribution was from the equation:

$$f(\mathbf{x}) = p\mathbf{1} \times \mathbf{x} + p\mathbf{2} \tag{1}$$

where *x* was normalized by mean 7.667 and std 4.378. The coefficients *p*1 = 16.88, and *p*2 = 27.9 were estimated by the model with 95% confidence bounds.

**Figure 19.** Fitting of the values of the portion of the graph highlighted by the green rectangle with the polynomial model.

In the same way, it was possible to highlight and analyze the next portion of the curve about the stomach, shown by the yellow rectangle in Figure 18. In the second case, it was possible to make an approximation described by a third-degree polynomial in the form:

$$f(\mathbf{x}) = p\mathbf{1} \times \mathbf{x}\mathbf{3} + p\mathbf{2} \times \mathbf{x}\mathbf{2} + p\mathbf{3} \times \mathbf{x} + p\mathbf{4} \tag{2}$$

where *x* was normalized by mean 25.17 and std 14.48. The coefficients *p*1 = 1.116, *p*2 = −3.359, *p*3 = 6.919 and *p*4 = 82.15 were estimated by the model with 95% confidence bounds (Figure 20).

**Figure 20.** Fitting of the values of the portion of the graph highlighted by the yellow rectangle with the polynomial model.

For both portions of the graph highlighted, the goodness of the fitting was evaluated with appropriate parameters, such as R-squared, to understand how strong the predictive power of a linear regression model is. These measurements evaluate how much difference there is between the observed values in the sample and the values that the model has estimated. The case examined shows small discrepancies between the expected and observed values, and this indicates that the model fits well with the data. In fact, the value of R-squared, respectively, for the first and second case examined, was equal to *R*<sup>1</sup> = 0.994 and *R*<sup>2</sup> = 0.997.

#### **4. Discussion**

This work aims to design and develop a sensing device that can be integrated with the EndoWrist instrument of surgical robots, in order to provide the surgeon with colorimetric feedback and information on the distance between the tip of the instrument and the organs. This is the first version of our device of sensing, and hence, the aspects are still preliminary. Despite this, the results obtained allow us to conclude that it is possible to use color to distinguish two different types of tissue with the final goal of making tumor diagnoses of tissue portions hidden from the human eyes. At the same time, through proximity feedback, the surgeon can work in conditions of greater control and safety. Furthermore, thanks to the integration of BLE communication, a connection between the various robotic arms is possible for the exchange of information during surgical procedures. These capabilities will facilitate the opening to the world of IoT applied to the world of surgical robotics, and will enable the development of AI algorithms for automatic or semi-automatic procedures in the future.

**Author Contributions:** Conceptualization, G.T.; methodology, M.R., R.L., G.P. and G.T.; software, M.R.; validation, M.R.; data analysis, M.R.; investigation, M.R., R.L., G.P. and G.T.; resources, M.R., R.L., G.P. and G.T.; data curation, M.R., R.L., G.P. and G.T.; writing—original draft preparation, M.R.; writing—review and editing, R.L., G.P. and G.T.; visualization, M.R.; supervision, G.T.; project administration, G.T.; funding acquisition, G.T. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.
