1 Introduction

Continuum robots have gained significant attention because of their advantageous characteristics, such as being lightweight, cost-effective, and versatile in many environmental and situational contexts. This is witnessed by the vast array of applications in which they have been utilized successfully. Continuum robots are increasingly used in medical, rehabilitation, manufacturing, monitoring, and remote exploration. In contrast to the conventional articulated rigid robot, continuum robots possess the ability to dynamically alter their shapes, enabling them to effectively navigate through confined and unstructured environments. This adaptability makes them particularly suitable for applications in several domains, including industrial pipeline inspection, aircraft engine maintenance, and medical environments, see Figs. 1 and 2.

Continuum robots can be actuated in various ways: mechanical, fluidic, and magnetic actuation. Mechanical actuation includes concentric tubes and backbone-based actuators. Fluidic actuation includes pleated, corrugated, belloscope tip driven and endoscope [30]. Designing such structures presents a significant challenge due to the inherent relationship between dexterity and the number of actuators involved. This leads to an expansion in the diameter of the structure, consequently resulting in a reduction in the range of motion, especially in the medical applications [40].

Conversely, the compliance and vast number of degrees of freedom (DOFs) possessed by these entities inherently augment the intricacy involved in their modelling. Various modelling methodologies have been previously implied exhibiting differences in their underlying assumptions and scope of application. The lumped mass model [13], the piecewise constant curvature model [8, 23, 28, 29, 43], discrete elastic rod model [22], and finite-element-based models [4, 12] are among the frequently used methodologies in the field of soft robotics. A review of modelling approaches, numerical methods, and their critical perspective on their implementation is illustrated by [1].

Fig. 1
figure 1

Soft robotic grippers with somatosensory feedback [39]

Fig. 2
figure 2

Rod-driven soft robot [41]

The lumped mass model (LMM) postulates that flexible links consist of repeated segments of point masses that are interconnected by springs and dampers. Each mass is subjected to the linear momentum applied by gravity and the motion of neighbouring masses exerted through springs, while some also undergo direct external loads, boundary conditions such as clamped support reaction forces, or the interactive forces and moments applied directly by the actuators embedded in the surface. These elements are selected to capture the geometric properties, expected motion, and degrees of freedom of the system [13].

The arc hypothesis theory is first established and the kinematics of the robot is developed using the classic D-H method [14]. Then after, the piecewise constant curvature (PCC) assumption is introduced and has the advantage of decomposing the robot kinematics from joint space, to configuration space parameters that describe constant curvature arcs, and from this configuration space to task space, consisting of a space curve which describes position and orientation along the backbone [43]. This PCC algorithms restrict the motion to constant curvature kinematics, and thus do not include real-world effects that can be important in some continuum robot designs, such as gravitational loading or friction.

The discrete elastic rod (DER) formulation originated in the field of computer graphics, in which the material curve of the rod is approximated by a discrete set of lines connected at vertices. The DER formulation employs discrete differential geometry to characterize bending and torsional strains. The discrete curvature vector of a vertex, measures bending strain, while the length of the edges accounts for stretching. Additionally, each edge is associated with a reference frame and a material frame, where the angle difference of the latter frame between adjacent edges is a measure of twist. Space and time operators are introduced to update these frames in space and time respectively, and thus, the torsion of the rod can be efficiently computed [10]. However, most of DER-based publications are oriented towards computer graphics rather than real mechanical systems.

The finite element methods (FEM) include the discretization of the mechanical structure by the use of one-dimensional, two-dimensional, and three-dimensional finite elements. By referring to classic robotic structures, the finite element discretization involves the use of beam, shell, and solid elements. Euler–Bernoulli beam, Timoshenko beam, and the Cosserat rod describe the material deformation of the robot as one-dimensional continuum mechanics entity [24]. However, the incremental nature of FEMs is suitable for small deformation problems and exhibits limitations such as computational costs and numerical instabilities when subjected to the large deformations, and inaccuracies due to mesh distortion. Regarding the mechanical approaches used for description of large displacements and deformations, two approaches are mainly adopted in the literature, the corotational frame formulation (CFF) [15] and inertial frame formulation (IFF) [12]. Both the CFF and the IFF presuppose a rigid cross section of the element that does not undergo deformation and is geometrically perpendicular to the centreline of the element.

The dynamics of a planar continuum robot of one section that consisting of a thin elastic beam element is carried out by [11] to obtain large-deflection dynamic model without considering the robot torsional effect. In this reference, the authors reveals that significant effort is still required for the modelling, design, and characterization of continuum robots. Clearly, a continuum manipulator consists of multiple sections connected in series, which increases the model’s complexity. In addition, dynamic and kinematic modelling in three dimensions presents an additional challenge. Despite the fact that axial motion is not inherently problematic for a backbone with high axial rigidity, manipulators that can contract and extend may find it extremely advantageous.

The models that are obtained from the three-dimensional elasticity theory, treating the soft body as a continuum medium, are listed by [1]. In robotics, these approaches are all based on the Cosserat rod theory, in which, one can replace the volume limit applied to the 3D model, by a simpler approach consisting of directly modelling the rod as a material line along which is continuously stacked a set of rigid cross-sections, and labelled by a single material coordinate. In this case, the rod is called a Cosserat rod [6, 17, 38], and its configuration is defined by the positional vector field of its centreline, and the orientation field of its cross-sectional directors.

On the other side, from the control point of view, soft robots no longer employ model-based controls and most of existing applications are limited to laboratories and learning methodologies [26, 27]. Simple continuum robot models or model order reduction strategies, which involve extensive simplifications, are hardly tested [25]. Since all model-based controllers for rigid robotics may be utilized for soft robots, an enormous number of attempts should be made to construct fully invertible models for soft and continuum robots.

Recently, a new continuum approach for soft robots modelling and shape control is developed by [7, 34], in which a systematic procedure to determine the actuation control forces that achieve the desired motion trajectories and shapes is developed. Shabana and Eldeeb [34] presents two numerical examples of planar straight and tapered cantilevered beams that estimate the actuation forces required for performing predetermined shapes. Moreover, they propose an imaging techniques that can be used to obtain a point cloud that defines the robot geometry to determine the generalized coordinates and define the driving constraints.

This research proposes a non-incremental finite element model of continuum robots based on the absolute nodal coordinate formulation (ANCF). The ANCF, presented by [20, 31,32,33, 37], enables the inclusion of continuum bodies with geometric and material nonlinearities under the multibody system umbrella. Moreover, the beam element based on the ANCF relaxes the assumption of the rigid cross section and is capable of representing a distortional deformation of the cross section [42] that gives a general and complete model of robotic systems. This study introduces the use of a continuum mechanics approach in deriving the expression of the elastic forces of the continuum robot as a 3D beam element with a tubular (circular) cross section and investigates the accuracy and usability of ANCF for the robotic systems that include soft and continuum bodies.

Fig. 3
figure 3

3D beam within ANCF

2 Challenges and scope of contributions

The objective of this work is to investigate the kinematic and static models of a spatial continuum robot using the ANCF, in which the assumption of a rigid cross section is relaxed, and the distortion deformation of the cross section can be captured. Figure 3 shows curved 3D beam element with circular cross section between nodes 1 and 2, with different absolute nodal gradients at node 2. It can be shown that the element shows arbitrary spatial curvatures, Fig. 3a, c, and the element can be twisted, as shown in Fig. 3b. Moreover, the cross section can exhibits radial distortion as presented in Fig. 3d. Thus, one of the goals of this research is to develop such continuum model that capture all practical deformation modes, and in addition allow for the axial deformation (elongation).

Unlike existing methodologies, the assumption of constant curvature geometry could be relaxed. The paper proposes the B-spline geometry to be employed to represent the initial and final configurations of the robot at the desired instants. The objective to obtain a systematic approach to generating the robot’s ANCF geometry based on the required tip point and utilizing of additional points along the requisite shape. A procedure based on linear transformation is suggested to systematically transform the B-spline representation into an ANCF finite element mesh, preserving the same geometry and the same degree of continuity. The implementation of a linear transformation will enhance the integration of motion control and computer-aided design in the field of soft robotics. Following that, the trajectory generation of the robot can be carried out.

For the purpose of comparisons and due to the success of applying the constant curvature method to many continuum robots despite the simplifications of mathematical modelling, the paper aims to verify the proposed ANCF model by comparison with PCC outcomes. It was found that if a constant moment is applied along the length of the beam, the Bernoulli–Euler beam predicts a constant curvature shape [43]. Accordingly, the generalized moment as an external force must be provided on the continuum robot within the ANCF as an additional goal of this paper.

Practically, it has been found that a constant moment can be applied by means of a cable terminating at the end of the robot and passing through a sufficient number of cable guides fixed along the length of the robot. This is the case for the derived simple robots, where concentric tubes (under the assumption of no torsion) directly apply constant moments to each other. Accordingly, the direct and inverse model of the robot static models will be constructed and evaluated in terms of the generalized coordinates and actuated forces.

Fig. 4
figure 4

3D beam within ANCF

3 Absolute nodal coordinates formulation

In the absolute nodal coordinate formulation, the nodal coordinates of the elements are defined in a fixed inertial coordinate system; this fixed inertial coordinate system should be mentioned here as the structure coordinate system SCS:\(\left( XYZ\right) \) [2]. The nodal coordinates of an element j are consisting of the global displacements and slopes of each node. For a two-noded beam element, element j, on body i, as shown in Fig. 4, the nodal coordinates of node k, \(k=\left( 1,2\right) \) can be written as:

