1 Introduction

Underactuated mechanical systems have fewer control inputs/outputs than degrees of freedom. When the systems are underactuated, it is highly challenging to solve inverse dynamics problems.

A specific projection approach [9,10,11] has already been applied to solve some inverse dynamics problems, see also [7, 23]. In the present work we use a recently developed method [2, 8] to determine the control inputs that force underactuated mechanical systems to complete the partly specified motion. The partly specified motion can be described by servo constraints [9, 14, 17, 19, 22], in which the desired control outputs (specified in time) are expressed in terms of state variables and can be modeled as constraints on the system. Therefore, the concept of servo constraints can be used to deal with the inverse dynamics problems. Our proposed approach mainly relies on servo and holonomic constraints. In this paper servo constraints focus on the specification of trajectories of a specific point of a multibody system such as the payload of a crane system.

The partial specification of the motion of underactuated mechanical systems with servo constraints typically leads to a mathematical formulation in the form of differential-algebraic equations (DAEs). If minimal coordinates are used, the differential equations of the DAEs correspond to the dynamic equations of the system while the algebraic equations are related to servo constraints. Servo constraints enforce the desired motion along the prescribed trajectory and thus specify the control outputs of the system. To determine the associated control inputs that are required to force the system to execute the prescribed trajectory, the DAEs need to be solved. In this way a feedforward control law is provided for the underactuated mechanical system in the partly specified motion. If possible external disturbances or perturbations are present, the solution can then be modified to include the feedback control to provide the stable tracking of the required reference load trajectory. A closed-loop control strategy with feedback of the actual errors can thus be constructed (see [5, 11] for more details).

If fully actuated mechanical systems are considered, the formulation with servo constraints for the inverse dynamics simulation yields a set of index-3 DAEs that can be integrated in analogy to DAEs corresponding to constrained mechanical systems (see, for example, [21]). However, the situation changes considerably if underactuated mechanical systems are dealt with. Examples of underactuated systems are cranes and flexible multibody systems.

The use of servo constraints in the context of underactuated multibody systems leads to a broad diversity of servo-constraint problems (see [1, 4, 10, 12, 20]). One indicator of problem diversity is the (differentiation) index of the underlying DAEs that typically ranges from three to five and even higher. Consequently, to facilitate a stable numerical integration, an index reduction approach needs to be applied.

To reduce the high index of DAEs, we apply a specific method, called index reduction by minimal extension [2, 8, 16, 22], to solve servo-constraint problems of underactuated mechanical systems. The method is based on the introduction of new algebraic variables (dummy derivatives) along with the enlargement of DAEs by appending time derivatives of the constraints. By exploiting the specific structure provided by underactuated multibody systems, we have applied the method [2, 8] to servo-constraint problems of a family of differentially flat cranes which are formulated either by minimal or redundant coordinates. Servo-constraint problems dealing with differentially flat cranes are typically based on index-5 DAEs. It turned out that index reduction by minimal extension is a viable alternative to the aforementioned projection approach.

In the present work we apply index reduction by minimal extension to much more complicated servo-constraint problems, which have not been approached before. In particular, we focus on a uniform modeling framework for a large class of cranes and weight handling equipments developed in [15]. The modeling approach proposed in [15] is based on the use of a uniform set of redundant coordinates which are associated with a singular inertia matrix. Due to the noninvertibility of the inertia matrix, it is not obvious how to apply the alternative projection method for the solution of the servo-constraint problems resulting from the involved crane systems considered herein. In sharp contrast to that, index reduction by minimal extension can be successfully used to deal with complicated crane systems that fit into the general framework of [15]. It has been shown in [15] that the uniform modeling approach leads to differentially flat systems. Moreover, it can be concluded from [15] that the associated servo-constraint problems are governed by DAEs of index five.

An outline of the rest of the paper is as follows. In Sect. 2, we introduce the general description of underactuated mechanical systems subjected to both holonomic and servo constraints. In Sect. 3, we present index reduction by minimal extension and link the present formulation to the previous work [2, 8]. After the discretization in time of the underlying DAEs in Sect. 4, four new sample applications are presented in Sects. 5 and 6 that demonstrate the capability of the present approach to successfully handle complicated inverse dynamics problems that have not been treated before. Appendices A and B provide some insight into the property of differential flatness and further support the fact that the present servo-constraint problems are governed by DAEs of index five. Eventually, conclusions are drawn in Sect. 7.

2 Inverse dynamics of underactuated mechanical systems

To simulate the inverse dynamics of underactuated mechanical systems, we introduce a general formulation of mechanical systems subjected to both holonomic and servo constraints. In particular, the present description takes into account the specific structure of the equations of motion resulting from the uniform modeling framework for a large class of cranes developed in [15]. Accordingly, the servo-constraint problems under consideration are governed by the following DAEs:

$$\begin{aligned} \begin{bmatrix} \boldsymbol{M}_{1} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{M}_{2} \end{bmatrix} \begin{bmatrix} \ddot{\boldsymbol{p}}\\ \ddot{\boldsymbol{x}} \end{bmatrix} &= \begin{bmatrix} \boldsymbol{f}_{1}(\boldsymbol{p}, \dot{\boldsymbol{p}}) \\ \boldsymbol{f}_{2}(\boldsymbol{x},\dot{\boldsymbol{x}}) \end{bmatrix} + \begin{bmatrix} \boldsymbol{B}_{1}^{T}(\boldsymbol{p}) \\ \boldsymbol{0} \end{bmatrix} \boldsymbol{u}- \boldsymbol{G}^{T}(\boldsymbol{p}, \boldsymbol{x}) \boldsymbol{\lambda }, \end{aligned}$$
(1a)
$$\begin{aligned} \boldsymbol{0} &= \boldsymbol{g}(\boldsymbol{p}, \boldsymbol{x}), \end{aligned}$$
(1b)
$$\begin{aligned} \boldsymbol{x} &= \boldsymbol{\gamma }. \end{aligned}$$
(1c)

The first row block in (1a) corresponds to the robot (input) subsystem with coordinates \(\boldsymbol{p} \in \mathbb{R}^{n-a}\), whereas the second row block in (1a) corresponds to the load (output) subsystem with coordinates \(\boldsymbol{x}\in \mathbb{R}^{a}\). The \(n\) redundant coordinates

$$ \boldsymbol{q} = \begin{bmatrix} \boldsymbol{p} \\ \boldsymbol{x} \end{bmatrix} $$
(2)

are subject to the holonomic constraints (1b), with associated constraint functions \(\boldsymbol{g}\in \mathbb{R}^{m}\). The total number of holonomic constraints is denoted by \(m\). The Jacobian of the holonomic constraints assumes the form

$$ \boldsymbol{G}(\boldsymbol{p},\boldsymbol{x}) = \begin{bmatrix} \boldsymbol{G}_{1}(\boldsymbol{p}, \boldsymbol{x}) & \boldsymbol{G} _{2} (\boldsymbol{p}, \boldsymbol{x}) \end{bmatrix} = \begin{bmatrix} \partial _{\boldsymbol{p}} \boldsymbol{g} (\boldsymbol{p}, \boldsymbol{x}) & \partial _{\boldsymbol{x}} \boldsymbol{g}( \boldsymbol{p}, \boldsymbol{x}) \end{bmatrix} \in \mathbb{R}^{m \times n} . $$
(3)

The Lagrange multipliers associated to the \(m\) holonomic constraints are contained in \(\boldsymbol{\lambda }\in \mathbb{R}^{m}\). Due to the presence of holonomic constraints, the configuration space of the constrained mechanical system is defined by

$$ {Q}=\bigl\{ \boldsymbol{q}\in \mathbb{R}^{n} \bigm| \boldsymbol{g}( \boldsymbol{p}, \boldsymbol{x}) = \boldsymbol{0} \bigr\} . $$
(4)

The constraints are assumed to be independent. Consequently, the constraint Jacobian \(\boldsymbol{G}\) has full row rank and the discrete mechanical system under consideration has \(n-m\) degrees of freedom.

The servo constraints (1c) specify the desired trajectory of the load via the prescribed function \(\boldsymbol{\gamma }\colon \mathbb{I}\rightarrow \mathbb{R}^{a}\), where \(\mathbb{I}=[t_{0},t_{f}]\) is the time interval of interest. In the present work we focus on underactuated mechanical systems in which the number of control inputs is smaller than the number of degrees of freedom, that is, \(a < n-m\).

The control inputs \(\boldsymbol{u}\in \mathbb{R}^{a}\) characterize the control forces which act on the robot subsystem and regulate the motion of the robot subsystem to force the load subsystem to execute the prescribed motion. In this connection the matrix \(\boldsymbol{B}_{1} \in \mathbb{R}^{a\times (n-a)}\) denotes the input transformation matrix. Besides the constraint and control forces, additional forces acting on the system are contained in the conjugate force vectors \(\boldsymbol{f}_{1}\in \mathbb{R}^{n-a}\) and \(\boldsymbol{f}_{2}\in \mathbb{R}^{a}\). Similarly, the inertia matrix is split into the submatrices \(\boldsymbol{M}_{1}\in \mathbb{R}^{{(n-a)}\times {(n-a)}}\) and \(\boldsymbol{M}_{2}\in \mathbb{R}^{a\times a}\). As mentioned above, the inertia matrix resulting from the uniform modeling approach due to [15] is typically singular. Correspondingly, matrix \(\boldsymbol{M}_{1}\) is assumed to be singular, while matrix \(\boldsymbol{M}_{2}\) is assumed to be nonsingular.

Due to the property of underactuation and the use of servo constraints, the (differentiation) index of DAEs (1a)–(1c) exceeds three. The DAEs of (differentially flat) crane systems typically have an index of five. Consequently, prior to the application of a numerical integrator, the index of the DAEs should be lowered. To this end, we apply index reduction by minimal extension of the previous work [2, 8] to the DAEs (1a)–(1c). Note that in the formulation (1a)–(1c) the number of holonomic constraints, \(m\), is just restricted by \(m< n\). This facilitates the arbitrary selection of redundant coordinates best suited for the description and numerical simulation of the specific inverse dynamics problems.

3 Index reduction by minimal extension

3.1 Formulation in terms of redundant coordinates

It has been shown in [2, 8] that in the context of underactuated crane systems the index of the DAEs (1a)–(1c) can be reduced by applying index reduction by minimal extension. To this end, we first enlarge the system of equations (1a)–(1c) by appending the first and second time derivatives of the servo constraints to obtain the reduced derivative array [16]. To maintain a square system and reduce the index, we next introduce new (dummy) variables (derivatives) \(\widehat{\boldsymbol{x}}\) and \(\widetilde{\boldsymbol{x}}\), which will replace each occurrence of the corresponding derivatives of control outputs \(\boldsymbol{x}\) in the minimally extended system. That is, \(\widehat{\boldsymbol{x}} := \dot{\boldsymbol{x}}\) and \(\widetilde{\boldsymbol{x}} := \ddot{\boldsymbol{x}}\). After that, the index of DAEs is reduced and the minimally extended system of equations reads

