1 Introduction

When a multibody system is subjected to impact forces which may originate from external impulses or impulsive constraints, the velocity of every component of that system changes abruptly. The dynamic modeling of an open kinematic chain system confined inside a closed environment has many engineering applications. For example, for the dynamic modeling of a chain of molecular connections confined in a closed environment or for the mathematical modeling of humanoid robotic systems that walk on the ground or may collide with side barriers, it is necessary to know what happens during the pre-impact, impact and post-impact time intervals.

The study of impact phenomena in multibody systems goes back to about 40 years ago when Wittenburg [1] applied the Newton–Euler formulation and graph theory to derive the motion equations for impact conditions. Chang and Peng [2] used the piecewise model and Kane’s method to study the single-point frictionless collision between two multibody systems. In their works, four different types of impulsive constraints were also considered. Multiple frictional contacts in multibody systems have been investigated by Hurmuzlu and Marghitu [3]. They have examined the conditions in which two bodies contact each other while the causing impact occurs elsewhere in the system. Rodriguez and Bowling [4] presented a method for determining the behavior of a rigid body undergoing multiple, simultaneous impacts, and also subjected to the effect of friction. Zhang et al. [5] focused on the experimental validation of the multiple impact law by applying the Coulomb friction on a planar block/anvil system. They concluded that the free-rocking experiments can be used to develop the parameters of the impact law for simulating the dynamics of more complex systems with base excitations. Gloker [6] studied the conditions under which Newtonian impacts lead to an energetically consistent post-impact state. In this study, the mechanisms responsible for a potential violation were also identified. Nonetheless, the main goal of all the above-mentioned works has been to improve the modeling of contact between colliding objects; and rigid multibody systems have not been simulated.

In some robotic systems, in order to achieve better results, it is necessary to model the system with the actual number of interconnected rigid bodies. As more links are used in modeling a system, the procedures required to derive the relevant motion equations become more laborious and complicated. Also, the development of an impact model that involves the multiple points of a multi-rigid link system makes the derivation of motion equations more difficult. So, it is essential to apply a recursive formulation to automatically obtain the governing equations. There are numerous recursive algorithms that can be applied to open kinematic chain systems [713]. However, the emphasis of this manuscript is on the less-frequently-used recursive Gibbs–Appell formulation. Recently, Korayem and Shafei successfully employed this method for the systematic modeling of elastic robotic manipulators [1416], mobile robotic manipulators [1719], and manipulators with revolute-prismatic joints [20, 21]. But, none of these works have considered the effects of impact between a manipulator and the surrounding walls.

The motion equations of multibody systems including unilateral constraints have already been well formulated. In fact, the finite motions of multibody systems undergoing impact can be described by differential equations; and algebraic equations should be used to express the motions of such systems at the moment of impact. However, the combined use of these differential–algebraic equations is still limited by high computational complexity, especially when a large number of rigid links have to be simulated. Therefore, researchers have tried to improve the recursive algorithms for simulating complex multibody systems that involve the impact phenomena. Förg et al. [22] proposed a time-stepping method for dealing with multibody systems with many unilateral constraints. They employed an iterative algorithm based on the Gauss–Seidel relaxation scheme to handle multiple contacts. A recursive \(O ( n )\) algorithm based on the Projection Equation was proposed by Gattringer et al. [23]. In their research, the impact occurring in the transformation phase between the free and the constrained systems was also considered. The motion equations of a 13-link biped robotic system were derived by Tlalolini et al. [24]. They employed a recursive Newton–Euler algorithm to develop a parametric optimization algorithm for determining the optimal cyclic gaits of the robot. Also, in the work of Lot and Dalio [25], the mathematical model of a multibody system was entirely derived in a symbolic form by using the MBSsymba software program. In their developed software, it is possible to define the constraints for the holonomic and non-holonomic systems by using the algebraic and differential equations, respectively. However, in none of these works, the impact model (which should be used to determine a robot’s velocity after impact) has been recursively formulated.

As was previously mentioned, this paper focuses on the symbolic modeling of the finite and impulsive motions of a multi-rigid link system in 3D space. So, some aspects such as friction and elastic deformation at contact points are disregarded. The rest of the paper has been organized as follows: In Sect. 2, the kinematics of the system are described. The dynamics of the system, including the system’s behavior in finite motion (flight phase) and impulsive motion (impact phase) are modeled in Sect. 3. Two numerical simulations are performed in Sect. 4 to demonstrate the effectiveness of the proposed method. And finally in Sect. 5, the concluding remarks are summarized, and the merits of the proposed method are highlighted.

2 Kinematics of the system

This section introduces the kinematic model of a robotic manipulator in 3D space, which consists of rigid links, connected via rigid, frictionless, revolute joints to form a single open kinematic chain.

Link \(i - 1\) and Link \(i\) of this open kinematic chain are shown in Fig. 1. As is shown in this figure, the coordinate system of every link is attached based on the following rule: \(x_{i,1}x_{i,2}x_{i,3}\) is the coordinate system of Link \(i\), whose origin is positioned at the beginning of this link; the \(x_{i,1}\) axis is along the length of Link \(i\), from \(O_{i}\) to \(O_{i + 1}\), the \(x_{i,3}\) axis is along the joint axis, about which Link \(i\) rotates relative to Link \(i - 1\), and \(x_{i,2}\) completes the right-handed coordinate system. Also, \({}^{\mathrm{ref}}X_{1}{}^{\mathrm{ref}}X_{2}{}^{\mathrm{ref}}X_{3}\) is an inertial reference frame attached to the ground. Here, it is assumed that the base of the manipulator is not fixed to the ground and that it can be easily moved in space. So, the translational motions of the first body’s local coordinate system (i.e., \(O_{1}\), in the \({}^{\mathrm{ref}}X_{1}\), \({}^{\mathrm{ref}}X_{2}\) and \({}^{\mathrm{ref}}X_{3}\) directions) are denoted by \(X_{1}\), \(X_{2}\) and \(X_{3}\), respectively. Moreover, the absolute velocities of this point with respect to the inertial reference frame are expressed by \(\dot{X}_{j}\) where \(j = 1, 2, 3\). Except for the first link, all the other links in this open kinematic chain have only one rotational degree of freedom. The first link, as a rigid body that can move freely in space, has three rotational degrees of freedom; so, it can be modeled as three joints (\(O_{ - 1},O_{0}\) and \(O_{1}\)) of one DOF connected with two imaginary links of zero length (link (−1) and link \((0)\)). These two links are shown in gray in Fig. 1. Therefore, without loss of generality, only the manipulators with one DOF joints will be considered.

