## 4 Designing Sensors for Soft Robots
### Modelling  
In order to convert our designs into a working prototype, we also needed a model that would translate sensor gathered data into useful information about the assumed pose of the flexible robot module. This model would need to deduce the extent of the bend in the flexible module from the changes of the length of the wires moving within the flexible module's internal chambers. To do this, we assume that the flexible module is a continuous cylinder and that when in any bent position, the three channels trace an arc or partial circumference of a circle. We note that constant curvature is assumed [38]. The proposed model (introduced in [38]) is based on the geometric relations between the measured arc lengths and angle \(\theta\) (amount of bending), \(\beta\) (bending direction) and the overall elongation of the flexible module. Figure 10A shows this circle, with its centre at \((R_{x},R_{y},0)\); \(R\) denoting the circle's radius. Figure 9: Constituent parts of the test system. (**A**) The rigid section with the integrated sensing elements; (**B**) Assembled system comprising the rigid sensor section and the flexible module [38]. Oriented normally to the main axis of the flexible module, virtual planes, \(p_{1}p_{2}p_{3}\) and \(q_{1}q_{2}q_{3}\), are introduced to determine the bending radius, as shown in Figure 10A. The locations of these planes are defined by three points along the paths of the three wires. We assume that \(n_{1}\) and \(n_{2}\) denote the centred normal vectors of the introduced cross-sectional planes which are perpendicular to the cylinder's main axis. We also assume that all the normal vectors project onto the same line (\(n_{xy}\)) on the \(x\)-\(y\) plane. For our considerations, we assume that the length of the flexible module in its unactuated, rested state is \(l\). Furthermore, when they are not bent (i.e., bending angle \(\theta\) = 0), the planes are parallel and \(l/N\) apart. Integer \(N\) is a large number that can be chosen arbitrarily. For the calculations here, it was set to 100. We presume that when the flexible module bends, it takes on the shape of an arc and that the two planes are normal to the module's main axis, the two planes always intersect at a point \(c\) = (\(Rx\), \(Ry\), 0) which is at the centre of the achieved arc. As we can see from Figure 10A, the centre line of the flexible module is always the bending radius, \(R\), away from the intersection point, \(c\). It is noted that the location of intersection point \(c\) and the length of radius \(R\) change depend on the curvature experienced by the flexible module. We introduce \(\Delta\)s\({}_{1}\), \(\Delta\)s\({}_{2}\), \(\Delta\)s\({}_{3}\) to describe the distances between the vertices of the triangles that describe the outlines of the virtual planes, \(p_{1}q_{1}\), \(p_{2}q_{2}\) and \(p_{3}q_{3}\), respectively [38]:  
\[ \begin{array}{l}\Delta\text{s}_{1}=\frac{1}{N}(l-l_{1}),\\ \Delta\text{s}_{2}=\frac{1}{N}(l-l_{2}),\\ \Delta\text{s}_{3}=\frac{1}{N}(l-l_{3}),\end{array}  \tag{1}\]  
where \(l_{1}\), \(l_{2}\) and \(l_{3}\) represent the change in length of the three wires in the flexible module, see Figure 10A. As one can see from Figure 10B, a pentahedron is formed by the two virtual planes and the connections between their vertices. With \(n_{1}\) being defined as the normal vector of the upper plane \(p_{1}p_{2}p_{3}\), and \(n_{2}\) as that of the lower plane \(q_{1}q_{2}q_{3}\), we can describe these as functions of the vertices of the two planes, as follows:  
\[ \begin{array}{l}n_{1}=\frac{p_{3}p_{1}\times p_{2}p_{1}}{\left|p_{3}p_{1} \times p_{2}p_{1}\right|}\\ n_{2}=\frac{q_{1}q_{1}\times q_{2}q_{1}}{\left|q_{3}q_{1}\times q_{2}q_{1}\right| }\end{array}  \tag{2}\]  
Figure 10: **(A)** Sketch of the bending module with its three inner conduits within which the wires move depending on amount and direction of movement.