# Curvature Sensing and Control of Soft Continuum Robots Using e-Textile Sensors
## 4 Jacobian-Based Shape Control  
To perform shape control of a single section of a continuum robot, a Jacobian-based shape control scheme is employed. This method identifies the tendon lengths \(I\) necessary for achieving the desired robot shape, parameterized by \(\kappa_{d}\) and \(\phi_{d}\), using the Jacobian matrix that relates the velocities of the robot's actuators to the velocities of its end-effector. The control system relies on feedback from a soft e-textile sensor that envelops the robot, providing real-time data from 16 sensing points, as depicted in Figure 6. These sensing points capture the deformations and strains experienced by the robot, which are crucial for determining its shape and movement.  
Figure 5: The CNN architectures used to estimate the curvature of the soft robot from sensor readings.  
Figure 6: A block diagram of the continuum robot Jacobian-based shape control approach utilizing the soft e-textile sensor with the proposed CNN shape sensing model.  
To translate these sensor readings into actionable information, we utilized a CNN deep learning model. This model maps the 16-point readings from the e-textile sensor to the estimated curvature (\(\hat{\kappa}\)) and angle of the curvature plane (\(\hat{\phi}\)). These estimations are essential for understanding the robot's configuration and guiding its movements accurately. By continuously updating the Jacobian matrix with real-time feedback from the e-textile sensor, the control system can dynamically adjust the robot's actuators, ensuring precise and smooth positioning. This approach allows the robot to adapt to various tasks and environments, maintaining high precision even in complex and unstructured settings.  
According to the assumption of the constant curvature model [30], the parameters (\(\kappa\)) and (\(\phi\)) of a continuum robot are related to the cable lengths \(\mathbf{l}=[l_{1},l_{2},l_{3}]^{T}\) as follows:  
\[\kappa=2\frac{\sqrt{l_{1}^{2}+l_{2}^{2}+l_{3}^{2}-l_{1}l_{2}-l_{2}l_{3}-l_{1}l _{3}}}{d(l_{1}+l_{2}+l_{3})} \tag{2}\]  
\[\phi=\tan^{-1}\left(\frac{\sqrt{3}l_{3}+l_{2}-2l_{1}}{l_{2}-l_{3}}\right) \tag{3}\]  
Thus, the time derivatives of the curvature and the angle of curvature plan are computed as  
\[\begin{bmatrix}\hat{\kappa}\\ \hat{\phi}\end{bmatrix}=\mathbf{J}(\mathbf{l})\mathbf{l} \tag{4}\]  
where \(\mathbf{J}(\mathbf{l})\in\mathbb{R}^{2\times 3}\) is the Jacobian matrix computed numerically by differentiating Equations (2) and (3) with respect to \(l_{1},l_{2},l_{3}\).  
To eliminate any shift while pursuing the desired shape parameterized by \(\kappa_{d}\) and \(\phi_{d}\), the Jacobian-based control selects the tendon lengths as follows:  
\[\mathbf{l}=\mathbf{J}^{\dagger}(\mathbf{l})\left(\begin{bmatrix}\kappa_{d}^{d}\\ \hat{\phi_{d}}\end{bmatrix}+\mathbf{K}\mathbf{e}\right) \tag{5}\]  
where \(\mathbf{J}^{\dagger}(\mathbf{l})\) is the pseudoinverse of the Jacobian matrix, \(\mathbf{e}\) represents the error between the desired and actual shape parameters, and \(\mathbf{K}\) is a positive gain used to tune the controller's performance. It is important to note that the actual shape parameters are estimated using the developed CNN shape sensing model in conjunction with the previously mentioned e-textile sensor. Since the robot's tendons are driven by servo motors, the angle \(\theta_{m}=f(\mathbf{l})\) of each servo is determined based on the mapping between the tendon length and the driving angle derived from the servo mechanism.