Fig. 1
figure 1

A multi-rigid-link chin floating in space

Let us consider an arbitrary differential element, \(Q\), on Link \(i\). The position of this differential element with respect to the \(x_{i,1}x_{i,2}x_{i,3}\) coordinate system is expressed by \({}^{i}\vec{r}_{Q/O_{i}} = \eta^{i}\vec{x}_{i,1}\) where \({}^{i}\vec{x}_{i,1} = \{ 1\ 0\ 0\}^{T}\) and \(\eta\) is the distance between points \(O_{i}\) and \(Q\). Since the approach developed in this manuscript is based on the Gibbs–Appell formulation, the absolute acceleration of this differential element is required, which can be represented as

$$ {}^{i}\ddot{\vec{r}}_{Q} = {}^{i}\ddot{ \vec{r}}_{O_{i}} + {}^{i}\dot{\vec{\omega}}_{i} \times {}^{i}\vec{r}_{Q/O_{i}} + {}^{i}\vec{ \omega}_{i} \times \bigl( {}^{i}\vec{\omega}_{i} \times {}^{i}\vec{r}_{Q/O_{i}} \bigr) $$
(1)

where \({}^{i}\ddot{\vec{r}}_{O_{i}}\) is the absolute acceleration of the \(i\)th joint and \({}^{i}\vec{\omega}_{i}\) and \({}^{i}\dot{\vec{\omega}}_{i}\) are the angular velocity and acceleration of the \(i\)th link, respectively. In the next section, Eq. (1) will be used to construct the acceleration energy of the whole system.

3 Dynamics of the system

This section develops a mathematical model for studying the mentioned robotic system. The dynamics of the system are composed of two different phases: (i) flight phase and (ii) impact phase. The different flight and impact phases lead to mathematical models that include distinct parts: differential equations for describing the system dynamics during the flight phase, and an algebraic equation for expressing the dynamics when this open kinematic chain touches the surrounding surfaces. In the following, the derivation of the motion equations for these two different phases will be detailed.

3.1 Flight phase

In the flight phase, there is no contact with the surrounding surfaces, and the robot has \(n + 5\) degrees of freedom (where \(n\) is the number of all real links). \(n + 2\) degrees of freedom of this system are associated with the orientation of the links \(( \theta_{j} )\), while the other three degrees concern the position of the first joint with respect to the inertial reference frame \(( X_{j} )\).

In the flight phase, the dynamic model is obtained by means of the Gibbs–Appell method. In this approach, the acceleration and potential energies of each link are computed first, and then these partial terms are summed to get the total acceleration energy, \(S\), and total potential energy \(V\). The effect of gravity can be directly incorporated into the motion equations by assuming that the origin of the inertial reference frame, i.e., \(O_{\mathrm{ref}}\), has an acceleration of \(1g\) in the \({}^{\mathrm{ref}}X_{2}\) direction. So, without any extra calculations, the effect of gravity is taken into consideration. On the other hand, the acceleration energy (Gibbs function) of \(n\) real links with length \(l_{i}\) can be expressed as

$$ S = \sum_{i = 1}^{n} \int_{0}^{l_{i}} \biggl[ \frac{1}{2} \mu_{i} ( \eta_{i} ) \bigl( {}^{i}\ddot{ \vec{r}}_{Q}^{T} \cdot {}^{i}\ddot{ \vec{r}}_{Q} \bigr) + \frac{1}{2}{}^{i}\dot{\vec{ \omega}}_{i}^{T} \cdot J_{i} ( \eta_{i} ){}^{i}\dot{\vec{\omega}}_{i} + {}^{i}\dot{\vec{ \omega}}_{i}^{T} \cdot {}^{i}\tilde{ \omega}_{i}J_{i} ( \eta_{i} ){}^{i}\vec{ \omega}_{i} \biggr]\,d\eta_{i} $$
(2)

where \(\mu_{i} ( \eta )\) and \(J_{i} ( \eta )\) are the mass per unit length and mass moment of inertia per unit length of the \(i\)th link, respectively. Note that, if the links of the manipulator are assumed thin enough, the second and the third terms in Eq. (2) can be ignored. By inserting Eq. (1) into Eq. (2), we get

$$\begin{aligned} S &= \sum_{i = 1}^{n} \frac{1}{2} B_{0i}{}^{i}\ddot{\vec{r}}_{O_{i}}^{T} \cdot {}^{i}\ddot{\vec{r}}_{O_{i}} - {}^{i}\ddot{\vec{r}}_{O_{i}}^{T} \cdot B_{1i}{}^{i}\dot{\vec{\omega}}_{i} - {}^{i}\ddot{\vec{r}}_{O_{i}}^{T} \cdot {}^{i}\tilde{\omega}_{i}B_{1i}{}^{i}\vec{\omega}_{i} + \frac{1}{2}{}^{i}\dot{\vec{\omega}}_{i}^{T} \cdot ( B_{2i} + B_{3i} ){}^{i}\dot{\vec{\omega}}_{i} \\ &\quad {}+ {}^{i}\dot{\vec{\omega}}_{i}^{T} \cdot {}^{i}\tilde{\omega}_{i} ( B_{2i} + B_{3i} ){}^{i}\vec{\omega}_{i} + \text{ineffective terms} \end{aligned}$$
(3)

where

$$\begin{aligned} &B_{0i} = \int_{0}^{l_{i}} \mu_{i}\,d\eta_{i}, \end{aligned}$$
(4)
$$\begin{aligned} & B_{1i} = \int_{0}^{l_{i}} \mu_{i}{}^{i} \tilde{r}_{Q/O_{i}}\,d\eta_{i}, \end{aligned}$$
(5)
$$\begin{aligned} & B_{2i} = \int_{0}^{l_{i}} \mu_{i}{}^{i} \tilde{r}_{Q/O_{i}}^{T}{}^{i}\tilde{r}_{Q/O_{i}}\,d \eta_{i}, \end{aligned}$$
(6)
$$\begin{aligned} & B_{3i} = \int_{0}^{l_{i}} J_{i}\,d\eta_{i}. \end{aligned}$$
(7)