$$\begin{aligned} \begin{bmatrix} \boldsymbol{M}_{1} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{M}_{2} \end{bmatrix} \begin{bmatrix} \ddot{\boldsymbol{p}}\\ \widetilde{\boldsymbol{x}} \end{bmatrix} &= \begin{bmatrix} \boldsymbol{f}_{1}(\boldsymbol{p}, \dot{\boldsymbol{p}}) \\ \boldsymbol{f}_{2}(\boldsymbol{x},\widehat{\boldsymbol{x}}) \end{bmatrix} + \begin{bmatrix} \boldsymbol{B}_{1}^{T}(\boldsymbol{p}) \\ \boldsymbol{0} \end{bmatrix} \boldsymbol{u} - \begin{bmatrix} \boldsymbol{G}_{1}^{T}(\boldsymbol{p}, \boldsymbol{x}) \\ \boldsymbol{G}_{2}^{T} (\boldsymbol{p}, \boldsymbol{x}) \end{bmatrix} \boldsymbol{\lambda }, \end{aligned}$$
(5a)
$$\begin{aligned} \boldsymbol{0} &= \boldsymbol{g}(\boldsymbol{p}, \boldsymbol{x}), \end{aligned}$$
(5b)
$$\begin{aligned} \boldsymbol{x} &= \boldsymbol{\gamma }, \end{aligned}$$
(5c)
$$\begin{aligned} \widehat{\boldsymbol{x}} &= \dot{\boldsymbol{\gamma} }, \end{aligned}$$
(5d)
$$\begin{aligned} \widetilde{\boldsymbol{x}} &= \ddot{\boldsymbol{\gamma} }. \end{aligned}$$
(5e)

Originally, in [2], we dealt with the special case where \(m \leq a\) and \(\boldsymbol{M}_{1}\) is nonsingular. In the subsequent work [8] we extended the method to the case where the number of holonomic constraints \(m\) exceeds the number of servo constraints (control outputs) \(a\), that is, \(a < m < n\). We also proved that under certain assumptions the minimally extended system (5a)–(5e) is of index 3. To solve the index-reduced DAEs, we apply the backward Euler scheme (see Sect. 4).

3.2 Formulation in terms of minimal coordinates

It has been shown in [2] that the commutative diagram in Fig. 1 applies. Accordingly, instead of applying index reduction by minimal extension to the formulation in terms of redundant coordinates, we may first introduce minimal coordinates and then apply the index reduction procedure. That is, we may first perform a size reduction by introducing minimal coordinates. In the wake of the size reduction the holonomic constraints (5b) are eliminated and the number of coordinates is reduced from \(n\) to \(f = n-m\). Assume that a mapping \(\boldsymbol{\varphi }:\mathbb{R}^{f}\rightarrow \mathbb{R}^{n}\) can be found such that

$$ \boldsymbol{q} = \boldsymbol{\varphi }( {\boldsymbol{\mu }}) \quad \mbox{or}\quad \begin{bmatrix} \boldsymbol{p} \\ \boldsymbol{x} \end{bmatrix} = \begin{bmatrix} \boldsymbol{\varphi }_{\boldsymbol{p}}(\boldsymbol{\mu }) \\ \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }) \end{bmatrix} , $$
(6)

where \({\boldsymbol{\mu }} \in \mathbb{R}^{f}\) contains the minimal coordinates. Note that the mapping (6) has to satisfy the holonomic constraints (5b) identically for all \({\boldsymbol{\mu }} \in \mathbb{R}^{f}\). Consequently,

$$ \boldsymbol{g}\bigl(\boldsymbol{\varphi }({\boldsymbol{\mu }}) \bigr) = \boldsymbol{0}. $$
(7)

The first and second time derivative of mapping (6) can be calculated by

$$ \dot{\boldsymbol{q}} = \boldsymbol{P} \dot{\boldsymbol{\mu }} $$
(8)

and

$$ \ddot{\boldsymbol{q}} = \boldsymbol{P} \ddot{\boldsymbol{\mu }}+ \dot{\boldsymbol{P}}\dot{\boldsymbol{\mu }} , $$
(9)

with the null space matrix \(\boldsymbol{P} = D \boldsymbol{\varphi }(\boldsymbol{\mu })\).

Fig. 1
figure 1

Commutative diagram for the index reduction (vertical lines) and the introduction of minimal coordinates (horizontal lines)

Premultiplying Eq. (1a) by \(\boldsymbol{P}^{T}\) and taking into account Eqs. (8) and (9) yield the size-reduced DAEs

$$\begin{aligned} \boldsymbol{P}^{T} \boldsymbol{M} \boldsymbol{P} \ddot{\boldsymbol{ \mu }} +\boldsymbol{P}^{T} \boldsymbol{M} \dot{\boldsymbol{P}}\dot{ \boldsymbol{\mu }} &= \boldsymbol{P}^{T} \boldsymbol{f} + \boldsymbol{P}^{T} \boldsymbol{B}^{T} \boldsymbol{u} , \end{aligned}$$
(10a)
$$\begin{aligned} \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }) &= \boldsymbol{\gamma } \end{aligned}$$
(10b)

in terms of minimal coordinates, where

$$\begin{aligned} {\boldsymbol{M}} &= \begin{bmatrix} \boldsymbol{M}_{1} & \boldsymbol{0} \\ \boldsymbol{0} & \boldsymbol{M}_{2} \end{bmatrix} , \end{aligned}$$
(11a)
$$\begin{aligned} {\boldsymbol{f}} &= \begin{bmatrix} \boldsymbol{f}_{1}(\boldsymbol{p}, \dot{\boldsymbol{p}}) \\ \boldsymbol{f}_{2}(\boldsymbol{x},\dot{\boldsymbol{x}}) \end{bmatrix} , \end{aligned}$$
(11b)
$$\begin{aligned} {\boldsymbol{B}}^{T} &= \begin{bmatrix} \boldsymbol{B}_{1}^{T}(\boldsymbol{p}) \\ \boldsymbol{0} \end{bmatrix} , \end{aligned}$$
(11c)

and the condition \(\boldsymbol{P}^{T} \boldsymbol{G}^{T} = \boldsymbol{0}\) has been applied.

Next, we apply index reduction by minimal extension to the DAEs (10a)–(10b) in terms of minimal coordinates. In order to find appropriate dummy variables, we divide the minimal coordinates into two groups \(\boldsymbol{\mu }_{1} \in \mathbb{R}^{f-a}\) and \(\boldsymbol{\mu } _{2} \in \mathbb{R}^{a}\) such that

$$ D_{2}\boldsymbol{\varphi }_{\boldsymbol{x}}( \boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2})\in \mathbb{R}^{a \times a} \quad \mbox{is nonsingular.} $$
(12)

The mapping (6) can be rewritten as

$$ \boldsymbol{q} = \boldsymbol{\varphi }(\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) $$
(13)

after the coordinate partition has been performed. Moreover, the partial derivative of the mapping (13) with respect to the first or second argument is given by \(D_{\alpha } \boldsymbol{\varphi }(\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2})\) with \(\alpha =1\) or \(\alpha = 2\). Now we choose the dummy variables

$$\begin{aligned} \widehat{\boldsymbol{\mu }}_{2} &= \dot{\boldsymbol{\mu }}_{2} , \end{aligned}$$
(14a)
$$\begin{aligned} \widetilde{\boldsymbol{\mu }}_{2} &= \ddot{\boldsymbol{\mu }}_{2}, \end{aligned}$$
(14b)

which will replace the corresponding derivatives of \(\boldsymbol{\mu }_{2}\) in the extended system of equations. Differentiating the servo constraints (10b) twice with respect to time yields the constraint condition on the velocity level

$$ D_{1} \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) \dot{\boldsymbol{\mu }}_{1} +D_{2} \boldsymbol{\varphi }_{\boldsymbol{x}} ( \boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) \widehat{ \boldsymbol{\mu }}_{2} = \dot{\boldsymbol{\gamma }} $$
(15)

and the condition on the acceleration level

$$ D_{1} \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) \ddot{\boldsymbol{\mu }}_{1} +D_{2} \boldsymbol{\varphi }_{\boldsymbol{x}} ( \boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) \widetilde{\boldsymbol{\mu }}_{2} + \boldsymbol{w}(\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}, \dot{\boldsymbol{\mu }}_{1}, \widehat{\boldsymbol{\mu }}_{2})= \ddot{ \boldsymbol{\gamma }} , $$
(16)

with

$$ \boldsymbol{w}(\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}, \dot{\boldsymbol{\mu }}_{1}, \widehat{ \boldsymbol{\mu }}_{2})= \frac{ \mathrm{d}}{\mathrm{d}t} \bigl[D_{1} \boldsymbol{\varphi }_{ \boldsymbol{x}}(\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) \bigr] \dot{\boldsymbol{\mu }}_{1} + \frac{\mathrm{d}}{\mathrm{d}t} \bigl[D _{2}\boldsymbol{ \varphi }_{\boldsymbol{x}}(\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) \bigr]\widehat{\boldsymbol{\mu }}_{2} . $$
(17)

For convenience, we rewrite the size-reduced DAEs (10a)–(10b) as

$$\begin{aligned} \widetilde{\boldsymbol{M}}(\boldsymbol{\mu }) \ddot{\boldsymbol{\mu }} &= \widetilde{ \boldsymbol{f}}( \boldsymbol{\mu }, \dot{\boldsymbol{\mu }}) + \widetilde{ \boldsymbol{B}}^{T}(\boldsymbol{\mu }) \boldsymbol{u} , \end{aligned}$$
(18a)
$$\begin{aligned} \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }) &= \boldsymbol{\gamma }, \end{aligned}$$
(18b)

where

$$\begin{aligned} \widetilde{\boldsymbol{M}}(\boldsymbol{\mu }) &= \boldsymbol{P}^{T} \boldsymbol{M} \boldsymbol{P} , \end{aligned}$$
(19a)
$$\begin{aligned} \widetilde{ \boldsymbol{f}}(\boldsymbol{\mu }, \dot{\boldsymbol{\mu }}) &= \boldsymbol{P}^{T} \boldsymbol{f} - \boldsymbol{P}^{T} \boldsymbol{M} \dot{\boldsymbol{P}} \dot{\boldsymbol{\mu }} , \end{aligned}$$
(19b)
$$\begin{aligned} \widetilde{ \boldsymbol{B}}^{T}(\boldsymbol{\mu }) &= \boldsymbol{P} ^{T} \boldsymbol{B}^{T}. \end{aligned}$$
(19c)

The minimally extended formulation can then be written as

$$\begin{aligned} \widetilde{\boldsymbol{M}}(\boldsymbol{\mu }_{1}, \boldsymbol{\mu } _{2}) \begin{bmatrix} \ddot{\boldsymbol{\mu }}_{1} \\ \widetilde{\boldsymbol{\mu }}_{2} \end{bmatrix} &= \widetilde{ \boldsymbol{f}}(\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}, \dot{\boldsymbol{\mu }}_{1}, \widehat{ \boldsymbol{\mu }}_{2}) + \widetilde{ \boldsymbol{B}}^{T}( \boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) \boldsymbol{u} , \end{aligned}$$
(20a)
$$\begin{aligned} D_{1} \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) \ddot{\boldsymbol{\mu }}_{1} &= \ddot{\boldsymbol{\gamma }} -D_{2} \boldsymbol{\varphi }_{ \boldsymbol{x}} (\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) \widetilde{\boldsymbol{\mu }}_{2} -\boldsymbol{w}(\boldsymbol{\mu } _{1}, \boldsymbol{\mu }_{2}, \dot{\boldsymbol{\mu }}_{1}, \widehat{ \boldsymbol{\mu }}_{2}) , \end{aligned}$$
(20b)
$$\begin{aligned} D_{1} \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) \dot{\boldsymbol{\mu }}_{1} &= \dot{\boldsymbol{\gamma }} -D_{2} \boldsymbol{\varphi }_{ \boldsymbol{x}} (\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) \widehat{\boldsymbol{\mu }}_{2} , \end{aligned}$$
(20c)
$$\begin{aligned} \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) &= \boldsymbol{\gamma }. \end{aligned}$$
(20d)

