Simultaneous rotary and linear displacement sensor based on soft pneumatic sensing chambers

Specific industrial or research applications necessitate specialized displacement measurement conditions, thereby driving researchers to innovate sensors based on novel operating principles. One such challenging condition is the prevalence of strong electromagnetic waves, which precludes using any sensor with a metallic structure or one that operates on electrical measurement principles. Additionally, space constraints in applications requiring multidimensional displacement measurements mandate the development of sensors capable of measuring displacements simultaneously in multiple directions. This paper introduces a novel soft sensor designed to simultaneously measure linear and rotational displacements using Soft Pneumatic Sensing Chambers (SPSCs). This sensor is unique in its ability to measure both linear and rotational movements and, due to its Electro-Magnetic Compatibility (EMC) and compact size, is suitable for environments with significant electromagnetic interference and spatial constraints. Furthermore, its flexibility makes it appropriate for body-interacting applications. The Abaqus software was employed to optimize the operating parameters. Subsequently, a laboratory setup was assembled, and the sensor's performance was assessed using two calibration methods: mathematical modeling and machine learning. According to the machine learning method, the accuracy in the linear and rotational directions was 0.49 mm and 5.4°, while the Root Mean Square Error (RMSE) was 0.05mm and 0.48°, respectively.

The challenge of measuring multi-dimensional displacements has been a longstanding issue in the field of instrumentation.Various methods have been devised to address this need, most involving the separation of movements along different axes.This approach, however, increases both the required space and the complexity of the motion mechanisms.Conversely, recent research has yielded a limited number of methods for simultaneously measuring different degrees of freedom.These methods are primarily categorized into three groups: capacitive, magnetic, or optical [1][2][3][4][5] .
Rotary-linear movement is a type of multi-degree-of-freedom movement encountered in various applications, making its measurement crucial for developing closed-loop systems.Applications requiring the measurement of rotary and linear displacements include capping machines, pick-and-place tasks in production lines, needle insertion robots for biopsy procedures, laboratory processes such as Polymerase Chain Reaction (PCR) for sample displacement, handheld football game controllers, and remote control systems [6][7][8][9] .Gao et al. successfully measured rotary-linear movements using a surface encoder comprising a microstructured surface and a system for processing the light reflected from this surface 10 .Laser interferometry, another method, accurately measures two-dimensional movements despite its rotational range limitations 11 .
Image processing has also been employed to measure this movement, but it necessitates a high processing volume and space for installing the image sensors 6 .Anandan et al., as well as Kumar et al., managed to measure an axis's linear and rotational movements by measuring the capacity of 4 and 6 capacitors, respectively, and deriving its mathematical mode 7,12 .In another study, researchers managed to measure the simultaneous linear and rotational motions of an axis by utilizing triboelectric and electrostatic induction effects 13 .Among the weaknesses of these researches, we can point out their electromagnetic incompatibility due to their metallic structure and electrical measurement nature.The optic method, nearly the only available Electro-Magnetic Compatible (EMC) displacement measurement technique, has been employed in single-degree-of-freedom measurements 14 .Also, the mentioned methods are not electrically isolated and could not be used in explosive environments.
To address these weaknesses, the soft measurement technique has been employed in this research.The surge of interest in soft robotics in recent years has led to further advancements in the field of soft sensors.Before this development, the Force-Sensing Resistor (FSR) was the only soft sensor that had garnered significant research attention and commercialized.The popularity of this sensor can be ascribed to its flexibility and thinness, attributes absent in sensors with rigid mechanical structures.Soft sensors can be fabricated using more readily available and expedited methods, such as 3D printing and silicon rubber molding, and also exhibit resilience in diverse environments 15,16 .A notable characteristic of these sensors is that, unlike traditional sensors, they do not constrain the degrees of freedom of the objects being measured, making them suitable for measuring displacements with multiple degrees of freedom [17][18][19] .One such method, which has been proven effective for measuring movements with one degree of freedom, involves the use of Soft Pneumatic Sensing Chambers (SPSCs) [20][21][22][23] .This technique measures displacements by detecting changes in the air pressure trapped within flexible chambers.
In a previous article, we successfully introduced a Soft Pneumatic Rotary Encoder (SPRE) based on this measurement method 24 .The present article makes an effort to design, optimize, and fabricate a soft sensor for measuring simultaneous linear and rotational movements using a specific arrangement of SPSCs.Through this research, we were able to generalize the idea of SPRE to more complex and challenging multi-dimensional movements.This represents the first instance where the efficacy of SPSCs in multidimensional measurements is proven.Unique features of this sensor include electro-magnetic compatibility and electrical isolation from the object being measured, attributes that are a consequence of its non-electrical measurement nature and entirely non-metallic structure.As a result, this sensor is the only available rotary-linear sensor that can be employed without special shielding conditions or Electro-Magnetic interference (EMI) in MR-guided robots 25 .Owing to its ability to measure degrees of freedom simultaneously, this sensor requires minimal space, making it suitable for the confined space of MRI bore and any other applications with space limitations.
Additionally, the mechanical movement mechanism of the axes is simple and backlashless.The passivity of this measurement method allows its usage in hazardous environments, such as explosive atmospheres, and in applications involving direct contact with humans, such as rehabilitation equipment.On the other hand, in single-axis displacement measurement applications, this sensor has the capability to tolerate unwanted linear movements of the rotary actuator and unwanted rotary displacements of the linear actuator.
Calibrating multi-degree-of-freedom sensors presents another challenge: dealing with Multiple-Input Multiple-Output (MIMO) systems.MIMO systems can be calibrated by extracting mathematical equations or employing machine learning algorithms 23 .In a study referenced as 26 , the capacitance of 8 dielectric elastomers was utilized to compute the displacement of a 5-degree-of-freedom actuator.This study demonstrated that MIMO sensors could be calibrated using the Support Vector Machine (SVM), one of the machine learning algorithms.Kawato et al., by creating a system consisting of three two-axis Hall effect sensors and using the Gaussian Least-Squares Differential-correction (GLSDC) method to solve its mathematical model, introduced a sensor with three degrees of freedom 3 .In this article, both mathematical modeling and machine learning methods are evaluated.
The structure of the article is as follows: First, the concept design, functional mechanism, and sensor optimization using the finite element method are discussed.Then, the fabrication process of the sensor and its test setup is explained.Finally, the test results are stated and analyzed.