Also \({}^{i}\tilde{\omega}_{i}\) and \({}^{i}\tilde{r}_{Q/O_{i}}\) are skew symmetric matrices related to vectors \({}^{i}\vec{\omega}_{i}\) and \({}^{i}\vec{r}_{Q/O_{i}}\). In the Gibbs–Appell formulation, the motion equations will be obtained by differentiating the Gibbs function with respect to an independent set of quasi-accelerations (it should be noted that, in holonomic systems, quasi-accelerations are exactly the same as generalized accelerations). So, all the terms in Gibbs function that are not functions of generalized accelerations can be discarded as “ineffective terms”. In this manuscript, the generalized accelerations due to the rotational motion of links (i.e., \(\ddot{\theta}_{j}\)), and the generalized accelerations due to the translational motion of \(O_{1}\) (i.e., \(\ddot{X}_{j}\)) are selected as quasi-accelerations. So,

  • Partial derivative of Gibbs function with respect to \(\ddot{\theta}_{j}\) is

    $$\begin{aligned} \frac{\partial S}{\partial \ddot{\theta}_{j}} &= \sum_{i = j + 1}^{n} \frac{\partial {}^{i}\ddot{\vec{r}}_{O_{i}}^{T}}{\partial \ddot{\theta}_{j}} \cdot \bigl( B_{0i}{}^{i}\ddot{\vec{r}}_{O_{i}} - B_{1i}{}^{i}\dot{\vec{\omega}}_{i} - {}^{i}\tilde{\omega}_{i}B_{1i}{}^{i}\vec{\omega}_{i} \bigr) \\ &\quad {} + \sum_{i = j}^{n} \frac{\partial {}^{i}\dot{\vec{\omega}}_{i}^{T}}{\partial \ddot{\theta}_{j}} \cdot \bigl( B_{1i}{}^{i}\ddot{\vec{r}}_{O_{i}} + ( B_{2i} + B_{3i} ){}^{i}\dot{\vec{\omega}}_{i} + {}^{i}\tilde{\omega}_{i} ( B_{2i} + B_{3i} ){}^{i}\vec{\omega}_{i} \bigr) ,\quad j = - 1,\ldots, n; \end{aligned}$$
    (8)
  • Partial derivative of Gibbs function with respect to \(\ddot{X}_{j}\) is

    $$ \frac{\partial S}{\partial \ddot{X}_{j}} = \sum_{i = - 1}^{n} \frac{\partial {}^{i}\ddot{\vec{r}}_{O_{i}}^{T}}{\partial \ddot{X}_{j}} \cdot \bigl( B_{0i}{}^{i}\ddot{\vec{r}}_{O_{i}} - B_{1i}{}^{i}\dot{\vec{\omega}}_{i} - {}^{i}\tilde{\omega}_{i}B_{1i}{}^{i}\vec{\omega}_{i} \bigr), \quad j = 1,\ldots, 3. $$
    (9)

The motion equations of this open kinematic chain of rigid links is finalized by considering the generalized forces which originate from the external loads or the torques which are exerted on the links or joints. But the assumption here is that there are no external loads on the links and no external torques on the joints. With this assumption, the governing equations of \(n\) rigid links connected by revolute joints, in the flight phase, can be expressed as

  • The \(j\)th rotational motion equation in the flight phase is

    $$ \frac{\partial S}{\partial \ddot{\theta}_{j}} = 0,\quad j = - 1,\ldots, n; $$
    (10)
  • The \(j\)th translational motion equation in the flight phase is

    $$ \frac{\partial S}{\partial \ddot{X}_{j}} = 0,\quad j = 1,\ldots, 3. $$
    (11)

The state variables of the above equations are highly nonlinear and coupled. So, before deriving the motion equations of this multi-rigid-link system for the impact phase, the inverse dynamic equations should be converted to forward dynamic equations.

3.2 Forward dynamics

The main goal of this section is to present the governing equations of the mentioned multi-rigid links (Eq. (10) and Eq. (11)) in a forward dynamic form as follows:

$$ I_{f} ( \varTheta ) \ddot{\vec{\varTheta}} = \mathop{R}\limits ^{ \to} ( \varTheta, \dot{\varTheta} ). $$
(12)

In the above relation, \(I_{f} ( \varTheta )\) is the inertia matrix of this open kinematic chain in the flight phase, which is symmetric and positive-definite. Also \(\ddot{\vec{\varTheta}}\) (the quasi-acceleration vector) and \(\mathop{R}\limits^{ \to} ( \varTheta,\dot{\varTheta} )\) (the remaining dynamics terms containing Coriolis and centrifugal forces) can be represented as

$$\begin{aligned} &\ddot{\vec{\varTheta}} = \bigl\{ \ddot{\theta}_{ - 1} \ \ddot{\theta}_{0} \ \ddot{\theta}_{1}\ \ldots\ \ddot{\theta}_{n - 1} \ \ddot{\theta}_{n} \ \ddot{X}_{1} \ \ddot{X}_{2} \ \ddot{X}_{3} \bigr\} ^{T}, \end{aligned}$$
(13)
$$\begin{aligned} &\vec{R}( \varTheta,\dot{\varTheta} ) = \bigl\{ R_{\theta_{ - 1}} \ R_{\theta_{0}} \ R_{\theta_{1}} \ \ldots\ R_{\theta_{n - 1}} \ R_{\theta_{n}} \ R_{X_{1}} \ R_{X_{2}} \ R_{X_{3}} \bigr\} ^{T}. \end{aligned}$$
(14)

To achieve the objective of this section, the partial derivatives of \({}^{i}\ddot{\vec{r}}_{O_{i}}\) and \({}^{i}\dot{\vec{\omega}}_{i}\) with respect to quasi-accelerations, which appeared in Eq. (8) and Eq. (9), should be evaluated. The sum of these two terms can be written as

$$\begin{aligned} &{}^{i}\ddot{\vec{r}}_{O_{i}} = {}^{i}\ddot{ \vec{r}}_{O_{s,i}} + {}^{i}\ddot{\vec{r}}_{O_{v,i}}, \end{aligned}$$
(15)
$$\begin{aligned} &{}^{i}\dot{\vec{\omega}}_{i} = {}^{i}\dot{\vec{ \omega}}_{s,i} + {}^{i}\dot{\vec{\omega}}_{v,i} \end{aligned}$$
(16)

where \({}^{i}\ddot{\vec{r}}_{O_{s,i}}\) and \({}^{i}\dot{\vec{\omega}}_{s,i}\) represent those terms of \({}^{i}\ddot{\vec{r}}_{O_{i}}\) and \({}^{i}\dot{\vec{\omega}}_{i}\) that include the generalized accelerations, while \({}^{i}\ddot{\vec{r}}_{O_{v,i}}\) and \({}^{i}\dot{\vec{\omega}}_{v,i}\) denote those terms of \({}^{i}\ddot{\vec{r}}_{O_{i}}\) and \({}^{i}\dot{\vec{\omega}}_{i}\) that do not have \(\ddot{\theta}_{j}\) and \(\ddot{X}_{j}\) as quasi-accelerations. These terms can be expressed as