The index-reduced system (20a)–(20d) constitutes a set of index-3 DAEs with \(f+3a\) equations for the determination of the differential variables \(\boldsymbol{\mu }_{1} \in \mathbb{R}^{f-a}\) and the algebraic variables \(\boldsymbol{u}, \boldsymbol{\mu }_{2}, \widehat{\boldsymbol{\mu }}_{2}, \widetilde{\boldsymbol{\mu }}_{2} \in \mathbb{R}^{a} \).

4 Numerical discretization

In this section we discretize the minimally extended index-3 DAEs. In this connection, we consider both the minimally extended system in terms of redundant coordinates and in terms of minimal coordinates.

4.1 Index-3 DAEs in terms of redundant coordinates

The minimally extended system of equations (5a)–(5e) assumes the form of semiexplicit DAEs. Thus we can expect that the backward Euler discretization of (5a)–(5e) works well (see Ascher and Petzold [3, Sect. 10.1.1]). The DAEs (5a)–(5e) can be recast in the form

$$\begin{aligned} \boldsymbol{M}_{1} \, \ddot{\boldsymbol{p}} &= \boldsymbol{f}_{1}( \boldsymbol{p}, \dot{\boldsymbol{p}}) + \boldsymbol{B}_{1}^{T}( \boldsymbol{p})\boldsymbol{u} - \boldsymbol{G}_{1}^{T}(\boldsymbol{p}, \boldsymbol{\gamma }) \boldsymbol{\lambda } , \end{aligned}$$
(21a)
$$\begin{aligned} \boldsymbol{0} &= \boldsymbol{M}_{2}\ddot{\boldsymbol{\gamma }} - \boldsymbol{f}_{2}(\boldsymbol{\gamma },\dot{\boldsymbol{\gamma }}) + \boldsymbol{G}_{2}^{T}(\boldsymbol{p},\boldsymbol{\gamma })\boldsymbol{\lambda } , \end{aligned}$$
(21b)
$$\begin{aligned} \boldsymbol{0} &= \boldsymbol{g}(\boldsymbol{p},\boldsymbol{\gamma }). \end{aligned}$$
(21c)

The DAEs (21a)–(21c) provide \(n-a\) differential equations (21a) along with \(a+m\) algebraic equations (21b) and (21c) for the determination of \(\boldsymbol{p}\in \mathbb{R}^{n-a}\), \(\boldsymbol{u}\in \mathbb{R}^{a}\), and \(\boldsymbol{\lambda }\in \mathbb{R}^{m}\). The application of the backward Euler scheme yields

$$\begin{aligned} {\boldsymbol{p}}_{n+1}-{\boldsymbol{p}}_{n} &= \Delta t \, {\boldsymbol{v}} _{n+1} ,\\ \end{aligned}$$
(22a)
$$\begin{aligned} {\boldsymbol{M}}_{1} \, \frac{ ({\boldsymbol{v}}_{n+1}-{\boldsymbol{v}} _{n} )}{\Delta t} &= {\boldsymbol{f}}_{1}({\boldsymbol{p}}_{n+1},{ \boldsymbol{v}} _{n+1})+{\boldsymbol{B}}_{1}^{T}({ \boldsymbol{p}}_{n+1}){\boldsymbol{u}} _{n+1} - { \boldsymbol{G}}_{1}^{T}\bigl({\boldsymbol{p}}_{n+1}, \boldsymbol{\gamma }(t_{n+1})\bigr) \boldsymbol{\lambda }_{n+1}, \\ \end{aligned}$$
(22b)
$$\begin{aligned} \boldsymbol{0} &= \boldsymbol{M}_{2}\ddot{\boldsymbol{\gamma }}(t _{n+1}) - \boldsymbol{f}_{2}\bigl(\boldsymbol{\gamma }(t_{n+1}), \dot{\boldsymbol{\gamma }}(t_{n+1})\bigr) +{ \boldsymbol{G}}_{2}^{T}\bigl({\boldsymbol{p}} _{n+1},\boldsymbol{\gamma }(t_{n+1})\bigr)\boldsymbol{ \lambda }_{n+1}, \end{aligned}$$
(22c)
$$\begin{aligned} \boldsymbol{0} &= {\boldsymbol{g}}\bigl({\boldsymbol{p}}_{n+1}, \boldsymbol{\gamma }(t_{n+1})\bigr), \end{aligned}$$
(22d)

where \(\boldsymbol{v} = \dot{\boldsymbol{q}}\). In a typical time step of size \(\Delta t = t_{n+1}-t_{n}\), approximations \((\bullet )_{n+1}\) to \((\bullet )(t_{n+1})\) need to be found if the corresponding quantities \((\bullet )_{n}\) are given as the results of the previous step. For the initial time step, the consistent initial values \({\boldsymbol{p}}_{0}\) and \({\boldsymbol{v}}_{0}\) are required and they have to satisfy \({\boldsymbol{g}}({\boldsymbol{p}}_{0}, \boldsymbol{\gamma }(t_{0}))=\boldsymbol{0}\) along with

$$ \begin{aligned} \partial _{\boldsymbol{p}}{\boldsymbol{g}}\bigl({ \boldsymbol{p}}_{0}, \boldsymbol{\gamma }(t_{0})\bigr) \, {\boldsymbol{v}}_{0} + \partial _{\boldsymbol{x}}{\boldsymbol{g}} \bigl({\boldsymbol{p}}_{0}, \boldsymbol{\gamma }(t_{0}) \bigr) \, \dot{\boldsymbol{\gamma }}(t_{0}) &= \boldsymbol{0}. \end{aligned} $$
(23)

The scheme (22a)–(22d) provides \(2{n}+{m}-a\) algebraic equations for the determination of \({\boldsymbol{p}}_{n+1}\), \({\boldsymbol{v}}_{n+1}\in \mathbb{R}^{ {n}-a}\), \(\boldsymbol{u}_{n+1}\in \mathbb{R}^{a}\), and \({\boldsymbol{\lambda }} _{n+1}\in \mathbb{R}^{{m}}\).

4.2 Index-3 DAEs in terms of minimal coordinates

Similarly, we can apply the backward Euler scheme to the minimally extended index-3 DAEs (20a)–(20d) in terms of minimal coordinates. Accordingly, we have

$$\begin{aligned} \boldsymbol{\mu }_{1_{n+1}}-\boldsymbol{\mu }_{1_{n}} &= \Delta t \, \boldsymbol{\nu }_{1_{n+1}} , \end{aligned}$$
(24a)
$$\begin{aligned} \widetilde{\boldsymbol{M}}(\boldsymbol{\mu }_{n+1}) \begin{bmatrix} \frac{\boldsymbol{\nu }_{1_{n+1}}-\boldsymbol{\nu }_{1_{n}}}{\Delta t} \\ \widetilde{\boldsymbol{\mu }}_{2_{n+1}} \end{bmatrix} &= \widetilde{ \boldsymbol{f}}( \boldsymbol{\mu }_{n+1}, \boldsymbol{\nu }_{1_{n+1}}, \widehat{ \boldsymbol{\mu }}_{2_{n+1}}) + \widetilde{ \boldsymbol{B}}^{T}( \boldsymbol{\mu }_{{n+1}}) \, \boldsymbol{u}_{n+1}, \end{aligned}$$
(24b)
$$\begin{aligned} D_{1} \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }_{ {n+1}}) \frac{ (\boldsymbol{\nu }_{1_{n+1}}-\boldsymbol{\nu } _{1_{n}} )}{\Delta t} &= \ddot{\boldsymbol{\gamma }}(t_{n+1}) -D_{2} \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }_{n+1}) \, \widetilde{\boldsymbol{\mu }}_{2_{n+1}} \\ &\quad{} -\boldsymbol{w}(\boldsymbol{\mu }_{n+1}, \boldsymbol{\nu }_{1_{n+1}}, \widehat{\boldsymbol{\mu }}_{2_{n+1}}), \end{aligned}$$
(24c)
$$\begin{aligned} D_{1} \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }_{n+1}) \, \boldsymbol{\nu }_{1_{n+1}} &= \dot{\boldsymbol{ \gamma }}(t_{n+1}) - D_{2} \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }_{n+1}) \, \widehat{\boldsymbol{ \mu }}_{2_{n+1}}, \end{aligned}$$
(24d)
$$\begin{aligned} \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }_{n+1}) &= \boldsymbol{\gamma }(t_{n+1}), \end{aligned}$$
(24e)

where \(\boldsymbol{\mu }_{n+1}\) represents \(\boldsymbol{\mu }_{1_{n+1}}\) and \(\boldsymbol{\mu }_{2_{n+1}}\), and \(\boldsymbol{\nu }= \dot{\boldsymbol{\mu }}\). The scheme (24a)–(24e) provides \(2(f+ a)\) algebraic equations for the determination of \(\boldsymbol{\mu }_{1_{n+1}}, \boldsymbol{\nu }_{1_{n+1}} \in \mathbb{R}^{f-a}\) and \(\boldsymbol{\mu }_{2_{n+1}}, \widehat{\boldsymbol{\mu }}_{2_{n+1}}, \widetilde{\boldsymbol{\mu }}_{2_{n+1}}, \boldsymbol{u}_{n+1}\in \mathbb{R}^{a}\).

5 Planar US Navy crane

We start with the description of a planar US Navy crane by applying the uniform modeling framework for cranes developed in [15]. We consider two specific versions of the planar US Navy crane. The property of differential flatness facilitates the calculation of an analytical reference solution (see Appendices A and B).

5.1 Planar US Navy crane with neglected pulley mass

The mechanical model of the planar US Navy crane is shown in Fig. 2. Two motor winches (radius \(r_{\alpha }\), moment of inertia \(J_{\alpha }\), actuating torque \(u_{\alpha }\), \(\alpha =1,2\)) are located on a rigid crane boom at points \(A\) and \(P\), respectively. The crane boom is fixed in the \((X,Z)\)-plane and makes angle \(\alpha \) with the vertical axis. The load at point \(C\) (mass \(m_{l}\), coordinates \(x,z\)) is linked to the motor drives through the main pulley (mass \(m_{0}\), coordinates \(x_{0}, z _{0}\)). In particular, the first rope (length \(L_{1}\)) connects the first motor winch with the main pulley, while the second rope (length \(L_{2}\)) goes through the main pulley and thus connects the load with the second motor winch, see also Fig. 3.

Fig. 2
figure 2

Planar US Navy crane with neglected pulley mass (\(m_{0} = 0\)) in terms of \(n=7\) redundant coordinates

Fig. 3
figure 3

Schematic drawing of the main pulley at point \(B\)

For modeling purposes the total length \(L_{2}\) of the rope winching the load is further decomposed into length \(L_{0}\) and \(L_{2}-L_{0}\). This decomposition makes possible to take into account the whole topology of the crane by means of holonomic constraints. This procedure is a typical feature of the uniform modeling framework for cranes proposed in [15]. It will be shown in the sequel that using \(L_{0}\) as additional variable eventually renders the inertia matrix singular.

It is worth mentioning that all ropes are assumed to be massless and can not be stretched. The ropes can, of course, only carry tensile forces and no compressive ones. Furthermore, in the following description of the crane topology, the radius of the winches is assumed to be small in comparison to the other dimensions of the crane, such as distance \(l\) between the two motor winches fixed at the boom (see Fig. 2).