$$\begin{aligned} \varvec{\bar{e}}^{ijk}= \begin{bmatrix} \varvec{\bar{r}}^{ijk^{T}}&\frac{\partial \varvec{\bar{r}}^{ijk}}{\partial x^{i}}^{T}&\frac{\partial \varvec{\bar{r}}^{ijk}}{\partial y^{i}}^{T}&\frac{\partial \varvec{\bar{r}}^{ijk}}{\partial z^{i}}^{T} \end{bmatrix} _{12\times 1}^{T} \end{aligned}$$
(1)

where \(\varvec{\bar{r}}^{ijk}\) defines the position of node k\( (k=1,2),\) and three vectors \({\partial \varvec{\bar{r}}^{ijk}/}{\partial } x^{i}\), \({\partial \varvec{\bar{r}}^{ijk}/}{\partial }y^{i}\), and \({\partial \varvec{\bar{r}}^{ijk}/}{\partial z}^{i}\) that define the gradients at node k with respect to the body coordinate system BCS:\(\left( x^{i}y^{i}z^{i}\right) \). The BCS is constructed such that the \(x-\) axis of the body frame \(\left( x^{i}\right) \) will coincide with the \(x-\) axis of the first element of the beam mesh \(\left( x^{i1}\right) \), and thus, there is no rotation required between the BCS and ECS at the first element of the beam mesh, i.e. ECS \(\left( x^{ij}y^{ij}z^{ij}\right) ,\) \(j=1\). In general, the vector \({\partial \varvec{\bar{r}}^{ij}/}{\partial }x^{i}\) defines the orientation of the centreline of the beam with respect to the BCS. Moreover, the orientation of the height and the width coordinates of the cross section of the beam are defined by vectors \({\partial \varvec{\bar{r}}^{ij}/}{\partial y }^{i}\) and \({\partial \varvec{\bar{r}}^{ij}/}{\partial z}^{i}\); these vectors and are not orthogonal unit vectors [33].

The body coordinate system, BCS, can be selected to be initially parallel to the axes of the global coordinate system. However, in some cases, where multiple bodies are fixed to one structure with distinct orientations, a transformation has to be performed between the two coordinate systems [44]. The relation between the BCS \( \left( x^{i}y^{i}z^{i}\right) \) and the SCS:\(\left( XYZ\right) \) can be expressed by constant transformation matrix that are orthogonal unit vectors along the body reference frame, such that

$$\begin{aligned} {\textbf{A}}_{o}=\frac{\partial {\textbf{X}}}{\partial {\textbf{x}}^{i}} \end{aligned}$$
(2)

For the case represented in Fig. 4, assuming no translation is carried out, the transformation can be expressed as

$$\begin{aligned} {\textbf{A}}_{o}= \begin{bmatrix} X\cdot x^{i} &{} &{} X\cdot y^{i} &{} &{} X\cdot z^{i} \\ Y\cdot x^{i} &{} &{} Y\cdot y^{i}&{} &{} Y\cdot z^{i} \\ Z\cdot x^{i} &{} &{} Z\cdot y^{i} &{} &{} Z\cdot z^{i} \end{bmatrix} = \begin{bmatrix} 0 &{} &{} 0 &{} &{} -1 \\ 0 &{} &{} 1 &{} &{} 0 \\ 1 &{} &{} 0 &{} &{} 0 \end{bmatrix} \end{aligned}$$
(3)

Thus, the transformation can be carried out, as \({\textbf{e}}^{ijk}= {\textbf{T}}_{o}\varvec{\bar{e}}^{ijk}\), such that

$$\begin{aligned} {\textbf{e}}^{ijk}= \begin{bmatrix} {\textbf{r}}^{ijk} \\ \frac{\partial {\textbf{r}}^{ijk}}{\partial X} \\ \frac{\partial {\textbf{r}}^{ijk}}{\partial Y} \\ \frac{\partial {\textbf{r}}^{ijk}}{\partial Z} \end{bmatrix} = \begin{bmatrix} {\textbf{A}}_{o} &{}&{} {\textbf{0}} &{} &{} {\textbf{0}} &{} &{} {\textbf{0}} \\ {\textbf{0}} &{} &{} {\textbf{A}}_{o} &{} &{} {\textbf{0}} &{} &{} {\textbf{0}} \\ {\textbf{0}} &{} &{} {\textbf{0}} &{} &{} {\textbf{A}}_{o}&{} &{} {\textbf{0}} \\ {\textbf{0}} &{} &{} {\textbf{0}} &{} &{} {\textbf{0}}&{} &{} {\textbf{A}}_{o} \end{bmatrix} \begin{bmatrix} \varvec{\bar{r}}^{ijk} \\ \frac{\partial \varvec{\bar{r}}^{ijk}}{\partial x^{i}} \\ \frac{\partial \varvec{\bar{r}}^{ijk}}{\partial y^{i}} \\ \frac{\partial \varvec{\bar{r}}^{ijk}}{\partial z^{i}} \end{bmatrix} \end{aligned}$$

where \(\varvec{\bar{e}}^{ijk}\) and \({\textbf{e}}^{ijk}\) are the nodal coordinates defined on the BCS and SCS respectively. As a consequence, such a representation guarantees inter-element continuity of global displacement gradients at these points. The nodal coordinates of one element can then be given by the vector \( \varvec{\bar{e}}^{ij}=\left[ \begin{array}{ll} \varvec{\bar{e}}^{ij1T}&\varvec{\bar{e}}^{ij2T} \end{array} \right] _{24\times 1}^{T}\). Therefore, in the ANCF, the position of an arbitrary point on the body i, element j, \(\varvec{\bar{r}}^{ij}\) with respect to BCS \(\left( x^{i}y^{i}z^{i}\right) ,\) and \({\textbf{r}} ^{ij}\) with respect to SCS \(\left( XYZ\right) \), can be defined as:

$$\begin{aligned} \varvec{\bar{r}}^{ij}\left( \varvec{\bar{u}}^{ij},t\right)= & {} {\textbf{S}} ^{ij}\left( \varvec{\bar{u}}^{ij}\right) \varvec{\bar{e}}^{ij}\left( t\right) \end{aligned}$$
(4)
$$\begin{aligned} {\textbf{r}}^{ij}\left( \varvec{\bar{u}}^{ij},t\right)= & {} {\textbf{S}} ^{ij}\left( \varvec{\bar{u}}^{ij}\right) {\textbf{T}}_{o}^{T}{\textbf{e}} ^{ij}\left( t\right) \end{aligned}$$
(5)
$$\begin{aligned}= & {} {\textbf{A}}_{o}\varvec{\bar{r}}^{ij}\left( \varvec{\bar{u}}^{ij},t\right) \end{aligned}$$
(6)

such that \({\textbf{e}}^{ijk}={\textbf{T}}_{o}\varvec{\bar{e}}^{ijk},\) and \({\textbf{S}}^{ij}\) is the element shape function matrix, \(\varvec{\bar{u}}^{ij}= \begin{bmatrix} x^{ij}&y^{ij}&z^{ij} \end{bmatrix} ^{T}\) is the local position of the arbitrary point with respect to the ECS, where, \(x^{ij},y^{ij}\) and \(z^{ij}\) are the coordinates along the element j. A straightforward procedure to construct the shape function is demonstrated by [42]. Equation (5) is very important when the nodal coordinates are defined using the structural coordinates system, while Eq. (6) is used in the simulation of the output results on the global (structural) coordinate system.

The initial configuration is defined such that the time is equal to zero; thus, the absolute position vector of an arbitrary point in the reference configuration can be described as

$$\begin{aligned} \varvec{\bar{r}}^{ij}\left( \varvec{\bar{u}}^{ij},0\right) =\varvec{\bar{r}} _{0}^{ij}={\textbf{S}}^{ij}\left( \varvec{\bar{u}}^{ij}\right) \varvec{\bar{e}} _{0}^{ij} \end{aligned}$$
(7)

where \(\varvec{\bar{e}}_{0}^{ij}\) is the vector of nodal coordinates in the reference configuration with respect to the body coordinate system (BCS). The displacement field, \(\varvec{\bar{r}} ^{ij}\left( \varvec{\bar{u}}^{ij},t\right) ,\) can be written as

$$\begin{aligned} \varvec{\bar{r}}^{ij}\left( \varvec{\bar{u}}^{ij},t\right) =\varvec{\bar{r}} _{0}^{ij}+{\textbf{u}}_{f}^{ij}={\textbf{S}}^{ij}\left( \varvec{\bar{u}} ^{ij}\right) \left( \varvec{\bar{e}}_{0}^{ij}+\varvec{\bar{e}} _{f}^{ij}\right) \end{aligned}$$
(8)

where \(\varvec{\bar{e}}_{f}^{ij}\) is the vector of nodal displacements with respect to the BCS. It can be shown that a line element \(d{\textbf{x}}^{i}\) in the straight configuration corresponds to a line element \(d\varvec{\bar{r}}_{0}^{ij}\) in the initial configuration and to a line element \(d\varvec{\bar{r}}^{ij}\) in the current configuration. One has the following relationships:

$$\begin{aligned} d\varvec{\bar{r}}^{ij}=\varvec{\bar{J}}^{ij}d\varvec{\bar{r}}_{0}^{ij}\text { \ \ },d\varvec{\bar{r}}^{ij}=\varvec{\bar{J}}_{e}^{ij}d{\textbf{x}}^{i}\text { \ \ },d\varvec{\bar{r}}_{0}^{ij}=\varvec{\bar{J}}_{0}^{ij}d{\textbf{x}}^{i} \end{aligned}$$

The gradients of the displacement vector, matrix \({\textbf{J}}^{ij}\) is defined as:

$$\begin{aligned} \varvec{\bar{J}}^{ij}=\frac{\partial \varvec{\bar{r}}^{ij}}{\partial \varvec{\bar{r}}_{0}^{ij}}=\frac{\partial \varvec{\bar{r}}^{ij}}{\partial {\textbf{x}} ^{i}}\frac{\partial {\textbf{x}}^{i}}{\partial \varvec{\bar{r}}_{0}^{ij}}= \varvec{\bar{J}}_{e}^{ij}\varvec{\bar{J}}_{0}^{ij-1} \end{aligned}$$
(9)

If the element local coordinate system is parallel to the body coordinate system and the element is not curved, matrix \({\textbf{J}}_{0}^{ij}\) is an identity matrix. The relationship between the volume of the curved structure \(V_{o}\) in the initial configuration, to the volume of the straight configuration V is defined as

$$\begin{aligned} dV_{o}= & {} \left| \varvec{\bar{J}}_{0}\right| dV \\ dv= & {} \left| \varvec{\bar{J}}_{e}\right| dV \end{aligned}$$

Note that

$$\begin{aligned} \varvec{\bar{J}}_{0}=\frac{\partial \varvec{\bar{r}}_{0}^{ij}}{\partial {\textbf{x}}^{i}}=\frac{\partial {\textbf{S}}^{ij}\left( \varvec{\bar{u}} ^{ij}\right) }{\partial {\textbf{x}}^{i}}\varvec{\bar{e}}_{0}^{ij}=\frac{ \partial {\textbf{S}}^{ij}\left( \varvec{\bar{u}}^{ij}\right) }{\partial {\textbf{x}}^{i}}{\textbf{T}}_{o}^{T}{\textbf{e}}_{0}^{ij} \end{aligned}$$

where \(\left| \varvec{\bar{J}}_{0}\right| \) is the determinant of the matrix of position vector gradients \(\varvec{\bar{J}}_{0}\), which is constant. By defining \({\textbf{p}}^{i}\) as the unconstrained (free) vector of nodal coordinates over the flexible body i, with the dimension of \(DOFs\times 1\), where DOFs are the total number of degrees of freedom. Thus, Eq. (4) can be rewritten as:

$$\begin{aligned} \varvec{\bar{r}}^{ij}={\textbf{S}}^{ij}\varvec{\bar{e}}^{ij}={\textbf{S}}^{ij} {\textbf{B}}_{1}^{ij}{\textbf{B}}_{2}^{i}\varvec{\bar{p}}^{i} \end{aligned}$$
(10)

where \({\textbf{B}}_{1}^{ij}\) is the connectivity matrix and \( {\textbf{B}}_{2}^{i}\) is boundary conditions linear transformation matrix.

3.1 Elastic forces

The nonlinear Lagrangian strain tensor, \(\mathbf {\epsilon }_{\mathcal {L}}\), can be defined using the right Cauchy-Green deformation tensor as follows [32]:

$$\begin{aligned} \mathbf {\epsilon }_{\mathcal {L}}=\frac{1}{2}\left( {\textbf{J}}^{T}\mathbf {J-I }\right) \end{aligned}$$
(11)

The gradients of the displacement vector are defined in Eq. (9), in which \({\textbf{J}}=\partial {\textbf{r}} ^{ij}/\partial {\textbf{r}}_{0}^{ij}={\textbf{J}}_{e}{\textbf{J}}_{0}^{-1}\). It is possible to verify that if the body experiences a rigid motion, matrix \( {\textbf{J}}\) is orthonormal, and thus it is clear from Equation (10) that there is no strain. Note that

$$\begin{aligned} {\textbf{J}}_{e}=\frac{\partial {\textbf{r}}^{ij}}{\partial {\textbf{X}}}=\frac{ \partial {\textbf{A}}_{o}\varvec{\bar{r}}^{ij}}{\partial {\textbf{x}}^{i}}\frac{ \partial {\textbf{x}}^{i}}{\partial {\textbf{X}}}={\textbf{A}}_{o}\frac{\partial \varvec{\bar{r}}^{ij}}{\partial {\textbf{x}}^{i}}{\textbf{A}}_{o}^{T}={\textbf{A}} _{o}\varvec{\bar{J}}_{e}{\textbf{A}}_{o}^{T} \end{aligned}$$

Similarly, \({\textbf{J}}_{0}={\textbf{A}}_{o}\varvec{\bar{J}}_{0} {\textbf{A}}_{o}^{T}\), thus

$$\begin{aligned} {\textbf{J}}={\textbf{A}}_{o}\varvec{\bar{J}}_{e}\varvec{\bar{J}}_{0}^{-1} {\textbf{A}}_{o}^{T}={\textbf{A}}_{o}\varvec{\bar{J}}^{ij}{\textbf{A}}_{o}^{T} \end{aligned}$$
(12)

where \(\varvec{\bar{J}}^{ij}=\partial \varvec{\bar{r}} ^{ij}/\partial \varvec{\bar{r}}_{0}^{ij}\) is defined in Eq. (9). Therefore, the strain tensor with respect to the element coordinate system can be defined as

$$\begin{aligned} \mathbf {\epsilon }_{\mathcal {L}}= & {} {\textbf{A}}_{o}\varvec{\bar{\epsilon }} _{\mathcal {L}}{\textbf{A}}_{o}^{T} \end{aligned}$$
(13)
$$\begin{aligned} \varvec{\bar{\epsilon }}_{\mathcal {L}}= & {} \frac{1}{2}\left( \varvec{\bar{J}} ^{T}\varvec{\bar{J}-I}\right) \end{aligned}$$
(14)

Because of the symmetry of the strain tensor, it is sufficient to identify only six strain components, three normal strains and three shear strains, such that the strain vector can be written as

$$\begin{aligned} \mathbf {\epsilon }={\left[ { \begin{array}{cccccc} \epsilon {{_{xx}}}&\epsilon {{_{yy}}}&\epsilon {{_{zz}}}&{2\epsilon { _{xy}}}&{2\epsilon {_{xz}}}&{2\epsilon {_{yz}}} \end{array} }\right] ^{T}} \end{aligned}$$
(15)

The stress components of the element can be defined using the constitutive equation as follows:

$$\begin{aligned} \mathbf {\sigma }=\mathbf {E\epsilon } \end{aligned}$$
(16)

where \({\textbf{E}}\) is the matrix of the elastic constants of the material [21]. The elastic forces of the element can be derived by using the following expression of the strain energy:

$$\begin{aligned} U=\frac{1}{2}\int _{V}\mathbf {\epsilon }^{T}\mathbf {\sigma } dV=\frac{1 }{2}\int _{V}\mathbf {\epsilon }^{T}\mathbf {E\epsilon } \textrm{d}V \end{aligned}$$
(17)

The vector of the elastic forces, \({\textbf{Q}}_{k}^{ij}\), that produced due to deformation of element j, can be defined using the strain energy, U, as follows:

$$\begin{aligned} {\textbf{Q}}_{k}^{ij}=\frac{\partial U^{ij}}{\partial {\textbf{e}}^{ij}} \end{aligned}$$
(18)

Several studies investigated the accuracy and usability of a continuum mechanics approach in description of elastic forces of a three-dimensional beam element [9, 35, 36]. It should be mentioned that the strain tensor given by Eq. (13) is defined as a function of the element coordinates ECS \(\left( x^{ij}y^{ij}z^{ij}\right) \) and, therefore, the elastic forces are defined as a volume element that allows for describing the deformation of the beam cross section.

3.2 Generalized external forces

The principle of virtual work can be used to develop the vector of the generalized forces on the body i, element j, i.e. \({{\textbf{Q}}_{e}^{ij}} \) that can be developed due to external Cartesian forces and moments. The virtual work done by applying external force vector, acting on an arbitrary point on the element, can be written with respect to SCS \(\left( {\ {\textbf{F}}}^{ij}\right) \), or BCS \(\left( {\varvec{{\bar{F}}}} ^{ij}\right) \) as follows:

$$\begin{aligned} \delta W={\varvec{{\bar{F}}}^{ijT}}\delta \varvec{{\bar{r}}}^{ij}={{\textbf{Q}} _{e}^{ijT}}\delta {\textbf{e}}^{ij} \end{aligned}$$
(19)

Substituting the value of \(\varvec{{\bar{r}}}\) from Eq. (5) yields

$$\begin{aligned} \delta W= & {} {\varvec{{\bar{F}}}^{ijT}}\delta \varvec{{\bar{r}}}^{ij} \\= & {} {\varvec{{\bar{F}}}^{ijT}}{\textbf{S}}^{ij}\delta \varvec{{\bar{e}}}^{ij} \\= & {} {\varvec{{\bar{F}}}^{ijT}}{\textbf{S}}^{ij}{\textbf{T}}_{o}^{iT}\delta {\textbf{e}}^{ij} \end{aligned}$$
$$\begin{aligned} {{\textbf{Q}}_{e}^{ijT}}{=\varvec{{\bar{F}}}^{ijT}}{\textbf{S}}^{ij}{\textbf{T}} _{o}^{iT} \end{aligned}$$
(20)

