Introduction

Complex mechanical systems with flexible links are difficult to model and control due to vibration effects that have to be accounted for and monitored in control actions. Flexible link models can be approximated by several methods, but then, the resulting dynamics and the associated simulated motions can reveal some differences. The review and comparison of modeling methods for flexible link manipulators are available in [1]. In addition, friction that affects motion and control of these systems is modeled by various models. An intensive review of friction models, their effectiveness with respect to motion types, and their comparisons in laboratory tests are presented in [2, 3]. Friction compensation in motion and control in the presence of vibration is addressed in [4].

Most of robotic systems equipped with flexible arms are required to perform tasks and their motions are constrained, see, e.g., [5, 6] and references there. These motions are defined as constrained maneuvers when a robot moves and its end effector interacts with the environment, e.g., a surface [6]. These maneuvers include, e.g., grinding, cutting, or polishing stationary or moving surfaces. In addition, effects of contact forces on required joint torques are determined and simulated for different contact surfaces. In [5], constrained motion is understood as motion of a plane, on which a robot end effector is to move. In [7], it is assumed that measurable joint variables are limited to rotor angles and its velocities, and a feedback controller able to drive a manipulator to a desired configuration specified in link angles with a desired contact force is designed. In these and other works reported in the literature, no task-based constraints, related to services or other performance requirements for flexible models, are considered and incorporated into their constrained dynamics.

Motivated by these, this paper presents motion analysis, specifically vibration, of system dynamic models with flexible components in their structures and subjected to position and kinematic constraints, which are referred to as programmed. They are imposed as control goals or service task requirements. Friction models are added to get reasonable motion conditions. According to recommendation in [2], LuGre and Dahl friction models are selected. The system model is derived by the computational procedure dedicated to constrained dynamics generation. It provides reference dynamic models, satisfying all imposed constraints. The procedure enables automated generation of constrained dynamics and it was successfully implemented for rigid models [8,9,10]. It serves both reference and control oriented dynamics derivation and the final dynamic models are obtained in the reduced state form. It was successfully extended to systems including flexible sub-systems [11]. System models composed of flexible parts are prone to vibration in some work regimes, e.g., when fast motions are required. This may affect system performance and disable realistic controller designs. The novelty of the presented method is in its ability to analyze any system reference motion, including flexible link vibration, with friction modeled in the joints, and in the presence of programmed constraints. The results of this analysis can contribute to verification of a system behavior when it is subjected to programmed constraints and help to specify these constraints properly. Preliminary results of vibration analysis of a system with a flexible link are presented in [12]. In this paper, the reference motion is examined based upon the example of a crane model with a flexible link and friction modeled in the joints. The crane carries loads and moves along specified programmed constraints imposed on a trajectory resulting from its workspace or with desired velocity resulting from a specific load. The example delivers a realistic work situation for the crane. Simulation results present analysis of the crane reference motion and vibrations generated when the constraints are imposed. This analysis may help to select proper programmed constraint parameters, e.g., link velocities, and design effectively subsequent controllers.

This paper is organized as follows. After “Introduction”, the computational procedure of generating constrained system dynamics is reported in “The Computational Procedure of Generating Constrained System Dynamics”. The crane constrained dynamics model is presented in “Constrained Dynamics Model of a Crane”. “Numerical Study Results” delivers numerical study results for the crane programmed motion. This paper closes with conclusions and a list of references.

The Computational Procedure of Generating Constrained System Dynamics

The computational procedure of generating constrained system dynamics is based upon the generalized programmed motion equations (GPME) presented in [8, 9]. This original GPME method is developed and implemented to model and design controllers for rigid system models. It has been extended to models with flexible components in [1112].

Let us consider a system composed of rigid/flexible links connected by joints with or without friction effects. It is assumed that constraints put on a system can be material or programmed. The latter ones are imposed as control goals on the system performance or as service tasks:

$${\mathbf{B}}\left( {t,{\mathbf{q}},{\dot{\mathbf{q}}}, \ldots ,{\mathbf{q}}^{{{\mathbf{(}}p - 1{\mathbf{)}}}} } \right){\mathbf{q}}^{(p)} + {\mathbf{s}}\left( {t,{\mathbf{q}},{\dot{\mathbf{q}}}, \ldots ,{\mathbf{q}}^{{{\mathbf{(}}p - 1{\mathbf{)}}}} } \right) = {\mathbf{0}}.$$
(1)

The programmed constraints are imposed by a designer or a control engineer to obtain a system desired performance, e.g., they can be imposed upon acceleration \(p = 2\) or jerk \(p = 3\).

The modified GPME algorithm is formulated to derive dynamic equations of motion of the constrained system. The flowchart illustrating the derivation process according to the GPME algorithm is presented in Fig. 1.

Fig. 1
figure 1

Flowchart of the GPME derivation algorithm

This algorithm requires to determine the function \(R_{1}\) defined as

$$R_{1} = P_{1} - \sum\limits_{i = 1}^{{n_{\text{dof}} }} {Q_{i} \,\dot{q}_{i} } ,$$
(2)

where \(P_{1} = \dot{E}_{k} - 2\dot{E}_{{k_{0} }}\) is the function composed of the kinetic energy of the unconstrained system and \(\,\dot{E}_{{k_{0} }}^{{}} = \sum\nolimits_{i = 1}^{{n_{\text{dof}}^{{}} }} {\frac{{\partial E_{k}^{{}} }}{{\partial q_{i}^{{}} }}\dot{q}_{i} } ,\)

\({\mathbf{Q}}(t,{\mathbf{q}},{\dot{\mathbf{q}}}) = {\mathbf{g}}({\mathbf{q}}) - {\mathbf{f}}_{fl} \left( {\mathbf{q}} \right) - {\mathbf{f}}_{fr} \left( {{\mathbf{q}},{\dot{\mathbf{q}}}} \right) + {\mathbf{f}}_{\text{ext}} \left( {t,{\mathbf{q}},{\dot{\mathbf{q}}}} \right),\), \({\mathbf{f}}_{\text{ext}} \left( {t,{\mathbf{q}},{\dot{\mathbf{q}}}} \right)\) is a vector of external forces (not controls), \({\mathbf{g}}({\mathbf{q}})\) is a vector of gravity forces, \({\mathbf{f}}_{fl} \left( {\mathbf{q}} \right)\) is a vector of spring deformation forces due to flexibility of links, and \({\mathbf{f}}_{fr} \left( {{\mathbf{q}},{\dot{\mathbf{q}}}} \right)\) is a vector of generalized forces resulting from friction in joints.

The next step in the algorithm is partition of the generalized velocities into dependent and independent ones. Assume that constraint Eq. (1) for \(p = 0,1\) may be solved, at least locally, with respect to a vector \({\dot{\mathbf{q}}}_{{{\text{d}}_{\text{c}} }}\) of dependent coordinates. Then, the relation between dependent and independent velocities can be written in the following form:

$${\dot{\mathbf{q}}}_{{{\text{d}}_{\text{c}} }} = {\dot{\mathbf{q}}}_{{{\text{d}}_{\text{c}} }} \left( {t,\,{\mathbf{q}},\,{\dot{\mathbf{q}}}_{{{\text{i}}_{\text{c}} }} } \right),$$
(3)

where \({\dot{\mathbf{q}}} = \left[ {\begin{array}{*{20}c} {{\dot{\mathbf{q}}}_{{{\text{i}}_{\text{c}} }}^{\text{T}} } & {{\dot{\mathbf{q}}}_{{{\text{d}}_{\text{c}} }}^{\text{T}} } \\ \end{array} } \right]^{\text{T}}\), \({\dot{\mathbf{q}}}_{{{\text{i}}_{\text{c}} }}^{{}} \in \Re^{{n_{\text{dof}} - n_{{{\text{d}}_{\text{c}} }} }}\), \({\dot{\mathbf{q}}}_{{{\text{d}}_{\text{c}} }}^{{}} \in \Re^{{n_{{{\text{d}}_{\text{c}} }} }}\).

Substituting dependent velocities \({\dot{\mathbf{q}}}_{{{\text{d}}_{\text{c}} }}^{{}}\) given by Eq. (3) into relations (2), results in the modified function \(R_{1}\) that can be expressed as

$$R_{1}^{*} = R_{1}^{*} \left( {t,\,{\mathbf{q}},\,{\dot{\mathbf{q}}}_{{{\text{i}}_{\text{c}} }} ,{\dot{\mathbf{q}}}_{{{\text{d}}_{\text{c}} }} (t,\,{\mathbf{q}},\,{\dot{\mathbf{q}}}_{{{\text{i}}_{\text{c}} }} )} \right) = R_{1}^{*} \left( {t,\,{\mathbf{q}},\,{\dot{\mathbf{q}}}_{{{\text{i}}_{\text{c}} }} } \right).$$
(4)