In the present example the mass of the main pulley is neglected, i.e., \(m_{0} = 0\). In the next example (Sect. 5.2) we deal with the case \(m_{0} > 0\), which requires three motor winches.

5.1.1 Formulation in terms of redundant coordinates

According to the general description of cranes introduced in [15], we use \(n=7\) redundant coordinates subjected to \(m=3\) holonomic constraints. The set of redundant coordinates (see Fig. 2) is given by

$$ {\boldsymbol{p}} = \begin{bmatrix} L_{1} & L_{2} & L_{0} & x_{0} & z_{0} \end{bmatrix} ^{T} $$
(25)

and

$$ {\boldsymbol{x}} = \begin{bmatrix} x & z \end{bmatrix} ^{T} . $$
(26)

When the motor winches are rotating with angular velocity \(\omega _{\alpha }\), their kinetic energy is given by \(T_{\alpha }= \frac{1}{2} J_{\alpha }\omega _{\alpha }^{2}\) (\(\alpha = 1,2\)). Using the kinematic relation \(\dot{L}_{\alpha }= \omega _{\alpha }r_{\alpha }\), the total kinetic energy of the crane system under consideration can be written in the form

$$ T = \frac{1}{2}\frac{J_{1}}{r_{1}^{2}} \dot{L}_{1}^{2} + \frac{1}{2} \frac{J _{2}}{r_{2}^{2}}\dot{L}_{2}^{2} + \frac{1}{2} m_{l} \bigl(\dot{x}^{2}+ \dot{z}^{2}\bigr) . $$
(27)

The last equation can be rewritten as

$$ T = \frac{1}{2} \dot{{\boldsymbol{p}}} \cdot {\boldsymbol{M}}_{1} \dot{{\boldsymbol{p}}} + \frac{1}{2} \dot{\boldsymbol{x}} \cdot \boldsymbol{M}_{2} \dot{\boldsymbol{x}} , $$
(28)

where the inertia matrices corresponding to the crane coordinates and the load coordinates are given by

$$ {\boldsymbol{M}}_{1} = \begin{bmatrix} \frac{J_{1}}{r_{1}^{2}} & 0 & 0 & 0 & 0\\ 0 & \frac{J_{2}}{r_{2}^{2}}& 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0\\ \end{bmatrix} ,\qquad \boldsymbol{M}_{2} = \begin{bmatrix} m_{l} & 0\\ 0 & m_{l}\\ \end{bmatrix} . $$
(29)

Note that the singularity of inertia matrix \({\boldsymbol{M}}_{1}\) is caused by (i) using the “noninertial” variable \(L_{0}\), and (ii) the neglect of the pulley mass \(m_{0}\).

As has been mentioned above, the topology of the crane is described by means of holonomic constraints. With regard to Fig. 2, the length \(L_{0}\) can be connected to the coordinates of the main pulley, \((x_{0},z_{0})\), through the constraint

$$ x_{0}^{2} + z_{0}^{2} = L_{0}^{2} . $$
(30)

Similarly, concerning length \(L_{1}\), we get the constraint

$$ (x_{0}+l\sin \alpha )^{2} + (z_{0}+l\cos \alpha )^{2} = L_{1}^{2} . $$
(31)

The distance between the main pulley \(m_{0}\) and the load \(m_{l}\) is given by \(L_{2}-L_{0}\), giving rise to the additional constraint

$$ (x - x_{0})^{2} + (z - z_{0})^{2} = (L_{2} - L_{0})^{2} . $$
(32)

Accordingly, we have a total of \(m=3\) holonomic constraints \({\boldsymbol{g} } ({\boldsymbol{p}}, \boldsymbol{x}) = \boldsymbol{0}\), with associated constraint function

$$ {\boldsymbol{g} } ({\boldsymbol{p}}, \boldsymbol{x}) = \begin{bmatrix} \frac{1}{2} ((x_{0}+l\sin \alpha )^{2} + (z_{0}+l\cos \alpha )^{2} - L_{1}^{2} )\\ \frac{1}{2} ( x_{0}^{2} + z_{0}^{2} - L_{0}^{2} )\\ \frac{1}{2} ((x - x_{0})^{2} + (z - z_{0})^{2} - (L_{2} - L_{0})^{2} ) \end{bmatrix} . $$
(33)

With regard to (26), the coordinates of load \(m_{l}\), \((x,z)\), are directly contained in the set of redundant coordinates. Accordingly, the trajectory of the load can be easily prescribed through servo constraints. Further quantities needed in Eqs. (1a)–(1c) and (3) are given by

$$ {\boldsymbol{B}}_{1}^{T} = \begin{bmatrix} \frac{1}{r_{1}} & 0\\ 0 & \frac{1}{r_{2}}\\ 0 & 0\\ 0 & 0\\ 0 & 0\\ \end{bmatrix} , \qquad {\boldsymbol{f}}_{1} = \begin{bmatrix} 0\\ 0\\ 0\\ 0\\ 0 \end{bmatrix} , \qquad \boldsymbol{f}_{2} = \begin{bmatrix} 0\\ -m_{l}g \end{bmatrix} , \qquad {\boldsymbol{u}} = \begin{bmatrix} u_{1} \\ u_{2} \end{bmatrix} , $$
(34)

and

$$ \boldsymbol{G}_{1}^{T} = \begin{bmatrix} -L_{1} & 0 & 0\\ 0 & 0 & L_{0}-L_{2}\\ 0 & -L_{0} & L_{2}-L_{0}\\ x_{0}+l\sin \alpha & x_{0} & x_{0}-x\\ z_{0}+l\cos \alpha & z_{0} & z_{0}-z\\ \end{bmatrix} , \qquad {\boldsymbol{G}}_{2}^{T} = \begin{bmatrix} 0 & 0 & x-x_{0}\\ 0 & 0 & z-z_{0}\\ \end{bmatrix} . $$
(35)

To summarize, the crane system at hand has \(f=n-m=4\) degrees of freedom and \(a=2\) control inputs corresponding to the two winch torques \(u_{1}\) and \(u_{2}\).

5.1.2 Formulation in terms of minimal coordinates

We next illustrate the use of minimal coordinates by proceeding along the lines of Sect. 3.2. To this end, we introduce \(f=4\) minimal coordinates (see Fig. 4)

$$ \boldsymbol{\mu }= \begin{bmatrix} \beta & \gamma & \theta & L \end{bmatrix} ^{T} , $$
(36)

where \(L = L_{2} - L_{0}\). By applying the law of sines to the triangle PAB in Fig. 4, we obtain for the coordinate mappings in Eq. (6):

$$ \boldsymbol{\varphi }_{\boldsymbol{p}} (\boldsymbol{\mu }) = \begin{bmatrix} \frac{l \sin \beta }{\sin \gamma }\\ \frac{l \sin (\gamma -\beta )}{\sin \gamma }+L\\ \frac{l \sin (\gamma -\beta )}{\sin \gamma }\\ - \frac{l \sin (\gamma -\beta )}{\sin \gamma } \sin (\alpha - \beta)\\ - \frac{l \sin (\gamma -\beta )}{\sin \gamma } \cos (\alpha - \beta) \end{bmatrix} $$
(37)

and

$$ \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }) = \begin{bmatrix} - \frac{l \sin (\gamma -\beta )}{\sin \gamma } \sin (\alpha - \beta)+L \sin \theta\\ - \frac{l \sin (\gamma -\beta )}{\sin \gamma } \cos (\alpha - \beta)-L \cos \theta \end{bmatrix} . $$
(38)

Then we calculate the Jacobian matrix (null space matrix) \(\boldsymbol{P}\) along with its first time derivative \(\dot{\boldsymbol{P}}\), and insert these quantities into the DAEs (10a)–(10b) to perform the size reduction. To apply index reduction by minimal extension, we divide the minimal coordinates into two groups:

$$ \boldsymbol{\mu }_{1} = \begin{bmatrix} \beta & \gamma \end{bmatrix} ^{T} \quad \mbox{and}\quad \boldsymbol{\mu }_{2} = \begin{bmatrix} \theta & L \end{bmatrix} ^{T} $$
(39)

such that the Jacobian

$$ D_{2}\boldsymbol{\varphi }_{\boldsymbol{x}}(\boldsymbol{\mu }_{1}, \boldsymbol{\mu }_{2}) = \begin{bmatrix} L \cos \theta & \sin \theta\\ L \sin \theta & - \cos \theta \end{bmatrix} $$
(40)

is guaranteed to be nonsingular. Accordingly, the condition in Eq. (12) is satisfied. Eventually, we obtain the minimally extended index-3 DAEs (20a)–(20d) in terms of minimal coordinates for the planar US Navy crane with neglected pulley mass.

Fig. 4
figure 4

Planar US Navy crane with neglected pulley mass (\(m_{0} = 0\)) in terms of \(n=4\) minimal coordinates

5.1.3 Inverse dynamics simulation

To perform the numerical simulation, we make use of the following parameters: \(m_{l} = 100~\mbox{kg}\), \(J_{1}=J_{2}= 0.1~\mbox{kg}\,\mbox{m}^{2}\), \(r_{1}=r_{2}=0.1~\mbox{m}\), \(\alpha = \frac{ \pi }{3}\), and \(l=10~\mbox{m}\). To prescribe a rest-to-rest maneuver of the load, the following function is used in the servo constraints:

$$ \boldsymbol{\gamma }(t) = \boldsymbol{\gamma }_{0} + ( \boldsymbol{\gamma }_{f} - \boldsymbol{\gamma }_{0}) c(\tau ) $$
(41)

with the initial position

$$ \boldsymbol{\gamma }_{0} = \begin{bmatrix} 0\\ -10~\mbox{m} \end{bmatrix} \quad \mbox{at } t_{0} = 0 $$
(42)

and the final position

$$ \boldsymbol{\gamma }_{f} = \begin{bmatrix} -3~\mbox{m}\\ -14~\mbox{m} \end{bmatrix} \quad \mbox{at } t_{f} = 4~\mbox{s} . $$
(43)

In (41), \(c(\tau )\) is a 5-6-7-8-9 interpolating polynomial of the following form:

$$ c(\tau ) = 70\tau ^{9} - 315 \tau ^{8} + 540 \tau ^{7} -420 \tau ^{6} + 126 \tau ^{5} , $$
(44)

where

$$ \tau = \frac{t}{t_{f}-t_{0}} . $$
(45)

The initial configuration of the crane system is defined by

$$ \boldsymbol{p}_{0} = \begin{bmatrix} 5 \sqrt{3}~\mbox{m} & 10~\mbox{m} & 5~\mbox{m} & 0 & -5~\mbox{m} \end{bmatrix} ^{T} $$
(46)

at \(t_{0}=0\), while the initial coordinates of the load are given by

$$ \boldsymbol{x}_{0} = \begin{bmatrix} 0 & -10~\mbox{m} \end{bmatrix} ^{T} . $$
(47)

As can be observed from Fig. 5, the numerical results for the redundant coordinates are very close to those of the analytical reference solution (see Appendix A) for a time step size \(\Delta t = 0.1~\mbox{s}\). Figure 6 shows that the numerical solution for the control inputs converges to the reference solution when the time step size is reduced. In addition to that, Fig. 7 (left) depicts the relative error in the control inputs, calculated by

$$ e_{u} = \frac{\lvert u_{\text{num}}-u_{\text{ref}}\rvert }{\lvert u_{\text{ref}}\rvert } $$
(48)