Sensor concept and working principle
In the SPRE study, the pressure inside of the SPSCs was employed to calculate the rotation of an eccentric shaft 24 .To overcome the decreased measurement sensitivity of each SPSC at the start and end of the measurement range, two SPSCs with a 90-degree phase difference were utilized.This approach was replicated in the present study, albeit with two sets of SPSCs (Fig. 1a) and (Fig. 1b).A 90-degree rotational phase difference between the two sets was considered to ensure the sensitivity of the sensor all over the working range.Rather than applying this phase difference to the SPSCs' placement, it was applied to the shaft by considering another eccentric axis (Fig. 1c).The axis of symmetry shown in Fig. 1d is considered as the reference axis in linear displacements, and the distance of this axis from reference point, which is the middle point of the shaft, represents the value of L. The deviation of each set from its straight configuration is called linear deviation (D), and its value when L = 0 is the initial linear deviation (D 0 ) .If D 0 is zero, the two sets will not have any phase difference in the linear direction and they will be parallel, as a result, the linear displacement measurement becomes impossible.Therefore, it is necessary to determine a non-zero value for D 0 .The direction of eccentricity and rotary reference axis are depicted in Fig. 1e.The θ parameter is calculated based on the angle between the direction of eccentricity and the reference rotary direction in set 1. To prevent any deviation and backlash in ball bearings, each set incorporated two rows of bearings.Consistent with our previous research, we employed the sbl15 model suction cup by Airbest as the SPSC 24 .This Nitrile Butadiene Rubber (NBR) suction cup features an active volume with a 15.5mm diameter and a 13.7 mm length.Its compact size and suitable number of steps in its active length informed this choice.
Another influential parameter is the initial contraction (C), representing the SPSC's contraction amount at its maximum contraction (Fig. 1f).For simplification, the SPSC-connected wall's motion path is presumed to be circular.The impacts of parameters D 0 and C will be subsequently assessed via simulation in Section "Simulation".
The sensor activation process commences with an initialization procedure, during which each set must return to its home position ( D = 0 and θ = 0 • for set1 and θ = 90 • for set2) and connect to the ambient air pressure.This ensures the repeatability of sensor calibration.A slot has been considered on the shaft to align the sets with their home positions, and two holes have been considered on the sensor casing.Additionally, a gauge (Fig. 1g) has been designed.When the initialization pins coincide with the casing holes and the gauge makes contact with the initialization slot on the shaft, it aligns the sets with their reference angles.Moreover, by moving the shaft to contact the upper and lower boundaries of the initialization slot with the gauge, each set returns to its D = 0 point.
To eliminate the effect of temperature, a temperature neutralizer tube was placed inside a sheath along with other tubes.This closed-end tube continues inside the sensor and its pressure is constantly measured.This tube is connected to the ambient pressure with the help of a valve during the initial setup process.Because the temperature of this tube is the same as the temperature of the air trapped in other tubes, the result of dividing the pressure of SPSCs by the pressure of this tube will result in pressure ratio parameters ( R 1 , R 2 , R 3 , R 4 ) independent of temperature.The R parameters are expressed in percentage.