Differentiating Eq. (4) with respect to the independent velocities \({\dot{\mathbf{q}}}_{{{\text{i}}_{\text{c}} }}^{{}}\) the final GPME are obtained as

$$\frac{{\partial R_{1}^{*} }}{{\partial {\dot{\mathbf{q}}}_{{{\text{i}}_{\text{c}} }} }} = {\mathbf{M}}\left( {\mathbf{q}} \right){\mathbf{\ddot{q}}} - {\mathbf{h}}\left( {{\mathbf{q}},{\dot{\mathbf{q}}}} \right) - {\mathbf{Q}}\left( {t,{\mathbf{q}},{\dot{\mathbf{q}}}} \right) = {\mathbf{0}},$$
(5)

where \({\mathbf{M}}({\mathbf{q}})\)—mass matrix, \({\mathbf{h}}({\mathbf{q}},{\dot{\mathbf{q}}})\)—vector of dynamic forces.

The dynamics (5) can be rewritten in the following form:

$${\mathbf{M}}\left( {\mathbf{q}} \right){\mathbf{\ddot{q}}} - {\mathbf{h}}\left( {{\mathbf{q}},{\dot{\mathbf{q}}}} \right) = {\mathbf{Q}}\left( {t,{\mathbf{q}},{\dot{\mathbf{q}}}} \right)$$
(6)
$$\quad {\mathbf{B}}\left( {t,{\mathbf{q}},{\dot{\mathbf{q}}}, \ldots ,{\mathbf{q}}^{(p - 1)} } \right){\mathbf{q}}^{(p)} + {\mathbf{s}}\left( {t,{\mathbf{q}},{\dot{\mathbf{q}}}, \ldots ,{\mathbf{q}}^{(p - 1)} } \right) = {\mathbf{0}}.$$

The main advantage of the presented approach is that Eq. (6) is free of constraint reaction forces eliminated in the derivation process. This is the fundamental advantage of (6) which makes them suitable for direct motion analysis and control applications.

Other advantages of this approach include:

  • The procedure is automated—any constraint can be merged into the system dynamics.

  • The procedure serves both reference (constrained) and control oriented dynamics derivation.

  • The procedure serves models with rigid and flexible sub-systems.

Constrained Dynamics Model of a Crane

Physical Model of a Crane

The analysed crane built of four bodies \((n_{\text{b}} = 4)\), i.e., a base, a rotary column and two links, is presented in Fig. 2. The crane is supported by means of eight supports \((n_{\text{s}} = 8)\), which are modeled by spring elements. The rotary column \((c,1)\) is driven by the driving torque \(({\mathbf{t}}_{\text{dr}}^{(c,1)} )\). It is assumed that the link \((c,2)\) is considered as a flexible body. To take its flexibility into account, the Rigid Finite-Element Method (RFEM) is used. It has been selected based upon study results reported in [13,14,15], which confirm that this method provides models which solutions are in good agreement with experiments. The LuGre and Dahl friction models are assumed to include the friction phenomena in joints [16, 17]. According to [18], where experimental results were compared with numerical ones for five friction models of robotic systems, the LuGre model provides system model behaviors closest to the experimental ones. Clearance in joints and damping effects in the system is omitted.

Fig. 2
figure 2

Model of a crane

Discretization of the Flexible Link \((c,2)\) by the Rigid Finite-Element Method

The RFEM is used to discretise link \((c,2)\) [19,20,21]. In this method, the link is replaced by rigid elements (rfe) interconnected by spring-damping elements (sde). The discretisation is performed in two stages. The first one, called the primary division (Fig. 3a), consists of dividing the link of length \(l^{(c,2)}\) into \(n_{\text{div}}^{(c,2)}\) sections of equal length \(d^{(c,2)}\). In the second stage, called the secondary division (Fig. 3b), we obtain a system of \(n_{\text{rfe}}^{(c,2)}\) rigid finite elements (\(n_{\text{rfe}}^{(c,2)} = n_{\text{div}}^{(c,2)} + 1\)) of lengths:

$$l^{(c,2,r)} = \left\{ {\begin{array}{*{20}l} {\left. {d^{(c,2)} } \right|_{{i = 1, \ldots ,n_{\text{rfe}}^{(c,2)} - 2}} ,} \hfill \\ {\left. {\frac{1}{2}d^{(c,2)} } \right|_{{i \in \{ 0,n_{\text{rfe}}^{(c,2)} - 1\} }} ,} \hfill \\ \end{array} } \right.$$
(7)

which are interconnected by \(n_{\text{sde}}^{(c,2)}\) spring-damping elements.

Fig. 3
figure 3

Discretization of a flexible link a primary division, b secondary division, and c generalized coordinates describing motion of \({\text{rfe}}(c,l,r)\)

Motion of \(\left. {{\text{rfe}}\,(c,2,r)} \right|_{{r = 1, \ldots ,n_{\text{rfe}}^{(c,2)} - 1}}\) is described with respect to \({\text{rfe}}\,(c,2,r - 1)\) (Fig. 3c) and has the following form:

$$\left. {{\tilde{\mathbf{q}}}^{(c,2,r)} } \right|_{{r = 1, \ldots ,n_{\text{rfe}}^{(c,l)} - 1}} = \left( {\tilde{q}_{j}^{(c,2,r)} } \right)_{j = 1,2,3} = \left[ {\begin{array}{*{20}c} {\psi^{(c,2,r)} } & {\theta^{(c,2,r)} } & {\varphi^{(c,2,r)} } \\ \end{array} } \right]^{\text{T}} .$$
(8)

Notice that only bending and torsional deformations of the link are analysed in simulations. Due to the simplicity of the discretisation method, motion dynamic equations of a flexible body can be generated by modification of the algorithm used to model dynamics of rigid body systems.

Joint Coordinates and Homogeneous Transformation Matrices

Figure 4 shows the crane model with local body frames assigned. The local frames and joint coordinates are selected according to the Denavit–Hartenberg notation [22].

Fig. 4
figure 4

Local frames and generalized coordinate vectors of the crane

The crane motion is described by the vector of joint coordinates and its components can be written in the following form:

$${\mathbf{q}} = \left( {q_{i} } \right)_{{i = 1, \ldots ,n_{\text{dof}} }} = \left[ {\begin{array}{*{20}c}{{\tilde{\mathbf{q}}}^{{(b)^{\text{T}} }} } & {{\tilde{\mathbf{q}}}^{{(c)^{\text{T}} }} } \\ \end{array} } \right]^{\text{T}} = \left[ {\begin{array}{*{20}c} {{\tilde{\mathbf{q}}}^{{(b)^{\text{T}} }} } &\vline & {{\tilde{\mathbf{q}}}^{{(c,1)^{\text{T}} }} } &\vline & {{\tilde{\mathbf{q}}}^{{(c,2)^{\text{T}} }} } &\vline & {{\tilde{\mathbf{q}}}^{{(c,3)^{\text{T}} }} } \\ \end{array} } \right]^{\text{T}} ,$$
(9)

where \({\tilde{\mathbf{q}}}^{(b)} = \left[ {\begin{array}{*{20}c} {x^{(b)} } & {y^{(b} } & {z^{(b)} } & {\psi^{(b)} } & {\theta^{(b)} } & {\varphi^{(b)} } \\ \end{array} } \right]^{\text{T}}\), \({\tilde{\mathbf{q}}}^{(c,1)} = \left[ {\psi^{(c,1)} } \right]\),

$${\tilde{\mathbf{q}}}^{(c,2)} = \left\{ {\begin{array}{*{20}l} {{\tilde{\mathbf{q}}}^{(c,2,0)} } \hfill & - \hfill & {{\text{rigid}}\,\,{\text{link}}\,\,\,\,\,} \hfill \\ {\left[ {\begin{array}{*{20}c} {{\tilde{\mathbf{q}}}^{{(c,2,0)^{\text{T}} }} } & \cdots & {{\tilde{\mathbf{q}}}^{{(c,2,r)^{\text{T}} }} } & \cdots & {{\tilde{\mathbf{q}}}^{{(c,2,n_{rfe}^{(c,2)} )^{\text{T}} }} } \\ \end{array} } \right]^{\text{T}} } \hfill & - \hfill & {{\text{flexible}}\,\,{\text{link}}} \hfill \\ \end{array} }\right.,$$
$$\begin{aligned} &{\tilde{\mathbf{q}}}^{(c,2,0)} = \left[ {\psi^{(c,2,0)} } \right],\quad {\tilde{\mathbf{q}}}^{(c,2,r)} = \left[ {\begin{array}{*{20}c} {\psi^{(c,2,r)} } & {\theta^{(c,2,r)} } & {\varphi^{(c,2,r)} } \\ \end{array} } \right]^{\text{T}} ,\quad\\& {\tilde{\mathbf{q}}}^{(c,3)} = \left[ {\psi^{(c,3)} } \right]. \end{aligned}$$

The crane motion is subjected to programmed constraint equations which describe the behavior of its end effector. Therefore, elements of the vector q are not all independent and can be partitioned into independent and dependent coordinates:

$${\mathbf{q}} = \left( {q_{i} } \right)_{{i \in i_{{{\text{i}}_{\text{c}} }} \cup i_{{{\text{d}}_{\text{c}} }} }} \in \left\{ {{\mathbf{q}}_{{{\text{i}}_{\text{c}} }} ,{\mathbf{q}}_{{{\text{d}}_{\text{c}} }} } \right\},$$
(10)

where indices that \(i_{{{\text{i}}_{\text{c}} }} ,i_{{{\text{d}}_{\text{c}} }}\) stand for independent and dependent coordinates, respectively.

In our case, programmed motion of the crane is described by two constraint equations which will be detailed in the next section. It is assumed that coordinate partitioning is performed as follows:

$$\begin{aligned} & i_{{{\text{i}}_{\text{c}} }} \in \left\{ {1, \ldots ,7,9, \ldots ,n_{{{\text{dof}} - 1}} } \right\} \to \\ & {\mathbf{q}}_{{{\text{i}}_{\text{c}} }} = \left[ {\begin{array}{*{20}c} {x^{(b)} } & {y^{(b)} } & {z^{(b)} } & {\psi^{(b)} } & {\theta^{(b)} } & {\varphi^{(b)} } & {\psi^{(c,1)} } & {\psi^{(c,2,1)} } & \cdots & {\varphi^{{(c,2,n_{\text{rfe}}^{(2)} - 1)}} } \\ \end{array} } \right]^{\text{T}} \\ \end{aligned}$$
(11.1)
$$i_{{{\text{d}}_{\text{c}} }} \in \left\{ {8,n_{\text{dof}} } \right\} \to {\mathbf{q}}_{{{\text{d}}_{\text{c}} }} = \left[ {\begin{array}{*{20}c} {\psi^{(c,2,0)} } & {\psi^{(c,3)} } \\ \end{array} } \right]^{\text{T}} .$$
(11.2)

The transformation matrices from the local body frames to the global reference frame are calculated as follows:

  • base \((b)\)

    $${\mathbf{T}}^{(b)} = {\tilde{\mathbf{T}}}^{(b)} ,$$
    (12.1)
  • rotary column \((c,1)\)

    $${\mathbf{T}}^{(c,1)} = {\mathbf{T}}^{(b)} {\tilde{\mathbf{T}}}^{(c,1)} ,$$
    (12.2)
  • flexible link \((c,2)\)

    $$\left. {{\mathbf{T}}^{(c,2,i)} } \right|_{{i = 0,\, \ldots ,\,n_{\text{rfe}}^{(c,2)} - 1}} = {\mathbf{T}}^{(b)} \prod\limits_{j = 0}^{i} {{\tilde{\mathbf{T}}}^{(c,2,j)} } ,$$
    (12.3)
  • rigid link \((c,3)\)

    $${\mathbf{T}}^{(c,3)} = {\mathbf{T}}^{(b)} \prod\limits_{j = 0}^{{n_{\text{rfe}}^{(c,2)} - 1}} {{\tilde{\mathbf{T}}}^{(c,2,j)} } \,{\tilde{\mathbf{T}}}^{(c,3)} ,$$
    (12.4)

where

$${\tilde{\mathbf{T}}}^{(b)} = \left[ {\begin{array}{*{20}c} {{\text{c}}\psi^{(b)} {\text{c}}\theta^{(b)} } & {{\text{c}}\psi^{(b)} {\text{s}}\theta^{(b)} {\text{s}}\varphi^{(b)} - {\text{s}}\psi^{(b)} {\text{c}}\varphi^{(b)} } & {{\text{c}}\psi^{(b)} {\text{s}}\theta^{(b)} {\text{c}}\varphi^{(\alpha )} + {\text{s}}\psi^{(b)} {\text{s}}\varphi^{(b)} } & {x^{(b)} } \\ {{\text{s}}\psi^{(b)} {\text{c}}\theta^{(b)} } & {{\text{s}}\psi^{(b)} {\text{s}}\theta^{(b)} {\text{s}}\varphi^{(b)} + {\text{c}}\psi^{(b)} {\text{c}}\varphi^{(b)} } & {{\text{s}}\psi^{(b)} {\text{s}}\theta^{(b)} {\text{c}}\varphi^{(b)} - {\text{c}}\psi^{(b)} {\text{s}}\varphi^{(b)} } & {y^{(b)} } \\ { - {\text{s}}\theta^{(b)} } & {{\text{c}}\theta^{(b)} {\text{s}}\varphi^{(b)} } & {{\text{c}}\theta^{(b)} {\text{c}}\varphi^{(b)} } & {z^{(b)} } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right],$$
$$\begin{aligned} &\left. {{\tilde{\mathbf{T}}}^{(l)} } \right|_{l = (c,1)} = \left[ {\begin{array}{*{20}c} {{\text{c}}\psi^{(l)} } & { - {\text{s}}\psi^{(l)} } & 0 & 0 \\ {{\text{s}}\psi^{(l)} } & {{\text{c}}\psi^{(l)} } & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} } \right],\quad\\& \left. {{\tilde{\mathbf{T}}}^{(l)} } \right|_{l = (c,2,0)} = \left[ {\begin{array}{*{20}c} {{\text{c}}\psi^{(l)} } & { - {\text{s}}\psi^{(l)} } & 0 & 0 \\ {{\text{s}}\psi^{(l)} } & {{\text{c}}\psi^{(l)} } & 0 & 0 \\ 0 & 0 & 1 & {l^{(c,1)} } \\ 0 & 0 & 0 & 1 \\ \end{array} } \right] \end{aligned}$$
$$\left. {{\tilde{\mathbf{T}}}^{(l)} } \right|_{\begin{subarray}{l} l = (c,2,r) \\ r = 1, \ldots ,n_{\text{rfe}}^{(c,2)} - 1 \end{subarray} } = \left[ {\begin{array}{*{20}c} {{\text{c}}\psi^{(l)} {\text{c}}\theta^{(l)} } & {{\text{c}}\psi^{(l)} {\text{s}}\theta^{(b)} {\text{s}}\varphi^{(b)} - {\text{s}}\psi^{(l)} {\text{c}}\varphi^{(l)} } & {{\text{c}}\psi^{(l)} {\text{s}}\theta^{(l)} {\text{c}}\varphi^{(l)} + {\text{s}}\psi^{(l)} {\text{s}}\varphi^{(l)} } & {l^{(c,2,r - 1)} } \\ {{\text{s}}\psi^{(l)} {\text{c}}\theta^{(l)} } & {{\text{s}}\psi^{(l)} {\text{s}}\theta^{(l)} {\text{s}}\varphi^{(l)} + {\text{c}}\psi^{(l)} {\text{c}}\varphi^{(l)} } & {{\text{s}}\psi^{(l)} {\text{s}}\theta^{(l)} {\text{c}}\varphi^{(l)} - {\text{c}}\psi^{(l)} {\text{s}}\varphi^{(l)} } & 0 \\ { - {\text{s}}\theta^{(l)} } & {{\text{c}}\theta^{(l)} {\text{s}}\varphi^{(l)} } & {{\text{c}}\theta^{(l)} {\text{c}}\varphi^{(l)} } & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} } \right],$$
$$\left. {{\tilde{\mathbf{T}}}^{(l)} } \right|_{l = (c,3)} = \left[ {\begin{array}{*{20}c} {{\text{c}}\psi^{(l)} } & { - {\text{s}}\psi^{(l)} } & 0 & {l^{{(c,2,n_{\text{rfe}}^{(c,2)} - 1)}} } \\ {{\text{s}}\psi^{(l)} } & {{\text{c}}\psi^{(l)} } & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ \end{array} } \right],$$
$$\left. {{\text{s}}\alpha^{(l)} } \right|_{{\alpha \in \{ \psi ,\theta ,\varphi \} }} = { \sin }\alpha^{(l)} ,\quad \left. {{\text{c}}\alpha^{(l)} } \right|_{{\alpha \in \{ \psi ,\theta ,\varphi \} }} = { \cos }\alpha^{(l)} .$$

Friction Models for the Crane Joints

Friction torques in the revolute joints (\({\mathbf{t}}_{f}^{(c,j)}\)) are determined using the planar model of a revolute joint (Fig. 5). The recursive Newton–Euler algorithm is used to obtain the total joint forces and torques denoted by (\({\mathbf{f}}_{\alpha }^{(c,j)} ,\left. {{\mathbf{n}}_{\alpha }^{(c,j)} } \right|_{{\alpha \in \left\{ {x,y,z} \right\}}}\)) [21, 22].

Fig. 5
figure 5

Model of a revolute joint

The value of the friction torque in each of the revolute joints is calculated as

$$t_{f}^{(c,j)} = \mu^{(c,j)} f_{n}^{(c,j)} \frac{{d^{(c,j)} }}{2},$$
(13)

where \(f_{n}^{(c,j)} = \sqrt {\left( {f_{x}^{(c,j)} } \right)^{2} + \left( {f_{y}^{(c,j)} } \right)^{2} }\).

The Dahl and LuGre friction models are applied to model friction in the joints [16, 17, 23]. The Dahl model can capture many properties of friction, but does not capture the Stribeck effect, and thus cannot predict stick–slip. The LuGre friction model takes these effects into account and can model more accurately friction in the joints. Both the LuGre and Dahl methods require to solve additional state equations, in each integration step, that is

$${\dot{\mathbf{z}}}^{(c)} = \left\{ {\begin{array}{*{20}l} {{\text{Dahl}}\left( {t,{\mathbf{q}}^{(c)} ,{\mathbf{z}}^{(c)} } \right)} \hfill \\ {{\text{LuGre}}\left( {t,{\dot{\mathbf{q}}}^{(c)} ,{\mathbf{z}}^{(c)} } \right)} \hfill \\ \end{array} ,} \right.$$
(14)

where

$$\left( {{\text{Dahl}}_{i} } \right)_{i = 1,2,3} = \left. {\dot{q}_{i}^{(c)} \left( {1 - \frac{{\sigma_{0,i}^{(c)} z_{i}^{(c)} \text{sgn} \left( {\dot{q}_{i}^{(c)} } \right)}}{{\mu_{s,i}^{(c)} }}} \right)^{\gamma } } \right|_{\gamma \in [1,2]} ,$$
$$\left( {{\text{LuGre}}_{i} } \right)_{i = 1,2,3} = \dot{q}_{i}^{(c)} \left( {1 - \frac{{\sigma_{0,i}^{(c)} z_{i}^{(c)} \text{sgn} \left( {\dot{q}_{i}^{(c)} } \right)}}{{\mu_{k,i}^{(c)} + \left( {\mu_{s,i}^{(c)} - \mu_{k,i}^{(c)} } \right)exp\left( { - \left( {\frac{{\dot{q}_{i}^{(c)} }}{{\dot{\tilde{q}}_{S,i}^{(c)} }}} \right)^{2} } \right)}}} \right),$$
  • \({\mathbf{z}}_{{}}^{(c)} = \left( {z_{i}^{(c)} } \right)_{i = 1,2,3}\) is a vector of bristle deflections,

  • \({\mathbf{q}}^{(c)} = \left( {q_{i}^{(c)} } \right)_{i = 1,2,3} = \left[ {\begin{array}{*{20}c} {{\tilde{\mathbf{q}}}^{(c,1)} } & {{\tilde{\mathbf{q}}}^{(c,2,0)} } & {{\tilde{\mathbf{q}}}^{(c,3)} } \\ \end{array} } \right]^{\text{T}}\)—vector of the joint coordinates,

  • \({\varvec{\upsigma}}_{0}^{(c)} = \left( {\sigma_{0,i}^{(c)} } \right)_{i = 1,2,3} ,{\varvec{\upsigma}}_{1}^{(c)} = \left( {\sigma_{1,i}^{(c)} } \right)_{i = 1,2,3} ,{\varvec{\upsigma}}_{2}^{(c)} = \left( {\sigma_{2,i}^{(c)} } \right)_{i = 1,2,3}\) are vectors of stiffness, damping and viscous friction coefficients of bristles, respectively,

  • \({\varvec{\upmu}}_{s}^{(c)} = \left( {\mu_{s,i}^{(c)} } \right)_{i = 1,2,3}\), \({\varvec{\upmu}}_{k}^{(c)} = \left( {\mu_{k,i}^{(c)} } \right)_{i = 1,2,3}\) are vectors of static and kinetic friction coefficients, respectively,

  • \({\mathbf{\dot{\tilde{q}}}}_{S}^{(c)} = \left( {\dot{\tilde{q}}_{S,i}^{(c)} } \right)_{i = 1,2,3}\) is a vector of transition velocities between friction regimes.

Values of state variables are needed to calculate friction coefficients in the joints:

$${\varvec{\upmu}}^{(c)} = \left\{ {\begin{array}{*{20}l} {{\varvec{\upsigma}}_{0}^{(c)} {\mathbf{z}}^{(c)} } \hfill & - \hfill & {{\text{Dahl}}\,\,{\text{model}}\,\,\,} \hfill \\ {{\varvec{\upsigma}}_{0}^{(c)} {\mathbf{z}}^{(c)} + {\varvec{\upsigma}}_{1}^{(c)} {\dot{\mathbf{z}}}^{(c)} + {\varvec{\upsigma}}_{2}^{(c)} {\dot{\mathbf{q}}}^{(c)} } \hfill & - \hfill & {{\text{LuGre}}\,\,{\text{model}}} \hfill \\ \end{array} } \right..$$
(15)

The friction coefficients obtained from (15) can be further substituted into (13) to calculate the friction torques.

The Generalized Programmed Motion Equations of the Crane Model

The computational procedure dedicated to constrained dynamics generation is based upon the GPME [8, 9]. Their extension to rigid–flexible systems is developed in [11, 12]. The GPME are the constrained dynamics in the reduced state form, i.e., constrained reaction forces are eliminated in their derivation. Solutions to the GPME deliver positions and their time derivatives histories that satisfy constraints imposed upon the system. The GPME of a system with first-order programmed constraints have the form:

$$\left. {\frac{{\partial R_{1} }}{{\partial \dot{q}_{i} }}} \right|_{{i \in i_{{{\text{i}}_{\text{c}} }} }} + \sum\limits_{{j \in i_{{{\text{d}}_{\text{c}} }} }} {\frac{{\partial R_{1} }}{{\partial \dot{q}_{j} }}} \frac{{\partial \dot{q}_{j} }}{{\partial \dot{q}_{i} }} = 0,$$
(16)

where \(R_{1} = \dot{E}_{k} - 2\sum\limits_{i = 1}^{{n_{\text{dof}} }} {\frac{{\partial E_{k} }}{{\partial q_{i} }}\dot{q}_{i} } - \sum\limits_{i = 1}^{{n_{E} }} {\frac{{\partial E_{p} }}{{\partial q_{i} }}\dot{q}_{i} } - \sum\limits_{i = 1}^{{n_{\text{dof}} }} {t_{f,i} \dot{q}_{i} } - \sum\limits_{i = 1}^{{n_{\text{dof}} }} {t_{{{\text{dr}},i}}^{{}} \dot{q}_{i} }\),

  • \(E_{k} = E_{k}^{(b)} + E_{k}^{(c)}\)—total kinetic energy of the system,

  • \(E_{k}^{(b)} = \frac{1}{2}{\text{tr}}\left\{ {{\dot{\mathbf{T}}}^{(b)} {\mathbf{H}}^{(b)} \left( {{\dot{\mathbf{T}}}^{(b)} } \right)^{\text{T}} } \right\}\)–kinetic energy of base \((b)\),

  • \(E_{k}^{(c)} = \left\{ {\begin{array}{*{20}l} {\frac{1}{2}\sum\limits_{l = 1}^{{n_{l} - 1}} {{\text{tr}}\left\{ {{\dot{\mathbf{T}}}^{(c,l)} {\mathbf{H}}^{(c,l)} \left( {{\dot{\mathbf{T}}}^{(c,l)} } \right)^{\text{T}} } \right\}} } \hfill & - \hfill & {{\text{rigid}}\,\,{\text{link}}} \hfill \\ {\frac{1}{2}\left\{ {\sum\limits_{{l \in \{ 1,3\} }}^{{}} {{\text{tr}}\left\{ {{\dot{\mathbf{T}}}^{(c,l)} {\mathbf{H}}^{(c,l)} \left( {{\dot{\mathbf{T}}}^{(c,l)} } \right)^{\text{T}} } \right\}} + \sum\limits_{r = 0}^{{n_{\text{rfe}}^{(c,2)} }} {{\text{tr}}\left\{ {{\dot{\mathbf{T}}}^{(c,2,r)} {\mathbf{H}}^{(c,2,r)} \left( {{\dot{\mathbf{T}}}^{(c,2,r)} } \right)^{T} } \right\}} } \right\}} \hfill & - \hfill & {{\text{flexible}}\,\,{\text{link}}} \hfill \\ \end{array} } \right.\)—kinetic energy of the main structure of the crane \((c)\),

  • \({\mathbf{H}}^{(b)}\), \({\mathbf{H}}^{(c,l)}\), \({\mathbf{H}}^{(c,2,r)}\)—pseudo-inertia matrix of bodies \((b)\),\((c,l)\) and \({\text{rfe}}(c,2,r)\), respectively,

  • \(E_{p} = E_{p,g} + E_{{p,{ \sup }}} + E_{{p,f_{l} }}\)—total potential energy of the system,

  • \(E_{p,g} = E_{p,g}^{(b)} + E_{p,g}^{(c)}\)—potential energy of the gravity forces,

  • \(E_{p,g}^{(b)} = m^{(b)} g{\mathbf{J}}_{3} {\mathbf{T}}^{(b)} {\mathbf{r}}_{C}^{(b)}\)—potential energy of the gravity forces of the base \((b)\),

  • \(E_{p,g}^{(c)} = \left\{ {\begin{array}{*{20}c} {\sum\limits_{l = 1}^{{n_{l} - 1}} {m^{(c,l)} g{\mathbf{J}}_{3} {\mathbf{T}}^{(c,l)} {\mathbf{r}}_{C}^{(c,l)} } \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,} & - & {{\text{rigid}}\,\,{\text{link}}} \\ {\sum\limits_{{l \in \{ 1,3\} }}^{{}} {m^{(c,l)} g{\mathbf{J}}_{3} {\mathbf{T}}^{(c,l)} {\mathbf{r}}_{C}^{(c,l)} } + \sum\limits_{r = 0}^{{n_{rfe}^{(c,2)} }} {m^{(c,2,r)} g{\mathbf{J}}_{3} {\mathbf{T}}^{(c,2,r)} {\mathbf{r}}_{C}^{(c,2,r)} } } & - & {{\text{flexible}}\,\,{\text{link}}} \\ \end{array} } \right.\)—potential energy of the gravity forces of the main structure of the crane \((c)\),

  • \(m^{(b)}\), \(m^{(c,l)}\), \(m^{(c,2,r)}\)—mass of bodies \((b)\),\((c,l)\) and \({\text{rfe}}(c,2,r)\), respectively,

  • \(g\)—the gravity acceleration,

  • \({\mathbf{r}}_{C}^{(b)}\), \({\mathbf{r}}_{C}^{(c,l)}\), \({\mathbf{r}}_{C}^{(c,2,r)}\)—position vectors of mass centres of bodies \((b)\),\((c,l)\) and \({\text{rfe}}(c,2,r)\), respectively,

$${\mathbf{J}} = \left[ {\begin{array}{*{20}c} {{\mathbf{J}}_{1} } \\ {{\mathbf{J}}_{2} } \\ {{\mathbf{J}}_{3} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} 1 &\quad 0 &\quad 0 &\quad 0 \\ 0 &\quad 1 &\quad 0 &\quad 0 \\ 0 &\quad 0 &\quad 1 &\quad 0 \\ \end{array} } \right],$$
  • \(E_{{p,{ \sup }}} = \frac{1}{2}\sum\limits_{s = 1}^{{n_{s} }} {\left( {{\mathbf{d}}^{{({ \sup },s)}} } \right)^{\text{T}} {\mathbf{S}}^{{({ \sup },s)}} {\mathbf{d}}^{{({ \sup },s)}} },\)\({\mathbf{d}}^{{({ \sup },s)}} = {\mathbf{U}}^{{({ \sup },s)}} {\tilde{\mathbf{q}}}^{(b)}\)—potential energy of spring deformation of the supports,

  • \({\mathbf{U}}^{{({ \sup },s)}} = \left[ {\begin{array}{*{20}c} 1 & 0 & 0 &\vline & { - y^{{({ \sup },s)}} } & {z^{{({ \sup },s)}} } & 0 \\ 0 & 1 & 0 &\vline & {x^{{({ \sup },s)}} } & 0 & { - z^{{({ \sup },s)}} } \\ 0 & 0 & 1 &\vline & 0 & { - x^{{({ \sup },s)}} } & {y^{{({ \sup },s)}} } \\ \end{array} } \right],\)\({\mathbf{S}}^{{({ \sup },s)}} = {\text{diag}}\left\{ {s_{x}^{{({ \sup },s)}} ,s_{y}^{{({ \sup },s)}} ,s_{z}^{{({ \sup },s)}} } \right\}\)—stiffness matrix of the support \(({ \sup },s)\),

  • \(E_{{p,f_{l} }} = \frac{1}{2}\sum\limits_{s = 1}^{{n_{\text{sde}}^{(c,2)} }} {\left( {{\tilde{\mathbf{q}}}^{(c,2,s)} } \right)^{\text{T}} } {\mathbf{S}}^{(c,2,s)} {\tilde{\mathbf{q}}}^{(c,2,s)}\)—potential energy of spring deformation of the body \((c,2)\),

  • \({\mathbf{S}}^{(c,2,s)} = {\text{diag}}\left\{ {s_{\psi }^{(c,2,s)} ,s_{\theta }^{(c,2,s)} ,s_{\varphi }^{(c,2,s)} } \right\}\)—stiffness matrix of the link \((c,2)\),

  • \({\mathbf{t}}_{\text{dr}} = \left( {t_{{{\text{dr}},i}} } \right)_{{i = 1,\, \ldots ,\,n_{\text{dof}} }} = \left[ {\begin{array}{*{20}c} {\mathbf{0}} & {t_{\text{dr}}^{(c,1)} } & {\mathbf{0}} \\ \end{array} } \right]^{\text{T}}\)—vector of generalized forces from the driving torques,

  • \({\mathbf{t}}_{f} = \left( {t_{f,i} } \right)_{{i = 1,\, \ldots ,\,n_{\text{dof}} }} = \left[ {\begin{array}{*{20}c} {\mathbf{0}} & {t_{f}^{(c,1)} } & {t_{f}^{(c,2,0)} } & {\mathbf{0}} & {t_{f}^{(c,3)} } \\ \end{array} } \right]^{\text{T}}\)—vector of generalized forces from friction in the joints.

Programmed Constraint Equations on the Crane Work Regime

The programmed constraints are imposed on the end-effector E motion. It moves along an elliptical trajectory as projected on the plane \({\hat{\mathbf{x}}}^{(0)} {\hat{\mathbf{y}}}^{(0)}\) and the coordinate \(z_{E}^{(0)}\) has to change according to a given time function \(z_{E,a}^{(0)} (t)\). Thus, the programmed constraint equations can be written as follows:

$$\varPhi_{1} \equiv 0 \Rightarrow \left( {\frac{{x_{E}^{(0)} }}{{a_{E,a}^{(0)} }}} \right)^{2} + \left( {\frac{{y_{E}^{(0)} }}{{b_{E,a}^{(0)} }}} \right)^{2} - 1 = 0$$
(17.1)
$$\varPhi_{2} \equiv 0 \Rightarrow z_{E}^{(0)} - z_{E,a}^{(0)} = 0,$$
(17.2)

where \(x_{E}^{(0)} = {\mathbf{J}}_{1} {\mathbf{T}}^{(c,3)} {\mathbf{r}}_{E}^{(c,3)},\)\(y_{E}^{(0)} = {\mathbf{J}}_{2} {\mathbf{T}}^{(c,3)} {\mathbf{r}}_{E}^{(c,3)},\)\(z_{E}^{(0)} = {\mathbf{J}}_{3} {\mathbf{T}}^{(c,3)} {\mathbf{r}}_{E}^{(c,3)}\)

According to constrained dynamics derivation method [8, 9], constraints (17.1) and (17.2) are differentiated twice:

$$\dot{\varPhi }_{1} \equiv 0 \Rightarrow {\mathbf{u\dot{q}}}^{{}} = 0,$$
(18.1)
$$\dot{\varPhi }_{2} \equiv 0 \Rightarrow {\mathbf{c}}_{3} {\dot{\mathbf{q}}} - \dot{z}_{E,a}^{(0)} = 0,$$
(18.2)
$$\ddot{\varPhi }_{1} \equiv 0 \Rightarrow {\mathbf{u\ddot{q}}} + v = 0,$$
(18.3)
$$\ddot{\varPhi }_{2} \equiv 0 \Rightarrow {\mathbf{c}}_{3} {\mathbf{\ddot{q}}} + {\mathbf{d}}_{3} - \ddot{z}_{E,a}^{(0)} = 0,$$
(18.4)

where \({\mathbf{C}} = \left[ {\begin{array}{*{20}c} {{\mathbf{c}}_{1} } \\ {{\mathbf{c}}_{2} } \\ {{\mathbf{c}}_{3} } \\ \end{array} } \right] = \left( {c_{ij} } \right)_{\begin{subarray}{l} i = 1,2,3 \\ j = 1, \ldots ,n_{\text{dof}} \end{subarray} } = {\mathbf{J}}\left[ {\begin{array}{*{20}c} {{\mathbf{T}}_{1}^{(c,3)} {\mathbf{r}}_{E}^{(c,3)} } & \cdots & {{\mathbf{T}}_{{n_{\text{dof}} }}^{(c,3)} {\mathbf{r}}_{E}^{(c,3)} } \\ \end{array} } \right]\),\({\mathbf{d}} = \left( {d_{i} } \right)_{i = 1, \ldots ,3} = {\mathbf{J}}\left( {\left( {\sum\limits_{i = 1}^{{n_{\text{dof}}^{{}} }} {\sum\limits_{j = 1}^{{n_{\text{dof}}^{{}} }} {{\mathbf{T}}_{ij}^{(c,3)} \dot{q}_{i}^{{}} \dot{q}_{j}^{{}} } } } \right){\mathbf{r}}_{E}^{(c,3)} } \right)\),\({\mathbf{u}} = \left( {u_{j} } \right)_{{j = 1, \ldots ,n_{\text{dof}} }} = \frac{1}{{\left( {a_{E,a}^{(0)} } \right)^{2} }}{\mathbf{J}}_{1} {\mathbf{T}}^{(c,3)} {\mathbf{r}}_{E}^{(c,3)} {\mathbf{c}}_{1} + \frac{1}{{\left( {b_{E,a}^{(0)} } \right)^{2} }}{\mathbf{J}}_{2} {\mathbf{T}}^{(c,3)} {\mathbf{r}}_{E}^{(c,3)} {\mathbf{c}}_{2}\),

$$v = \frac{1}{{\left( {a_{E,a}^{(0)} } \right)^{2} }}\left( {\left( {{\mathbf{c}}_{1} {\dot{\mathbf{q}}}} \right)^{2} + {\mathbf{J}}_{1} {\mathbf{T}}^{(c,3)} {\mathbf{r}}_{E}^{(c,3)} d_{1} } \right) + \frac{1}{{\left( {b_{E,a}^{(0)} } \right)^{2} }}\left( {\left( {{\mathbf{c}}_{2} {\dot{\mathbf{q}}}} \right)^{2} + {\mathbf{J}}_{2} {\mathbf{T}}^{(c,3)} {\mathbf{r}}_{E}^{(c,3)} d_{2} } \right),$$
$${\mathbf{T}}_{i}^{( \cdot )} = \frac{{\partial {\mathbf{T}}_{{}}^{( \cdot )} }}{{\partial q_{i} }},{\mathbf{T}}_{ij}^{( \cdot )} = \frac{{\partial^{2} {\mathbf{T}}_{{}}^{( \cdot )} }}{{\partial q_{i} \partial q_{j} }}.$$

The vector of dependent velocities determined from (18.1) and (18.2) has the form:

$${\dot{\mathbf{q}}}_{{{\text{d}}_{\text{c}} }} = {\mathbf{K}}_{{{\text{d}}_{\text{c}} }}^{ - 1} \left[ {{\mathbf{k}}_{a} - {\mathbf{K}}_{{{\text{i}}_{\text{c}} }}^{{}} {\dot{\mathbf{q}}}_{{{\text{i}}_{\text{c}} }} } \right],$$
(19)

with \({\mathbf{K}}_{{{\text{d}}_{\text{c}} }} = \left[ {\begin{array}{*{20}c} {u_{8} } & {u_{{n_{\text{dof}} }} } \\ {c_{18} } & {c_{{1n_{\text{dof}} }} } \\ \end{array} } \right]\), \({\mathbf{K}}_{{{\text{i}}_{\text{c}} }} = \left[ {\begin{array}{*{20}c} {u_{1} } & \cdots & {u_{7} } & {u_{9} } & \cdots & {u_{{n_{\text{dof}} - 1}} } \\ {c_{11} } & \cdots & {c_{17} } & {c_{19} } & \cdots & {c_{{1n_{\text{dof}} - 1}} } \\ \end{array} } \right]\), \({\mathbf{k}}_{a} = \left[ {\begin{array}{*{20}c} 0 \\ {\ddot{z}_{E,a}^{(0)} } \\ \end{array} } \right]\).

Formulas for dependent generalized velocities will be further used to transform them into functions of independent generalized velocities.

The GPME for the Crane Model

Performing all calculations as indicated in (16), taking (13), (18), and (19) into account, the final dynamic equations of the programmed motion can be written as

$$\begin{aligned} & \left[ {\begin{array}{*{20}c} {\left. {{\mathbf{M}}_{i} } \right|_{{i \in i_{{{\text{i}}_{\text{c}} }} }} + \sum\limits_{{j \in i_{{{\text{d}}_{\text{c}} }} }}^{{}} {{\mathbf{M}}_{j} \frac{{\partial \dot{q}_{j} }}{{\partial \dot{q}_{i} }}} } \\ {\mathbf{u}} \\ {{\mathbf{c}}_{3} } \\ \end{array} } \right]{\mathbf{\ddot{q}}} = \\ & = \left[ {\begin{array}{*{20}c} {{\mathbf{h}}_{i} + {\mathbf{Q}}_{i} + \sum\limits_{{j \in i_{{{\text{i}}_{\text{c}} }} \cup \,i_{{{\text{d}}_{\text{c}} }} }}^{{}} {\dot{q}_{j} } \frac{{\partial Q_{j} }}{{\partial \dot{q}_{i} }} + \sum\limits_{{k \in i_{{{\text{d}}_{\text{c}} }} }}^{{}} {\left( {h_{k} + Q_{k} + \sum\limits_{{j \in i_{{{\text{i}}_{\text{c}} }} \cup \,i_{{{\text{d}}_{\text{c}} }} }}^{{}} {\dot{q}_{j} } \frac{{\partial Q_{j} }}{{\partial \dot{q}_{k} }}} \right)\frac{{\partial \dot{q}_{k} }}{{\partial \dot{q}_{i} }}} } \\ { - v} \\ {\ddot{z}_{E,a}^{(0)} - {\mathbf{d}}_{3} } \\ \end{array} } \right], \\ \end{aligned}$$
(20)

where \({\mathbf{M}} = {\mathbf{M}}^{(b)} + {\mathbf{M}}^{(c)}\),

$${\mathbf{M}}^{(b)} = \left[ {\begin{array}{*{20}c} {{\mathbf{M}}_{1,1}^{(b)} } & {\mathbf{0}} \\ {\mathbf{0}} & {\mathbf{0}} \\ \end{array} } \right],\quad {\mathbf{M}}^{(c)} = \left[ {\begin{array}{*{20}c} {{\mathbf{M}}_{1,1}^{(c)} } & \cdots & {{\mathbf{M}}_{1,j}^{(c)} } & \cdots & {{\mathbf{M}}_{{1,n_{b} - 1}}^{(c)} } \\ \vdots & \ddots & \vdots & {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} & \vdots \\ {{\mathbf{M}}_{i,1}^{(c)} } & \cdots & {{\mathbf{M}}_{i,j}^{(c)} } & \cdots & {{\mathbf{M}}_{{i,n_{b} - 1}}^{(c)} } \\ \vdots & {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} & \vdots & \ddots & \vdots \\ {{\mathbf{M}}_{{n_{b} - 1,1}}^{(c)} } & \cdots & {{\mathbf{M}}_{{n_{b} - 1,j}}^{(c)} } & \cdots & {{\mathbf{M}}_{{n_{b} - 1,n_{b} - 1}}^{(c)} } \\ \end{array} } \right],$$
$${\mathbf{M}}_{1,1}^{(b)} = \left( {m_{ij}^{(b)} } \right)_{{i,j = 1, \ldots ,n_{\text{dof}}^{(b)} }} ,\quad m_{ij}^{(b)} = {\text{tr}}\left\{ {{\mathbf{T}}_{i}^{(b)} {\mathbf{H}}_{{}}^{(b)} \left( {{\mathbf{T}}_{j}^{(b)} } \right)^{\text{T}} } \right\}s$$
$${\mathbf{M}}_{i,j}^{(c)} = \sum\limits_{l = 1}^{{n_{b} - 1}} {{\mathbf{M}}^{(c,l)} } ,\quad {\mathbf{M}}^{(c,l)} = \left( {m_{ij}^{(c,l)} } \right)_{{i,j = 1, \ldots ,n_{\text{dof}}^{(c.l)} }} ,\quad m_{ij}^{(c,l)} = {\text{tr}}\left\{ {{\mathbf{T}}_{i}^{(c,l)} {\mathbf{H}}_{{}}^{(c,l)} \left( {{\mathbf{T}}_{j}^{(c,l)} } \right)^{\text{T}} } \right\},$$
$${\mathbf{h}} = {\mathbf{h}}^{(b)} + {\mathbf{h}}^{(c)} ,$$
$${\mathbf{h}}^{(b)} = \left[ {\begin{array}{*{20}c} {{\mathbf{h}}_{1}^{(b)} } \\ {\mathbf{0}} \\ \end{array} } \right],\quad {\mathbf{h}}^{(c)} = \left[ {\begin{array}{*{20}c} {{\mathbf{h}}_{1}^{(c)} } \\ \vdots \\ {{\mathbf{h}}_{i}^{(c)} } \\ \vdots \\ {{\mathbf{h}}_{{n_{b} - 1}}^{(c)} } \\ \end{array} } \right]$$
$${\mathbf{h}}_{1}^{(b)} = \left( {h_{i}^{(b)} } \right)_{{i = 1, \ldots ,n_{\text{dof}}^{(b)} }} ,$$
$$\,h_{i}^{(b)} = \sum\limits_{m = 1}^{{n_{\text{dof}}^{(b)} }} {\sum\limits_{n = 1}^{{n_{\text{dof}}^{(b)} }} {{\text{tr}}\left\{ {{\mathbf{T}}_{m}^{(b)} {\mathbf{H}}_{{}}^{(b)} \left( {{\mathbf{T}}_{m,n}^{(b)} } \right)^{\text{T}} } \right\}\dot{q}_{m}^{(b)} \dot{q}_{n}^{(b)} } } + 2\sum\limits_{m = 1}^{{n_{\text{dof}}^{(b)} }} {\sum\limits_{n = 1}^{{n_{\text{dof}}^{(b)} }} {{\text{tr}}\left\{ {{\mathbf{T}}_{m}^{(b)} {\mathbf{H}}_{{}}^{(b)} \left( {{\mathbf{T}}_{i,n}^{(b)} } \right)^{\text{T}} } \right\}\dot{q}_{m}^{(b)} \dot{q}_{n}^{(b)} } } ,$$
$${\mathbf{h}}_{i}^{(c)} = \sum\limits_{l = 1}^{{n_{b} - 1}} {{\mathbf{h}}^{(c,l)} } ,$$
$${\mathbf{h}}_{{}}^{(c,l)} = \left( {h_{i}^{(c,l)} } \right)_{{i = 1, \ldots ,n_{\text{dof}}^{(c,l)} }} ,$$
$$\begin{aligned} h_{i}^{(c,l)} & = \sum\limits_{m = 1}^{{n_{\text{dof}}^{(c,l)} }} {\sum\limits_{n = 1}^{{n_{\text{dof}}^{(c,l)} }} {{\text{tr}}\left\{ {{\mathbf{T}}_{m}^{(c,l)} {\mathbf{H}}_{{}}^{(c,l)} \left( {{\mathbf{T}}_{m,n}^{(c,l)} } \right)^{\text{T}} } \right\}\dot{q}_{m}^{(c,l)} \dot{q}_{n}^{(c,l)} } } + \\ & \quad + 2\sum\limits_{m = 1}^{{n_{\text{dof}}^{(c,l)} }} {\sum\limits_{n = 1}^{{n_{\text{dof}}^{(c,l)} }} {{\text{tr}}\left\{ {{\mathbf{T}}_{m}^{(c,l)} {\mathbf{H}}_{{}}^{(c,l)} \left( {{\mathbf{T}}_{i,n}^{(c,l)} } \right)^{\text{T}} } \right\}\dot{q}_{m}^{(c,l)} \dot{q}_{n}^{(c,l)} ,} } \\ \end{aligned}$$
$${\mathbf{Q}} = {\mathbf{g}} + {\mathbf{f}}_{ \sup } + {\mathbf{f}}_{l} + {\mathbf{t}}_{\text{dr}} + {\mathbf{t}}_{f} ,$$
$${\mathbf{g}} = {\mathbf{g}}^{(b)} + {\mathbf{g}}^{(c)} ,$$
$${\mathbf{g}}^{(b)} = \left[ {\begin{array}{*{20}c} {{\mathbf{g}}_{1}^{(b)} } \\ {\mathbf{0}} \\ \end{array} } \right],\quad {\mathbf{g}}^{(c)} = \left[ {\begin{array}{*{20}c} {{\mathbf{g}}_{1}^{(c)} } \\ \vdots \\ {{\mathbf{g}}_{i}^{(c)} } \\ \vdots \\ {{\mathbf{g}}_{{n_{b} - 1}}^{(c)} } \\ \end{array} } \right]$$
$${\mathbf{g}}_{1}^{(b)} = \left( {g_{i}^{(b)} } \right)_{{i = 1, \ldots ,n_{\text{dof}}^{(b)} }} ,\quad g_{i}^{(b)} = m^{(b)} g{\mathbf{j}}_{3} {\mathbf{T}}_{i}^{(b)} {\mathbf{r}}_{C}^{(b)}$$
$${\mathbf{g}}_{i}^{(c)} = \sum\limits_{l = 1}^{{n_{b} - 1}} {{\mathbf{g}}^{(c,l)} } ,\quad {\mathbf{g}}^{(c,l)} = \left( {g_{i}^{(c,l)} } \right)_{{i = 1, \ldots ,n_{dof}^{(c,l)} }} ,\quad g_{i}^{(c,l)} = m^{(c,l)} g{\mathbf{J}}_{3} {\mathbf{T}}_{i}^{(c,l)} {\mathbf{r}}_{C}^{(c,l)} ,$$
$${\mathbf{f}}_{ \sup } = \left[ {\begin{array}{*{20}c} {{\mathbf{s}}_{ \sup }^{\text{T}} } & {\mathbf{0}} \\ \end{array} } \right]^{\text{T}} ,\quad {\mathbf{s}}_{ \sup } = \left( {\sum\limits_{s = 1}^{{n_{s} }} {\left( {{\mathbf{U}}^{{({ \sup },s)}} } \right)^{\text{T}} {\mathbf{S}}^{{({ \sup },s)}} {\mathbf{U}}^{{({ \sup },s)}} } } \right){\tilde{\mathbf{q}}}^{(b)}$$
$${\mathbf{f}}_{l} = \left[ {\begin{array}{*{20}c} {\mathbf{0}} & {{\mathbf{s}}_{l}^{\text{T}} } & {\mathbf{0}} \\ \end{array} } \right]^{\text{T}} ,\quad {\mathbf{s}}_{l} = {\mathbf{S}}^{(c,2)} {\tilde{\mathbf{q}}}^{(c,2)} ,$$
$${\mathbf{S}}^{(c,2)} = {\text{diag}}\left\{ {0,{\mathbf{S}}^{(c,2,1)} , \ldots ,{\mathbf{S}}^{(c,2,r)} , \ldots ,{\mathbf{S}}^{{(c,2,n_{\text{rfe}}^{(c,2)} )}} } \right\}$$
$$\,\frac{{\partial {\dot{\mathbf{q}}}_{{{\text{d}}_{\text{c}} }}^{{}} }}{{\partial {\dot{\mathbf{q}}}_{{{\text{i}}_{\text{c}} }}^{{}} }} = - {\mathbf{K}}_{{{\text{d}}_{\text{c}} }}^{ - 1} {\mathbf{K}}_{{{\text{i}}_{\text{c}} }}^{{}} .$$

The GPME form a set of \(n_{\text{dof}}\) ordinary differential equations. The main advantage of the presented derivation procedure is that the constraint reaction forces are eliminated. The number of GPME is equal to the number of the system degrees of freedom. In addition, using the joint coordinates, motion of the system is described by the minimal set of coordinates.

Numerical Study Results

Numerical studies focus upon influence of friction in joints and link flexibility on the programmed motion execution during the crane motion. It is assumed that the crane is driven by the torque applied to the rotary column \((c,1)\), which is

$$t_{\text{dr}}^{(c,1)} (t) = \left\{ {\begin{array}{*{20}l} { - 4000\,{\text{Nm,}}} \hfill & {0 \le t \le 0.1\,{\text{s,}}} \hfill \\ {0\,{\text{Nm,}}} \hfill & {t > 0.1\,{\text{s}} .} \hfill \\ \end{array} ,} \right.$$
(21)

The end effector of the crane, point E, has to satisfy programmed constraints which are described by Eqs. (17) and (18). It is assumed that the ellipse’s semi-major and semi-minor axes are \(a_{E,a}^{(0)} = 3\,{\text{m}}\), \(b_{E,a}^{(0)} = 2\,{\text{m}}\), respectively. In addition, the time course of z coordinate of the end effector is defined as

$$z_{E,a}^{(0)} = \left\{ {\begin{array}{*{20}l} {z_{E,s}^{(0)} + 10\frac{{z_{\text{inc}}^{(0)} }}{{t_{c}^{3} }}t^{3} - 15\frac{{z_{\text{inc}}^{(0)} }}{{t_{c}^{4} }}t^{4} + 6\frac{{z_{\text{inc}}^{(0)} }}{{t_{c}^{5} }}t^{5} } \hfill & {{\text{for}}\,\,0 \le t < t_{c} } \hfill \\ {z_{E,c}^{(0)} } \hfill & {{\text{for}}\,\,t \ge t_{c} } \hfill \\ \end{array} } \right.,$$
(22)

where \(z_{inc}^{(0)} = z_{E,c}^{(0)} - z_{E,s}^{(0)}\), \(z_{E,c}^{(0)} , \, z_{E,s}^{(0)}\) are the end-effector initial and final positions in \({\hat{\mathbf{z}}}_{{}}^{(0)}\) direction, respectively, and \(t_{c}\) stands for the time at which the final position of the end effector is reached. Values of these parameters applied in simulations are as follows: \(t_{c} = 1{\text{ s}}\), \(z_{E,s}^{(0)} = z_{{E,{\text{static}}}}^{(0)}\), \(z_{E,c}^{(0)} = \,z_{E,s}^{(0)} + 0.2\,{\text{m}}\), and \(z_{{E,{\text{static}}}}^{(0)}\) is the position obtained from solutions of the static analysis.

The flexible link \((c,2)\) is divided into 4 rfes. Such division allows us to achieve sufficient accuracy of results with acceptable computation time. The initial configuration of the crane is defined as

$$\begin{array}{*{20}l} {x^{(b)} = y^{(b)} = z^{(b)} = 0{\text{ m,}}} \hfill &\vline & {\dot{x}^{(b)} = \dot{y}^{(b)} = \dot{z}^{(b)} = 0{\text{ ms}}^{ - 1} ,} \hfill \\ {\varphi^{(b)} = \theta^{(b)} = \psi^{(b)} = 0{\text{ rad,}}} \hfill &\vline & {\dot{\varphi }^{(b)} = \dot{\theta }^{(b)} = \dot{\psi }^{(b)} = 0{\text{ rads}}^{ - 1} ,} \hfill \\ {\varphi^{(c,1)} = \frac{3}{2}\pi {\text{ rad,}}} \hfill &\vline & {\dot{\varphi }^{(c,1)} = 0{\text{ rads}}^{ - 1} ,} \hfill \\ {\varphi^{(c,2,0)} = \frac{1}{4}\pi {\text{ rad,}}} \hfill &\vline & {\dot{\varphi }^{(c,2,0)} = 0{\text{ rads}}^{ - 1} ,} \hfill \\ {\varphi^{(c,3)} = \frac{3}{2}\pi {\text{ rad,}}} \hfill &\vline & {\dot{\varphi }^{(c,3)} = 0{\text{ rads}}^{ - 1} .} \hfill \\ \end{array}$$
(23)

The flexible link is initially undeformed. It is assumed that the base of the crane is flexibly supported in 8 points by the springs, which parameters are \(\left. {s_{x}^{{({ \sup },s)}} } \right|_{s = 1,\, \ldots ,\,8} = \left. {s_{y}^{{({ \sup },s)}} } \right|_{s = 1,\, \ldots ,\,8} = 10^{5} \,{\text{Nm}}^{ - 1}\), \(\left. {s_{z}^{{({ \sup },s)}} } \right|_{s = 1,\, \ldots ,\,8} = 10^{7} \,{\text{Nm}}^{ - 1}\).

The crane joint friction parameters applied for the Dahl and LuGre friction models are gathered in Table 1. They were selected based upon data reported in the literature, see, e.g., [23].

Table 1 Parameters of the Dahl and LuGre friction models

The GPME were integrated using the Runge–Kutta fourth-order scheme with a constant step size of \(h = 2.5 \times 10^{ - 4} \,{\text{s}}\). Inaccuracies which occur during numerical integration of motion equations can lead to constraint violations at the position and velocity levels. The Baumgarte method is applied to eliminate these violations [24]. In simulations, the parameters selected to the Baumgarte method are: α = 110 and β = 20. The values of these parameters are relatively large, but smaller values may lead to some constraint inconsistencies and erroneous solutions. First series of simulation tests were performed for the crane with all rigid links. The influence of friction, modeled by the Dahl and LuGre models, on time courses of joint coordinates obtained, as solutions of the dynamic model with the programmed constraints were analysed. These time courses and the course of the end-effector coordinate \(z_{E}^{(0)}\) and its trajectory are shown in Fig. 6.

Fig. 6
figure 6

Time courses of the joint coordinates in the programmed motion for the crane with rigid links

It can be observed that friction has significant influence on the time courses of the joint coordinates of links \((c,2)\) and \((c,3)\) which perform the assumed programmed motion. This influence is smaller on motion of the rotary column \((c,1)\). It can also be seen that both models of friction provide similar results. It can be concluded that the inclusion of friction into the GPME introduces a dissipative effect. Trajectory plots (Fig. 6e) show that the initial position of the end effector is outside of the planned trajectory. The constraint equations for the elliptical trajectory are satisfied after 1.25 s. Figure 7 presents time courses of the joint coordinates obtained for the model with the flexible link \((c,2).\)

Fig. 7
figure 7

Time courses of the joint coordinates and the programmed motion obtained for the crane with the flexible link

The second series of simulation tests examined the flexibility effect on the crane constrained dynamics. It leads to additional vibrations of the joints. Adding joint friction to the dynamic model in the programmed motion execution leads to smoother time courses of the joint coordinates and additional oscillations, present when friction is absent, are suppressed. From Fig. 6b, c, it can be seen that the Dahl friction model introduces larger resistance to motion of the joints than the LuGre friction model. Based upon these simulation studies, the programmed constraints can be adjusted or the constrained dynamics solutions can serve as motion planners for the controller, which has to compensate vibrations.

Furthermore, the influence of the vertical stiffness of the flexible supports on vibration of the system and execution of the programmed motion is analysed. In the simulation, it is assumed that all links are rigid and friction in the joints is described according to the LuGre friction model. Figure 8 shows time courses of the selected joint coordinates obtained for different vertical stiffness coefficients for the model with friction in joints.

Fig. 8
figure 8

Time courses of the joint coordinates for the crane with rigid links and friction in the joints

Analyzing the plots, it can be observed that lower stiffness of the support leads to more complex behavior of the crane links to achieve the assumed programmed constraints. It can also be noted that it increases the amplitude of displacements of the base in \({\hat{\mathbf{z}}}^{(b)}\) direction and rotations around \({\hat{\mathbf{x}}}^{(b)}\)- and \({\hat{\mathbf{y}}}^{(b)}\)-axes.

Conclusions

A model of the dynamics of a crane subjected to constraints has been derived in this paper. The novelty of the presented approach is that the computationally automated procedure for generation of the crane dynamics subjected to programmed constraints is applied. In the crane model, the base support and one of the links flexibility, together with friction in the joints, are taken into account. The automated procedure for generating the crane dynamics is based upon the GPME and application of the joint coordinates and the homogenous transformation matrices. The RFEM is applied to discretise the flexible link. The main advantage of the RFEM, in comparison with formulations based on the finite-element method, is the possibility of generating dynamic equations by modifications of the algorithm applied to rigid body systems. Numerical simulations demonstrate that the link flexibility adds additional vibrations to the system. Friction in joints is introduced by the Dahl and LuGre models. Time courses of joint coordinates obtained from the crane-constrained dynamics can be further used as reference variables to control programmed motions. In future research, it is planned to apply the proposed dynamics model to real-time control of the crane motion.