$$\begin{aligned} &{}^{i}\ddot{\vec{r}}_{O_{s,i}} = \sum _{j = 1}^{3} {}^{i}R_{\mathrm{ref}}{}^{\mathrm{ref}} \vec{X}_{j}\ddot{X}_{j} + \sum_{k = - 1}^{i - 1} {}^{i}R_{k} \bigl( {}^{k}\dot{\vec{ \omega}}_{s,k} \times {}^{k}\vec{r}_{O_{k + 1}/O_{k}} \bigr), \end{aligned}$$
(17)
$$\begin{aligned} & {}^{i}\ddot{\vec{r}}_{O_{v,i}} = {}^{i}R_{\mathrm{ref}}{}^{\mathrm{ref}} \vec{X}_{2}g + \sum_{k = - 1}^{i - 1} {}^{i}R_{k} \bigl( {}^{k}\dot{\vec{ \omega}}_{v,k} \times {}^{k}\vec{r}_{O_{k + 1}/O_{k}} + {}^{k}\vec{\omega}_{k} \times \bigl( {}^{k}\vec{ \omega}_{k} \times {}^{k}\vec{r}_{O_{k + 1}/O_{k}} \bigr) \bigr), \end{aligned}$$
(18)
$$\begin{aligned} & {}^{i}\dot{\vec{\omega}}_{s,i} = \sum _{k = - 1}^{i} {}^{i}R_{k}{}^{k} \vec{x}_{k,3}\ddot{\theta}_{k}, \end{aligned}$$
(19)
$$\begin{aligned} & {}^{i}\dot{ \vec{\omega}}_{v,i} = \sum_{k = - 1}^{i - 1} {}^{i}R_{k}{}^{k}\vec{\omega}_{k} \times {}^{i}R_{k + 1}{}^{k + 1}\vec{x}_{k + 1,3} \dot{\theta}_{k + 1} \end{aligned}$$
(20)

where \({}^{k}\vec{r}_{O_{k + 1}/O_{k}} = l_{k}{}^{k}\vec{x}_{k,1}\), \({}^{\mathrm{ref}}\vec{X}_{1} = \{ 1 \ 0 \ 0 \}^{T}\), \({}^{\mathrm{ref}}\vec{X}_{2} = \{ 0 \ 1 \ 0 \}^{T}\), \({}^{\mathrm{ref}}\vec{X}_{3} = \{ 0\ 0\ 1 \}^{T}\), and \({}^{k}\vec{x}_{k,3} = \{ 0 \ 0 \ 1 \}^{T}\). Also, \({}^{i}R_{k}\) is a \(3 \times 3\) compound rotation matrix which shows the orientation of the \(k\)th body’s local reference system (i.e., \(x_{k,1}x_{k,2}x_{k,3}\)) with respect to the \(i\)th one (i.e., \(x_{i,1}x_{i,2}x_{i,3}\)). Now, the partial derivatives of \({}^{i}\ddot{\vec{r}}_{O_{i}}\) and \({}^{i}\dot{\vec{\omega}}_{i}\) with respect to generalized accelerations can be expressed as

$$\begin{aligned} &\frac{\partial {}^{i}\ddot{\vec{r}}_{O_{i}}}{\partial \ddot{\theta}_{j}} = {}^{i}R_{j}{}^{j} \vec{x}_{j,3} \times {}^{i}\vec{r}_{O_{i}/O_{j}}, \end{aligned}$$
(21)
$$\begin{aligned} &\frac{\partial {}^{i}\dot{\vec{\omega}}_{i}}{\partial \ddot{\theta}_{j}} = {}^{i}R_{j}{}^{j} \vec{x}_{j,3}, \end{aligned}$$
(22)
$$\begin{aligned} & \frac{\partial {}^{i}\ddot{\vec{r}}_{O_{i}}}{\partial \ddot{X}_{j}} = {}^{i}R_{\mathrm{ref}}{}^{\mathrm{ref}} \vec{X}_{j} \end{aligned}$$
(23)

where \({}^{i}\vec{r}_{O_{i}/O_{j}}\) indicates the position vector of \(O_{i}\) with respect to \(O_{j}\), expressed in the \(i\)th body’s local coordinate system.

3.2.1 Constructing the inertia matrix for the flight phase

To construct the inertia matrix for this multi-link chain in flight, it is sufficient to insert Eqs. (15) and (16) and also Eqs. (21)–(23) into the relevant parts of Eqs. (10) and (11). Then, all the terms that have \(\ddot{\theta}_{j}\) and \(\ddot{X}_{j}\) should be preserved on the left hand side of the equality sign, and all the remaining terms should be moved to the right hand side. By putting the right hand side terms of the motion equations in a matrix form, the inertia matrix of this flying open kinematic chain will be obtained. The details are described below.

The coefficients of generalized accelerations in the rotational motion equations. In Eq. (10), all the terms that include \(\ddot{\theta}_{k}\) and \(\ddot{X}_{k}\) as their coefficients can be grouped as:

$$\begin{aligned} & \Biggl[ \sum_{k = - 1}^{n} \underbrace{{}^{j}\vec{x}_{j,3}^{T} \cdot {}^{j}\sigma_{k}{}^{k} \vec{x}_{k,3}}_{1} + \sum_{k = - 1}^{n} \underbrace{ - {}^{j}\vec{x}_{j,3}^{T} \cdot {}^{j}\psi_{k}{}^{k}\vec{x}_{k,3}}_{2} + \sum_{k = - 1}^{n - 1} \underbrace{ - {}^{j}\vec{x}_{j,3}^{T} \cdot {}^{j}U_{k}{}^{k}\vec{x}_{k,3}}_{3} \Biggr] \ddot{\theta}_{k} \\ &\quad {}+ \Biggl[ \sum_{k = n + 1}^{n + 3} \underbrace{{}^{j}\vec{x}_{j,3}^{T} \cdot {}^{j}\xi_{\mathrm{ref}}{}^{\mathrm{ref}}\vec{X}_{k - n}}_{4} + \sum_{k = n + 1}^{n + 3} \underbrace{{}^{j}\vec{x}_{j,3}^{T} \cdot {}^{j}\gamma_{\mathrm{ref}}{}^{\mathrm{ref}}\vec{X}_{k - n}}_{5} \Biggr]\ddot{X}_{k - n}, \quad j = - 1,\ldots, n, \end{aligned}$$
(I)

