1 Introduction

Cranes are widely used, primarily in construction and transportation industries. Since cranes are designed as pendulums, oscillation of loads is a common problem [1]. Transportation techniques, anti-swing controls or cranes designs had arose in order to face this problem [26]; in this paper we focus on the latest.

Hammerhead cranes are mostly used in construction industry and are practically seen on top of every building in construction, being in charge of transporting the construction materials. Reducing transportation time is fundamental for reducing costs and promotes investments; however, the actual hammerhead cranes must be moved slow enough to prevent dangerous oscillations, and so, undesired efforts in structure [7] and [8].

All cranes are under-actuated systems. This crane consists in a rotating structure, one trolley and a cable that carries the suspended load, where three motors modifies the crane rotation, the position of the trolley and the length of the cable, respectively [21]. Adding a second cable and consequently a second hoisting motor gives us the possibility of controlling the loads movements in a more efficient manner. This basic observation implies the possibility of decreasing transportation time while reducing oscillations; in the literature similar configurations have been called Bifilar Pendulum [9], Multistring Pendulum [10] and [11], Blackburn Pendulum [12] or 2D-Spider Crane [13].

Thus, one may think that the main problem of a 2-wire crane is the natural difficulty of how to coordinate both cables in order to reduce oscillations, this difficulty increases considerably if we want to implement this new hoisting system in any of the configurations of the commercial cranes existing in the market.

Even more, despite many anti-swing techniques had been developed, their use has been relegated by human operators because the control method of a skilled human operator is considerably different from that of a computer control [4]; in that sense, the new configuration presented in this paper may be considered as a suitable anti-swing system, since it may reduce oscillations of the load without interfering with human operators.

This paper is organized as follows: in Sect. 2, we present the ’nominal’ mathematical model of a two wired crane and is presented a linear coordinate transformation that will fit better to our control objective of transporting a suspended mass from one point to another while reducing oscillations; in Sect. 3, using the new coordinate system, a linear state-feedback control is designed, and is set the way of how the transformed system relates the ’nominal’ system; in the synthesis of the control law we assume that controls are bounded, this hypothesis makes the control more realistic. In Sect. 4 are shown the simulations results; and finally, in Sect. 5 are described the conclusions and future work.

Fig. 1
figure 1

The crane model

2 Mathematical model

Consider the hammerhead crane depicted in Fig. 1, with the following general assumptions: A1. The load is represented by a point mass, the mass of the crane and the mass of the transporting car are represented by point masses and their, respectively, moment of inertia, A2. The cables are considered always tense and weightless, and A3. No deformation in crane structure due to load acceleration is considered. The centre of mass of the trolley is between the two hoisting motors that are aligned with the crane boom, separated each other a distance \(d>0\).