Simulation
The Fluid cavity tool of Abaqus software was utilized for the finite element simulation of the sensor.C and D 0 were applied to the initialization procedure through a displacement boundary condition.During the initialization process, wherever needed, the pressure was set to zero using the fluid cavity pressure boundary condition.A reference point was defined on the shaft and coupled to the shaft.Theta and El boundary conditions were applied to this point.Also, another point was defined on the eccentric axis, and by coupling it to the bearing cover, the role of the bearing was implemented.Due to the possibility of contact between the steps of SPSCs, self-contact interaction was applied to them.Tubes reduce the range of sensor pressure changes.In fact, pressure changes are attenuated by the ratio of SPSC volume to the total volume of trapped air.Tubes have been omitted in the simulation, so to apply this effect, the attenuation factor was multiplied by the ambient pressure.At first, a simulation was carried out to calculate the volume of SPSCs at the moment of connection to atmospheric pressure during the initialization process for each combination of C and D 0 .Considering the volume of the tubes, which is 3534mm 3 , the range of attenuation factor was between 0.21 and 0.23, according to the different combinations of C and D 0 .The volume of the active portion of the SPSC without applying any deformation is about 1330mm 3 .This simulation was done assuming an ideal gas with a molar mass of 28.8g at 25 • C. The sensor's rotational and linear motion ranges were deemed infinite and ± 6.5 mm, respectively.Due to symmetry, the simulation was conducted for one of the sets within the 0°-180° range.C, D 0 parameters should be selected so that the difference between the highest and lowest pressures observed during the working interval ( P ) is maximized.On the other hand, to keep the sensor fixed, we need a holding torque and holding force, and their maximum should be minimized.
Figure 2a illustrates the pressure in chamber number 1, resulting from changing D. The D < 2 region is critical due to the low rate of pressure changes with D. Therefore, the D parameter should be designed in such a way that both sets do not locate in this region at the same time.This requirement is fulfilled if D 0 ≥ 2mm is stipulated.
Based on Fig. 2b, parameter C has an optimal value at 5mm where the pressure changes are maximum.In other words, this parameter causes the SPC working interval to be selected in such a way that the volume changes are maximum.The maximum amount of pressure will occur at D = 0 .Therefore, the maximum pres- sure observed in the entire working range is independent of the D 0 value.Increasing the value of D 0 will cause www.nature.com/scientificreports/ the SPSCs to be in the range with more tension, and we will face less pressures in the system.This increase in the pressure range is shown in the Fig. 2b, which behaves almost linearly with D 0 .An increase in D 0 and a decrease in C increase the holding force and torque due to the increase in the extension of the SPSCs.The exponential form of these curves can be due to the exponential form present in the force-displacement diagrams of the SPSCs.Per the graphs in Fig. 2b-d, if the design objective is to augment the sensor's pressure variation range, a C value of 5 mm should be adopted.However, if the goal is to minimize the holding torque and holding force, a C value of 6mm is preferable.In this study, C = 5 was selected as it represents a compromise between the torque and force parameters and maximizes ∆P.Since the influence of elevating the D 0 parameter on the ∆P value is marginal (Fig. 2b), but it considerably impacts force and particularly torque, the D 0 value was set at 2mm in this study to satisfy the condition D 0 ≥ 2mm.