where

$$\begin{aligned} &{}^{j}\sigma_{k} = \sum_{i = \max ( j,k )}^{n} {}^{j}R_{i} ( B_{2i} + B_{3i} ){}^{i}R_{k}, \end{aligned}$$
(24)
$$\begin{aligned} & {}^{j}\psi_{k} = \sum_{i = \max ( j + 1,k )}^{n} {}^{j} \tilde{r}_{O_{i}/O_{j}}{}^{j}R_{i}B_{1i}{}^{i}R_{k}, \end{aligned}$$
(25)
$$\begin{aligned} & {}^{j}U_{k} = \sum_{t = k}^{n - 1} \bigl( {}^{j}\xi_{t^{ +}} + {}^{j} \gamma_{t} \bigr) {}^{t}\tilde{r}_{O_{t + 1}/O_{t}}{}^{t}R_{k}, \end{aligned}$$
(26)
$$\begin{aligned} & {}^{j}\xi_{t^{ +}} = \sum_{i = \max ( j,t + 1 )}^{n} {}^{j}R_{i}B_{1i}{}^{i}R_{t}, \end{aligned}$$
(27)
$$\begin{aligned} & {}^{j}\gamma_{t} = \sum_{i = \max ( j + 1,t + 1 )}^{n} {}^{j}\tilde{r}_{O_{i}/O_{j}}B_{0i}{}^{j}R_{t}, \end{aligned}$$
(28)
$$\begin{aligned} & {}^{j}\xi_{\mathrm{ref}} = \sum_{i = j}^{n} {}^{j}R_{i}B_{1i}{}^{i}R_{\mathrm{ref}}, \end{aligned}$$
(29)
$$\begin{aligned} & {}^{j}\gamma_{\mathrm{ref}} = \sum_{i = j + 1}^{n} {}^{j}\tilde{r}_{O_{i}/O_{j}}B_{0i}{}^{j}R_{\mathrm{ref}}. \end{aligned}$$
(30)

The constructive terms of Eq. (I), numbered from (1) to (5), fill the inertia matrix of the whole system (Fig. 2). Note that, for deriving Eq. (I), the order of summation has been changed as needed, in the following way:

$$\begin{aligned} &\sum_{i = j + 1}^{n} \sum _{k = - 1}^{i - 1} a_{i}b_{k} = \sum _{k = - 1}^{n - 1} \sum _{i = \max (k + 1,j + 1)}^{n} a_{i}b_{k}, \end{aligned}$$
(31)
$$\begin{aligned} & \sum _{i = j + 1}^{n} \sum_{k = - 1}^{i} a_{i}b_{k} = \sum_{k = - 1}^{n} \sum_{i = \max (k,j + 1)}^{n} a_{i}b_{k}, \end{aligned}$$
(32)
$$\begin{aligned} & \sum_{i = j}^{n} \sum _{k = - 1}^{i - 1} a_{i}b_{k} = \sum _{k = - 1}^{n - 1} \sum _{i = \max (k + 1,j)}^{n} a_{i}b_{k}, \end{aligned}$$
(33)
$$\begin{aligned} & \sum _{i = j}^{n} \sum_{k = - 1}^{i} a_{i}b_{k} = \sum_{k = - 1}^{n} \sum_{i = \max (k,j)}^{n} a_{i}b_{k}, \end{aligned}$$
(34)
$$\begin{aligned} & \sum_{i = - 1}^{n - 1} \sum _{k = - 1}^{i} a_{i}b_{k} = \sum _{k = - 1}^{n - 1} \sum _{i = k}^{n - 1} a_{i}b_{k}, \end{aligned}$$
(35)
$$\begin{aligned} & \sum _{i = - 1}^{n} \sum_{k = - 1}^{i - 1} a_{i}b_{k} = \sum_{k = - 1}^{n - 1} \sum_{i = k + 1}^{n} a_{i}b_{k}. \end{aligned}$$
(36)

The coefficients of generalized accelerations in the translational motion equations. Like in the previous step, in Eq. (11), all the terms that contain \(\ddot{\theta}_{k}\) and \(\ddot{X}_{k}\) should be grouped. However, since the inertia matrix of the whole system is symmetric, the coefficient of \(\ddot{\theta}_{k}\) in Eq. (11) is the same as the coefficient of \(\ddot{X}_{k}\) in Eq. (10), which was once evaluated in Eq. (I). So, it is sufficient to evaluate only the coefficient of \(\ddot{X}_{k}\) in Eq. (11), which is obtained as follows:

$$ M_{\mathrm{tot}}\ddot{X}_{j}, $$
(II)

where \(M_{\mathrm{tot}}\) is the mass of the whole system and can be expressed as

$$ M_{\mathrm{tot}} = \sum_{i = 1}^{n} B_{0i}. $$
(37)
Fig. 2
figure 2

Inertia matrix of the whole system for the flight phase

The position of Eq. (II) in the inertia matrix of the system for the flight phase is shown by \(M_{\mathrm{tot}}\). As was mentioned before, the inertia matrix of the whole system is symmetric; consequently, it is not necessary to evaluate again the gray region of this matrix. This greatly reduces the number of necessary computations for constructing the inertia matrix of the whole system in symbolic form.

3.2.2 Constructing the right hand sides of the motion equations for the flight phase

Now, let us construct the right hand sides of the forward dynamics equations. In Eq. (10), if all the terms that do not include \(\ddot{\theta}_{k}\) and \(\ddot{X}_{k}\) are transferred to the right hand side of the equality sign, the following equation will be obtained:

$$ R_{\theta_{j}} = \underbrace{\sum_{i = j + 1}^{n} - \frac{\partial {}^{i}\ddot{\vec{r}}_{O_{i}}^{T}}{\partial \ddot{q}_{j}} \cdot {}^{i}\vec{S}_{i}}_{6} + \underbrace{\sum_{i = j}^{n} - \frac{\partial {}^{i}\dot{\vec{\omega}}_{i}^{T}}{\partial \ddot{q}_{j}} \cdot {}^{i}\vec{T}_{i}}_{7}. $$
(38)

In the above equation,