In the case of describing the generalized forces related to the unconstrained nodal coordinates of the body \(\left( i\right) \), i.e. \( {\textbf{p}}^{i}\), one can conclude that:

$$\begin{aligned} \delta W= & {} {\varvec{{\bar{F}}}^{ijT}}{\textbf{S}}^{ij}{\textbf{T}}_{o}^{iT} {\textbf{B}}_{1}^{ij}{\textbf{B}}_{2}^{i}\delta {\textbf{p}}^{i} \end{aligned}$$
(21)
$$\begin{aligned}&\Updownarrow&\nonumber \\ {{\textbf{Q}}_{{\textbf{p}}}^{iT}}&{=}&{\varvec{{\bar{F}}}^{ijT}}{\textbf{S}} ^{ij} {\textbf{T}}_{o}^{iT}{\textbf{B}}_{1}^{ij}{\textbf{B}}_{2}^{i} \end{aligned}$$
(22)

The absence of rotating angular coordinates in ANCF elements complicates the application of moments compared to the application of point forces. In the context of applied moments, it can be held that

$$\begin{aligned} \delta W={\varvec{{\bar{M}}}^{ijT}}\delta \varvec{{\bar{\vartheta }}}^{ij} \end{aligned}$$
(23)

which is the applied moment \({\varvec{{\bar{M}}}^{ij}}\) at a given point on the body (i)-element (j) times the virtual change in orientation \(\delta \varvec{{\bar{\vartheta }}}^{ij}\), at that point. The virtual change \(\delta \varvec{{\bar{\vartheta }}}^{ij}\) can be expressed as

$$\begin{aligned} \delta \varvec{{\bar{\vartheta }}}^{ij}=\varvec{\bar{\omega }}^{ij}\delta {\textbf{t}} \end{aligned}$$
(24)

Therefore, the formulation of the virtual change in orientation \( \delta \varvec{{\bar{\vartheta }}}^{ij}\) can be obtained when the angular velocity for a material point, \(\varvec{\bar{\omega }}^{ij}\), inside an ANCF element is defined. The vorticity tensor describes the angular velocity \( \varvec{\bar{\omega }}^{ij}\) at the given point in the continuum element which can be expressed as [3]:

$$\begin{aligned} \overset{\sim }{\varvec{\bar{\omega }}}^{ij}= \begin{bmatrix} 0 &{}&{} -\bar{\omega }_{z} &{}&{} \bar{\omega }_{y} \\ \bar{\omega }_{z} &{}&{} 0 &{}&{} -\bar{\omega }_{x} \\ -\bar{\omega }_{y} &{}&{} \bar{\omega }_{x} &{}&{} 0 \end{bmatrix} =\frac{1}{2}\left( \mathbf {L-L}^{T}\right) \end{aligned}$$
(25)

where \({\textbf{L}}\) is the velocity gradient tensor that can be defined as

$$\begin{aligned} \mathbf {L=}\frac{\partial \overset{\cdot }{\varvec{\bar{r}}}^{ij}}{\partial \varvec{\bar{r}}^{ij}} \end{aligned}$$
(26)

Equation (26) can be written in terms of the deformation gradient as follows:

$$\begin{aligned} \mathbf {L=}\frac{\partial \overset{\cdot }{\varvec{\bar{r}}}^{ij}}{\partial \varvec{\bar{r}}^{ij}}=\frac{\partial \overset{\cdot }{\varvec{\bar{r}}} ^{ij} }{\partial \varvec{\bar{r}}_{0}^{ij}}\frac{\partial \varvec{\bar{r}} _{0}^{ij} }{\partial \varvec{\bar{r}}^{ij}}= \overset{\cdot }{\varvec{ \bar{J}}} ^{ij}\left( \varvec{\bar{J}}^{ij}\right) ^{-1} \end{aligned}$$
(27)

Substituting the value of \(\varvec{\bar{J}}^{ij}\), Eq. (9), yields

$$\begin{aligned} \mathbf {L=}\overset{\cdot }{\varvec{\bar{J}}}_{e}^{ij}\varvec{\bar{J}} _{0}^{ij^{-1}} \varvec{\bar{J}}_{0}^{ij} \varvec{\bar{J}} _{e}^{ij^{-1}}=\overset{\cdot }{\varvec{\bar{J}}}_{e}^{ij}\varvec{\bar{J}} _{e}^{ij^{-1}} \end{aligned}$$
(28)

It can be shown that the velocity gradient \({\textbf{L}}\) can now be written in terms of the nodal coordinates, the time derivative of the nodal coordinates. Using Eq. (25), one can conclude that

$$\begin{aligned} \varvec{\bar{\omega }}^{ij}= \begin{bmatrix} \bar{\omega }_{x} \\ \bar{\omega }_{y} \\ \bar{\omega }_{z} \end{bmatrix} =\frac{1}{2} \begin{bmatrix} {\textbf{L}}_{3,2}-{\textbf{L}}_{2,3} \\ {\textbf{L}}_{1,3}-{\textbf{L}}_{3,1} \\ {\textbf{L}}_{2,1}-{\textbf{L}}_{1,2} \end{bmatrix} =\varvec{\bar{G}}^{ij}\overset{\cdot }{\varvec{\bar{e}}} \end{aligned}$$
(29)

Substituting the value of \(\varvec{\bar{\omega }}^{ij}\) into Eq. (24) and then into the virtual work of Eq. (23) yields:

$$\begin{aligned} \delta W= & {} {\varvec{{\bar{M}}}^{ijT}}\varvec{\bar{\omega }}^{ij}\delta t \end{aligned}$$
(30)
$$\begin{aligned}= & {} {\varvec{{\bar{M}}}^{ijT}}\varvec{\bar{G}}^{ij}\overset{\cdot }{\varvec{ \bar{e}}}^{ij}\delta t \end{aligned}$$
(31)
$$\begin{aligned}= & {} {\varvec{{\bar{M}}}^{ijT}} \varvec{\bar{G}}^{ij} \delta \varvec{\bar{e}}^{ij} \end{aligned}$$
(32)
$$\begin{aligned}= & {} {\varvec{{\bar{M}}}^{ijT}} \varvec{\bar{G}}^{ij} {\textbf{T}} _{o}^{iT}\delta {\textbf{e}}^{ij} \end{aligned}$$
(33)

Thus, the generalized forces due to external moments can be described as:

$$\begin{aligned} {{\textbf{Q}}_{e}^{ijT}}= & {} {\varvec{{\bar{M}}}^{ijT}} \varvec{\bar{G}} ^{ij} {\textbf{T}}_{o}^{iT} \end{aligned}$$
(34)
$$\begin{aligned} {{\textbf{Q}}_{p}^{ijT}}= & {} {\varvec{{\bar{M}}}^{ijT}} \varvec{\bar{G}} ^{ij} {\textbf{T}}_{o}^{iT}{\textbf{B}}_{1}^{ij}{\textbf{B}}_{2}^{i} \end{aligned}$$
(35)

The complete vector of the generalized forces, due to external forces and moments, can be written as:

$$\begin{aligned} {{\textbf{Q}}_{p}^{ijT}}=\left( {\varvec{{\bar{F}}}^{ijT}}{\textbf{S}}^{ij}+{ \varvec{{\bar{M}}}^{ijT}} \varvec{\bar{G}}^{ij}\right) {\textbf{T}}_{o}^{iT}{\textbf{B}}_{1}^{ij}{\textbf{B}}_{2}^{i} \end{aligned}$$
(36)
Fig. 5
figure 5

Effect of applying Cartesian forces and moments on continuum robot structure

3.3 Static analysis

The equations of motion of the continuum robot structure, say, body i,  can then be written in a matrix form in terms of the unconstrained generalized coordinates \(\varvec{\ddot{p}}\) as

$$\begin{aligned} {\textbf{M}}^{i}\varvec{\ddot{p}}^{i}\mathbf {=}{{\textbf{Q}}_{k}^{iT}+{\textbf{Q}} _{p}^{iT}={\textbf{Q}}^{iT}} \end{aligned}$$
(37)

Note that the complete set of generalized coordinates of the body \({\textbf{e}}^{i}={\textbf{B}}_{1}^{ij}{\textbf{B}}_{2}^{i}{\textbf{p}}^{i}\). The \({ {\textbf{Q}}_{p}^{i}}\) is the vector of generalized external forces and moments that discussed in the last section, Eq. (36), and \({{\textbf{Q}}_{k}^{i}}\) is the elastic forces, as expressed in Eq. (18). The preceding equation accounts for all geometric nonlinearities since nonlinear strain–displacement relations are used, Eq. (14). Thus, the static analysis can be carried out by solving the following equation:

$$\begin{aligned} {{\textbf{Q}}^{i}}\left( {\textbf{p}}\right) ={\textbf{0}} \end{aligned}$$
(38)

The nonlinear equations can be solved using the Newton-Raphson iteration procedure in which the values of the nodal coordinates at step \( \left( n+1\right) \) can be calculated as

