## 3 Principle of Sensing and Measurement of Embedded FBGs
From Equations (14) and (15), the change of FBG length caused from the bending was obtained, and the grating period is changed proportionally to the bending angle \(\theta\), the bending curvature of the microstructure can be written as [10]:  
\[C=\frac{1}{R}=\frac{2}{h}\frac{\Delta L}{L}=\frac{2}{h}\varepsilon=\frac{ \Delta\lambda_{B}}{\lambda_{B}(1-R_{\varepsilon})\cdot h} \tag{17}\]  
where \(C\) is the bending curvature of the microstructure, \(R\) represents the curvature radius, \(\Delta L\) represents the length variation of both the inner and outer side of the microstructure, \(\varepsilon\) is the strain of the microstructure. For any FBG sensors, \(\lambda_{B}\), \(R_{\varepsilon}\), \(h\) are the constant, so the bending curvature and wavelength shift has a linear relationship, and this characteristic could realize the 3D shape reconstruction of the microstructure. The shape reconstruction of the soft actuator includes curvature acquisition, curvature continuum, curve reconstruction and shape reconstruction, etc. Due to the curvature data being discrete and obtained from the FBG sensors, the curvature is serialized continuously through the linear interpolation and the fitted algorithm; then the geometrical structure of the soft actuator can be reconstructed. By using the idea of differential calculus, a line with fixed length can be divided into several uniform  
\[\Delta\lambda_{B}/\lambda_{B}=(1-P_{\varepsilon})\cdot\varepsilon+(\alpha_{T} +\xi)\cdot\Delta T \tag{11}\]0 Bending mechanism of the FBG-based optical fiber sensor. (**a**) Free-state without bending. (**b**) Bending situation. sections, and the length of these sections expressed as \(L\), namely \(O_{1}O_{2}=O_{2}O_{3}=L\), and then become some arcs with the length of \(L\) when the microstructure is bending, and the center angle of the circular arc is determined by the length \(L\) and the curvature \(C\). Assuming that the coordinate of \(O_{2}\) is (0, 0), the coordinate of \(O_{3}\) can be calculated as (\(\sin\theta_{2}/C_{2}\), (1 \(-\cos\theta_{2}/C_{2}\))), from the length \(L\) and curvature \(C\), the \(\theta_{2}\) is equal to \(L^{*}C_{2}\); thus this algorithm can be applied for 3D shape reconstruction of the soft actuator [23; 24; 25; 26; 27; 28; 29]. The sensing surface formed by some sensing points can be reconstructed based on the motion coordinate system, as illustrated in \[\Delta\lambda_{B}/\lambda_{B}=(1-P_{\varepsilon})\cdot\varepsilon+(\alpha_{T} +\xi)\cdot\Delta T \tag{11}\]1 Assuming that the original curved surface along the direction of (\(O_{1}\), \(Z_{1}\)), and could bend from the direction of curves \(O_{1}\), \(O_{2}\), \(O_{3}\), the point \(O_{2}\) could be obtained from translation and rotation of the coordinate \(O_{2}\)[1]. In the fixed length of arc, the coordinate system is set up in the tangent direction of the curve with points \(O_{2}\) and \(O_{3}\) respectively, and for the coordinate \(X_{1}\)-\(Z_{1}\) and \(X_{2}\)-\(Z_{2}\), the direction and size of vector \(O_{1}O_{2}\) is invariable. The rotation angle \(\theta_{1}\) can be calculated from the curvature \(C_{1}\) (the coordinate of \(O_{1}\)), and the rotation angle \(\theta_{2}\) can be calculated from the curvature \(C_{2}\) (the coordinate of \(O_{2}\)). The relationship between each coordinate can be established by the rotation matrix, the ratio angle of the whole plane is fitted through the change of the curvature; thus the reconstruction and visualization of the soft actuator can be realized, and the rotation matrix can be expressed as:  
\[\left[ \begin{array}{c}X_{2}\\ Z_{2}\end{array} \right]=\left[ \begin{array}{c}X_{1}\\ Z_{1}\end{array} \right]=\left[ \begin{array}{c}\cos\theta_{1}-\sin\theta_{1} \\ \sin\theta_{1}-\cos\theta_{1}\end{array} \right] \tag{18}\]  
Consequently, according to the curvature obtained from each sensing point, the 3D shape of the soft actuator is well reconstructed, and the real-time interaction surface with the soft actuator can be realized by using the multi-resolution mesh modeling tool.