$$\begin{aligned} &{}^{i}\vec{S}_{i} = B_{0i}{}^{i}\ddot{ \vec{r}}_{O_{v,i}} - B_{1i}{}^{i}\dot{\vec{ \omega}}_{v,i} - {}^{i}\tilde{\omega}_{i}B_{1i}{}^{i} \vec{\omega}_{i}, \end{aligned}$$
(39)
$$\begin{aligned} & {}^{i}\vec{T}_{i} = B_{1i}{}^{i}\ddot{\vec{r}}_{O_{v,i}} + ( B_{2i} + B_{3i} ){}^{i}\dot{\vec{ \omega}}_{v,i} + {}^{i}\tilde{\omega}_{i} ( B_{2i} + B_{3i} ){}^{i}\vec{\omega}_{i}. \end{aligned}$$
(40)

And also, in Eq. (11), all the terms that do not include generalized accelerations should be moved to the right hand sides of the motion equations as follows:

$$ R_{X_{j}} = \underbrace{\sum_{i = - 1}^{n} - \frac{\partial {}^{i}\ddot{\vec{r}}_{O_{i}}^{T}}{\partial \ddot{X}_{j}} \cdot {}^{i}\vec{S}_{i}}_{8}. $$
(41)

The constructive terms of Eq. (38) and Eq. (41), which are numbered from (6) to (8) and contain the Coriolis and centrifugal forces, fill the right hand side vector of the motion equations, as is shown in Fig. 3.

Fig. 3
figure 3

Right hand side of the motion equations for the flight phase

Figures 2 and 3 graphically illustrate the motion equations of \(n\) rigid links flying through a defined space. In the next section, the effect of the collision of this system with the surrounding surfaces will be studied.

3.3 Impact phase

An impact occurs when each joint of the mentioned open kinematic chain touches the surfaces that surrounded the chain. Before modeling the impact phase, let us present the absolute velocity of each joint in the inertial reference frame. Obviously, for an open kinematic chain which is composed of \(n\) rigid links, there are \(n - 1\) joints and two end points (\(O_{1}\) and \(O_{n}\)). By employing the Jacobian matrix, the velocities of these \(n + 1\) points can be expressed as

$$ {}^{\mathrm{ref}}\dot{\vec{r}}_{O_{i}} ( \varTheta, \dot{\varTheta} ) = J ( \varTheta )\dot{\vec{\varTheta}}. $$
(42)

The Jacobian matrix is graphically depicted in Fig. 4.

Fig. 4
figure 4

Jacobian matrix for \(n\) flying rigid links

It should be noted that \(\frac{\partial {}^{\mathrm{ref}}\vec{r}_{O_{i}}}{\partial \varTheta_{j}}\) is the partial derivative of the \(i\)th joint’s position (described in the inertial reference frame) with respect to the \(j\)th quasi-coordinate (again, it should be emphasized that in holonomic systems, the quasi-coordinates are exactly the same as the generalized coordinates). Also \({}^{i}J_{j,:}\) is a representation for the \(j\)th row and every column of the \(i\)th joint’s Jacobian matrix.

As mentioned before, in this paper, an impact results from the contact of each joint with the surrounding surfaces. The externally applied forces in an impact can be represented by impulses. So, the obtained equations in the previous section (flight phase), which include no external forces or torques, can be modified for the impact phase as

$$ I_{f} ( \varTheta ) \ddot{\vec{\varTheta}} = \mathop{R}\limits ^{ \to} ( \varTheta, \dot{\varTheta} ) + J^{T} ( \varTheta )\delta \vec{F} ( t ) $$
(43)

where \(\delta \vec{F} ( t )\) represents the vector of the external forces acting on the joints due to the collision between these joints and confining surfaces. As was pointed out, these forces are impulsive; therefore, the \(\delta \vec{F} ( t )\) notation is used. If Eq. (43) is integrated over the infinitesimal duration of the impact time \(( t^{ -} \to t^{ +} )\), it yields

$$ I_{f} \bigl( \varTheta^{ -} \bigr) \bigl( \dot{\vec{ \varTheta}}^{ +} - \dot{\vec{\varTheta}}^{ -} \bigr) = J^{T} \bigl( \varTheta^{ -} \bigr)\vec{F} $$
(44)

where \(\vec{F} = \int_{t^{ -}}^{t^{ +}} \delta \vec{F} ( t ) \,dt\) and also \(\dot{\vec{\varTheta}}^{ -}\) and \(\dot{\vec{\varTheta}}^{ +}\) are the quasi-velocities (or generalized velocities) just before and just after and impact. In an impact, the configuration of a system is assumed not to change over a very short time interval; hence, \(\vec{\varTheta}^{ +} = \vec{\varTheta}^{ -}\). Finally, it should be noted that the values of \(\vec{R} ( \varTheta,\dot{\varTheta} )\) containing Coriolis and centrifugal forces are finite; so, they vanish in the integration. In Eq. (44), if all the unknown terms are transferred to the left hand side of the equality sign and all the known terms are moved to the right hand side, the following equation will be obtained:

$$ I_{f} \bigl( \varTheta^{ -} \bigr)\dot{\vec{ \varTheta}}^{ +} - J^{T} \bigl( \varTheta^{ -} \bigr) \vec{F} = I_{f} \bigl( \varTheta^{ -} \bigr)\dot{\vec{ \varTheta}}^{ -}. $$
(45)

Equation (45) can be rewritten in a compact form as

$$ \bigl[ I_{f} \bigl( \varTheta^{ -} \bigr) \big\vert - J^{T} \bigl( \varTheta^{ -} \bigr) \bigr] \biggl\{ \frac{\dot{\vec{\varTheta}}^{ +}}{\vec{F}} \biggr\} = \bigl[ I_{f} \bigl( \varTheta^{ -} \bigr) \bigr] \bigl\{ \dot{\vec{\varTheta}}^{ -} \bigr\} . $$
(46)

Equation (46) represents \(n + 5\) equations and \(n + 5 + \dim ( \vec{F} )\) unknowns, where the unknowns are \(\dot{\vec{\varTheta}}^{ +}\) and \(\vec{F}\). So, it is required to find as many additional equations as is the dimension of vector \(\vec{F}\). These additional equations are generated by equating the pre-collision and post-collision velocities of the joints that impact the surrounding surfaces. Based on the Newton’s kinematic impact law, these equations can be written as

$$ J \bigl( \varTheta^{ -} \bigr)\dot{\vec{\varTheta}}^{ +} = - eJ \bigl( \varTheta^{ -} \bigr)\dot{\vec{\varTheta}}^{ -} $$
(47)