$$\begin{aligned} {\textbf{p}}^{\left( n+1\right) }= & {} {\textbf{p}}^{\left( n\right) }+\Delta {\textbf{p}} \end{aligned}$$
(39)
$$\begin{aligned} \Delta {\textbf{p}}&\mathbf {=-}&\left[ \frac{\partial {{\textbf{Q}}^{i^{\left( n\right) }}}}{\partial {\textbf{p}}^{\left( n\right) }}\right] ^{-1}{{\textbf{Q}} ^{i^{\left( n\right) }}} \end{aligned}$$
(40)

where \(\partial {{\textbf{Q}}^{i^{\left( n\right) }}}/\partial {\textbf{p}}^{\left( n\right) }\) is called as tangent stiffness matrix and vector \({{\textbf{Q}}^{i^{\left( n\right) }}}\) includes the elastic and external forces at iteration step n. In the solution process, the tangent stiffness matrix is calculated numerically using perturbations in the nodal coordinates and finite differences. The convergence criterion for the iteration is defined as follows:

$$\begin{aligned} \left| \Delta {\textbf{p}}\right| <\varepsilon \end{aligned}$$
(41)

where \(\left| .\right| \) is the Euclidean norm of the vector. Thus, given the Cartesian forces and/or moments, the generalized forces can be calculated, and the corresponding nodal coordinates can be obtained. Figure 5 shows various configurations of continuum robots, whereby Cartesian forces are applied along the local \(x- \) and \(z-\) axes, and Cartesian moments are applied about \(z-\) and \(y-\) axes to excite bending modes. Additionally, the torsional mode is illustrated in Fig. 6. These figures depict a robot including 12 elements of silicone rubber. The last-node frame representing the tip point orientation (node 13) of both the undeformed and deformed shapes are shown. The figures demonstrate the robot connectivity, continuity, while also validate the correctness of the elastic and external forces formulation of the beam element. It is crucial to note that the derivation of the velocity transformation matrix \(\varvec{\bar{G}}^{ij}({\textbf{e}})\), which depends on the nodal coordinates, is significant in the context of applying moments to a cross-section undergoing rotation. The subsequent derivation of the elements of this matrix will be elaborated upon in the inverse solution.

Fig. 6
figure 6

Effect of torsional force on continuum robot structure

Fig. 7
figure 7

Beam element of circular cross section

3.4 3D beam element with circular cross section

A well-known structure of 3D beam with circular cross section, i.e. circular rods, is utilized in constructing continuum robots. In this case, the coordinates of the material point in the undeformed configuration with respect to the element frame are described in terms of the axial and radial displacements and an angle measured counter clockwise from the element frame. The coordinates of an arbitrary point can be described as \(\varvec{ \bar{\varrho }}^{ij}\mathbf {:} \begin{bmatrix} x^{ij}&r^{ij}&\theta ^{ij} \end{bmatrix} ^{T}\). The Cartesian coordinates are related to the cylindrical coordinates, see Fig. 7, by

$$\begin{aligned} \left. \begin{array}{l} x=x \\ y=r\cos \left( \theta \right) \\ z=r\sin \left( \theta \right) \end{array} \right\} \end{aligned}$$
(42)

Using Eq. (42), the shape function can be described by the cylindrical coordinates, i.e. \({\textbf{S}}^{ij}\left( \varvec{\bar{u}} ^{ij}\right) \rightarrow {\textbf{S}}^{ij}\left( \varvec{\bar{\varrho }} ^{ij}\right) \). The transformation of the displacement field can be carried out as

$$\begin{aligned} \begin{bmatrix} \bar{u}_{x} \\ \bar{u}_{y} \\ \bar{u}_{z} \end{bmatrix} = \begin{bmatrix} 1 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad \cos \theta &{}\quad -\sin \theta \\ 0 &{}\quad \sin \theta &{}\quad \cos \theta \end{bmatrix} \begin{bmatrix} \bar{u}_{x} \\ \bar{u}_{r} \\ \bar{u}_{\theta } \end{bmatrix} \end{aligned}$$
(43)

The Jacobian matrix, can be described in cylindrical coordinates \( \mathbf {\varrho :}\left( x,r,\theta \right) \) as:

$$\begin{aligned} \varvec{\bar{D}}=\frac{\partial \varvec{\bar{u}}^{ij}}{\varvec{\bar{\varrho }} ^{i}}= \begin{bmatrix} \frac{\partial \bar{u}_{x}}{\partial x} &{} \frac{\partial \bar{u}_{x}}{ \partial r} &{} \frac{\partial \bar{u}_{x}}{\partial \theta } \\ \frac{\partial \bar{u}_{r}}{\partial x} &{} \frac{\partial \bar{u}_{r}}{ \partial r} &{} \frac{\partial \bar{u}_{r}}{\partial \theta } \\ \frac{\partial \bar{u}_{\theta }}{\partial x} &{} \frac{\partial v}{\partial r} &{} \frac{\partial \bar{u}_{\theta }}{\partial \theta } \end{bmatrix} \end{aligned}$$
(44)

Thus, the gradients of the displacement vector can be estimated as [18]:

$$\begin{aligned} \varvec{\bar{J}}_{e}^{ij}= \begin{bmatrix} \varvec{\bar{D}}_{1,1} &{} \varvec{\bar{D}}_{2,1} &{} \frac{1}{r}\varvec{\bar{D}} _{3,1} \\ \varvec{\bar{D}}_{2,1} &{} \varvec{\bar{D}}_{2,2} &{} \frac{1}{r}\left( \varvec{ \bar{D}}_{2,3}-\bar{u}_{\theta }\right) \\ \varvec{\bar{D}}_{3,1} &{} \varvec{\bar{D}}_{3,2} &{} \frac{1}{r}\left( \varvec{ \bar{D}}_{3,2}+\bar{u}_{r}\right) \end{bmatrix} \end{aligned}$$
(45)

Similar procedure can be carried out to estimate \(\varvec{\bar{J}} _{0}^{ij}\), and then the deformation gradients \(\varvec{\bar{J}}^{ij}\), Eq. (9) can be calculated. Based on the deformation gradient, the strain tensor of beam element with circular cross area can be calculated using Eq. (13). The axial component \(\epsilon _{xx}\) remains the same as for rectangular cross section. Moreover, the variables of volume integration are the parameters \(\left( x,r,\theta \right) \) and volume integration boundaries are altered to \(V^{ij}=\) \(\int \nolimits _{0}^{{\small L} }\cdots \int \nolimits _{-\pi }^{+\pi }\cdots \int \nolimits _{0}^{R}\cdots r\textrm{d}r\textrm{d}\theta \textrm{d}x\). Using the mapped forms described above, the dynamic terms can be updated for circular cross-section 3D beams.

4 Shape configuration of continuum robots using B-spline geometry

The continuum robot structure, which is represented using the ANCF, needs not only the position and orientation of the tip point, but also figuring out of the positions and gradients of all nodal points along the elastic line of the beam. Typically, the configuration of a robot may not exhibit consistent curvature, but it may be constrained to a single plane. This plane might potentially be one of \(X-Z\), \(X-Y\) planes, or any plane resulting from rotation around the global \(Z-\)axis.

Within this particular framework, the use of B-spline geometry may be regarded as a very effective mechanism for producing the essential nodal points and their corresponding gradients, which are derived from identified control points located along the plane of motion. However, using the B-spline curve geometry, the nodal positions and the gradients along one axis can be obtained. While the ANCF requires the three gradients with respect to the Cartesian space. For this reason, the article suggests using B-spline surface geometry to accomplish the static shape configuration of continuum robots in the same way as it is described in [19]. This section describes a method of shaping the robot configuration using the B-spline surface geometry.

The B-spline surface with pth degree is defined as

$$\begin{aligned} \varvec{\Omega }\left( u,v\right) =\overset{n}{\underset{i=0}{\sum }} \overset{m}{\underset{j=0}{\sum }}N_{i,p}\left( u\right) M_{j,q}\left( v\right) {\textbf{P}}_{i,j} \end{aligned}$$
(46)

where \({\textbf{P}}_{i,j}\) are bidirectional net of control points, and \(N_{i,p}\left( u\right) \), \(M_{j,q}\left( v\right) \) are the \( p\textrm{th},q\textrm{th}\)-degree B-spline basis functions defined on the non-periodic and nonuniform two knot vectors \({\textbf{U}},{\textbf{V}}\), which can be written as:

$$\begin{aligned} {\textbf{U}}=\{\underset{p+1}{\underbrace{0,\cdots ,0}},u_{p+1},\cdots ,u_{n}, \underset{p+1}{\underbrace{1,\cdots ,1}}\} \end{aligned}$$
(47)
$$\begin{aligned} {\textbf{V}}=\{\underset{q+1}{\underbrace{0,\cdots ,0}},v_{q+1},\cdots ,v_{m}, \underset{q+1}{\underbrace{1,\cdots ,1}}\} \end{aligned}$$
(48)

where \({\textbf{U}}\) and \({\textbf{V}}\) have \(\left( n+p+2\right) \) and \(\left( m+q+2\right) \) knots, respectively, where n and m are the number of control points along the perspective axis minus one. The matrix representation of B-spline surfaces and its derivatives are introduced by [19]. Equation (46) can be written as:

$$\begin{aligned} \varvec{\Omega }= \begin{bmatrix} N_{i-p,p} \\ \vdots \\ N_{i,p} \end{bmatrix} ^{T} \begin{bmatrix} {\textbf{P}}_{i-p,j-q} &{} \cdots &{} {\textbf{P}}_{i-p,j} \\ \vdots &{} \ddots &{} \vdots \\ {\textbf{P}}_{i,j-q} &{} \cdots &{} {\textbf{P}}_{i,j} \end{bmatrix} \begin{bmatrix} N_{j-q,q} \\ \vdots \\ N_{j,q} \end{bmatrix} \end{aligned}$$
(49)

in which, the nonzero basis functions are multiplied with the corresponding control points. Regarding Eq. (49), one can drive similar matrix representation for the B-spline derivatives. Note that \(N_{k+1,p}^{(0)}=N_{k,p}^{(1)},\) \(k=0,1,....,i^{(1)}\), and therefore, one can avoid the calculation of the basis derivatives. Thus, \(\varvec{\Omega }_{u}\left( u,v\right) \) can be stated as:

$$\begin{aligned} \varvec{\Omega }_{u}= \begin{bmatrix} N_{i-p,p-1} \\ \vdots \\ N_{i,p-1} \end{bmatrix} ^{T} \begin{bmatrix} {\textbf{Q}}_{i-p,j-q}^{\left( 1,0\right) } &{} \cdots &{} {\textbf{Q}} _{i-p,j}^{\left( 1,0\right) } \\ \vdots &{} \ddots &{} \vdots \\ {\textbf{Q}}_{i,j-q}^{\left( 1,0\right) } &{} \cdots &{} {\textbf{Q}}_{i,j}^{\left( 1,0\right) } \end{bmatrix} \begin{bmatrix} N_{j-q,q} \\ \vdots \\ N_{j,q} \end{bmatrix} \end{aligned}$$
(50)

where \(N_{k,p-1}\left( u\right) ,i-p\le k\le i\), and \( N_{j-q,q}\left( v\right) \) \(,j-q\le k\le j\) are computed on \({\textbf{U}}\) and \({\textbf{V}}\), respectively.The vector \({\textbf{Q}}_{i,j}^{\left( 1,0\right) }=p\frac{{\textbf{P}}_{i+1,j}-{\textbf{P}}_{i,j}}{u_{i+p+1}-u_{i+1}}\) such that \({\textbf{Q}}^{\left( 1,0\right) }\) are computed on \({\textbf{U}}^{(1)} \). Similarly, \(\varvec{\Omega }_{v}\left( u,v\right) \) can be expressed as:

$$\begin{aligned} \varvec{\Omega }_{v}= \begin{bmatrix} N_{i-p,p} \\ \vdots \\ N_{i,p} \end{bmatrix} ^{T} \begin{bmatrix} {\textbf{Q}}_{i-p,j-q}^{\left( 0,1\right) } &{} \cdots &{} {\textbf{Q}} _{i-p,j}^{\left( 0,1\right) } \\ \vdots &{} \ddots &{} \vdots \\ {\textbf{Q}}_{i,j-q}^{\left( 0,1\right) } &{} \cdots &{} {\textbf{Q}}_{i,j}^{\left( 0,1\right) } \end{bmatrix} \begin{bmatrix} N_{j-q,q-1} \\ \vdots \\ N_{j,q-1} \end{bmatrix} \end{aligned}$$
(51)

in this equation, \({\textbf{Q}}^{\left( 0,1\right) }\) are computed based on \({\textbf{V}}^{(1)}\). The mapping process of the B-spline surface to an ANCF continuum elements is demonstrated by [19], in which, the B-spline surface is converted into \(s\times s\) ANCF continuum plate elements, where s is the number of actual segments in the knot vector, i.e. after neglecting the knot multiplicities. For example, if \({\textbf{U}}= \mathbf {V=}\{ \begin{array}{cccccccc} 0&0&0&1/3&2/3&1&1&1 \end{array} \}\), then \({\textbf{U}}\) and \({\textbf{V}}\) have actually three segments along the reference length of the curve, i.e. a grid model of \(3\times 3\) ANCF plate elements can be constructed. This three segments can be defined as \( s_{1}:u_{1}\in \left[ 0,\frac{1}{3}\right) \), \(s_{2}:u_{2}\in \left[ \frac{1 }{3},\frac{2}{3}\right) \), and \(s_{3}:u_{3}\in \left[ \frac{2}{3},1\right) \). According to the knot vectors \({\textbf{U}}\) and \({\textbf{V}}\), for the first element, the nodal point (i) and the corresponding gradients of the ANCF beam element, see Fig. 8, can be estimated as:

$$\begin{aligned} \left. \begin{array}{l} {\textbf{r}}^{(i)}=\varvec{\Omega }\left( u_{2},v_{2}\right) \\ {\textbf{r}}_{x}^{(i)}=\varvec{\Omega }_{u}\left( u_{2},v_{2}\right) \\ {\textbf{r}}_{y}^{(i)}=\varvec{\Omega }_{v}\left( u_{2},v_{2}\right) \\ {\textbf{r}}_{z}^{(i)}={\textbf{r}}_{x}^{i}\times {\textbf{r}}_{y}^{i} \end{array} \right\} _{u_{2}=v_{2}=0} \end{aligned}$$
(52)

Similarly, the nodal point (j) and the corresponding gradients can be written as

$$\begin{aligned} \left. \begin{array}{l} {\textbf{r}}^{(i)}=\varvec{\Omega }\left( u_{2},v_{2}\right) \\ {\textbf{r}}_{x}^{(i)}=\varvec{\Omega }_{u}\left( u_{2},v_{2}\right) \\ {\textbf{r}}_{y}^{(i)}=\varvec{\Omega }_{v}\left( u_{2},v_{2}\right) \\ {\textbf{r}}_{z}^{(i)}={\textbf{r}}_{x}^{i}\times {\textbf{r}}_{y}^{i} \end{array} \right\} _{u_{2}=v_{2}=0} \end{aligned}$$
(53)

Similarly, the nodal point (j) and the corresponding gradients can be written as

$$\begin{aligned} \left. \begin{array}{l} {\textbf{r}}^{(j)}=\varvec{\Omega }\left( u_{2},v_{2}\right) \\ {\textbf{r}}_{x}^{(j)}=\varvec{\Omega }_{u}\left( u_{2},v_{2}\right) \\ {\textbf{r}}_{y}^{(j)}=\varvec{\Omega }_{v}\left( u_{2},v_{2}\right) \\ {\textbf{r}}_{z}^{(j)}={\textbf{r}}_{x}^{j}\times {\textbf{r}}_{y}^{j} \end{array} \right\} _{u_{2}=1/3,v_{2}=0} \end{aligned}$$
(54)

After that, the \({r}_{z}^{i,j}\) can be estimated by the cross product of the two gradients along \(x-\) and \(y-\) axes.

Fig. 8
figure 8

Control points of the B-spline surface in two parallel planes

Fig. 9
figure 9

Shape configuration of continuum robot, a Selection of B-spline control points, b Generated configuration of robot using 12-ANCF elements with circular cross section, c Projected \(X-Z\) plane shows deformed configuration

As pre-assumed, the motion of the continuum robot may be constrained to a single plane. Therefore, the approach has the potential to be less complex compared to the process of constructing a continuum surface in space. Since the shape function of the ANCF beam element is a third-order polynomial in the axial direction and first order along the two other axes, as a result, the degrees of the B-spline basis functions can be settled as \(p=3, q=1\). In order to attain the required degrees, two distinct knots can be utilized with four control points along \(x-\)axis and three points along \(y-\)axis, considering that the movement occurs inside \(X-Z\) plane. The parallel plane (plane 2) serves as a useful tool for estimating the gradient along the \(y-\)axis, see Fig. 9a. Defining the shape configuration of the continuum robot does not necessarily requires the knots of B-spline surfaces to be similar. The knots utilized in this paper are defined as \({\textbf{U}}=\{ \begin{array}{cccccccc} 0&0&0&0&1&1&1&1\end{array}\}\), and \({\textbf{V}}=\{ \begin{array}{ccccc} 0&0&1/2&1&1\end{array}\}\). After obtaining the B-spline surface and its derivatives, the continuum robot structure can be constructed by estimating the necessary nodal positions and gradients according to the required number of beam elements. Figure 9b, c shows the \(12-\)ANCF elements of the continuum robot with circular cross section. Because of the linearity of the transformation developed in this investigation, all the desirable features of the ANCF finite element are preserved. It is noteworthy to mention that B-spline representations enable the alteration of the degree of continuity at a given point through the implementation of the knot multiplicity concept. Systematically, a higher degree of continuity can be attained through the reduction of knot multiplicity. Thus, a cubic B-spline curve representation with a knot multiplicity of four at a point means that the curve is discontinuous at this point. With respect to the chosen \({\textbf{U}}\), it exhibits discontinuity at both the fixed starting point and the tip locations. Further details regarding the continuity aspect can be explored by referring to the references [16, 19].

5 Calculation of particular generalized forces

Due to the existence of a stable zero velocity fixed point for soft and continuum robots’ applications, inverse statics models are meaningful and applicable (if found) as one approach for estimating the driving forces of the robot.