at time \(t = 1.5~\mbox{s}\). In the last equation, the value of the numerical solution is denoted by \(u_{\text{num}}\), whereas the reference value is given by \(u_{\text{ref}}\). Figure 7 (right) shows the numerical solution for the Lagrange multipliers related to the three holonomic constraints. The tension forces \(N_{1}\) and \(N_{2}\) in the two ropes with length \(L_{1}\) and \(L_{2}\) are depicted in Fig. 8.

Fig. 5
figure 5

Planar US Navy crane with neglected pulley mass: Comparison between the numerical results (NUM) obtained with \(\Delta t = 0.1~\mbox{s}\) and the analytical reference solution (REF)

Fig. 6
figure 6

Planar US Navy crane with neglected pulley mass: Comparison between the numerical results (NUM) obtained with \(\Delta t = 0.1~\mbox{s}\) (left) and \(\Delta t = 0.01~\mbox{s}\) (right) and the analytical reference solution (REF)

Fig. 7
figure 7

Planar US Navy crane with neglected pulley mass: Relative error in control inputs (left). Numerical results of Lagrange multipliers obtained with \(\Delta t = 0.01~\mbox{s}\) (right)

Fig. 8
figure 8

Planar US Navy crane with neglected pulley mass: Tension forces in the two ropes obtained with \(\Delta t = 0.01~\mbox{s}\) (left). The related forces acting at point \(B\) at time \(t = 2.5~\mbox{s} \) are illustrated on the right-hand side

The effect of increasing the duration of the prescribed motion of the load is considered next. To this end, the final time is changed from \(t_{f} = 4~\mbox{s}\) to the new value \(t_{f} = 15~\mbox{s}\). The corresponding results are shown in Fig. 9.

Fig. 9
figure 9

Planar US Navy crane with neglected pulley mass: Comparison between the numerical results (NUM) obtained with \(\Delta t = 0.1~\mbox{s}\) and the analytical reference solution (REF) for the extended final time \(t_{f} =15~\mbox{s}\)

Eventually, the simulated motion of the crane system is illustrated in Fig. 10 with some snapshots at consecutive points in time.

Fig. 10
figure 10

Planar US Navy crane with neglected pulley mass: Snapshots of the crane system at specific points in time for (i) (top) a fast transition of the load from the initial to the final placement (final time \(t_{f} = 4~\mbox{s}\)), and (ii) (bottom) a slow transition with final time \(t_{f} = 15~\mbox{s}\)

5.2 Planar US Navy crane with nonzero pulley mass

We next deal with a more elaborate version of the planar US Navy crane, which comprises three motor winches (radius \(r_{\alpha }\), moment of inertia \(J_{\alpha }\), actuating torque \(u_{\alpha }\), \(\alpha =1,2,3\)) with associated ropes of length \(L_{1}\), \(L_{2}\) and \(L_{3}\) (Fig. 11). The three motor winches are again mounted on a rigid crane boom and are located at points \(A\), \(S\) and \(P\), respectively. The crane boom is fixed in the \((X,Z)\)-plane and makes angle \(\alpha \) with the vertical axis. The load at point \(C\) (mass \(m_{l}\), coordinates \(x,z\)) is linked to the motor drives through the main pulley (mass \(m_{0}>0\), coordinates \(x_{0}, z_{0}\)). The first rope (length \(L_{1}\)) and the second rope (length \(L_{2}\)) are both attached to the main pulley, see also Fig. 12. The third rope (length \(L_{3}\)) goes through the main pulley and thus connects the load with the third motor winch.

Fig. 11
figure 11

Planar US Navy crane with nonzero pulley mass (\(m_{0} > 0\)) in terms of \(n=8\) redundant coordinates

Fig. 12
figure 12

Schematic drawing of the main pulley at point \(B\)

Again, for modeling purposes the total length \(L_{3}\) of the rope winching the load is further decomposed into length \(L_{0}\) and \(L_{3}-L_{0}\). This decomposition makes possible to take into account the whole topology of the crane by means of holonomic constraints. As mentioned before, this procedure is a typical feature of the uniform modeling framework for cranes proposed in [15]. Due to the introduction of the additional variable \(L_{0}\), the inertia matrix becomes singular.

5.2.1 Formulation in terms of redundant coordinates

The description of the crane system in terms of redundant coordinates relies on \({n}=8\) coordinates, which are subject to \({m}=4\) holonomic constraints. In particular (cf. Fig. 11),

$$ {\boldsymbol{p}} = \begin{bmatrix} L_{1} & L_{2} & L_{3} & L_{0} & x_{0} \end{bmatrix} ^{T} $$
(49)

and

$$ {\boldsymbol{x}} = \begin{bmatrix} x & z & z_{0} \end{bmatrix} ^{T} . $$
(50)

In addition to the coordinates \(x,z\) of the load, the coordinate \(z_{0}\) of the main pulley is selected as third (flat) output. This corresponds to the three control inputs of the system (i.e., \(a=3\)). It is worth mentioning that there exist alternative choices for the third output such as the rope length \(L_{3}-L_{0}\) or the coordinate \(x_{0}\) of the main pulley.

Similar to the previous example, the total kinetic energy of the crane system under consideration can be written in the form

$$ T = \frac{1}{2}\frac{J_{1}}{r_{1}^{2}}\dot{L}_{1}^{2} + \frac{1}{2}\frac{J _{2}}{r_{2}^{2}}\dot{L}_{2}^{2} + \frac{1}{2}\frac{J_{3}}{r_{3}^{2}} \dot{L}_{3}^{2} + \frac{1}{2} m_{0} \bigl(\dot{x}_{0}^{2}+ \dot{z}_{0}^{2}\bigr) + \frac{1}{2} m_{l} \bigl(\dot{x}^{2}+\dot{z}^{2}\bigr) , $$
(51)

leading to

$$ T = \frac{1}{2} \dot{{\boldsymbol{p}}} \cdot {\boldsymbol{M}}_{1} \dot{{\boldsymbol{p}}} + \frac{1}{2} \dot{\boldsymbol{x}} \cdot \boldsymbol{M}_{2} \dot{\boldsymbol{x}} , $$
(52)

where

$$ {\boldsymbol{M}}_{1} = \begin{bmatrix} \frac{J_{1}}{r_{1}^{2}} & 0 & 0 & 0 & 0\\ 0 & \frac{J_{2}}{r_{2}^{2}}& 0 & 0 & 0\\ 0 & 0 & \frac{J_{3}}{r_{3}^{2}} & 0 & 0\\ 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & m_{0}\\ \end{bmatrix} , \qquad \boldsymbol{M}_{2} = \begin{bmatrix} m_{l} & 0 & 0\\ 0 & m_{l} & 0\\ 0 & 0 & m_{0}\\ \end{bmatrix} . $$
(53)

Note that the singularity of inertia matrix \({\boldsymbol{M}}_{1}\) is caused by the “noninertial” variable \(L_{0}\).

The topology of the crane is accounted for by holonomic constraints. With regard to Fig. 11, the rope length \(L_{2}\) can be connected to the coordinates of the main pulley, \((x_{0},z_{0})\), through the constraint

$$ x_{0}^{2} + z_{0}^{2} = L_{2}^{2} . $$
(54)

Similar geometric relationships can be easily established containing the remaining three rope-length variables \(L_{1}\), \(L_{3}\) and \(L_{0}\). This procedure gives rise to a total of \(m=4\) holonomic constraints \({\boldsymbol{g}} ({\boldsymbol{p}}, \boldsymbol{x}) = \boldsymbol{0} \) specified by

$$ {\boldsymbol{g}} ({\boldsymbol{p}}, \boldsymbol{x}) = \begin{bmatrix} \frac{1}{2}((x_{0}+(l+s)\sin \alpha )^{2} +(z_{0}+(l+s)\cos \alpha )^{2} - L_{1}^{2})\\ \frac{1}{2}((x_{0}+s \, \sin \alpha )^{2} + (z_{0}+s \,\cos \alpha )^{2} - L_{0}^{2})\\ \frac{1}{2}(x_{0}^{2} + z_{0}^{2} - L_{2}^{2})\\ \frac{1}{2}((x - x_{0})^{2} + (z - z_{0})^{2} - (L_{3} - L_{0})^{2})\\ \end{bmatrix} . $$
(55)

Further quantities needed in Eqs. (1a)–(1c) and (3) are given by

$$ {\boldsymbol{B}}_{1}^{T} = \begin{bmatrix} \frac{1}{r_{1}} & 0 & 0\\ 0 & \frac{1}{r_{2}}& 0\\ 0 & 0 & \frac{1}{r_{3}}\\ 0 & 0 & 0\\ 0 & 0 & 0\\ \end{bmatrix} , \qquad {\boldsymbol{f}}_{1} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix} , \qquad \boldsymbol{f}_{2} = \begin{bmatrix} 0 \\ -m_{l}g \\ -m_{0}g \end{bmatrix} , \qquad {\boldsymbol{u}} = \begin{bmatrix} u_{1} \\ u_{2} \\ u_{3} \end{bmatrix} , $$
(56)

and

$$\begin{aligned} {\boldsymbol{G}}_{1}^{T} =& \begin{bmatrix} -L_{1} & 0 & 0 & 0 \\ 0 & 0 & -L_{2} & 0 \\ 0 & 0 & 0 & L_{0}-L_{3} \\ 0 & -L_{0} & 0 &L_{3}-L_{0} \\ x_{0}+(l+s)\sin \alpha &x_{0}+s\sin \alpha & x_{0} &x_{0}-x \\ \end{bmatrix} , \end{aligned}$$
(57)
$$\begin{aligned} {\boldsymbol{G}}_{2}^{T} =& \begin{bmatrix} 0 & 0 & 0 & x-x_{0} \\ 0 & 0 & 0 & z-z_{0} \\ z_{0}+(l+s)\cos \alpha & z_{0}+s\cos \alpha & z_{0} & z_{0}-z \end{bmatrix} . \end{aligned}$$
(58)

5.2.2 Formulation in terms of minimal coordinates

Despite the more elaborate geometry of the crane under consideration, it is feasible to find suitable minimal coordinates. Based on the fact that the present system has \(f=n-m=4\) degrees of freedom, we introduce the following set of minimal coordinates (see Fig. 13)

$$ \boldsymbol{\mu }= \begin{bmatrix} \beta & \gamma & \theta & L \end{bmatrix} ^{T} $$
(59)

with \(L = L_{3} - L_{0}\). Note that we could also use angle \(\mu \) instead of \(\beta \). By applying the law of sines to the triangle PAB (Fig. 13), we obtain the coordinate mappings in Eq. (6) as follows:

$$ \boldsymbol{\varphi }_{\boldsymbol{p}} (\boldsymbol{\mu }) = \begin{bmatrix} \frac{l \sin \beta }{\sin (\gamma +\theta +\alpha -\beta )}\\ \frac{l \sin (\gamma +\theta +\alpha )}{\sin (\gamma +\theta +\alpha -\beta )}+L \\ \sqrt{x_{0}^{2}+z_{0}^{2}} \\ \frac{l \sin (\gamma +\theta +\alpha )}{\sin (\gamma +\theta +\alpha -\beta )} \\ x_{0} \end{bmatrix} $$
(60)

and

$$ \boldsymbol{\varphi }_{\boldsymbol{x}} (\boldsymbol{\mu }) = \begin{bmatrix} x_{0}+L \sin \theta \\ z_{0}-L \cos \theta \\ z_{0} \end{bmatrix} , $$
(61)

where