where \(e\) is called the coefficient of restitution. A coefficient \(e = 1\) means that the contacting joint will rebound with exactly the same velocity as it strikes the surface (elastic impact). On the other hand, \(e = 0\) indicates that the contacting joint will cling to the surface with no rebound (plastic impact). However, most impact conditions lie somewhere between these two extremes. By considering Eqs. (46) and (47) and presenting them in compact form, we get

$$ \underbrace{ \biggl[ \frac{I_{f} ( \varTheta^{ -} )}{J ( \varTheta^{ -} )} \bigg| \frac{ - J^{T} ( \varTheta^{ -} )}{0} \biggr]}_{I_{i} ( \varTheta^{ -} )} \biggl\{ \frac{\dot{\vec{\varTheta}}^{ +}}{\vec{F}} \biggr\} = \biggl[ \frac{I_{f} ( \varTheta^{ -} )}{ - eJ ( \varTheta^{ -} )} \biggr] \bigl\{ \dot{\vec{\varTheta}}^{ -} \bigr\} . $$
(48)

For example, if three impulsive forces of \(\delta F_{p}^{X_{3}} ( t )\), \(\delta F_{q}^{X_{1}} ( t )\) and \(\delta F_{r}^{X_{2}} ( t )\) are respectively and simultaneously applied on the \(p\)th joint in the \({}^{\mathrm{ref}}\vec{X}_{3}\) direction, \(q\)th joint in the \({}^{\mathrm{ref}}\vec{X}_{1}\) direction and on the \(r\)th joint in the \({}^{\mathrm{ref}}\vec{X}_{2}\) direction, then three rows and columns should be added to the preliminary inertia matrix derived for the flight phase in order to construct the inertia matrix for the impact phase (Fig. 5).

Fig. 5
figure 5

A sample inertia matrix for the impact phase

Since \(I_{f} ( \varTheta )\) is positive definite and \(J ( \varTheta )\) is of full rank, the inertia matrix for the impact phase (i.e., \(I_{i} ( \varTheta )\)) is invertible [26]. By pre-multiplying both sides of Eq. (48) by \(I_{i}^{ - 1} ( \varTheta )\) the unknown variables including the quasi-velocities just after an impact and also the impulses of the applied forces will be determined. In fact, the impact of this multi-rigid-link system with the surrounding surfaces changes the velocity components of the quasi-coordinate vector very quickly. The final results of an impact phase become the new initial conditions for the next flight phase. Figure 6 shows a block diagram of the procedures developed in this work for deriving the motion equations of multi-rigid links in the flight and impact phases.

Fig. 6
figure 6

Block diagram of the developed procedure

4 Computational simulations

Case study 1

In this section, two simulations are performed to validate the developed model. The first simulation involves a planar four-link rigid robotic manipulator, which is shown in Fig. 7. The movement of this system is confined within a rectangle of 3 m length and 2 m width.

Fig. 7
figure 7

A four-link planar robotic manipulator confined within a rectangle

In order to force the system to remain in the \({}^{\mathrm{ref}}X_{1}{}^{\mathrm{ref}}X_{2}\) plane, the initial conditions for \(\theta_{ - 1}\) and \(\theta_{0}\) should be \(- \frac{\pi}{2}\ \mathrm{rad}\) and \(0\ \mathrm{rad}\), respectively. The other initial conditions for the simulations are assumed as follows:

$$\begin{aligned} &\theta_{1}|_{t = 0} = \frac{\pi}{4}\ \mbox{rad};\quad \theta_{2} = \theta_{3} = \theta_{4}|_{t = 0} = - \frac{\pi}{2}\ \mbox{rad};\quad X_{1}|_{t = 0} = 1.5\ \mbox{m};\quad X_{2}|_{t = 0} = 0.3\ \mbox{m};\\ & X_{3}|_{t = 0} = 0\ \mbox{m}; \\ &\dot{\theta}_{ - 1} = \dot{\theta}_{0} = \dot{\theta}_{1} = \dot{\theta}_{2} = \dot{\theta}_{3} = \dot{\theta}_{4}|_{t = 0} = 0\ \frac{\mathrm{rad}}{\mathrm{s}};\quad \dot{X}_{1} = \dot{X}_{2} = \dot{X}_{3}|_{t = 0} = 0\ \frac{\text{m}}{\mathrm{s}}. \end{aligned}$$

All the other necessary parameters for the simulations can be found in Table 1.

Table 1 Required parameters for simulating the planar motion of a four-rigid-link manipulator in flight

By solving a set of 18 differential equations for the flight phase and also by solving the algebraic equations related to the collision of the system with the surrounding rectangle, the time responses of the system are obtained and illustrated in Figs. 8 through 13.

Fig. 8
figure 8

Angular positions of the joints

Also, the configurations of this open kinematic chain at different times are illustrated in Figs. 14(A) through 14(E).

The initial conditions are deliberately chosen in such a way that the system is symmetric with respect to the line at \(X_{1} = 1.5\ \mbox{m}\). As seen in Fig. 14(A), the first configuration of the system at \(t = 0\ \mbox{s}\) recalls a square (In fact, with regards to the initial conditions, joints \(O_{1}\) and \(O_{5}\) are located at the same position). So, it is not unusual that the system preserves its symmetricity during the simulation. As is clearly shown in Fig. 14, the system touches the confining surfaces at seven different times: \(t = 0.247,\ 0.443,\ 0.54,\ 1.05,\ 1.10,\ 1.25,\ 1.36\ \mbox{s}\). As mentioned before, the impacts have no effect on the configuration of the system i.e., \(\vec{\varTheta}^{ -} = \vec{\varTheta}^{ +}\). This fact can be verified in Figs. 8, 10 and 12, where the values of quasi-coordinates are equal before and after impact. However, the quasi-velocities quickly change at the moment of impact, as shown in Figs. 9, 11, and 13. Finally, the simulation results, especially Figs. 12 and 13, indicate that the system loses its symmetricity at the final moments of simulation. This happens due to the numerical integration errors, which can be mitigated by employing more accurate numerical integration methods. For more information on the stability of integration methods for contact-impact analysis in multibody systems, one may refer to [27], which presents a general and comprehensive approach for automatically adjusting the time step in variable time-step integration algorithms in the vicinity of contact.

Fig. 9
figure 9

Angular velocities of the joints

Fig. 10
figure 10

Positions of the joints in the \({}^{\mathrm{ref}}X_{1}\) direction

Fig. 11
figure 11

Absolute velocities of the joints in the \({}^{\mathrm{ref}}X_{1}\) direction