Let \(\left\{ {X,Y ,Z } \right\} \) be the inertial coordinate system fixed to the crane tower axis, the coordinate system \(\left\{ {X',Y' ,Z'}\right\} \) is the trolley’s coordinate system which moves with the trolley. Where Z and \(Z'\) are parallel, \(X'\) is aligned with the crane boom axis, and \(Y'\) is tangential to the trolley’s rotation.

The notation used in the paper is:

\(m_1\) :

\(\equiv \)   Trolley mass,

\(m_2\) :

\(\equiv \)   Load mass,

\(\mathbf r _1\) :

\(\equiv \)   Trolley’s centre of mass,

\(\mathbf r _{2,3}\) :

\(\equiv \)   Position of hoisting motors,

\(\mathbf r _4\) :

\(\equiv \)   Position of the load mass,

\(l_{2,3}\) :

\(\equiv \)   Length of mechanical cables,

\(\theta \) :

\(\equiv \)   Crane’s rotation,

\(P_1\) :

\(\equiv \)   Plane passing through \(\mathbf r _2\) parallel to the \(Y'Z'\)-plane,

\(\phi _1\) :

\(\equiv \)   Swing angle projected on \(P_1\)

\(\psi _1\) :

\(\equiv \)   Swing angle measured from the \(P_1\)-plane to the load mass,

\(P_2\) :

\(\equiv \)   Plane passing through \(\mathbf r _3\) parallel to the \(Y'Z'\)-plane,

\(\phi _2\) :

\(\equiv \)   Swing angle projected on \(P_2\)

\(\psi _2\) :

\(\equiv \)   Swing angle measured from the \(P_2\)-plane to the load mass,

\(u_0\) :

\(\equiv \)   Force control over trolley,

\(u_1\) :

\(\equiv \)   Force control over cable 1,

\(u_2\) :

\(\equiv \)   Force control over cable 2,

\(u_3\) :

\(\equiv \)   Torque control over crane rotation.

The position of the trolley’s centre of mass (\(\mathbf r _1\)) and the position of the hoisting motors (\(\mathbf r _2\) and \(\mathbf r _3\)) with respect the fixed frame are

$$\begin{aligned} \mathbf r _1= & {} \left[ \begin{array}{l} \rho \cos \theta \\ \rho \sin \theta \\ 0 \\ \end{array} \right] , \quad \mathbf r _2 = \left[ \begin{array}{l} \left( {\rho - {d /2}} \right) \cos \theta \\ \left( {\rho - {d/2}} \right) \sin \theta \\ 0 \\ \end{array} \right] , \\ \mathbf r _3= & {} \left[ \begin{array}{l} \left( {\rho + {d /2}} \right) \cos \theta \\ \left( {\rho + {d/2}} \right) \sin \theta \\ 0 \\ \end{array} \right] . \end{aligned}$$

The position of the load can be described from any of the two hoisting motors by spherical coordinates [14], because of the assumption of tense cables, it can be written in terms of the triad \((l_1,\phi _1,\psi _1)\), or the triad \((l_2,\phi _2,\psi _2)\).

Notice here, that the tense cables define univocally a plane (the plane is defined by the two motors and the load mass) that allows us to geometrically relate the \((l_1,\phi _1,\psi _1)\) and \((l_2,\phi _2,\psi _2)\) triads. It is immediate that \(\phi _1=\phi _2\), and using the law of cosines, we have

$$\begin{aligned} \begin{array}{l} l_2 = \sqrt{d^2 + l_1 ^2 - 2l_1 \mathrm{d}\cos \left( {\frac{\pi }{2} - \psi _1 } \right) } \\ \psi _2 = - \frac{\pi }{2} + \arccos \left( {\frac{{d^2 + l_2 ^2 - l_1 ^2 }}{{2l_2 d}}} \right) . \\ \end{array} \end{aligned}$$
(1)

Therefore, the coordinate system \(\left[ {\begin{array}{*{20}c} \rho &{} \theta &{} l_1 &{} \phi _1 &{} \psi _1 \\ \end{array}} \right] ^\mathrm{T} = :\mathbf q \) defines completely the configuration space of our crane and may be defined as the generalized coordinates in which we describe the motion. In this way, the load position in the inertial frame is given by

$$\begin{aligned} \mathbf r _4 (\mathbf q ) = \left[ \begin{array}{l} \left( {\rho - {d /2}} \right) {\mathop {\mathrm{c}}\nolimits } _{\theta } + l_{1}s_{\psi _1 } c_{\theta } - l_{1}c_{\psi _1 } s_{\phi _1 } s_{\theta } \\ \left( {\rho - {d/2}} \right) s_\theta + l_{1}s_{\psi _1 } s_{\theta } - l_{1}c_{\psi _1 } s_{\phi _1 } c_{\theta } \\ -\, l_{1}c_{\phi _1 } c_{\psi _1 } \\ \end{array} \right] , \end{aligned}$$
(2)

where for notation convenience, we have denoted \(\sin (X) = s_X\) and \(\cos (X) = c_X\). With this coordinate system, the potential energy of the system is \(V=-mglc_{\phi _1} c_{\psi _1}\) and the kinematic energy of the rail, the trolley and the load are, respectively,

$$\begin{aligned} T_1= & {} \frac{1}{2}I_1 {\dot{\theta }}^2,\\ T_2= & {} \frac{1}{2}\left( {I_2 + m_1 \rho ^2 } \right) {\dot{\theta }}^2 + \frac{1}{2}m_1{\dot{\rho }}^2,\\ T_3= & {} \frac{1}{2}m_2 \dot{\mathbf{r }}_4 ^\mathrm{T} \dot{\mathbf{r }}_4, \end{aligned}$$

where \(I_1\) is the moment of inertia of the rail structure, and \(I_2\) is the moment of inertia of the car (further, we will denote \(I=I_1+I_2\)). Thus, we have the Lagrangian

$$\begin{aligned} L = \sum \limits _{i = 1}^3 {T_i } - V, \end{aligned}$$

and finally applying the Euler-Lagrange’s equations, the dynamics may be expressed as

$$\begin{aligned} D\left( \mathbf q \right) \ddot{\mathbf{q }} + C\left( \mathbf{q ,\dot{\mathbf{q }}} \right) \dot{\mathbf{q }} + G\left( \mathbf q \right) = Q\left( \mathbf{q ,\mathbf u } \right) . \end{aligned}$$
(3)

where the generalized forces \(Q\left( \mathbf{q ,\mathbf u }\right) \), in matrix form, are written as

$$\begin{aligned} Q\left( \mathbf{q ,\mathbf u } \right) = \left[ {\begin{array}{*{20}c} 1 &{} {s_ {\psi _1 }} &{} {s_ {\psi _2 }} &{} 0 \\ 0 &{} {\left( {\rho - \frac{d}{2}} \right) c_{\psi _1} s_{\phi _1} } &{} {\left( {\rho + \frac{d}{2}} \right) c_{\psi _1} s_{\phi _1}} &{} 1 \\ 0 &{} { - 1} &{} { - c_{ \left( \psi _1 - \psi _2 \right) } } &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} {l_1 s_ {\left( \psi _1 - \psi _2 \right) } } &{} 0 \\ \end{array}} \right] \mathbf u ,\quad \end{aligned}$$
(4)

with

$$\begin{aligned} \mathbf u = \left[ {\begin{array}{*{20}c} {u_0 } &{} {u_1 } &{} {u_2 } &{} {u_3 } \\ \end{array}} \right] ^\mathrm{T} , \end{aligned}$$

Explicit expression for the right hand terms can be found in “Appendix 1”.

From Eq. (4) is clear that the dynamic of the \(\psi _1\)-variable, which describes the oscillation of the load (fifth row), is affected by the term \({l_1 s_ {\left( \psi _1 - \psi _2 \right) } } u_2\), i.e. due to the control of the extra hoisting cable, we can explicitly manage to reduce \(\psi \)- oscillations. Unfortunately this natural selection of coordinates is not suitable since appears that only \(u_2\) affects directly the oscillations (since there is no difference between cable 1 or cable 2, we should expect that our model gives the same importance to both cables) and it is not clear how to control the height of the load mass, and so we cannot take advantage of adding a second hoisting cable. However, it is also clear that we cannot control \(\phi \)-oscillations directly.

2.1 Defining a virtual control

Here, we consider a more suitable coordinate selection, see Fig. 2, we have then

\(\mathbf u _{\mathrm{eq}}\) :

\(\equiv \)   Equivalent control: \(\mathbf u _1 + \mathbf u _2\)

\(\gamma \) :

\(\equiv \)   Distance on \(X'\) from centre of mass to the applied equivalent force \(\mathbf u _{\mathrm{eq}}\)

\(l_3\) :

\(\equiv \)   Distance from the point \(\gamma \) to the load

\(P_3\) :

\(\equiv \)   Plane passing through \(\gamma \) parallel to the \(Y'Z'\)-plane

\(\phi _3\) :

\(\equiv \)   Swing angle projected on the \(P_3\)-plane

\(\psi _3\) :

\(\equiv \)   Swing angle measured from the \(P_3\)-plane to the load mass.

Here \(\mathbf u _{\mathrm{eq}}\) is contained in the parallelogram parallel to the coordinate system formed by the two hoisting cables and the load, and we may think of \(l_3\) as a virtual hoisting cable with a time varying suspension point with distance \(\gamma (t)\in \left[ -d/2,d/2\right] \) measured from the mid point between the hoisting motors; let us define

$$\begin{aligned} \left[ {\begin{array}{*{20}c} \rho &{} \theta &{} l_3 &{} \phi _3 &{} \psi _3 \\ \end{array}} \right] ^\mathrm{T} = :\tilde{q}, \end{aligned}$$
Fig. 2
figure 2

The new coordinates selection

we have now, using this new coordinates

$$\begin{aligned} \mathbf r _4 \left( \tilde{\mathbf{q }} \right) = \left[ \begin{array}{l} \left( \rho + \gamma \right) c _\theta + l_3s_{\psi _3 } c_\theta - l_3c_{\psi _3 } s_{\phi _3 } s_\theta \\ \left( {\rho + \gamma } \right) s_\theta + l_3s_{\psi _3 } s_\theta - l_3c_{\psi _3 } s_{\phi _3 } c_\theta \\ -\, l_3c_{\phi _3 } c_{\psi _3 } \\ \end{array} \right] , \end{aligned}$$
(5)

And according to (2), we have the relation

$$\begin{aligned} \mathbf q = f\left( {\tilde{\mathbf{q }};t} \right) , \end{aligned}$$

which by geometric relations, we found explicitly

$$\begin{aligned} \mathbf q = \left[ \begin{array}{c} \rho \\ \theta \\ \left( {l_3 c_{\psi _3}} \right) \left( {{\cos \left( {\arctan \left( {\frac{{\gamma + l_3 s_{\psi _3} + d/2}}{{l_3 c_{\psi _3} }}} \right) } \right) }} \right) ^{-1} \\ \phi _3 \\ \arctan \left( {\frac{{\gamma + l_3 s_{\psi _3} + d/2}}{{l_3 c_{\psi _3} }}} \right) \\ \end{array} \right] , \end{aligned}$$
(6)

where is immediate that the transformation corresponds to the pair \((l_1, \psi _1)\) and \(\phi _1=\phi _3\). Since it is a diffeomorphism, we have the relation \(L\left( {q,\dot{q};t} \right) = \tilde{L}\left( {\tilde{q},\dot{\tilde{q}};t} \right) \), the new dynamic equations can be defined as

$$\begin{aligned} \begin{array}{*{20}c} {\frac{d}{{dt}}\left( {\frac{\partial }{{\partial \dot{ \tilde{q} }}}\tilde{L}\left( {\tilde{q},\dot{ \tilde{q} } ;t} \right) } \right) - \frac{\partial }{{\partial \tilde{q}}}\tilde{L} \left( {\tilde{q},\dot{ \tilde{q} };t} \right) = \tilde{Q}_i ,} &{} {i = 1,2,3.} \\ \end{array} \end{aligned}$$

Making the corresponding computations, we get the equivalent dynamical system

$$\begin{aligned} \tilde{D} \left( {\tilde{q}} \right) \ddot{\tilde{q}} + \tilde{C} \left( {\tilde{q},\dot{ \tilde{q}} } \right) \dot{ \tilde{q} }+ \tilde{ G }\left( {\tilde{q}} \right) = \tilde{Q}'\left( {\tilde{q},\tilde{ u }} \right) + \tilde{F}\left( {\tilde{q},\ddot{\gamma } } \right) \end{aligned}$$
(7)

where after the corresponding calculations are found

$$\begin{aligned} \begin{array}{*{20}c} {\tilde{D}\left( {\tilde{q}} \right) = D\left( {\tilde{q}} \right) ,} &{} {\tilde{C}\left( {\tilde{q},\dot{\tilde{q}} } \right) = C\left( {\tilde{q},\dot{ \tilde{q}}} \right) ,} &{} {\tilde{G} \left( {\tilde{q}} \right) = G\left( {\tilde{q}} \right) ,} \\ \end{array} \end{aligned}$$

and the right-hand side of formula (7) is

$$\begin{aligned} \left[ {\begin{array}{*{20}c} 1 &{} {s_{\psi _3 } } &{} 0 \\ 0 &{} {\left( {\rho + \gamma } \right) c_{\psi _3 } s_{\phi _3 } } &{} 1 \\ 0 &{} { - 1} &{} 0 \\ 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 \\ \end{array}} \right] \left[ {\begin{array}{*{20}c} {u_0 } \\ {u_{\mathrm{eq}} } \\ {u_3 } \\ \end{array}} \right] + \ddot{\gamma }\left[ \begin{array}{l} - m_2 \\ ml_3 c_{\psi _3 } s_\alpha \\ - ms_{\psi _3 } \\ 0 \\ - ml_3 c_{\psi _3 } \\ \end{array} \right] . \end{aligned}$$
(8)

Since \(\ddot{\gamma }\) may be considered as another control input; i.e \(u_4=\ddot{\gamma }\); similar controls over the acceleration are studied in [23]; Eq. (8) can be written simply as

$$\begin{aligned} Q\left( {\tilde{\mathbf{q }},\tilde{\mathbf{u }}} \right) = B\left( {\tilde{q}} \right) \tilde{\mathbf{u }} = \left[ {\begin{array}{*{20}c} 1 &{} {s_{\psi _3 } } &{} 0 &{} { - m_2 } \\ 0 &{} {\left( {\rho + \gamma } \right) c_{\psi _3 } s_{\phi _3 } } &{} 1 &{} {ml_3 c_{\psi _3 } s_\alpha } \\ 0 &{} { - 1} &{} 0 &{} { - ms_{\psi _3 } } \\ 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} { - ml_3 c_{\psi _3 } } \\ \end{array}} \right] \tilde{\mathbf{u }}, \end{aligned}$$

with

$$\begin{aligned} \tilde{\mathbf{u }} = \left[ {\begin{array}{*{20}c} {u_0 } &{} {u_{\mathrm{eq}} } &{} {u_3 } &{} {u_4 } \\ \end{array}} \right] ^\mathrm{T}. \end{aligned}$$

At this point, one may think we have obtained basically the same system, but we found some important differences; first, the effect on the height of the load appears now explicitly as the combined effect of the two hoisting forces of the motors; then, the \(\psi \)-oscillations can be reduced varying \(\gamma (t)\), and finally the relation between hoisting cables is also easily deduce from \(\gamma \).

Since physical cables can only pull the load, we must consider the following constraint

$$\begin{aligned} \begin{array}{*{20}c} {u_1 \ge 0,} &{} {u_2 \ge 0}. \\ \end{array} \end{aligned}$$
(9)
Fig. 3
figure 3

Controller and plant scheme

3 Main results

As stated earlier, with this change in the coordinate variables, is possible to coordinate both cables via a linear feedback control; for this, we consider the extended vector \(\mathbf p \in \mathfrak {R}^6\) \(\left( \mathbf p = \left[ {\begin{array}{*{20}c} {\rho } &{} {\theta } &{} {l_3 } &{} {\phi _3 } &{} {\psi _3 } &{} \gamma \\ \end{array}} \right] ^\mathrm{T} \right) \).

The dynamics of the extended vector \(\mathbf p \) is simply

$$\begin{aligned} \begin{array}{*{20}c} {\left[ {\begin{array}{*{20}c} {D\left( \mathbf p \right) } &{} \mathbf{0 }_{{5 \times 1} } \\ \mathbf{0 }_{{1 \times 5} } &{} 1 \\ \end{array}} \right] \ddot{\mathbf{p }} + \left[ {\begin{array}{*{20}c} {C\left( \mathbf{p ,\dot{\mathbf{p }}} \right) } &{} \mathbf{0 }_{{5 \times 1} } \\ \mathbf{0 }_{{1 \times 5} } &{} 0 \\ \end{array}} \right] \dot{\mathbf{p }} + \cdots } \\ { \cdots + \left[ {\begin{array}{*{20}c} {G\left( \mathbf p \right) } \\ 0 \\ \end{array}} \right] = \left[ \begin{array}{c} B \left( \mathbf p \right) \\ \begin{array}{*{20}c} 0 &{} 0 &{} 0 &{} 1 \\ \end{array} \\ \end{array} \right] \tilde{\mathbf{u }},} \\ \end{array} \end{aligned}$$

in this extended system, and we can analyse the complete behaviour of the system, stability and cable coordination.

Linearizing around some equilibrium point \(\mathbf p _{ss} = \left[ {\begin{array}{*{20}c} {\rho _{ss} } &{} {\theta _{ss} } &{} {l_{3,ss} } &{} 0 &{} 0 &{} 0 \\ \end{array}} \right] ^\mathrm{T}\), we obtain the second-order linear differential system

$$\begin{aligned} \ddot{\mathbf{p }} = A\mathbf p + B\tilde{\mathbf{u }} \end{aligned}$$

where

$$\begin{aligned} A= & {} \left[ {\begin{array}{*{20}c} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} { - \frac{g}{{l_{3,ss} }}} &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} { - \frac{g}{{l_{3,ss} }}} &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ \end{array}} \right] , \end{aligned}$$
(10)
$$\begin{aligned} B= & {} \left[ {\begin{array}{*{20}c} {\frac{1}{{m_1 }}} &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} {\frac{1}{{m_1 \rho _{ss} ^2 + I}}} &{} 0 \\ 0 &{} { - \frac{1}{{m_2 }}} &{} 0 &{} 0 \\ 0 &{} 0 &{} { - \frac{{\rho _{ss} }}{{l_{3,ss} }}\left( {\frac{1}{{m_1 \rho _{ss} ^2 + I}}} \right) } &{} 0 \\ { - \frac{1}{{m_1 l_{3,ss} }}} &{} 0 &{} 0 &{} { - \frac{1}{{l_{3,ss} }}} \\ 0 &{} 0 &{} 0 &{} 1 \\ \end{array}} \right] , \end{aligned}$$
(11)