Fabrication and testing
The fabricated sensor is depicted in Fig. 3.The casing and shaft were fabricated using 3D-printed Acrylonitrile Butadiene Styrene (ABS).Since the shaft is subjected to wear from linear movements, and Polyamide (PA) offers superior wear resistance compared to ABS, the shaft cover was 3D-printed from PA.A Polyurethane (PU) tube, with internal and external diameters of 1.5 mm and 3 mm, respectively, was employed to connect the SPSCs to the DAQ unit.Cyanoacrylate glue was used to affix the ball bearing cover to the SPSC, the SPSC to the casing, the tube to the SPSC, and the tube to the pressure sensor.Additionally, all the bearings utilized were made of polymer.The specifications of the fabricated sensor are detailed in Table 1.
Five BMP280 sensors manufactured by Bosch were used to measure the pressure and temperature of four SPSCs and the ambient air.During the initialization procedure, pneumatic valves were used to connect the chambers to the ambient air.To assess the sensor's performance, a laboratory setup comprising two stepper motors designed to generate linear and rotary movements was assembled (Fig. 3).The rotational movements generated by one of the motors were converted into linear displacement via a 3 mm pitch lead screw.Additionally, a Nikon RX1800 rotary encoder, with 7200 steps per revolution, and an Opkon RTL-100 linear potentiometer were used to measure the rotary and linear movements, respectively.The pressure sensors data were transmitted to an Arduino Mega 2560 microcontroller via an SPI interface.This microcontroller was also employed to generate the rotational pulses of the stepper motor drivers and read the position sensors.The testing procedure involved positioning the sensor's linear position at 100 µm intervals and executing a full cycle of back-and-forth rotation in 1.8° steps to measure the SPSCs' pressure values.The sensor was evaluated in 5 complete cycles of longitudinal movements for three days.Meanwhile, in order to check the effectiveness of the presented method in compensating the effect of temperature, the ambient temperature was changed in the temperature range of 17-28 °C.

Results and discussion
The R charts derived from the experimental tests on the fabricated prototype are illustrated in Fig. 4. The range of R ratio changes for SPSCs 1 and 2 is approximately 7 For SPSCs 3 and 4, it is about 8.5 .This disparity is attributed to the pressure range observed in the two sets, which is approximately 6 kPa for the SPSCs in the first set and about 8.9 kPa for the second set.This parameter was 9.8 kPa in the simulations, which closely aligns with the measured values in the second set.The sole factor that could account for the discrepancy between the simulation and the values obtained in set 2 is the errors introduced during manual assembly.These errors could encompass inaccuracies in part fabrication due to the limited precision of the 3D printer and errors in adhesive application.

Sensor calibration
Before presenting calibration models, the uniqueness of each ( θ , L ) position for the possible combination of ( R 1 , R 2 , R 3 , R 4 ) input values should be examined.For this purpose, 1 million pairs of positions were randomly selected.Their R distance and spatial distance for each pair, such as m and n, were calculated using Eqs. 1 and 2. These distance parameters have no physical meaning.In order to match the scale of the linear and rotary distances, they are normalized in Eq. 2.
In order to ensure uniqueness, it is necessary for the data points to have no intersection with the horizontal axis except at the origin.As depicted in Fig. 5, this criterion is almost met by the data points depicted in this diagram.
The first approach employed for displacement calculation in this study is the Random Forest algorithm, one of the machine learning (ML) methods used for classification and regression.Random forest is an accurate algorithm that is robust to outliers and data noise.The Python programming language was used to implement

Hysteresis
The hysteresis property is one of the parameters that considerably impacts the mechanical behavior of hyperelastic materials.Although this effect may not disrupt the performance of soft actuators, it can have detrimental effects on the efficiency of soft sensors, compelling us to use computational methods to eliminate it.In the sensor presented in this research, due to the interactions of two SPSCs placed in a set, hysteresis may cause changes in pressure during reciprocating movements.For this reason, the effects of hysteresis on longitudinal and rotational measurements have been experimentally investigated in this section.
As shown in the Fig. 9, although this effect was not observed in the rotary direction, in linear displacements, a maximum of 0.2 mm hysteresis was observed.