Fig. 12
figure 12

Positions of the joints in the \({}^{\mathrm{ref}}X_{2}\) direction

Fig. 13
figure 13

Absolute velocities of the joints in the \({}^{\mathrm{ref}}X_{2}\) direction

Fig. 14
figure 14

Configurations of the system during the simulations

Case study 2

In the previous simulation, the system was confined to have only planar motion. But in this simulation, a single rigid link with 3D spatial motion inside a closed cube is considered (Fig. 15).

Fig. 15
figure 15

A single flying link confined inside a closed cube

The necessary parameters for the numerical simulation of the mentioned link are presented in Table 2.

Table 2 Required parameters for simulating a single rigid link confined within a cube

Also the initial conditions are set as follows:

$$\begin{aligned} & \theta_{ - 1} = \theta_{1}|_{t = 0} = \frac{\pi}{6}\ \mbox{rad};\quad \theta_{0}|_{t = 0} = 0\ \mathrm{rad};\quad X_{1} = X_{3}|_{t = 0} = 0.1\ \text{m};\quad X_{2} = 0.4\ \text{m}; \\ &\dot{\theta}_{ - 1} = \dot{\theta}_{0} = \dot{\theta}_{1}|_{t = 0} = 0\ \frac{\mathrm{rad}}{\text{s}};\quad \dot{X}_{1} = \dot{X}_{2} = \dot{X}_{3}|_{t = 0} = 0\ \frac{\text{m}}{\text{s}}. \end{aligned}$$

The time responses of the system as well as the configurations of this single flying link at impact moments are depicted in Figs. 1624.

Fig. 16
figure 16

Angular positions of the joints

Figure 18 displays the collisions of the first joint, i.e., \(O_{1}\), with the \(X_{1} = 0\) and \(X_{1} = 1\) planes at \(t_{3} = 0.353\ \text{s}\) and \(t_{9} = 1.382\ \text{s}\), respectively. These two impact times are indicated in Fig. 24 by symbol \(\Delta\). Similarly, by considering Fig. 20, it is observed that \(O_{1}\) touches the \(X_{2} = 0\) plane at \(t_{1} = 0.285 \ \text{s},\ t_{5} = 0.863\ \text{s}\), \(t_{8} = 1.264\ \text{s},\ \mbox{and}\ t_{11} = 1.647\ \text{s}\), and also \(O_{2}\) strikes this plane at \(t_{4} = 0.399\ \text{s},\ t_{7} = 1.113\ \text{s},\ \mbox{and}\ t_{12} = 1.690\ \text{s}\). All these impacts on the \(X_{2} = 0\) plane are marked by symbol ∗ in Fig. 24. Finally, according to Fig. 22, two impacts occur due to the collision of \(O_{1}\) with the \(X_{3} = 0\) plane at \(t_{2} = 0.325\ \text{s}\ \mbox{and}\ t_{10} = 1.563\ \text{s}\), and one impact occurs by the collision of \(O_{1}\) with the \(X_{3} = 1\) plane at \(t_{6} = 0.886\ \text{s}\). These three impact moments are depicted in Fig. 24 by the ✩ symbol. As expected, at these 12 impact times during simulations, the quasi-velocities of the system change rapidly, as illustrated in Figs. 17, 19, 21, and 23. The stability of system responses is highly dependent on step size. So, besides employing the “ode45” solver and the EVENTS function available in the MATLAB software, a computer program based on the fourth-order Runge–Kutta method was also used to solve these differential–algebraic equations. The time step in this method was increased until no significant error was observed. The CPU time for deriving and solving the governing equations with a time step of \(\Delta t=10^{-5}\ \mbox{s}\) is approximately 40 hr for the first simulation and 3 hr for the second simulation. This is due to the additional degrees of freedom of the first system. Both of these simulations have been performed in an Intel (R) Core (TM) i3-3220 system running at 3.3 GHz.

Fig. 17
figure 17

Angular velocities of the joints

Fig. 18
figure 18

Positions of the joints in the \({}^{\mathrm{ref}}X_{1}\) direction

Fig. 19
figure 19

Absolute velocities of the joints in the \({}^{\mathrm{ref}}X_{1}\) direction

Fig. 20
figure 20

Positions of the joints in the \({}^{\mathrm{ref}}X_{2}\) direction

Fig. 21
figure 21

Absolute velocities of the joints in the \({}^{\mathrm{ref}}X_{2}\) direction

Fig. 22
figure 22

Positions of the joints in the \({}^{\mathrm{ref}}X_{3}\) direction

Fig. 23
figure 23

Absolute velocities of the joints in the \({}^{\mathrm{ref}}X_{3}\) direction

Fig. 24
figure 24

Configurations of the single rigid link at the moments of impact

5 Summary and conclusion

In this paper, a recursive approach has been presented for the hybrid dynamic modeling of the finite and impulsive motions of serial chains with many degrees of freedom. Here, instead of using too many formulas, we have attempted to explain the procedure graphically. The proposed method has been able to simulate an open kinematic chain composed of \(n\) real rigid links flying through a confined space. By adding two imaginary links to this open kinematic chain, it was possible to systematically model the rotations of the system. The recursive Gibbs–Appell formulation has been used to derive the motion equations. As was mentioned before, in holonomic systems, the quasi-velocities are the same as generalized velocities so \(\frac{\partial S}{\partial \ddot{\theta}_{j}} = \frac{d}{dt} ( \frac{\partial T}{\partial \dot{\theta}_{j}} ) - \frac{\partial T}{\partial \theta_{j}},\ j = 1, 2,\ldots,n\). Obviously, as the DOF of a system increases, the Lagrangian formulation loses its efficiency relative to the Gibbs–Appell formulation, since it requires a higher number of total and partial derivatives in deriving the motion equations. The authors in [9] and [14] have respectively demonstrated that the number of mathematical operations in the recursive G–A method is less than that in the recursive Lagrangian method for multi-rigid and multi-flexible links. In fact, even a little reduction in the number of multiplications and additions may have a significant effect on the efficiency of the algorithm used. As a result, one can execute the considered algorithm by a simpler and less costly computing system and satisfactorily achieve the same end results. Moreover, in the proposed approach, the effect of impact with the surrounding walls has been directly incorporated into the relevant formulations. To our knowledge, this is the first time that a combination of finite and impulsive motions is presented in recursive form.

For future works, the proposed method can be applied to multiple and flexible flying links. More importantly, the friction effects at the contact points can be recursively considered in the motion equations.