From Eq. (10) we see that the linearized unforced dynamics behaves as two uncoupled pendulums with equal natural frequencies \((g/l_{ss})^{1/2}\). Defining \(\mathbf z = \left[ {\begin{array}{*{20}c} \mathbf p &{}\quad \! {\dot{\mathbf{p }}} \\ \end{array}} \right] ^\mathrm{T} \), we have the 12-dimensional first-order linear equation system

$$\begin{aligned} \dot{\mathbf{z }} = A_1 \mathbf z + B_1 \tilde{\mathbf{u }} \end{aligned}$$

where

$$\begin{aligned} \begin{array}{*{20}c} {A_1 = \left[ {\begin{array}{*{20}c} \mathbf{0 }_{{6 \times 6}} &{}\quad \! \mathbf{I }_{{6 \times 6}} \\ A &{}\quad \! \mathbf{0 }_{{6 \times 6} } \\ \end{array}} \right] ,} &{}\quad \! {B_1 = \left[ \begin{array}{l} \mathbf{0 }_{6 \times 4} \\ B \\ \end{array} \right] } \\ \end{array}. \end{aligned}$$

and, since rank\(\left( {\left[ {\begin{array}{*{20}c} {B_1 } &{} {A_1 B_1 } &{} \ldots &{} {A^{11} _1 B_1 } \\ \end{array}} \right] } \right) = 12\), the system is controllable.