$$ \begin{aligned} x_{0} &= -s \sin \alpha - \frac{l \sin (\gamma +\theta +\alpha )}{ \sin (\gamma +\theta +\alpha -\beta )} \sin (\alpha - \beta ), \\ z _{0} &= -s \cos \alpha - \frac{l \sin (\gamma +\theta +\alpha )}{ \sin (\gamma +\theta +\alpha -\beta )} \cos (\alpha - \beta ). \end{aligned} $$
(62)

The Jacobian matrix (null space matrix) \(\boldsymbol{P}\) along with its first time derivative \(\dot{\boldsymbol{P}}\) needed in (10b) can be obtained by means of symbolic manipulations. To apply index reduction by minimal extension, we divide the minimal coordinates into two groups

$$ \boldsymbol{\mu }_{1} = \begin{bmatrix} \beta \end{bmatrix} \quad \mbox{and}\quad \boldsymbol{\mu }_{2} = \begin{bmatrix} \gamma & \theta & L \end{bmatrix} ^{T} $$
(63)

such that the Jacobian \(D_{2}\boldsymbol{\varphi }_{\boldsymbol{x}}( \boldsymbol{\mu }_{1},\boldsymbol{\mu }_{2})\) is guaranteed to be nonsingular. Thus the condition in Eq. (12) is satisfied. Now it is a straightforward procedure to obtain the minimally extended index-3 DAEs (20a)–(20d) in terms of minimal coordinates.

Fig. 13
figure 13

Planar US Navy crane with nonzero pulley mass (\(m_{0} > 0\)) in terms of \(n=4\) minimal coordinates

5.2.3 Inverse dynamics simulation

In the numerical example we make use of the following parameters: \(m_{l} = 100~\mbox{kg}\), \(m_{0} = 150~\mbox{kg}\), \(J_{1}=J_{2}=J_{3}= 0.1~\mbox{kg}\,\mbox{m}^{2}\), \(r_{1}=r_{2}=r_{3}=0.1~\mbox{m}\), \(\alpha = \frac{ \pi }{3}\), \(s = 5~\mbox{m}\), and \(l=10~\mbox{m}\). The trajectory of the output is again prescribed by using (41) along with (44) from the previous example. The resulting rest-to-rest maneuver is based on the initial coordinates of the output

$$ \boldsymbol{\gamma }_{0} = \begin{bmatrix} -\frac{5}{2}\sqrt{3}~\mbox{m} \\ -17.5~\mbox{m} \\ -12.5~\mbox{m} \end{bmatrix} \quad \mbox{at } t_{0} = 0 $$
(64)

and the corresponding final coordinates

$$ \boldsymbol{\gamma }_{f} = \begin{bmatrix} -2~\mbox{m} \\ -16~\mbox{m} \\ -15~\mbox{m} \end{bmatrix} \quad \mbox{at } t_{f} = 4~\mbox{s} . $$
(65)

The initial configuration of the crane system at \(t_{0}=0\) is given by

$$ \boldsymbol{p}_{0} = \begin{bmatrix} 10~\mbox{m} & 15~\mbox{m} & 13.23~\mbox{m} & 10~\mbox{m} & - \frac{5}{2}\sqrt{3}~\mbox{m} \end{bmatrix} ^{T} $$
(66)

along with

$$ \boldsymbol{x}_{0} = \begin{bmatrix} -\frac{5}{2}\sqrt{3}~\mbox{m}& -17.5~\mbox{m} & -12.5~\mbox{m} \end{bmatrix} ^{T}. $$
(67)

It can be observed from Fig. 14 that the numerical results for the redundant coordinates closely match the analytical reference solution (see Appendix B) for a time step size \(\Delta t = 0.1~\mbox{s}\). Figure 15 indicates that the numerical solution for the control inputs converges to the reference solution when the time step size is reduced. The numerical solution of the control inputs typically exhibits a slower convergence towards the reference solution than the coordinates. This can be observed by comparing Figs. 14 and 15. This phenomenon can be explained by the flatness-based solution. While the coordinates depend on the flat outputs and derivatives thereof up to the second order, the control inputs depend on the flat outputs and derivatives thereof up to the fourth order (see Appendix B).

Fig. 14
figure 14

Planar US Navy crane with nonzero pulley mass: Comparison between the numerical results (NUM) obtained with \(\Delta t = 0.1~\mbox{s}\) and the analytical reference solution (REF)

Fig. 15
figure 15

Planar US Navy crane with nonzero pulley mass: Comparison between the numerical results (NUM) obtained with \(\Delta t = 0.1~\mbox{s}\) (left) and \(\Delta t = 0.01~\mbox{s}\) (right) and the analytical reference solution (REF)

Figure 16 (left) shows a log–log plot of the relative error of the control inputs at time \(t =1.5~\mbox{s}\). Furthermore, Fig. 16 depicts the numerical solution for the Lagrange multipliers.

Fig. 16
figure 16

Planar US Navy crane with nonzero pulley mass: Relative error in the control inputs (left). Numerical results for the Lagrange multipliers obtained with \(\Delta t = 0.01~\mbox{s}\) (right)

The tension forces in the three ropes are plotted versus time in Fig. 17. The effect of increasing the duration of the rest-to-rest maneuver by changing the final time from \(t_{f} = 4~\mbox{s}\) to the new value \(t_{f} = 15~\mbox{s}\) can be observed from Fig. 18. To illustrate the motion of the crane system, Fig. 19 contains some snapshots of the crane at consecutive points in time.

Fig. 17
figure 17

Planar US Navy crane with nonzero pulley mass: Tension forces in the three ropes obtained with \(\Delta t = 0.01~\mbox{s}\) (left). Corresponding forces acting on the main pulley (point \(B\)) at time \(t=2.5~\mbox{s}\) (right)

Fig. 18
figure 18

Planar US Navy crane with nonzero pulley mass: Comparison between the numerical results (NUM) obtained with \(\Delta t = 0.1~\mbox{s}\) and the analytical reference solution (REF) for the extended final time \(t_{f} =15~\mbox{s}\)

Fig. 19
figure 19

Planar US Navy crane with nonzero pulley mass: Snapshots of the crane system at specific points in time for the short duration (\(t _{f} = 4~\mbox{s}\)) (top) and the extended duration (\(t_{f} = 15~\mbox{s}\)) (bottom) of the rest-to-rest maneuver. In addition to that, the trajectory of the main pulley and the trajectory of the load are shown

6 Three-dimensional US Navy crane

In this section we deal with the three-dimensional extension of the planar US Navy crane considered above. We again consider two alternative versions of the US Navy crane: In the first case, the mass of the main pulley is neglected, while in the second case the mass of the main pulley is taken into account. In the three-dimensional case, the use of minimal coordinates turns out to be quite cumbersome. Accordingly, we focus on redundant coordinates following the uniform modeling approach proposed in [15].

6.1 Three-dimensional US Navy crane with neglected pulley mass

We first consider the three-dimensional extension of the US Navy crane treated in Sect. 5.1. It can be observed from Fig. 20 that the topology of the 3D crane essentially remains unchanged. In the 3D case, the coordinates of the main pulley (mass \(m_{0}\)) and the load (mass \(m_{l}\)) are given by \((x_{0},y_{0},z_{0})\) and \((x,y,z)\), respectively. We make use of the enlarged set of \(n=11\) redundant coordinates given by

$$ {\boldsymbol{p}} = \begin{bmatrix} L_{1} & L_{2} & L_{0} & x_{0} & y_{0} & z_{0} & x_{2} & y_{2} \end{bmatrix} ^{T} $$
(68)

and

$$ {\boldsymbol{x}} = \begin{bmatrix} x & y & z \end{bmatrix} ^{T} . $$
(69)

The whole crane can now rotate about the vertical \(Z\)-axis. According to the modeling approach due to [15], the rotational motion of the crane is accounted for by using the coordinates \((x_{2},y_{2})\) associated with the position of the motor winch hoisting the load (see point \(P\) in Fig. 20). In particular the kinetic energy associated with the rotational motion of the whole crane is given by \(T_{b}=\frac{1}{2}J_{b}\dot{\varphi }^{2}\), where \(\dot{\varphi }\) denotes the angular velocity about the \(Z\)-axis, see Fig. 21.

Fig. 20
figure 20

Three-dimensional US Navy crane with neglected pulley mass (\(m_{0} = 0\)) in terms of \(n=11 \) redundant coordinates

Fig. 21
figure 21

View onto the \((X,Y)\)-plane

Furthermore, \(J_{b}\) is the moment of inertia of the crane (without \(m_{0}\) and \(m_{l}\)) relative to the \(Z\)-axis. Instead of using angle \(\varphi \) as variable, coordinates \((x_{2},y_{2})\) associated with point \(P\) are used. Taking into account the kinematic relationships \(\dot{x}_{2} =-\dot{\varphi } y_{2}\) and \(\dot{y}_{2} = \dot{\varphi } x_{2}\) (Fig. 21), gives rise to the relation

$$ (\dot{x}_{2})^{2} + ( \dot{y}_{2})^{2} = \dot{\varphi }^{2} \bigl( ( {x}_{2})^{2} + ({y}_{2})^{2} \bigr) . $$
(70)

Since coordinates \(x_{2}\) and \(y_{2}\) are not independent, we impose the holonomic constraint

$$ ({x}_{2})^{2} + ({y}_{2})^{2} = r^{2} , $$
(71)

where \(r\) denotes the constant perpendicular distance between point \(P\) and the \(Z\)-axis. Substituting from the last equation into (70) leads to the expression \(\dot{\varphi }^{2} = (\dot{x}_{2}^{2} + \dot{y}_{2}^{2})/r^{2}\). Similar to (27), the total kinetic energy of the 3D crane system at hand can be written as

$$ T = \frac{1}{2} M \bigl(\dot{x}_{2}^{2} + \dot{y}_{2}^{2} \bigr) + \frac{1}{2} \frac{J_{1}}{r_{1}^{2}}\dot{L}_{1}^{2} + \frac{1}{2}\frac{J _{2}}{r_{2}^{2}}\dot{L}_{2}^{2} +\frac{1}{2} m_{l} \bigl(\dot{x}^{2}+ \dot{z}^{2}\bigr) , $$
(72)

where \(M=\frac{J_{b}}{r^{2}}\) has been introduced. Kinetic energy (72) can be rewritten in the form

$$ T = \frac{1}{2} \dot{{\boldsymbol{p}}} \cdot {\boldsymbol{M}}_{1} \dot{{\boldsymbol{p}}} + \frac{1}{2} \dot{\boldsymbol{x}} \cdot \boldsymbol{M}_{2} \dot{\boldsymbol{x}}, $$
(73)

where the inertia matrices are given by

$$ {\boldsymbol{M}}_{1} = \begin{bmatrix} \frac{J_{1}}{r_{1}^{2}} & & & & & & &\\ & \frac{J_{2}}{r_{2}^{2}}& & & & & &\\ & & 0 & & & & &\\ & & & 0 & & & & \\ & & & & 0 & & & \\ & & & & & 0 & & \\ & & & & & & M & \\ & & & & & & & M \\ \end{bmatrix} , \qquad \boldsymbol{M}_{2} = \begin{bmatrix} m_{l} & & \\ & m_{l} & \\ & & m_{l} \end{bmatrix} . $$
(74)

