Curvature sensing of a soft robot based on conductive foam

Soft material robots are an emerging and fast‐growing field of research [1] with potential application in various technical fields. These applications include, but are not limited to medical applications and all sorts of human‐machine‐interaction. Due to the soft structure, conventional components and design methodologies are not applicable. For reliable control and positioning of soft robots in 3D space especially accurate knowledge about their current position and orientation is essential.


Design of the sensor
In this contribution a resistive curvature sensor based on electrically conductive foam is presented. It is used to determine the bending angle of a simple soft robot segment shown in Fig. 1. The soft robot segment consists of a soft body made of foam and is actuated by a servo via a tendon. The bending sensor made of 2 mm thick electrically conductive foam is mounted on the bottom side. The conductive foam is contacted with five copper strips with electrically conductive adhesive at the beginning and at the end of the segment as well as below each of the first three prongs. This allows the separate measurement of the resistance in four sections of the soft robot segment. The resistance of the foam is measured with a simple voltage divider for each of the sections between the contacts separately.
Since many electrically conductive foams tend to form cracks after some load cycles the cycle stability is of importance. To investigate the cycle stability, the soft robot segment is exposed to several load cycles with a period time of 2s. In each cycle, the bending angle is increased linearly from 20 • to 110 • and then reduced to the original value. In Fig. 2 the resistance of the used foam is plotted over the bending angle for two different numbers of load cycles. It can be seen, that there is a large change of the resistance with the change of the bending angle. The resistance for a specific bending angle stays almost constant over several load cycles, therefore a sufficient cycle stability is given for this foam. However, the sensitivity for small and very large angles is much lower than for medium angles and the sensor behavior is strongly hysteretic.

Estimation of the bending angle with neural networks
For the determination of the bending angle from the measured resistances a neural network is used. It consists of two dense layers with a hyperbolic tangent activation function as well as a flatten layer for data formatting and a dropout layer to prevent overfitting during training. The measured resistances of the soft robot segment serve as input data for the neural network. As an output signal, the neural network is supposed to estimate the bending angle of the soft robot segment. In the simplest case, the total resistance of the soft robot segment measured at a certain point in time can be used as the input signal to determine the bending angle at that point in time. However, due to the hysteretic sensor behavior, which can be seen in Fig. 2, this only provides a comparatively inaccurate estimate. In order to improve the estimation, additional resistance measurement values from previous time steps are used as input signal. Furthermore, the resistances of the individual sections of the soft robot are used as input signal. This enables the detection of the hysteresis due to a slightly uneven resistance change of the Section 1: Multi-body dynamics individual sections. Additionally, the inclusion of the resistances of the individual sections of the soft robot segment will allow to distinguish between resistance changes as a result of a change in the bending angle and resistance changes as a result of contact with the foam in the future. To enable more efficient training, all signals are scaled to a uniform range of values. To generate the training and the validation set, the bending angle of the soft robot segment is varied sinusoidally. The period duration is randomly varied in an interval of 3 s to 60 s and the amplitude in an interval of 30 • to 45 • for each half period. Important parameters of the neural network are the number of the trainable weights, the number of considered past measurements, the number of used contacting points of the conductive foam and the required training set size. A higher number of trainable weights enables the representation of more complex functions and thus, in principle, a better prediction result. At the same time, however, the training becomes more complex. In particular, a larger training set is required and the risk of overfitting increases. For the used neural network, the number of trainable weights mainly depends on the number of neurons of the first dense layer. In Fig. 3 the prediction error on the validation set for different numbers of neurons of the first dense layer and different numbers of considered past timesteps is shown. From the diagrams it can be seen that when considering only one time step (0 s), an approximately 25 % larger prediction error occurs than when considering also one past time step (0.2 s). This can be explained by the hysteretic sensor behavior. The best result can be achieved when considering measured values from the past 10 s. Taking into account even older data does not lead to a reduction of the error. Furthermore, the diagram shows that up to a number of about 100 neurons increasing the number of neurons in the first dense layer leads to a significant reduction of the error. Up to about 1000 neurons the error reduces slightly, from about 1000 neurons the error increases again. The increase can be explained by overfitting.
Further investigations have shown that when using three input signals, which requires four contacting points, an approximately 20 % lower mean error can be achieved compared to considering only the total resistance of the soft robot segment. The use of 4 input signals results in only a slight improvement compared to the use of 3 input signals. Also, the use of 2 instead of 1 input signals offers only a small advantage.
To achieve a good training result the training set should have a length of about 10 to 20 min. A smaller training set leads to a significantly worse result, larger training sets offer no advantage.

Results
The curvature estimation of the trained neural network as well as the error that occurs on a section of the validation set is shown in Fig.4. Thereby it is compared to the true value of the bending angle determined from the length of the tendon. The mean error on the validation set is 5.4 • on a measurement range of 10 • to 110 • . It can be seen, that the error is comparatively large for very small and very large bending angles. Especially the bending angle extrema are underestimated. The reason for this is the dependence of the sensor sensitivity on the bending angle. This was investigated in section 1. Especially for very small, but also for very large bending angles, the change of the electrical resistance and thus the sensor sensitivity is only very small. The method presented here for curvature estimation thus appears to be suitable for the use in soft robots.
For real-time applications, such as control of soft robots, the computation time of the curvature estimation for a single time step is relevant. On the PC used ("AMD 5 1500X" CPU, "NVIDIA GeForce GTX 1500 Ti" GPU), the computation time for curvature estimation for a single time step is 50 ms. The computation time is significantly lower than the used sampling interval t sample = 200 ms. Therefore, the curvature estimation presented here is suitable for real-time applications, such as the control of soft robots. Further experiments have shown that the computation time is largely independent of the size of the neural network used and the batch size during prediction. This shows, that a reduction in computation time is probably possible through a more efficient implementation.