3.1 LQR control

We proposed the standard cost functional of the form

$$\begin{aligned} J = \int _0^\infty {\left( \mathbf{z ^\mathrm{T} \left( t \right) Q\mathbf z \left( t \right) + \tilde{\mathbf{u }}^\mathrm{T} \left( t \right) R\tilde{\mathbf{u }}\left( t \right) } \right) dt} \end{aligned}$$

with \(Q=Q^\mathrm{T}\ge 0\) and \(R=R^\mathrm{T} > 0\). Optimal control theory (as stated in any conventional optimal control book, say [15]) states that the optimal control is given by the state-feedback control

$$\begin{aligned} \tilde{\mathbf{u }}\left( t \right) = - R^{ - 1} BP\mathbf z \left( t \right) \end{aligned}$$

where the symmetric positive definite P matrix must satisfy the algebraic Ricatti equation (ARE)

$$\begin{aligned} PA + A^\mathrm{T} P + Q - PBR^{ - 1} B^\mathrm{T }P = 0, \end{aligned}$$

and more important, an appropriate choice of R and Q matrices must be made to obtain acceptable state and control levels [16], one might choose these R and Q matrices to be diagonal with

$$\begin{aligned} \begin{array}{l} Q^{-1}_{ii} = \hbox {maximum acceptable value of}\, \left[ {p_i \left( t \right) } \right] ^2 \\ R^{-1}_{ii} = \hbox {maximum acceptable value of} \, \left[ {u_i \left( t \right) } \right] ^2 \\ \end{array} \end{aligned}$$
(12)