In complete analogy to the 2D version of the crane dealt with in Sect. 5.1, the topology of the crane is described by means of three additional holonomic constraints. Since the crane boom is assumed to be rigid, the placement of the first motor winch (point \(A\)) can be expressed in terms of the coordinates of point \(P\), by introducing the parameter \(\beta _{1} = \frac{1}{2}\). In particular, we have (Fig. 20) \(\overrightarrow{OA}=\beta _{1} \overrightarrow{OP}\), or \(x_{1}=\beta _{1} x_{2}\), \(y_{1}=\beta _{1} y_{2}\) and \(z_{1}=\beta _{1} z_{2}\). Now, length \(L_{0}\) can be connected to the coordinates of the main pulley, \((x_{0}, y_{0}, z _{0})\) via the constraint

$$ (x_{0}-x_{2})^{2} + (y_{0}-y_{2})^{2}+(z_{0}-z_{2})^{2} = L_{0}^{2} . $$
(75)

Similarly, for length \(L_{1}\) we get

$$ (x_{0}-\beta _{1} x_{2})^{2} + (y_{0}-\beta _{1} y_{2})^{2}+(z_{0}- \beta _{1} z_{2} )^{2} = L_{1}^{2} . $$
(76)

The distance between the main pulley \(m_{0}\) and the load \(m_{l}\) is given by \(L_{2} - L_{0}\), giving rise to the constraint

$$ (x - x_{0})^{2} + (y - y_{0})^{2} + (z - z_{0})^{2} = (L_{2} - L_{0})^{2} . $$
(77)

Accordingly, the last three constraints together with constraint (71) lead to a total of \(m=4\) holonomic constraints \({\boldsymbol{g} } ({\boldsymbol{p}}, \boldsymbol{x}) = \boldsymbol{0}\), with associated constraint function

$$ {\boldsymbol{g} } ({\boldsymbol{p}}, \boldsymbol{x}) = \begin{bmatrix} \frac{1}{2} (x_{2}^{2} + y_{2}^{2} - r^{2} ) \\ \frac{1}{2} ((x_{0}-\beta _{1} x_{2})^{2} + (y_{0}-\beta _{1} y _{2})^{2}+(z_{0}- \beta _{1} z_{2} )^{2} - L_{1}^{2} ) \\ \frac{1}{2} ((x_{0}-x_{2})^{2} + (y_{0}-y_{2})^{2}+(z_{0}-z_{2})^{2} - L_{0}^{2} ) \\ \frac{1}{2} ((x - x_{0})^{2} + (y - y_{0})^{2} + (z - z_{0})^{2} - (L_{2} - L_{0})^{2} ) \end{bmatrix} . $$
(78)

It is worth noting that, since the crane can only rotate about the \(Z\)-axis, coordinate \(z_{2}\) does not change, i.e., \(z_{2}=(k+l) \cos \alpha \) (Fig. 20).

The actuating torque \(u_{3}\) acting on the crane boom about the \(Z\)-axis can be incorporated into the present formulation by envisioning forces \((F_{x}, F_{y})\) conjugated to the redundant coordinates \((x_{2},y _{2})\) (Fig. 21). Choosing \(F_{x} = - \frac{y _{2}}{r^{2}} u_{3}\) and \(F_{y} = \frac{x_{2}}{r^{2}} u_{3}\), the resulting torque about the \(Z\)-axis is given by

$$ -F_{x} y_{2} + F_{y} x_{2} = \biggl(\frac{y_{2}}{r^{2}} y_{2} + \frac{x _{2}}{r^{2}} x_{2} \biggr) u_{3} = \frac{y_{2}^{2} + x_{2}^{2}}{r^{2}} u_{3} = u_{3} , $$
(79)

where constraint (71) has been used. Now, the description of the crane system can be completed by providing further quantities needed in Eqs. (1a)–(1c) and (3):

$$ {\boldsymbol{B}}_{1}^{T} = \begin{bmatrix} \frac{1}{r_{1}} & 0 & 0 \\ 0 & \frac{1}{r_{2}}& 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & -\frac{y_{2}}{r^{2}} \\ 0 & 0 & \frac{x_{2}}{r^{2}} \\ \end{bmatrix} , \qquad {\boldsymbol{f}}_{1} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix} , \qquad \boldsymbol{f}_{2} = \begin{bmatrix} 0 \\ 0 \\ -m_{l} g \end{bmatrix} , \qquad {\boldsymbol{u}} = \begin{bmatrix} u_{1} \\ u_{2} \\ u_{3} \end{bmatrix} , $$
(80)

and

$$ \boldsymbol{G}_{1}^{T} = \begin{bmatrix} 0& -L_{1} & 0 & 0 \\ 0& 0 & 0 & L_{0}-L_{2} \\ 0& 0 & -L_{0} & L_{2}-L_{0} \\ 0& x_{0}-\beta _{1} x_{2} & x_{0}-x_{2} & x_{0}-x \\ 0& y_{0}-\beta _{1} y_{2} & y_{0}-y_{2} & y_{0}-y \\ 0& z_{0}-\beta _{1} z_{2} & z_{0}-z_{2} & z_{0}-z \\ x_{2} & -\beta _{1}(x_{0}-\beta _{1} x_{2}) & x_{2}-x_{0} & 0 \\ y_{2} & -\beta _{1}(y_{0}-\beta _{1} y_{2}) & y_{2}-y_{0} & 0 \\ \end{bmatrix} , \qquad {\boldsymbol{G}}_{2}^{T} = \begin{bmatrix} 0 & 0 & 0 & x-x_{0} \\ 0 & 0 & 0 & y-y_{0} \\ 0 & 0 & 0 & z-z_{0} \\ \end{bmatrix} . $$
(81)

In summary, the three-dimensional US Navy crane with neglected pulley mass has \(f = 7\) degrees of freedom and \(a = 3\) control inputs.

Remark

The present description of the rotational motion of the crane is closely related to the rotationless formulation of multibody systems including the prominent description in terms of natural coordinates. Proceeding along the lines of [6, Sect. 3.3], the actuating forces conjugated to the coordinates associated with point \(P\), collected in vector \(\boldsymbol{r}_{p} = [x_{2}, y_{2},0]^{T}\), can be calculated via

$$\boldsymbol{F}_{p} = \frac{1}{r^{2}}\boldsymbol{m}\times \boldsymbol{r}_{p}, $$

where the actuating torque vector is given by \(\boldsymbol{m} = [0,0,u _{3}]^{T}\) (or \(\boldsymbol{m} = u_{3}\boldsymbol{e}_{Z}\)). The result of the above formula is \(\boldsymbol{F}_{p}=[F_{x},F_{y},0]^{T}\), where the components \(F_{x}\) and \(F_{y}\) coincide with those used in (79). The above formula can be derived by considering the power of the torque \(u_{3}\) acting on the crane boom about the \(Z\)-axis, which is given by \(P_{b} = \boldsymbol{m}\cdot \boldsymbol{\omega }=\boldsymbol{F}_{p}\cdot \boldsymbol{v}_{p}\), where \(\boldsymbol{\omega }=\dot{\varphi }\boldsymbol{e}_{Z}\) and \(\boldsymbol{v}_{p}=\dot{\boldsymbol{r}}_{p}=\boldsymbol{\omega } \times \boldsymbol{r}_{p}\) (cf. Fig. 21). The last kinematic relationship gives rise to \(\boldsymbol{\omega }= \boldsymbol{r}_{p}\times \boldsymbol{v}_{p}/r^{2}\).

6.1.1 Inverse dynamics simulation

In the numerical simulation we make use of the following parameters: \(m_{l} = 100~\mbox{kg}\), \(M = 6.4~\mbox{kg}\), \(J_{1}=J_{2}= 0.1~\mbox{kg}\,\mbox{m}^{2}\), \(r_{1}=r_{2}=0.1~\mbox{m}\), \(\alpha = \frac{ \pi }{3}\), and \(l=k=5~\mbox{m}\). The required trajectory of the load is prescribed by

$$ \boldsymbol{\gamma }(t) = \boldsymbol{\gamma }_{0} + ( \boldsymbol{\gamma }_{f} - \boldsymbol{\gamma }_{0}) c(t) $$
(82)

with the initial position

$$ \boldsymbol{\gamma }_{0} = \begin{bmatrix} 5\sqrt{3}~\mbox{m} \\ 0 \\ -10~\mbox{m} \end{bmatrix} \quad \mbox{at } t_{0} = 0 $$
(83)

and the final position

$$ \boldsymbol{\gamma }_{f} = \begin{bmatrix} 2~\mbox{m} \\ 5~\mbox{m} \\ -5~\mbox{m} \end{bmatrix} \quad \mbox{at } t_{f} = 20~\mbox{s} . $$
(84)

The reference function \(c(t)\) is here composed of three phases,

$$ c(t) = \textstyle\begin{cases} c_{\text{I}}(t)& \text{for }0 \leq t < 5~\mbox{s},\\ c_{\text{II}}(t)& \text{for }5~\mbox{s} \leq t < 15~\mbox{s},\\ c_{\text{III}}(t)& \text{for } 15~\mbox{s} \leq t \leq 20~\mbox{s}, \end{cases} $$
(85)

with

$$\begin{aligned} c_{\text{I}}(t) &= \frac{1}{\tau -\tau _{0}} \biggl(-\frac{5t^{8}}{2{\tau _{0}} ^{7}}+ \frac{10t^{7}}{{\tau _{0}}^{6}} - \frac{14t^{6}}{2{\tau _{0}}^{5}} + \frac{7t^{5}}{2{\tau _{0}}^{4}} \biggr) , \\ \end{aligned}$$
(86a)
$$\begin{aligned} c_{\text{II}}(t) &= \frac{1}{\tau -\tau _{0}} \biggl(t - \frac{\tau _{0}}{2} \biggr), \\ \end{aligned}$$
(86b)
$$\begin{aligned} c_{\text{III}}(t) &= 1+ \frac{1}{\tau -\tau _{0}} \biggl(-\frac{5(\tau -t)^{8}}{2 {\tau _{0}}^{7}}+ \frac{10(\tau -t)^{7}}{{\tau _{0}}^{6}} - \frac{14( \tau - t)^{6}}{2{\tau _{0}}^{5}} +\frac{7(\tau -t)^{5}}{2{\tau _{0}} ^{4}} \biggr). \end{aligned}$$
(86c)

The initial configuration of the crane system is specified by

$$ \boldsymbol{p}_{0} = \begin{bmatrix} \frac{5}{2}\sqrt{3}~\mbox{m} & 15~\mbox{m} & 2.5~\mbox{m} & 5 \sqrt{3}~\mbox{m} & 0 & 2.5~\mbox{m} & 5 \sqrt{3}~\mbox{m} & 0 \end{bmatrix} ^{T} $$
(87)

at \(t_{0}=0\), while the initial output coordinates are given by

$$ \boldsymbol{x}_{0} = \begin{bmatrix} 5\sqrt{3}~\mbox{m} & 0 & -10~\mbox{m} \end{bmatrix} ^{T} . $$
(88)

The numerical results for the time step size \(\Delta t = 0.01~\mbox{s}\) are displayed in Fig. 22, in which the coordinates, control inputs, Lagrange multipliers, and tension forces in ropes are presented. The simulated motion of the crane generated by using the redundant coordinates formulation is presented in Fig. 23 with some snapshots at consecutive points in time.

Fig. 22
figure 22

Three-dimensional US Navy crane with neglected pulley mass: Numerical results obtained with \(\Delta t = 0.01~\mbox{s}\)

Fig. 23
figure 23

Three-dimensional US Navy crane with neglected pulley mass: Snapshots of the load and the pulley at specific points in time. In addition, the trajectory of the pulley and the prescribed trajectory of the load are shown

6.2 Three-dimensional US Navy crane with nonzero pulley mass