Resolution
The output of the fabricated sensor by placing it in a state of rest for 30 min is shown in Fig. 10.The standard deviation of the data in this chart indicates the sensor resolution for two modes of rotary and linear measurements, which are mentioned in Table 2 27 .These values are more affected by the noise present in the data, the source of which is the noise on the pressure and temperature data of the BMP280 sensors.MM method is more susceptible to noise compared to ML method in linear measurements.Their performance is the same in rotary measurements.

Dynamic response
The dynamic response of the sensor was evaluated up to a linear and rotational speed of 3 mm/s and 15 rpm with MM model.The graph obtained from this test at these two speeds and the resulting numerical values are shown in the Fig. 11, Tables 3 and 4. According to Fig. 11, dynamic displacements in one direction will increase the measurement error in the other direction as well.These errors can be derived from the speed of data acquisition and the nature of pneumatic measurement.

Discussion
A comparison of the performance characteristics of the proposed sensor with others is delineated in Table 5.
Due to the all-polymer structure, this sensor is fully compatible with electromagnetic environments.Other methods are not at all suitable for use in these environments due to metal mechanisms and the nature of electrical measurement.The magnetic sensor has the lowest score due to more interference with these waves.On the other hand, due to the use of air as an interface in the measurements and the significant distance between the data acquisition unit and the sensor, it is electrically isolated from the measured object.This feature is established in optical sensors due to the distance between the source of emission and light reception with the object to be measured, but the applied fields in capacitive, triboelectric, and magnetic methods are an obstacle to isolation.The measurement method presented in this article is very economical due to the polymer structure and the type of pressure sensors used.However, other methods require more complex circuits and data acquisition equipment.

Conclusion
In conclusion, this study detailed the inception, design, testing, and assessment of the first soft sensor devised for the simultaneous measurement of linear and rotational displacements.The sensor was assembled using a series of SPSCs attached to a shaft.The efficacy of this sensor was appraised utilizing a setup tailored for linear and rotational displacements and calibration methodologies encompassing mathematical modelling and machine learning.The ML approach with random forest algorithm yielded superior outcomes compared to the alternative technique.As a result, within the linear movement range of ± 6.5 mm and rotational range of (0°-360°), the sensor's accuracy was ascertained to be 0.49 mm and 5.4°, respectively.By adjusting parameters such as tube length, eccentricity, initial contraction (C), and initial linear deflection ( D 0 ), the sensor could be designed according to the intended application.This sensor embodies attributes that are unattainable in analogous measurement methods, such as: 1.No Electro-Magnetic interface (EMI) noise and the absence of electromagnetic wave emission.Additionally, the sensor lacks metal components, classifying it as an Electro-Magnetic Compatible (EMC) sensor.2. Compact size due to simultaneous measurement of displacements and eliminating the movement mechanisms.3. The capability to measure purely rotational movements without interference from concurrent linear movements along the L direction of the measured object.This is particularly advantageous in rehabilitation applications, as it minimizes movement constraints for individuals, thereby enhancing their comfort.This capability is also applicable in purely linear movement measurement scenarios, eliminating the need to restrict the object's rotational movements.This feature mitigates the stresses exerted on the sensor and actuator in industrial applications.4. A more streamlined manufacturing process and cost-effectiveness compared to similar models.

Figure 1 .
Figure 1.Concept and parameters introduction: (a) schematic of the sensor representing the main concept, (b) chambers arrangement and L − θ direction, (c) design of eccentricities, (d) linear deviation (D) and references, (e) eccentricity direction and rotary reference axis, (f) Initial contraction parameter (C), (g) the designed gauge which holds the sets on their home positions to connect to the ambient pressure during the initialization process.

Figure 2 .
Figure 2. Results of the simulation (a) the effects of D on gauge pressure in chamber 1 (b), (c), (d) the effects D 0 and C on the amplitude of the pressure change ( P ), maximum holding force and maximum holding torque of the sensor.

Figure 3 .
Figure 3. Presented sensor and its test setup including two degrees of freedom displacement mechanism and displacement measurement sensors.

Figure 8 .
Figure 8. Error probability density obtained from mathematic modeling (a) rotary measurement error, (b) linear measurement error.

Figure 9 .
Figure 9. Hysteresis analysis diagrams (a) θ value in forward and backward rotary movements, (b) L value in forward and backward linear movements.

Table 2 .
Characteristics of the prototype sensor.

Table 5 .
Comparison between the presented sensor and the others.