3.2 Connection between controller and plant

Because of the coordinate transformation, the control of the physical crane must be performed as shown in Fig. 3, the error \(\mathbf{e}(t)= \mathbf{r}(t)-\mathbf{q}(t)\), must enter the controller, where a transformation \(T:(\mathbf{q},\gamma ) \rightarrow \mathbf{z}\) will change the plant’s coordinates to the controller’s coordinates; then a transformation \(T_1:(\tilde{\mathbf{u }},\gamma ) \rightarrow \mathbf{u}\), will assign each cable the corresponding tension, noting that the control calculated for the trolley’s and crane’s actuators has no difference in both coordinate variables. The virtual variable \(\gamma (t)\) is obtain via \(u_4(t)\), i.e.

$$\begin{aligned} \ddot{\gamma } \left( t \right)= & {} u_4 \left( t \right) , \quad \gamma \left( 0 \right) = \gamma _0 \in \left[ -\frac{d}{2},\frac{d}{2}\right] \\ \gamma \left( t \right)= & {} \int \limits _0^t \int \limits _0^{t_2 } u_4 \left( {t_1 } \right) dt_1 dt_2 \\ \end{aligned}$$

this way, \(\gamma \left( t\right) \) is perfectly defined during all the experimentation time

3.2.1 Transformation T

We will assume that we have access to all \(\mathbf{q}\) states. The transformation \({\tilde{\mathbf{q}}} = T\left( {{\mathbf{q}},\gamma } \right) \)

$$\begin{aligned} {\tilde{\mathbf{q}}} = \left[ \begin{array}{c} \rho \\ \theta \\ \left( {{l_1 c_{\psi _1} }}\right) \left( {\cos \left( {\arctan \left( {\frac{{l_1 s_{\psi _1} - \gamma - \frac{d}{2}}}{{l_1 c_{\psi _1} }}} \right) } \right) }\right) ^{-1} \\ q_4 \\ \arctan \left( {\frac{{l_1 s_{\psi _1} - \gamma - \frac{d}{2}}}{{l_1 c_{\psi _1} }}} \right) \\ \end{array} \right] \end{aligned}$$
(13)