Recall Eq. (32), the generalized external forces due to applying Cartesian moment vector, \({\varvec{{\bar{M}}} ^{ij}\left( \varvec{\bar{u}}^{ij}\right) =} \begin{bmatrix} \bar{M}_{x}&\bar{M}_{y}&\bar{M}_{z} \end{bmatrix} ^{T}\), on the body i, element j, along the elastic line of beam, \( \varvec{\bar{u}}^{ij}= \begin{bmatrix} x^{ij}&0&0 \end{bmatrix} ^{T}\), can be obtained as

$$\begin{aligned} {\varvec{\bar{Q}}_{e}^{ijT}}={\varvec{{\bar{M}}}^{ijT}} \varvec{\bar{G}}^{ij} \end{aligned}$$
(55)

where \(\varvec{\bar{G}}^{ij}\) is the velocity transformation matrix between the Cartesian and nodal velocities of the body that can be written as

$$\begin{aligned} \varvec{\bar{\omega }}^{ij}=\varvec{\bar{G}}^{ij}\overset{\cdot }{\varvec{\bar{e}}}^{ij} \end{aligned}$$
(56)

The matrix \(\varvec{\bar{G}}_{3\times 24}^{i}\) may be expressed as an augmented matrix consisting of elementary transformations put into \( 3\times 3\) sub-matrices, as

$$\begin{aligned} \varvec{\bar{G}}= \begin{bmatrix} \varvec{\bar{G}}_{{\textbf{r}}}^{(i)}&\varvec{\bar{G}}_{{\textbf{r}}_{x}}^{(i)}&\varvec{\bar{G}}_{{\textbf{r}}_{y}}^{(i)}&\varvec{\bar{G}}_{{\textbf{r}} _{z}}^{(i)}&\varvec{\bar{G}}_{{\textbf{r}}}^{(j)}&\varvec{\bar{G}}_{ {\textbf{r}}_{x}}^{(j)}&\varvec{\bar{G}}_{{\textbf{r}}_{y}}^{(j)}&\varvec{\bar{G}}_{{\textbf{r}}_{z}}^{(j)} \end{bmatrix} \end{aligned}$$
(57)

As previously stated in the preceding, the motion is restricted in single plane, say \(X-Z\) plane. As a result, the applying moment will be applied about the local \(y-\)axis. Furthermore, the moment may be applied at the beam element’s nodal positions, either node (i) or node (j). Clearly, the moment of applied on node (i) of element (k) is the same as the moment of applied on node (j) of element \((k-1)\). By selecting the simplest option, the moment regarded to be applied on node (i), and thus \(\varvec{ \bar{u}}^{ij}={\textbf{0}}\). In this case, the moment vector and the corresponding \(\varvec{\bar{G}}^{ij}{\left( \varvec{\bar{u}}^{ij}={\textbf{0}} \right) },\) can be expressed as

$$\begin{aligned} {\varvec{{\bar{M}}}^{ij}=} \begin{bmatrix} 0&\bar{M}_{y}^{(i)}&0 \end{bmatrix} ^{T} \end{aligned}$$
(58)

and

$$\begin{aligned} \varvec{\bar{G}}^{(i)}= \begin{bmatrix} {\textbf{0}}&\varvec{\bar{G}}_{{\textbf{r}}_{x}}^{(i)}&\varvec{\bar{G}}_{ {\textbf{r}}_{y}}^{(i)}&\varvec{\bar{G}}_{{\textbf{r}}_{z}}^{(i)}&{\textbf{0}}&{\textbf{0}}&{\textbf{0}}&{\textbf{0}} \end{bmatrix} \end{aligned}$$
(59)

Getting the angular velocity vector, \(\varvec{\bar{\omega }}^{ij}\), by employing Eq. (29), the matrices of elementary transformations are found as follows:

$$\begin{aligned} \varvec{\bar{G}}_{{\textbf{r}}_{x}}^{(i)}= \frac{1}{2\Delta } \begin{bmatrix} 0 &{}\quad e_{8}e_{10}-e_{7}e_{11} &{}\quad e_{9}e_{10}-e_{7}e_{12} \\ e_{7}e_{11}-e_{8}e_{10} &{}\quad 0 &{}\quad e_{9}e_{11}-e_{8}e_{12} \\ e_{7}e_{12}-e_{9}e_{10} &{}\quad e_{8}e_{12}-e_{9}e_{11} &{}\quad 0 \end{bmatrix} \end{aligned}$$
(60)
$$\begin{aligned} \varvec{\bar{G}}_{{\textbf{r}}_{y}}^{(i)}= \frac{1}{2\Delta } \begin{bmatrix} 0 &{}\quad e_{4}e_{11}-e_{5}e_{10} &{}\quad e_{4}e_{12}-e_{6}e_{10} \\ e_{5}e_{10}-e_{4}e_{11} &{}\quad 0 &{}\quad e_{5}e_{12}-e_{6}e_{11} \\ e_{6}e_{10}-e_{4}e_{12} &{}\quad e_{6}e_{11}-e_{5}e_{12} &{}\quad 0 \end{bmatrix} \end{aligned}$$
(61)
$$\begin{aligned} \varvec{\bar{G}}_{{\textbf{r}}_{z}}^{(i)}=\frac{1}{2\Delta } \begin{bmatrix} 0 &{}\quad e_{5}e_{7}-e_{4}e_{8} &{}\quad e_{6}e_{7}-e_{4}e_{9} \\ e_{4}e_{8}-e_{5}e_{7} &{}\quad 0 &{}\quad e_{6}e_{8}-e_{5}e_{9} \\ e_{4}e_{9}-e_{6}e_{7} &{}\quad e_{5}e_{9}-e_{6}e_{8} &{}\quad 0 \end{bmatrix} \end{aligned}$$
(62)

where \(\Delta =\det (\varvec{\bar{J}}_{e}^{ij})\) of Eq. (28) and can be written as

$$\begin{aligned} \Delta =\frac{1}{ e_{4}e_{8}e_{12}-e_{4}e_{9}e_{11}-e_{5}e_{7}e_{12}+e_{5}e_{9}e_{10}+e_{6}e_{7}e_{11}-e_{6}e_{8}e_{10}} \end{aligned}$$
(63)

Consequently, by employing Eq. (55), the generalized force vector takes the form of

$$\begin{aligned} {\varvec{\bar{Q}}_{e}^{ij}}= \begin{bmatrix} {\varvec{\bar{Q}}_{e}^{\left( i\right) ^{T}}}&\quad {\varvec{\bar{Q}} _{e}^{\left( j\right) ^{T}}} \end{bmatrix} ^{T}= \begin{bmatrix} {\varvec{\bar{Q}}_{e}^{\left( i\right) ^{T}}}&\quad {{\textbf{0}}} \end{bmatrix} ^{T} \end{aligned}$$

It is found that \({\varvec{\bar{Q}}_{e}^{\left( i\right) }}\) takes the form of

$$\begin{aligned} {\varvec{\bar{Q}}_{e}^{\left( i\right) }=}\frac{1}{2\Delta }\left[ \begin{array}{c} 0 \\ 0 \\ 0 \\ e_{7}e_{11}-e_{8}e_{10} \\ 0 \\ e_{9}e_{11}-e_{8}e_{12} \\ e_{5}e_{10}-e_{4}e_{11} \\ 0 \\ e_{5}e_{12}-e_{6}e_{11} \\ e_{4}e_{8}-e_{5}e_{7} \\ 0 \\ e_{6}e_{8}-e_{5}e_{9} \end{array} \right] \bar{M}_{y}^{(i)} \end{aligned}$$
(64)

The explicit representation of the generalized forces of Eq. (64) ensures that Eq. (38) is not invertable. Furthermore, the generalized forces resulting from external moments acting on particular nodes are linear to the actuation moment. Moreover, there are several equations available, rather than just one solution being required.

6 Numerical examples

This section presents numerical examples to illustrate the efficacy of using the ANCF beam element, developed throughout this study, for the purpose of modelling and simulating continuum and soft robotics. The first example investigates a static pure bending scenario in order to assess the perfect circle bench problem. The second example demonstrates the validation of stress and strain values by a comparison with an ANSYS model, particularly relevant to conditions involving intermediate and large deformations. The third example investigates the inverse static procedure of the robot, to follow a predetermined shape, in order to reach a certain target point.

In each of these examples and applications, Polyurethene-soft material will be utilized, and the mass density is 1200 [kg/m\(^{3}\)], the modulus of elasticity of \(E=40000\) [kPa] and Poisson’s ratio of \(\upsilon =0.4\). The robot will consist of 16 elements of 3D beam with circular cross section. The outer diameter of the entire element is \(D_{o}\), and half of this diameter is utilized for the connecting elements, in the case of stepped structure.

6.1 Validation of forward static model

The exact solution of the moment required for making a perfect circle is presented by [35] and given as follows:

$$\begin{aligned} \bar{M}^\textrm{tip}=\frac{2\pi \textrm{EI}}{L} \end{aligned}$$
(65)