Eventually, we deal with the more general case of the three-dimensional US Navy crane in which the mass of the main pulley is nonzero, i.e., \(m_{0}>0\) (Fig. 24). This case can be viewed as direct extension of the planar version of the crane (Sect. 5.2) to the three-dimensional regime. An extended set of \({n}=12\) redundant coordinates is used to describe the 3D version of the crane. Specifically,

$$ {\boldsymbol{p}} = \begin{bmatrix} L_{1} & L_{2} & L_{3} & L_{0} & x_{0} & y_{0} & x_{3} & y_{3} \end{bmatrix} ^{T} $$
(89)

and

$$ {\boldsymbol{x}} = \begin{bmatrix} x & y & z & z_{0} \end{bmatrix} ^{T} . $$
(90)

Similar to the planar version, the coordinate \(z_{0}\) of the main pulley is taken to be the fourth (flat) output. In analogy to the previous example, the coordinates \(x_{3}, y_{3}\) associated with the third motor winch (point \(P\)) hoisting the load are employed as additional variables to account for the rotational motion of the crane about the \(Z\)-axis. To locate the position of the first motor winch (point \(A\)) on the crane boom, the parameter \(\beta _{1} = \frac{1}{2}\) is introduced, so that \(x_{1} = \beta _{1} x_{3}\), \(y_{1} = \beta _{1} y_{3}\) and \(z_{1} = \beta _{1} z_{3}\). Similarly, concerning the second motor winch (point \(S\)) on the crane boom, we have \(x_{2} = \beta _{2} x_{3}\), \(y_{2} = \beta _{2} y_{3}\) and \(z_{2} = \beta _{2} z_{3}\), with \(\beta _{2} = \frac{3}{2}\). Proceeding along the lines of the previous sections, it is now a straightforward procedure to formulate the total kinetic energy along with the constraints. In particular, we have

$$ T = \frac{1}{2} \dot{{\boldsymbol{p}}} \cdot {\boldsymbol{M}}_{1} \dot{{\boldsymbol{p}}} + \frac{1}{2} \dot{\boldsymbol{x}} \cdot \boldsymbol{M}_{2} \dot{\boldsymbol{x}} , $$
(91)

where the inertia matrices are given by

$$ {\boldsymbol{M}}_{1} = \begin{bmatrix} \frac{J_{1}}{r_{1}^{2}} & 0 & 0 & 0 & 0 & 0 & 0 &0 \\ 0 & \frac{J_{2}}{r_{2}^{2}}& 0 & 0 & 0 & 0 & 0 &0 \\ 0 & 0 & \frac{J_{3}}{r_{3}^{2}} & 0 & 0 & 0 & 0 &0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 &0 \\ 0 & 0 & 0 & 0 &m_{0} & 0 & 0 &0 \\ 0 & 0 & 0 & 0 & 0 &m_{0} & 0 &0 \\ 0 & 0 & 0 & 0 & 0 & 0 & M &0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & M \\ \end{bmatrix} , \qquad \boldsymbol{M}_{2} = \begin{bmatrix} m & 0 & 0 & 0 \\ 0 & m & 0 & 0 \\ 0 & 0 & m & 0 \\ 0 & 0 & 0 & m_{0} \end{bmatrix} . $$
(92)

We obtain \(m=5\) holonomic constraints \({\boldsymbol{g} } ({\boldsymbol{p}}, \boldsymbol{x}) = \boldsymbol{0}\), with associated constraint function

$$ {\boldsymbol{g} } ({\boldsymbol{p}}, \boldsymbol{x}) = \begin{bmatrix} \frac{1}{2}(x_{3}^{2} + y_{3}^{2} - r^{2}) \\ \frac{1}{2} ((x_{0}-\beta _{1} x_{3})^{2} + (y_{0}-\beta _{1} y _{3})^{2}+(z_{0}- \beta _{1} z_{3} )^{2} - L_{1}^{2} ) \\ \frac{1}{2} ((x_{0}-\beta _{2} x_{3})^{2} + (y_{0}-\beta _{2} y _{3})^{2}+(z_{0}- \beta _{2} z_{3} )^{2} - L_{2}^{2} ) \\ \frac{1}{2} ((x_{0}-x_{3})^{2} + (y_{0}-y_{3})^{2}+(z_{0}-z_{3})^{2} - L_{0}^{2} ) \\ \frac{1}{2} ((x - x_{0})^{2} + (y - y_{0})^{2} + (z - z_{0})^{2} - (L_{3} - L_{0})^{2} ) \end{bmatrix} . $$
(93)

Further quantities needed in Eqs. (1a)–(1c) and (3) are given by

$$ {\boldsymbol{B}}_{1}^{T} = \begin{bmatrix} \frac{1}{r_{1}} & 0 & 0 & 0 \\ 0 & \frac{1}{r_{2}}& 0 & 0 \\ 0 & 0 & \frac{1}{r_{3}} & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & -\frac{y_{3}}{r^{2}} \\ 0 & 0 & 0 & \frac{x_{3}}{r^{2}} \\ \end{bmatrix} , \qquad {\boldsymbol{f}}_{1} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix} , \qquad \boldsymbol{f}_{2} = \begin{bmatrix} 0 \\ 0 \\ -m_{l}g \\ -m_{0}g \end{bmatrix} , \qquad {\boldsymbol{u}} = \begin{bmatrix} u_{1} \\ u_{2} \\ u_{3} \\ u_{4} \end{bmatrix} . $$
(94)

The constraint Jacobian is given by

$$ {\boldsymbol{G}}_{1}^{T} = \begin{bmatrix} 0 & -L_{1} & 0 & 0 & 0 \\ 0 & 0 & -L_{2} & 0 & 0 \\ 0 & 0 & 0 & 0 & L_{0}-L_{3} \\ 0 & 0 & 0 & -L_{0} & L_{3}-L_{0} \\ 0 & x_{0}-\beta _{1} x_{3} & x_{0}-\beta _{2} x_{3} & x_{0}-x_{3} & x _{0}-x \\ 0 & y_{0}-\beta _{1} y_{3} & y_{0}-\beta _{2} y_{3} & y_{0}-y_{3} & y _{0}-y \\ x_{3} & \beta _{1} (\beta _{1} x_{3}-x_{0}) & \beta _{2} (\beta _{2} x _{3}-x_{0}) & x_{3}-x_{0} & 0 \\ y_{3} & \beta _{1} (\beta _{1} y_{3}-y_{0}) & \beta _{2} (\beta _{2} y _{3}-y_{0}) & y_{3}-y_{0} & 0 \end{bmatrix} $$
(95)

and

$$ {\boldsymbol{G}}_{2}^{T} = \begin{bmatrix} 0& 0 & 0 & 0 & x-x_{0} \\ 0& 0 & 0 & 0 & y-y_{0} \\ 0& 0 & 0 & 0 & z-z_{0} \\ 0& z_{0}-\beta _{1} z_{3} & z_{0}-\beta _{2} z_{3} & z_{0}-z_{3} & z _{0}-z \end{bmatrix} . $$
(96)

In summary, the three-dimensional US Navy crane with the nonzero pulley mass has \(f = 7\) degrees of freedom and \(a = 4\) control inputs.

Fig. 24
figure 24

Three-dimensional US Navy crane with nonzero pulley mass (\(m _{0} > 0\)) in terms of \(n=12 \) redundant coordinates

6.2.1 Inverse dynamics simulation

In the subsequent numerical simulation we use the following parameters: \(m_{l} = 100~\mbox{kg}\), \(m_{0} = 20~\mbox{kg}\), \(M = 6.4~\mbox{kg}\), \(J_{1}=J_{2}=J_{3}=0.1~\mbox{kg}\,\mbox{m}^{2}\), \(r_{1}=r_{2}=r_{3}= 0.1~\mbox{m}\), \(\alpha = \frac{\pi }{3}\), and \(s=l=k=5~\mbox{m}\). The prescribed trajectory can be generated by the same functions as in the last example. The initial load position is given by

$$ \boldsymbol{\gamma }_{0} = \begin{bmatrix} 5\sqrt{3}~\mbox{m} \\ 0 \\ -10~\mbox{m} \\ 2.5~\mbox{m} \end{bmatrix} \quad \mbox{at } t = 0 $$
(97)

and the final load position is described by

$$ \boldsymbol{\gamma }_{f} = \begin{bmatrix} 2~\mbox{m} \\ 5~\mbox{m} \\ -5~\mbox{m} \\ 2~\mbox{m} \end{bmatrix} \quad \mbox{at } t = 20~\mbox{s} . $$
(98)

The initial configuration of the crane system is specified by

$$ \boldsymbol{p}_{0} = \begin{bmatrix} \frac{5}{2}\sqrt{3}~\mbox{m} & 6.6144~\mbox{m} & 15~\mbox{m} & 2.5~\mbox{m} & 5\sqrt{3}~\mbox{m} & 0 & 5\sqrt{3}~\mbox{m} & 0 \end{bmatrix} ^{T} $$
(99)

at \(t_{0}=0\), and the initial load coordinates are given by

$$ \boldsymbol{x}_{0} = \begin{bmatrix} 5\sqrt{3}~\mbox{m} & 0 & -10~\mbox{m} & 2.5~\mbox{m} \end{bmatrix} ^{T} . $$
(100)

The numerical results for the time step size \(\Delta t = 0.1~\mbox{s}\) are displayed in Fig. 25, in which the coordinates, control inputs, Lagrange multipliers, and tension forces in ropes are presented. The simulated motion of the crane generated by the redundant coordinates formulation is presented in Fig. 26 with some snapshots at consecutive points in time.

Fig. 25
figure 25

Three-dimensional US Navy crane with nonzero pulley mass: Numerical results obtained with \(\Delta t = 0.1~\mbox{s}\)

Fig. 26
figure 26

Three-dimensional US Navy crane with nonzero pulley mass: Snapshots of the load and the main pulley at specific points in time. In addition, the trajectory of the main pulley and the prescribed trajectory of the load is shown

7 Conclusions

In this paper we further extended the applicability of index reduction by minimal extension [2, 8] to particularly complicated crane systems, which can be modeled by a general crane formulation based on redundant coordinates. Servo-constraint problems of such complicated cranes have not been amenable to numerical solution before. Due to the high degree of redundancy of the underlying crane description, the alternative projection technique does not seem to be applicable to the inverse dynamics problems treated herein. In contrast to that, the present approach proved to be perfectly suited for the numerical solution of the considered, comparatively complex servo-constraint problems. In this connection, the use of redundant coordinates provides the most versatile framework for the description of complex inverse dynamics problems such as the 3D US Navy crane dealt with in Sect. 6. If minimal coordinates are available for the description of the system, index reduction by minimal extension can as well be successfully applied. This has been shown for the planar version of the US Navy crane in Sect. 5.

The present approach allows for a high level of redundancy of the coordinates. Accordingly, truly rotationless formulations of multibody systems with natural coordinates are encompassed by the present method. The corresponding rotationless formulation is characterized by constant inertia parameters and holonomic constraints that are at most quadratic in the coordinates. In this way the use of rotational parameters like angles is circumvented in the problem formulation. The specific rotationless formulation of cranes dealt with in the present work typically yields singular inertia matrices which are a peculiar feature of the uniform modeling approach originally developed in [15].

Index reduction by minimal extension can be applied to the broad diversity of underactuated mechanical systems as well. For example, in some applications, the underlying DAEs of servo-constraint problems may have index greater than five, in others the system might be non-flat and exhibit internal dynamics (see [10, 12, 20]). The application to servo-constraint problems with internal dynamics could be the subject of future research work.