which is the inverse transformation of Eq. (6) and is valid almost everywhere. Here, \({\dot{\tilde{\mathbf{q}}}}\) can be obtained either deriving the previous expression or numerically, for simulation purposes we use the latest. So, with this information we can form the \(\mathbf{z}\) vector and calculate the corresponding linear \({\tilde{\mathbf{u}}}\left( t \right) = - R^{ - 1} BP{\mathbf{z}}\left( t \right) \) controller.

3.2.2 Transformation \(T_1\)

It is clear that we cannot control the physical crane directly from our transformed coordinates; so, we should be able to determine the pair \((u_1,u_2)\) somehow from the pair \((u_{\mathrm{eq}},\gamma )\), we first observe that

$$\begin{aligned} \begin{array}{*{20}c} {\mathbf{u}_1 = u_1 \left[ \begin{array}{l} - s_{\psi _1} \\ c_{\psi _1} \\ \end{array} \right] ,} &{} {u_1 = \left| {{\mathbf{u}}_1 } \right| }, \\ {\mathbf{u}_2 = u_2 \left[ \begin{array}{l} - s_{\psi _2} \\ c_{\psi _2} \\ \end{array} \right] ,} &{} {u_2 = \left| {{\mathbf{u}}_2 } \right| }, \\ \end{array} \end{aligned}$$

and, also that

$$\begin{aligned} \begin{array}{*{20}c} {{\mathbf{u}}_{\mathrm{eq}} = u_{\mathrm{eq}} \left[ \begin{array}{l} - s_{\psi _3} \\ c_{\psi _3} \\ \end{array} \right] ,} &{} {u_{\mathrm{eq}} = \left| {{\mathbf{u}}_{\mathrm{eq}} } \right| }, \\ \end{array} \end{aligned}$$

where \(\psi _3\) is known by (13) (where appears the dependence on \(\gamma \)); using the definition of \(\mathbf{u}_{\mathrm{eq}}\), we simply have

$$\begin{aligned} u_{\mathrm{eq}}\left[ \begin{array}{l} - s_{\psi _3} \\ c_{\psi _3} \\ \end{array} \right] = \left[ {\begin{array}{*{20}c} { - s_{\psi _1} } &{} { - s_{\psi _2}} \\ {c_{\psi _1} } &{} {c_{\psi _2}} \\ \end{array}} \right] \left[ \begin{array}{l} u_1 \\ u_2 \\ \end{array} \right] , \end{aligned}$$

where

$$\begin{aligned} \det \left[ {\begin{array}{*{20}c} { - s_{\psi _1} } &{} { - s_{\psi _2}} \\ {c_{\psi _1} } &{} {c_{\psi _2}} \\ \end{array}} \right] = - s_{\left( \psi _1-\psi _2 \right) }, \end{aligned}$$

and \(- s_{\left( \psi _1-\psi _2 \right) } \ne 0\) if and only if \(\psi _1\ne \psi _2\) \(\hbox {mod} \left( \pi \right) \), situation that arises when we have parallel cables, which is impossible in the proposed crane. So, we immediately have

$$\begin{aligned} \left[ \begin{array}{l} u_1 \\ u_2 \\ \end{array} \right] = u_{\mathrm{eq}} \left[ {\begin{array}{*{20}c} { - s_{\psi _1} } &{} { - s_{\psi _2}} \\ {c_{\psi _1} } &{} {c_{\psi _2}} \\ \end{array}} \right] ^{ - 1} \left[ \begin{array}{l} - s_{\psi _3} \\ c_{\psi _3} \\ \end{array} \right] . \end{aligned}$$

3.3 Admissible controls

At his point, we have made a change of coordinates, propose an optimal stabilizing control, and return the control to the original coordinates. Unfortunately the calculated control may be an inadmissible control; as stated by condition (9), it is evident that all admissible controls \(\mathbf{u}_{\mathrm{eq}}\) must lay inside the parallelogram formed by the two cables (or equivalently \(\gamma (t) \in \left[ { - \frac{d}{2},\frac{d}{2}} \right] \), \(\forall t\)); so, in the transformation function T, instead of \(\gamma (t)\), we use the saturation function