where \(\bar{M}^\textrm{tip}\) is an external moment applied at the tip point, EI is the bending stiffness, and L the total length of the robot. Because of Eq. (65) is given as a solution to the pure bending problem, called Rolling-up problem, this example can be used as a bench problem for bending. In order to avoid the occurrence of locking, a ratio of the beam length to diameter (L/D) is selected to be 20; thus, the outer diameter of the entire element is selected as \(D_{o}=20\) [mm] and the robot length of \(L=0.4\)[m]. Figure 10 shows the deformed shapes of the robot obtained for different moments applied as \(\bar{M}_{y}^\textrm{tip}=\lambda \pi \textrm{EI}/L,\) \(\lambda =\left\{ 0,1/2,1,2\right\} \).These results are obtained using the analytical integration of the strain energy, Eq. (17), and external moments are evaluated using Eq. (35). As can be observed from Fig. 10, the robot correctly makes a circle when the proposed formulation is used. It is found that the use of \(2^{4}\) elements leads to convergent Newton–Raphson iterations of Eq. (38). The results obtained in this example confirm the correctness of calculating the strain energy and the external moments equation as well. However, it is worth noting that in the field of continuum and soft robots, structures driven by cables typically consist of stepped elements rather than the uniform configuration used in this particular example. Uniform structures are most suitable for sub-pneumatically actuated robots.

Fig. 10
figure 10

Effect of applying moment at the tip

6.2 Comparison with ANSYS

In this example, a robot of 16 stepped elements will be examined by comparing the results with those of ANSYS model. The diameter of the even elements is equal to half the odd numbered elements. A bending moment is applied along the local \(y-\)axis at the tip point, \(\bar{M} _{y}^\textrm{tip}=\lambda \pi \textrm{EI}_\textrm{ave}/L\), with \(\lambda =\left\{ 1/2,1\right\} \), and \(I_\textrm{ave}\) is calculated as the average moment of area for odd and even numbered elements.

The large deformation static analysis is employed with ANSYS, with automatic domain meshing of 24776 total solid elements (SOLID187). The nonlinear geometric effects and stabilization control are activated, and the distributed sparse matrix solver is utilized.

By applying a moment \(\bar{M}_{y}^\textrm{tip}\) at the tip point, with \(\lambda =1/2 \), the strain analysis of the ANSYS and ANCF models, as seen in Fig. 11a, b, demonstrates that the outer boundaries experience tension, while the interior boundaries undergo compression, and the elastic line of the robot exhibits zero strain along these interior boundaries. The strain values derived from the ANSYS model range from \(-0.08877\) to \(+0.08596\), while the ANCF model exhibits strain values ranging from \(-0.0908\) to \(+0.0901\) [m/m].

Fig. 11
figure 11

Comparison with ANSYS: a ANSYS output shape/strain for intermediate deformation, b ANCF model shape/strain of the robot, c Un-converged ANSYS output shape/deformation for large deformation case, d Converged ANCF shape/strain for large deformation case

Nevertheless, when applying a moment with \(\lambda =1\), the ANSYS solution is un-converged, and there is a significant occurrence of excessive distortion in the elements. This indicates the need for taking corrective measures concerning the behaviour of materials, type of elements, and constraint equations. On the contrary, the ANCF model accurately depicts the correct shape of robot configuration, see Fig. 11c, d. This example provides insight into the suitability of using the ANCF in the context of large deformation applications pertaining to soft and continuum robots. The scenario of half circle configuration being examined with ANCF model, see Fig. 11d, sufficiently illustrates the potential uses of enabling robots to perform whole-body manipulation, regarding soft and continuum robots, as presented in [5].

6.3 Inverse static model

In the present example, the suggested approach of using the B-spline geometry will be performed by generating a set of four points spatial coordinates. The first coordinate represents the focal point of the robot, while the last coordinate denotes the intended destination to be attained. Based on these points, Equations (49, 50, 51, 53, 54) are used to estimate the generalized coordinates (positions and gradients) of a specific number of ANCF elements of the robot. Thus, the nodal coordinates of the ANCF elements are given for a particular configuration generated via B-spline geometry. Depending on the chosen actuation approach, it is possible to apply a set of external moments on node (i) of selected elements, such as the even elements of a stepped robot configuration.

As previously mentioned, the static analysis can be carried out by solving the following equation:

$$\begin{aligned} {{\textbf{Q}}^{i}}\left( \varvec{\bar{M}}_{y}\right) ={\textbf{0}} \end{aligned}$$
(66)

These equations can be solved using the Newton–Raphson iteration procedure, in which the values of the nodal coordinates at step \(\left( n+1\right) \) can be calculated as

$$\begin{aligned} \varvec{\bar{M}}_{y}^{\left( n+1\right) }=\varvec{\bar{M}}_{y}^{\left( n\right) }\mathbf {-}\left[ \frac{\partial {\varvec{\bar{Q}}^{i^{\left( n\right) }}}}{\partial \varvec{\bar{M}}_{y}^{\left( n\right) }}\right] ^{-1}{ \varvec{\bar{Q}}^{i^{\left( n\right) }}} \end{aligned}$$
(67)

From the analytical perspective, Eq. (67) can be solved by means of one-step iteration. Nevertheless, the solution is subjected to two sources of error. The first source of error arises from the numerical estimation of the Jacobian matrix \(\partial {{\textbf{Q}}^{i^{\left( n\right) }}}/\partial \varvec{\bar{M}}_{y}^{\left( n\right) }\) which is obtained numerically by applying perturbations to the applied moments. The second source involves calculating the Pseudo-inverse of the matrix \(\partial { {\textbf{Q}}^{i^{\left( n\right) }}}/\partial \varvec{\bar{M}}_{y}^{\left( n\right) }\). Therefore, a convergence criteria of \(\left| \Delta \varvec{\bar{M}}_{y}^{\left( n\right) }\right| <\varepsilon \) is established for the iteration with the objective of minimizing the aforementioned error.

Fig. 12
figure 12

A ten-shape sequence for a 16-element robot: a Control points, b B-spline position and gradient outputs of nodal points. (c) The robot’s ISM output shapes

Fig. 13
figure 13

Applied moment about of even elements

Fig. 14
figure 14

Error in the position of the tip point

What is required now, is to orient the robot in the aforementioned example, presented in Fig. 11b, for ten successive points in space, and for simplicity, we will define them in \(X-Z\) plane. The following are the identified tip points, see Fig. 12a:

$$\begin{aligned} {\textbf{P}}_{\#1}^\textrm{tip}...{\textbf{P}}_{\#10}^\textrm{tip}= \begin{bmatrix} 0.0303 \\ 0 \\ 0.3986 \end{bmatrix}, \begin{bmatrix} 0.0599 \\ 0 \\ 0.3945 \end{bmatrix},..., \begin{bmatrix} 0.2582 \\ 0 \\ 0.2753 \end{bmatrix} \end{aligned}$$
(68)

In addition to the robot’s origin point, two points were calculated, in the same plane of curvature of the robot, for each shape separately, as depicted in Fig. 12a. Figure 12b depicts the positions and gradients obtained using the proposed B-spline method for 17 points along the elastic line of the robot.

Equations (66) are solved for eight external moments about the even nodes of the robot, i.e. \(\varvec{\bar{M}}_{y}^{\textrm{node}(2)},..., \varvec{\bar{M}}_{y}^{\textrm{node}(16)}\). The concept for selecting these locations is based on the potential of producing moments by using cables at the extremities of the wide elements, with the slender elements working as flexible interconnections. Figure 13 illustrates the moments generated by the inverse statics model (ISM) that are used to calculate the generalized external forces of Eq. (64). These forces are then utilized in the forward static model described in Eq. (38) to evaluate the accuracy of the ISM outcomes. The output figures of the robot are shown in Fig. 12c, and the produced position of the tip points are plotted in Fig. 14 with the reference points listed in Eq. (68). It can be concluded that the error percentage between the reference points and the points obtained by the applying the ISM moments is quite satisfactory. Theoretical enhancements may be made by including moments throughout the full range or by adding Cartesian forces in addition. Nevertheless, the practical implementation of the suggested approach for calculating the forces affecting the robot to guide it in space is deemed satisfactory.

7 Conclusions and future works

The paper provides a comprehensive examination of the appropriateness of using the absolute nodal coordinate formulation (ANCF) in the context of large deformation applications pertaining to soft and continuum robots. The elastic forces of the beam element based on the ANCF relax the assumption of a rigid cross-section of the robot structure. This permits the accurate representation of deformations in the cross-section and enables the representation of their distortions. In this paper, the elastic forces of beam elements with circular cross sections are illustrated. In addition, the generalized forces due to external moments are derived based on velocity gradient tensor. The paper validates the concept of achieving perfect circle configuration of the robot through a numerical example of forward statics model (FSM) of continuum robot. Moreover, the ANCF can be implemented using non-incremental solution procedures in a general framework of multibody computer algorithms, which enables modelling soft gripper/robot that are fixed in moving boundaries. Nevertheless, the degrees of freedom are quite large, and the inverse models necessary for estimating the requisite driving forces are complicated. In this context, the paper proposed a method to estimate the coordinates of four points, in advance, and construct a B-spline surface which can be used to estimate the generalized nodal coordinates of continuum robot with a specific number of ANCF beam elements. The inverse static model (ISM) of the B-spline generated structure is presented in this study, based on iterative solution, and examined by use of numerical example of orienting the robot with different shapes to attain certain tip points. It can be concluded that the error percentage between the reference and the FSM points, obtained by applying the ISM driving moments, is quite satisfactory. The future work includes the experimental validation of the ANCF-based models. Additionally, there will be a focus on developing a B-spline spatial curve to eliminate the assumption of moving in certain plane.