$$\begin{aligned} \gamma _{\mathrm{sat}} (t) = \left\{ {\begin{array}{*{20}c} { - \frac{d}{2}} &{} \hbox {if} &{} {\gamma (t) < - \frac{d}{2}} \\ \gamma (t) &{} \hbox {if} &{} {\gamma (t) \in \left[ { - \frac{d}{2},\frac{d}{2}} \right] } \\ { \frac{d}{2}} &{} \hbox {if} &{} {\gamma (t) > \frac{d}{2}} \\ \end{array}} \right. \end{aligned}$$

and we use the transformation

$$\begin{aligned} {\tilde{\mathbf{q}}} = T\left( {{\mathbf{q}},\gamma _{\mathrm{sat}} } \right) \end{aligned}$$

instead of transformation (13).

Remark A large d will have better stabilizing properties (at the expense of the crane design); and as d tends to zero, the behaviour of the two wired crane design will tend to the behaviour of a single wired crane.

As stated earlier, \(\gamma (t)\) affects the velocity of convergence of the angle, and due to the pendulum behaviour of the load we will see small oscillations around the equilibrium point, until the load losses enough energy to be stopped by the saturated control, i.e. saturating the \(\gamma \)-variable does not compromises stability, just the transitory behaviour. Stability of saturated control in mechanical systems is presented in more detail in [17] and [18].

4 Simulations

In this section, we present the two possible motions; we consider first the radial displacement of the trolley, while the angle of the crane boom is fixed, then we consider the rotation of the crane boom while keeping the trolley in a fixed position.

Simulations were realized in Matlab Simulink, we consider the following physical parameters: \(g=9.81 (m/s^2)\), \(m_1=1500 (kg)\), \(m_2=300 (kg)\) and \(I=3000 (kg\cdot m^2)\). The functional cost matrix Q can be partitioned as

$$\begin{aligned} Q = \left[ {\begin{array}{*{20}c} {Q_1 } &{} \mathbf 0 _{6 \times 6} \\ \mathbf 0 _{6 \times 6} &{} {Q_2 } \\ \end{array}} \right] \end{aligned}$$

where \(Q_1\) weights the position terms and \(Q_2\) weights the velocity terms; according to (12), we want to penalize a lot the deviation from the desired coordinate (\(Q_1\) have large diagonal elements), and the controls are allowed to reach high values (\(R_{ii}\ll 1\) for \(i=1,\ldots ,4\)). However, according to (12) we have that the Q-element corresponding to the penalization over the \(\gamma \)-position (denoted as \(Q_{66}\)) should take into account the physical restriction d, so it must be considered

$$\begin{aligned} Q^{-1}_{66} = \hbox {maximum acceptable value of } \left[ \gamma (t) \right] ^2 \end{aligned}$$
(14)

since is immediate that

$$\begin{aligned} \mathop {\max }\limits _\mathrm{t} {\left[ {\gamma \left( t \right) } \right] ^2} = {\left[ {\frac{d}{2}} \right] ^2} \end{aligned}$$

we simply have

$$\begin{aligned} {Q_{66}} = \frac{4}{{{d^2}}} \end{aligned}$$

and the gain matrices may be written as

$$\begin{aligned} Q_1= & {} 10^3 \cdot \left[ {\begin{array}{*{20}c} 1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 30 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0.05 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 1 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} \frac{4\cdot 10^{-3}}{d^2} \\ \end{array}} \right] ,\\ Q_2= & {} 10^2 \cdot \left[ {\begin{array}{*{20}c} 1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0.5 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 1 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0.01 \\ \end{array}} \right] , \end{aligned}$$

and

$$\begin{aligned} R = 10^{-2} \cdot \left[ {\begin{array}{*{20}c} 1 &{} 0 &{} 0 &{} 0 \\ 0 &{} 1 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0.05 &{} 0 \\ 0 &{} 0 &{} 0 &{} {0.05} \\ \end{array}} \right] , \end{aligned}$$

And the ARE equation must be solved for each possible design value of d.

The LQR transitory behaviour for each calculated controller was improved using input shaping [10, 19, 22], also called prefiltering, as commonly used for improving the behaviour of this kind of systems (see “Appendix 2”), although other techniques may be used for this purpose [20].

4.1 Case 1: Pure displacement of the trolley

While considering no rotation in the crane, the system analysis is simplified. We consider two important situations: firstly, when d is large enough to contain the horizontal displacement of the load, and finally the more interesting case for industrial implementation, the case where d is considerably smaller than the horizontal displacement of the load.

4.1.1 Simplest case: \(d\ge \) horizontal load’s displacement

Intuitively this case is the simplest case we should find with the actual crane design, nor the crane neither the trolley should be moved in order to achieve the load’s displacement; this may be considered a case of the called spider crane [13]. For simulation, let us consider a displacement of the load located initially below the left hoisting motor (arbitrarily located at \(r_2 = \left[ 1 ,0,0 \right] \)), whose final position must be placed below the right hoisting motor (also arbitrarily located at \(r_3 = \left[ 11 ,0,0 \right] \)), the distance between the hoisting motors is clearly \(d = 10 (m)\) which is also the load displacement, the elevation of the load during all the trajectory must be kept to a constant value, let us consider the load to be placed 10 (m) under the crane’s boom. We can express, in \(\mathbf p \)-coordinates, the position of the load at initial and final time as

$$\begin{aligned} \begin{array}{*{20}c} {p\left( 0 \right) = \left[ {\begin{array}{*{20}c} {6,} &{} {0,} &{} {10,} &{} {0,} &{} {0,} &{} { - 5} \\ \end{array}} \right] ^\mathrm{T} ,} \\ {p\left( {t_\mathrm{f} } \right) = \left[ {\begin{array}{*{20}c} {6,} &{} {0,} &{} {10,} &{} {0,} &{} {0,} &{} { 5} \\ \end{array}} \right] ^\mathrm{T}.} \\ \end{array} \end{aligned}$$

Notice that moving the load between the hoisting motors is equivalent to vary the virtual coordinate \(\gamma (t)\) from \(-5\) to 5 (m).

In Fig. 4 is shown the position of the load in the XZ-Plane, while in Fig. 5 is shown the transition of the total tension effort from the left cable to the right cable; the validity and advantages of the coordinate transformation are now easily seen. Is also clear that moving the load without moving the transporting vehicle cannot be performed in a 1-wire crane.

Fig. 4
figure 4

Position of the load in the XY-plane for \(d=0.5\)

Fig. 5
figure 5

Final control force applied by cables

4.1.2 Case: \(d<<\) horizontal load’s displacement

In this case, we want to perform only a displacement of the trolley considering a small distance between hoisting motors (we consider three possible values of d), while keeping a constant altitude on the suspended mass. For simulation purposes, we will consider a translation from \(\mathbf r _1(0)=\left[ {\begin{array}{*{20}c} 2 &{} 0 &{} 0 \\ \end{array}} \right] ^\mathrm{T}\) at initial time to \(\mathbf r _1(t_\mathrm{f})=\left[ {\begin{array}{*{20}c} {22} &{} 0 &{} 0 \\ \end{array}} \right] ^\mathrm{T}\) at final time, or equivalently

$$\begin{aligned} \begin{array}{*{20}c} {p\left( 0 \right) = \left[ {\begin{array}{*{20}c} {2,} &{} {0,} &{} {10,} &{} {0,} &{} {0,} &{} 0 \\ \end{array}} \right] ^\mathrm{T} ,} \\ {p\left( {t_\mathrm{f} } \right) = \left[ {\begin{array}{*{20}c} {22,} &{} {0,} &{} {10,} &{} {0,} &{} {0,} &{} 0 \\ \end{array}} \right] .} \\ \end{array} \end{aligned}$$

Note that the final point does not coincide with the linearization point, however, due to the nature of the mechanical system as well as the inherently robust capability to small perturbations of the linear feedback controller, we can achieve a good system response.

Fig. 6
figure 6

X-displacement of the load

Fig. 7
figure 7

Variation of \(\psi _1\)-angle

Fig. 8
figure 8

Horizontal distance between load and trolley

In Fig. 6, we see the displacement of the load and we can see that the single cable crane is unable to attenuate fast enough residual oscillations despite the shaped input (see “Appendix 2”), meanwhile having an extra hoisting motor eliminate residual oscillations fairly well. In Fig. 7 is shown the variation of the \(\psi _1\)-angle, because of the shaped input, oscillations for the chosen values of d were reduced. To make a fair comparison between the oscillations of the three chosen values of d, in Fig. 8 is depicted the horizontal distance between the trolley centre of mass and the load. At this point, now are clear the benefits of including an extra cable.

Fig. 9
figure 9

Height of the load to crane’s boom

Fig. 10
figure 10

\(\theta \)-crane rotation

Fig. 11
figure 11

Position of the load in the XY-plane

Fig. 12
figure 12

\(\phi \)-load rotation

Fig. 13
figure 13

\(\psi \)-load rotation

For the sake of completeness, we show in Fig. 9 that the intended height was also achieved. Note that the tension in the cables will determine the attenuation in the oscillations as well as the height of the load, so we cannot improve on one aspect without affecting the other; this relation between coordinates is defined with the proposed LQR cost functional.

4.2 Case 2: Pure rotation of the crane

In order to analyse the behaviour of the crane in a pure rotation motion, in the mechanical model we fix \(\rho \equiv 10 (m)\) (\(\dot{\rho }\equiv 0\), \(\ddot{\rho }\equiv 0\)).

Our crane will make a half rotation following a step input; in Fig. 10 we see the effect of the input in the crane rotation for distinct values of d, in Fig. 11 is shown the projection of the load in the XY-plane, where the behaviour of the 1-Wire Crane and the behaviour of the 2-Wire Cranes are pretty much the same except in a neighbourhood of the final position, due to the extra hoisting cable is possible to attenuate \(\psi \)-rotations (Fig. 13), and as intuitively thought, is immediate that a larger d will attenuate this oscillations faster, however \(\phi \)-oscillations behave similarly in all cranes because of the pre-filtered behaviour (Fig. 12).

5 Conclusions

The new crane configuration studied in this paper promises an important reduction in oscillations on hammerhead cranes; the increase in cost due to the addition of an extra motor should be compensated with an important decrease of transportation times. This paper provides an useful an simple approach for understanding the behaviour of two wired crane, by a coordinate change of variables, we have managed to coordinate the tension in both cables to achieve the expected behaviour; and by a linear state-feedback controller we have proved some advantages of using a second hoisting cable.

Some few modifications can show that is possible to control only the virtual coordinates \((\psi _3,\gamma )\), i.e. to control the tension relation between the cables and so the radial oscillations, making possible to help human operators while not interfering in their regular activities, by this, we consider this crane system to be broadly suitable for implementation in actual hammerhead cranes.

In the present paper, we analysed only the mechanical behaviour of the proposed crane design. The implementation on nonlinear controllers should be studied in order to achieve the maximum efficiency of the presented design.

By the method exposed in this paper, we cannot conclude anything about the exact relation between oscillation attenuation and the parameter d; recall that the cables not only act on the oscillations but also in the load height, and too large d may cause some problems in controlling the elevation of the system. In the present paper, we have just shown that adding a second cable will reduce the oscillations of the system; and, at least locally, in we increase the distance between the hoisting motors the control over the load will improve. The ratio between the load elevation and the distance between the hoisting motors, with the method exposed in this work, should be carefully studied for each possible crane design.

Robust and adaptive techniques should be studied, since we have not considered any parametric uncertainty or the varying operational point.

In order to implement in a real crane, we have to develop an angle observer, despite angles sensor are common on academical prototypes, it does not seem practical to try to measure any angle on industrial cranes.

In order to control the oscillations produced by pure rotation movements is required a third, non co-linear with the other two, cable; however, this option does not look viable in existing cranes.