Introduction

Tower-cranes are complicated mechatronic systems which are widely used for the transportation of payloads in a large workspace and at large height [13]. Tower cranes can accomplish accurate transport and positioning of heavy items in construction sites, in multi-storey building erection,in loading and unloading of cargos in ports and in storage tasks for the logistics industry [46]. Tower cranes exhibit the advantages of simple structure, convenient installation, low cost, high payload capacity and low energy consumption [79]. Tower cranes usually consist of an actuated jib arm, an actuated translational trolley and an unactuated payload below the trolley [3, 10, 11]. Tower cranes have a complicated and strongly nonlinear dynamics and are also subject to underactuation [1214]. Major issues in the precise and safe operation of tower cranes are the accurate trajectory tracking about the cranes’ moving parts, as well as the suppression of the swinging and sway motion of the payload which can emerge when large and fast manoeuvres take place [1517]. Under such operating conditions tower cranes are also exposed to bending and torsional deformations therefore their operation is a demanding and delicate task [18, 19]. Even nowadays most cranes are manually operated by skilled personnel. However, for human operators it is often difficult to achieve precise positioning and suppression of swinging and swaying phenomena [20, 21]. Operational mistakes occur frequently when pursuing highly repetitive tasks under time-pressure. To avoid the deficiencies of the human operation of cranes, automation of such systems has become a pre-requisite and to this end elaborated nonlinear control methods have been developed [22, 23].

The use of robotic tower cranes is rapidly deploying in several construction, industrial and supply-chain applications and the treatment of the associated nonlinear control problems has become a necessity. To this end new results have been recently developed. In [24] a neural adaptive control method is introducted for 4-DOF tower cranes. In [25] a 2-DOF overhead and a 4-DOF rotary crane are controlled through a neural adaptive control scheme. In [26] a control method is presented about vibrations suppression in a 4-DOF tower crane with a flexible jib. In [27] a neural adaptive control scheme is developed for a double-pendulum tower crane. In [27] a 4-DOF tower crane is controlled by a nonlinear controller that consists of a PD control part and a sliding-mode control part. In [28] an input-shaping control technique is applied to suppress oscillations in the 4-DOF underactuated robotic crane. Finally, in [29] an adaptive control scheme is proposed for an underactuated 2-DOF overhead crane.

In the present article, a nonlinear optimal control method is proposed for the 4-DOF nonlinear and underactuated model of tower cranes [30, 31]. The dynamic model of the 4-DOF underactuated tower crane undergoes first approximate linearization around a temporary operating point which is updated at each sampling instance. This operating point is defined by the present value of the crane’s state vector and by the last sampled value of the control inputs vector. The linearization process relies on first-order Taylor series expansion and on the computation of the associated Jacobian matrices [3234]. The modelling error which is due to the truncation of higher-order terms in the Taylor series expansion, is proven to be small and is asymptotically compensated by the robustness of the control algorithm. For the approximately linearized state-space description of the system a stabilizing H-infinity feedback controller is defined.

The proposed H-infinity controller achieves the solution of the optimal control problem for the tower crane under model uncertainty and external perturbations [16]. Actually, it represents a min-max differential game which takes place between the control inputs of the system that try to minimize a cost function comprising a quadratic term of the state vector’s tracking error and the model uncertainty or exogenous perturbation terms which try to maximize this cost function. To compute the stabilizing feedback gains of this controller an algebraic Riccati equation has to be also solved at each time-step of the control method [3537]. The global stability properties of the control scheme are proven through Lyapunov analysis. First, it is proven that the control loop satisfies the H-infinity tracking performance criterion [16, 38]. Next, it is proven that under moderate conditions, global asymptotic stability of the control loop is ensured. To implement state estimation-based control without need to measure the entire state vector of the system the H-infinity Kalman Filter is used as a robust state estimator. The nonlinear optimal control method retains the advantages of linear optimal control, that is fast and accurate tracking of reference setpoints under moderate variations of the control inputs [16].

The article has also a meaningful contribution to the area of nonlinear control. One can point out the advantages of the nonlinear optimal control method against Nonlinear Model Predictive Control (NMPC) [16]. In NMPC the stability properties of the control scheme remain unproven and the convergence of the iterative search for an optimum often depends on initialization and parameter values’ selection. It is also noteworthy that the nonlinear optimal control method is applicable to a wider class of dynamical systems than approaches based on the solution of State Dependent Riccati Equations (SDRE). The SDRE approaches can be applied only to dynamical systems which can be transformed to the Linear Parameter Varying (LPV) form. Besides, the nonlinear optimal control method performs better than nonlinear optimal control schemes which use approximation of the solution of the Hamilton–Jacobi–Bellman equation by Galerkin series expansions. The stability properties of the Galerkin series expansion-based optimal control are still unproven.

The structure of the paper is as follows: In Sect. 2 the dynamic model of the tower crane is given and the associated state-space model is formulated in the affine-in-the-input nonlinear state-space form. In Sect. 3 the dynamic model of the robotic crane undergoes approximate linearization through Taylor series expansion and with the computation of the associated Jacobian matrices. In Sect. 4 the H-infinity optimal control problem for the dynamic model of the tower crane is analyzed. In Sect. 5 the global stability properties of the H-infinity control scheme are proven through Lyapunov analysis. Besides, the H-infinity Kalman Filter is introduced as a robust state estimator. In Sect. 6 the accuracy of setpoints tracking by the state variables of the robotic crane, under the nonlinear optimal control method, is further confirmed through Simulation experiments. Finally, in Sect. 7 concluding remarks are stated.

Dynamic model of the robotic tower crane

State-of-the-art in the control of underactuated robotic cranes

As noted, robotic cranes can find use in construction works, in buildings erection, in loading and unloading of cargo-ships in ports, in heavy material lifting for several industrial tasks and in heavy items pick-and-place tasks in logistics. The solution of the nonlinear optimal control problem for underactuated robotic cranes is important for ensuring the reliable performance of robotic cranes in such applications. In the following, the state-of-the-art in the control of underactuated robotic cranes is outlined. To this end, indicative results are overviewed about (a) the use of established model-based and model-free control approaches in robotics, (b) the use of the proposed nonlinear optimal control methods in specific types of autonomous cranes.

There exist several recent results showing the performance of advanced nonlinear control techniques to the stabilization and trajectory tracking problem of robotic cranes. In [39] Lyapunov stability analysis is used to select the gains of a PID-type conntroller so as to ensure global stability for an overhead robotic crane. In [27] a feedback controller which comprises a PID-type control part and an SMC-type control part is proposed for a 4-DOF robotic tower crane. Lyapunov stability analysis is used to select the feedback gains of the controller and to ensure global stability of the control loop. In [40] an adaptive fuzzy controller jointly with a disturbances estimator are used to stabilize an offshore boom crane. The controller’s feedback gains are chosen through Lyapunov stability analysis so as to ensure global stability for the control loop. In [41] an adaptive PID-type controller is developed for dual rotary cranes. The selection of the controller’s gains is performed through the system’s Lyapunov analysis. Global stability is proven through the Lyapunov technique and LaSalle’s invariance principle. In [42] adaptive output feedback control is proposed for a double-pendulum ship-mounted crane while also considering uncertainty about the cargo’s mass. The controller’s gains and the adaptation law which are used for compensating for the model’s uncertainty are chosen through Lyapunov analysis. In [29] a state-variables transformation and the backstepping control technique are used for treating the stabilization of a 2-DOF crane. The stability properties of the control method are proven through Lyapunov analysis. In [43] an energy-based control method is proposed for the dynamic model of a large gantry crane which comprises also elements that are subjected to elastic deformation. Stability properties are demonstrated with the use of Lyapunov analysis. In [44] a knuckle boom crane is controlled by a cascade controller where the inner control loop is designed to damp out the pendulum oscillation, and the crane tip is controlled by the outer loop. An extended Kalman filter is used for the estimation of payload angles and angular velocity. In [45] modified tracking error variables and Lyapunov stability analysis are used to define a feedback controller that finally stabilizes a 4-DOF overhead crane. The global stability proof makes use of LaSalle’s invariance principle. Moreover, in [46] the dynamic model of a knuckle boom crane is considered and a stabilizing feedback controller is designed about it using the Nonlinear Model Predictive Control concept and a Lyapunov analysis-based auxiliary controller.

In particular, the proposed nonlinear optimal control method is suitable for use in a variety of autonomous robotic cranes and several related results have been obtained [1, 16, 17]. Thus, one can note nonlinear optimal control for (i) the 4-DOF overhead crane, (ii) offshore boom cranes, (iii) the double-pendulum overhead crane, (iv) the 4-DOF tower crane and (v) quay-side cranes. The use of the nonlinear optimal control method in robotic systems is not limited into specific state-space forms (e.g., canonical forms, strict feedback or pure feedback forms). The computational complexity of the nonlinear optimal control method remains also moderate because (a) it does not require complicated changes of state variables and transformations of the cranes’ state-space representation, (b) it does not rely on matrices for computing the robots’ control inputs and consequently it avoids the risk of singularities, (c) it performs linearization around one single operating point which is easy to define, (d) it does not require the solution of multiple Riccati equations or LMIs, (e) it avoids the deadlocks of pole-placement techniques which arise in the case of underactuation.

State-space model of the tower crane

The diagram of the 4-DOF robotic tower crane in depicted in Fig. 1. The tower crane consists of an actuated jib arm, an actuated translational trolley and an unactuated payload below the trolley. The trolley of mass M can perform an one-dimensional motion along the jib. The load mass m is suspended from the vehicle with a rope of length L. The jib can rotate around the vertical axis. The state variables of the tower-crane are defined as follows: (i) ϕ is the turn angle of the crane, (ii) ϕ̇ is the rate of change of the turn angle of the crane, (iii) η is the displacement of the trolley along the jib, (iv) η̇ is the velocity of the jib, (v) \(\delta _{1}\) is the primary projection angle of the link that connects the trolley with the suspended load (swinging angle), (vi) \(\dot{\delta}_{1}\) is the rate of change of the primary projection angle, (vii) \(\delta _{2}\) is the secondary projection angle of the link that connects the trolley with the suspended load (sway angle), (viii) \(\dot{\delta}_{2}\) is the rate of change of the secondary projection angle [2, 3].

Figure 1
figure 1

Diagram of the 4-DOF robotic tower crane

The vector of the main variables of the robotic tower crane is defined as \(q=[\phi,\eta,\delta _{1},\delta _{2}]^{T}\). The dynamic model of the crane is given by [1, 2, 16]

$$\begin{aligned} M(q)\ddot{q}+C(q,\dot{q})\dot{q}+G(q)=T- \tilde{d}. \end{aligned}$$
(1)

The inertia matrix of the crane \(M(q)\) is symmetric and positive definite and is defined as [2, 3]

$$\begin{aligned} M(q)= \begin{pmatrix} m_{11} & m_{12} & m_{13} & m_{14} \\ m_{21} & m_{22} & m_{23} & m_{24} \\ m_{31} & m_{32} & m_{33} & m_{34} \\ m_{41} & m_{42} & m_{43} & m_{44} \end{pmatrix}, \end{aligned}$$
(2)

where \(m_{11}=m(\sin^{2}(\delta _{1})\cos^{2}(\delta _{2})+\sin^{2}(\delta _{2})){L^{2}}+2mL{ \eta}\times \cos(\delta _{2})\sin(\delta _{2})+(m+M){\eta ^{2}}+J\), \(m_{12}=m_{21}=-mL\sin(\delta _{2})\), \(m_{13}=m_{31}=-m{L^{2}}\cos(\delta _{2})\cos(\delta _{2})\sin(\delta _{2})\), \(m_{14}=m_{41}= mL({\eta}\cos(\delta _{2})+L\sin(\delta _{2}))\), \(m_{22}=m+M\), \(m_{23}=m_{32}=mL\times \cos(\delta _{1})\cos(\delta _{2})\), \(m_{24}=m_{42}=-mL\sin(\delta _{1})\sin(\delta _{2})\), \(m_{33}= m{L^{2}}\cos(\delta _{2})\), \(m_{34}=m_{43}=-mL\sin(\delta _{1})\sin(\delta _{2})\), \(m_{44}=m{L^{2}}\).

The Coriolis and centrifugal forces matrix of the crane is [2, 3]

$$\begin{aligned} \tilde{C}(q,\dot{q})= \begin{pmatrix} c_{11} & c_{12} & c_{13} & c_{14} \\ c_{21} & c_{22} & c_{23} & c_{24} \\ c_{31} & c_{32} & c_{33} & c_{34} \\ c_{41} & c_{42} & c_{43} & c_{44} \end{pmatrix}, \end{aligned}$$
(3)

where

$$\begin{aligned} c_{11}={}&(m+M){\eta} {\dot{\eta}}+mL{\eta}\cos( \delta _{1})\cos(\delta _{2})\dot{\delta}_{1}\\ &{}-mL{ \eta}\cos(\delta _{1})\sin(\delta _{2}) \dot{ \delta}_{2} \\ &{}- mL\sin(\delta _{1})\sin(\delta _{2})\dot{ \eta}\\ &{}+m{L^{2}}\sin(\delta _{1})\cos(\delta _{1}) \cos^{2}(\delta _{2})\dot{\delta}_{1} \\ &{}+ m{L^{2}}\cos^{2}(\delta _{1}) \sin(\delta _{2})\cos(\delta _{2})\dot{\delta}_{2}, \\ c_{12}={}&mL\sin(\delta _{1})\cos( \delta _{2})\dot{\phi}+(m+M){\eta}\dot{\phi}, \\ c_{13}={}&mL{\eta}\cos(\delta _{1}) \cos( \delta _{2})\dot{\phi}\\ &{}+m{L^{2}}\sin(\delta _{1}) \sin(\delta _{2})\cos(\delta _{2})\dot{ \delta}_{1} \\ &{}+m{L^{2}}\sin(\delta _{1})\cos(\delta _{1}) \cos^{2}(\delta _{2})\dot{\phi}\\ &{}+m{L^{2}}\cos(\delta _{1})\sin^{2}(\delta _{2})\dot{ \delta}_{2}, \\ c_{14}={}&{-}mL{\eta}\sin(\delta _{1}) \sin( \delta _{2})\dot{\phi}-mL{\eta}\sin(\delta _{2})\dot{ \delta _{2}} \\ &{}+ m{L^{2}}\cos^{2}(\delta _{1})\sin(\delta _{2})\cos(\delta _{2})\dot{\phi}\\ &{}+m{L^{2}}\cos( \delta _{1})\sin^{2}(\delta _{2})\dot{ \delta}_{2}, \\ c_{21}={}&-(m+M){\eta}\dot{\phi}-mL\sin(\delta _{1})\cos(\delta _{2}) \dot{\phi}\\ &{}-mL\cos(\delta _{2})\dot{\delta}_{2}, \\ c_{22}={}&0, \\ c_{23}={}&{-}mL\bigl(\sin(\delta _{1})\cos(\delta _{2})\dot{\delta}_{1}+\cos( \delta _{1})\sin(\delta _{2})\dot{\delta}_{2}\bigr),\\ c_{24}={}&-mL\bigl( \cos(\delta _{1})\sin(\delta _{2})\dot{\delta}_{1}+ \sin( \delta _{1})\cos(\delta _{2})\dot{\delta _{2}}\\ &{}+\cos(\delta _{2}) \dot{\phi}\bigr), \\ c_{31}={}&{-}mL\cos(\delta _{1})\cos(\delta _{2}) \bigl(\eta +L\cos(\delta _{1})\cos( \delta _{2})\bigr)\dot{ \phi}\\ &{}-m{L^{2}}\cos(\delta _{1})\cos^{2}(\delta _{2}) \dot{\delta}_{2}, \\ c_{32}={}&0, \\ c_{33}={}&-m{L^{2}}\sin(\delta _{2})\cos(\delta _{2})\dot{\delta}_{2}, \\ c_{34}={}&{-}m{L^{2}}\bigl(\cos(\delta _{1}) \cos^{2}(\delta _{2})\dot{\phi}+\sin( \delta _{2}) \cos(\delta _{2})\dot{\delta}_{1}\bigr), \\ c_{41}={}&mL \bigl({\eta}\sin(\delta _{1}) \sin(\delta _{2})-L\cos^{2}(\delta _{1})\sin(\delta _{2})\cos(\delta _{2}) \bigr)\dot{ \phi} \\ &{}+m{L^{2}}\cos(\delta _{1})\cos^{2}(\delta _{2})\dot{\delta}_{1}+mL\cos(\delta _{2})\dot{ \eta}, \\ c_{42}={}&mL\cos(\delta _{2})\dot{\phi}, \\ c_{43}={}&m{L^{2}}\bigl(\cos(\delta _{1}) \cos^{2}(\delta _{2})\dot{\phi}+\sin( \delta _{2}) \cos(\delta _{2})\dot{\delta}_{1}\bigr), \\ c_{44}={}&0. \end{aligned}$$

The gravitational vector of the robotic crane is defined as [2, 3]

$$\begin{aligned} G= \begin{pmatrix} g_{1} \\ g_{2} \\ g_{3} \\ g_{4} \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ gmL\sin(\delta _{1})\sin(\delta _{2}) \\ gmL\cos(\delta _{1})\sin(\delta _{2}) \end{pmatrix}. \end{aligned}$$
(4)

The disturbances and friction vector of the robotic crane is defined as

$$\begin{aligned} \tilde{d}= \begin{pmatrix} d_{1} \\ d_{2} \\ d_{3} \\ d_{4} \end{pmatrix} = \begin{pmatrix} -{w_{1}}\dot{\phi} \\ -{w_{2}}\dot{\eta} \\ -{w_{3}}\dot{\delta}_{1} \\ -{w_{4}}\dot{\delta}_{2} \end{pmatrix}. \end{aligned}$$
(5)

The complexity of the dynamics of the model of the tower-crane can be partially alleviated by considering moderate (small angle) swinging or sway motion for the load. In such a case the associated sinusoidal and cosinusoidal variables \(\sin(\delta _{i})\) and \(\cos(\delta _{i})\), \(i=1,2\) can be substituted by the first terms of the related Taylor series expansions. Next, the inverse of the inertia matrix M is defined as

$$\begin{aligned} N^{-1}={\frac{1}{\det M}} \begin{pmatrix} M_{11} & -M_{21} & M_{31} & -M_{41} \\ -M_{12} & M_{22} & -M_{32} & M_{42} \\ M_{13} & -M_{23} & M_{33} & -M_{43} \\ -M_{14} & M_{24} & -M_{34} & M_{44} \end{pmatrix}, \end{aligned}$$
(6)

where the above noted subdeterminants \(M_{ij}\) for \(i=1,2,3,4\) and \(j=1,2,3,4\) are defined as

$$\begin{aligned} M_{11}={}&m_{22}(m_{33}m_{44}-m_{43}m_{34})\\ &{}-m_{23}(m_{32}m_{44}-m_{43}m_{34})\\ &{}+m_{24}(m_{32}m_{43}-m_{42}m_{33}), \\ M_{12}={}&m_{21}(m_{33}m_{44}-m_{43}m_{34})\\ &{}-m_{23}(m_{31}m_{44}-m_{41}m_{34}) \\ &{}+m_{24}(m_{31}m_{43}-m_{41}m_{33}), \\ M_{13}={}&m_{21}(m_{32}m_{44}-m_{42}m_{34})\\ &{}-m_{22}(m_{31}m_{44}-m_{41}m_{34}) \\ &{}+m_{24}(m_{31}m_{43}-m_{41}m_{33}), \\ M_{14}={}&m_{21}(m_{32}m_{43}-m_{42}m_{33})\\ &{}-m_{22}(m_{31}m_{43}-m_{41}m_{33}) \\ &{}+m_{23}(m_{31}m_{42}-m_{41}m_{32}), \\ M_{21}={}&m_{12}(m_{33}m_{44}-m_{43}m_{34})\\ &{}-m_{13}(m_{32}m_{44}-m_{42}m_{34}) \\ &{}+m_{14}(m_{32}m_{43}-m_{42}m_{33}), \\ M_{22}={}&m_{11}(m_{33}m_{44}-m_{43}m_{34})\\ &{}-m_{13}(m_{31}m_{44}-m_{41}m_{34}) \\ &{}+m_{14}(m_{31}m_{43}-m_{41}m_{33}), \\ M_{23}={}&m_{11}(m_{32}m_{44}-m_{42}m_{34})\\ &{}-m_{12}(m_{31}m_{44}-m_{41}m_{34}) \\ &{}+m_{14}(m_{31}m_{42}-m_{41}m_{32}), \\ M_{24}={}&m_{11}(m_{32}m_{43}-m_{42}m_{33})\\ &{}-m_{12}(m_{31}m_{43}-m_{41}m_{33}) \\ &{}+m_{13}(m_{31}m_{42}-m_{41}m_{32}), \\ M_{31}={}&m_{12}(m_{23}m_{44}-m_{43}m_{24})\\ &{}-m_{13}(m_{22}m_{44}-m_{42}m_{24}) \\ &{}+m_{14}(m_{22}m_{43}-m_{42}m_{23}), \\ M_{32}={}&m_{11}(m_{23}m_{44}-m_{43}m_{24})\\ &{}-m_{13}(m_{21}m_{44}-m_{41}m_{24}) \\ &{}+m_{14}(m_{21}m_{43}-m_{41}m_{23}), \\ M_{33}={}&m_{11}(m_{22}m_{44}-m_{42}m_{24})\\ &{}-m_{12}(m_{21}m_{44}-m_{41}m_{24}) \\ &{}+m_{14}(m_{41}m_{22}-m_{21}m_{42}), \\ M_{34}={}&m_{11}(m_{22}m_{43}-m_{42}m_{23})\\ &{}-m_{12}(m_{21}m_{43}-m_{41}m_{23}) \\ &{}+m_{13}(m_{21}m_{42}-m_{41}m_{22}), \\ M_{41}={}&m_{12}(m_{23}m_{34}-m_{33}m_{24})\\ &{}-m_{13}(m_{22}m_{34}-m_{32}m_{24}) \\ &{}+m_{14}(m_{22}m_{33}-m_{32}m_{23}), \\ M_{42}={}&m_{11}(m_{23}m_{34}-m_{33}m_{44})\\ &{}-m_{13}(m_{21}m_{34}-m_{31}m_{24}) \\ &{}+m_{14}(m_{21}m_{33}-m_{31}m_{23}), \\ M_{43}={}&m_{11}(m_{22}m_{34}-m_{32}m_{24})\\ &{}-m_{12}(m_{21}m_{34}-m_{31}m_{24}) \\ &{}+m_{14}(m_{21}m_{32}-m_{31}m_{22}), \\ M_{44}={}&m_{11}(m_{22}m_{33}-m_{32}m_{23})\\ &{}-m_{12}(m_{21}m_{33}-m_{31}m_{23}) \\ &{}+m_{13}(m_{21}m_{32}-m_{31}m_{22}). \end{aligned}$$

The determinant of matrix M is

$$\begin{aligned} \det M=m_{11}M_{11}-m_{12}M_{12}+m_{13}M_{13}-m_{14}M_{14}. \end{aligned}$$

For the dynamic model of the robotic crane that was initially written in the form

$$\begin{aligned} M(q)\ddot{q}+\tilde{C}(q,\dot{q}) \dot{q}+G(q)+\tilde{d}=T . \end{aligned}$$
(7)

It holds that

$$\begin{aligned} \tilde{C}(q,\dot{q})\dot{q}= \begin{pmatrix} c_{11} & c_{12} & c_{13} & c_{14} \\ c_{21} & c_{22} & c_{23} & c_{24} \\ c_{31} & c_{32} & c_{33} & c_{34} \\ c_{41} & c_{42} & c_{43} & c_{44} \end{pmatrix} \begin{pmatrix} \dot{\phi} \\ \dot{\eta} \\ \dot{\delta}_{1} \\ \dot{\delta}_{2} \end{pmatrix} \end{aligned}$$
(8)

or equivalently

$$\begin{aligned} C(q,\dot{q})= \begin{pmatrix} c_{1} \\ c_{2} \\ c_{3} \\ c_{4} \end{pmatrix} = \begin{pmatrix} c_{11}\dot{\phi} & c_{12}\dot{\eta} & c_{13}\dot{\delta}_{1} & c_{14}\dot{\delta}_{2} \\ c_{21}\dot{\phi} & c_{22}\dot{\eta} & c_{23}\dot{\delta}_{1} & c_{24}\dot{\delta}_{2} \\ c_{31}\dot{\phi} & c_{32}\dot{\eta} & c_{33}\dot{\delta}_{1} & c_{34}\dot{\delta}_{2} \\ c_{41}\dot{\phi} & c_{42}\dot{\eta} & c_{43}\dot{\delta}_{1} & c_{44}\dot{\delta}_{2} \end{pmatrix}. \end{aligned}$$
(9)

Consequently, the dynamic model of the robot can be written as

$$\begin{aligned} \begin{aligned} &M(q)\ddot{q}+C(q,\dot{q})+G(q)+\tilde{d}=T\quad{ \Rightarrow} \\ & \ddot{q}+M^{-1}(q)C(q,\dot{q})+M^{-1}(q)G(q)+M^{-1}(q) \tilde{d}\\ &\quad =M^{-1}(q)T\quad{\Rightarrow} \\ & \ddot{q}=-M^{-1}(q)C(q,\dot{q})-M^{-1}(q)G(q)\\ &\phantom{\ddot{q}=}{}-M^{-1}(q) \tilde{d}+M^{-1}(q)T\quad{\Rightarrow} \\ & \ddot{q}=-M^{-1}(q) \bigl[C(q,\dot{q})-G(q)+ \tilde{d} \bigr]+M^{-1}(q)T .\end{aligned} \end{aligned}$$
(10)

Next, the dynamic model of the robotic crane is written as

$$\begin{aligned} \begin{pmatrix} \ddot{\phi} \\ \ddot{\eta} \\ \ddot{\delta}_{1} \\ \ddot{\delta}_{2} \end{pmatrix} ={}&-{\frac{1}{\det M}} \begin{pmatrix} M_{11} & -M_{21} & M_{31} & -M_{41} \\ -M_{12} & M_{22} & -M_{32} & M_{42} \\ M_{13} & -M_{23} & M_{33} & -M_{43} \\ -M_{14} & M_{24} & -M_{34} & M_{44} \end{pmatrix} \\ &{}\times \begin{pmatrix} c_{1}+g_{1}+d_{1} \\ c_{2}+g_{2}+d_{2} \\ c_{3}+g_{3}+d_{3} \\ c_{4}+g_{4}+d_{4} \end{pmatrix} \\ &{}+ {\frac{1}{\det M}} \begin{pmatrix} M_{11} & -M_{21} & M_{31} & -M_{41} \\ -M_{12} & M_{22} & -M_{32} & M_{42} \\ M_{13} & -M_{23} & M_{33} & -M_{43} \\ -M_{14} & M_{24} & -M_{34} & M_{44} \end{pmatrix} \\ &{}\times \begin{pmatrix} \tau _{1} \\ \tau _{2} \\ 0 \\ 0 \end{pmatrix}. \end{aligned}$$
(11)

Equivalently, the dynamic model of the robotic crane is written as

$$\begin{aligned} & \begin{pmatrix} \ddot{\phi} \\ \ddot{\eta} \\ \ddot{\delta}_{1} \\ \ddot{\delta}_{2} \end{pmatrix} \\ &\quad = \begin{pmatrix} {\frac{-M_{11}(c_{1}+g_{1}+d_{1})+M_{21}(c_{2}+g_{2}+d_{2})-M_{31}(c_{3}+g_{3}+d_{3})+M_{41}(c_{4}+g_{4}+d_{4})}{\det M}} \\ {\frac{M_{12}(c_{1}+g_{1}+d_{1})-M_{22}(c_{2}+g_{2}+d_{2})+M_{32}(c_{3}+g_{3}+d_{3})-M_{42}(c_{4}+g_{4}+d_{4})}{\det M}} \\ {\frac{-M_{13}(c_{1}+g_{1}+d_{1})+M_{23}(c_{2}+g_{2}+d_{2})-M_{33}(c_{3}+g_{3}+d_{3})+M_{43}(c_{4}+g_{4}+d_{4})}{\det M}} \\ {\frac{M_{14}(c_{1}+g_{1}+d_{1})-M_{24}(c_{2}+g_{2}+d_{2})+M_{34}(c_{3}+g_{3}+d_{3})-M_{44}(c_{4}+g_{4}+d_{4})}{\det M}} \end{pmatrix} \\ &\qquad{}+ \begin{pmatrix} {\frac{M_{11}}{\det M}} & -{\frac{M_{21}}{\det M}} \\ -{\frac{M_{12}}{\det M}} & {\frac{M_{22}}{\det M}} \\ {\frac{M_{13}}{\det M}} & -{\frac{M_{23}}{\det M}} \\ -{\frac{M_{14}}{\det M}} & {\frac{M_{24}}{\det M}} \end{pmatrix} \begin{pmatrix} v_{1} \\ v_{2} \end{pmatrix}. \end{aligned}$$
(12)

The state vector of the robotic crane is

$$\begin{aligned} \begin{aligned} &x=[x_{1},x_{2},x_{3},x_{4},x_{5},x_{6},x_{7},x_{8}]^{T}\quad{ \Rightarrow} \\ & x=[\phi,\dot{\phi},\eta,\dot{\eta},\delta _{1},\dot{ \delta}_{1},\delta _{2},\dot{ \delta}_{2}]^{T}. \end{aligned} \end{aligned}$$
(13)

Moreover, the following functions are defined

$$\begin{aligned} &f_{1}(x)=x_{2}, \\ & f_{2}(x)= \bigl(-M_{11}(c_{1}+g_{1}+d_{1})+M_{21}(c_{2}+g_{2}+d_{2})\\ &\phantom{f_{2}(x)=}{}-M_{31}(c_{3}+g_{3}+d_{3})+M_{41}(c_{4}+g_{4}+d_{4})\bigr)\\ &\phantom{f_{2}(x)=}{}/{\det M}, \\ &f_{3}(x)=x_{4}, \\ & f_{4}(x)=\bigl(M_{12}(c_{1}+g_{1}+d_{1})-M_{22}(c_{2}+g_{2}+d_{2})\\ &\phantom{f_{4}(x)=}{}+M_{32}(c_{3}+g_{3}+d_{3})-M_{42}(c_{4}+g_{4}+d_{4})\bigr)\\ &\phantom{f_{4}(x)=}{}/{\det M}, \\ &f_{5}(x)=x_{6} , \\ & f_{6}(x)=\bigl(-M_{13}(c_{1}+g_{1}+d_{1})+M_{23}(c_{2}+g_{2}+d_{2})\\ &\phantom{f_{6}(x)=}{}-M_{33}(c_{3}+g_{3}+d_{3})+M_{43}(c_{4}+g_{4}+d_{4})\bigr)\\ &\phantom{f_{6}(x)=}{}/{\det M}, \\ &f_{7}(x)=x_{8}, \\ & f_{8}(x)=\bigl(M_{14}(c_{1}+g_{1}+d_{1})-M_{24}(c_{2}+g_{2}+d_{2})\\ &\phantom{f_{8}(x)=}{}+M_{34}(c_{3}+g_{3}+d_{3})-M_{44}(c_{4}+g_{4}+d_{4})\bigr)\\ &\phantom{f_{8}(x)=}{}/{\det M}, \\ &g_{11}(x)=0,\qquad g_{12}(x)=0, \\ &g_{21}(x)={\frac{M_{11}}{\det M}}, \qquad g_{22}(x)=-{ \frac{M_{21}}{\det M}}, \\ &g_{31}(x)=0 , \qquad g_{32}(x)=0, \\ &g_{41}(x)=-{\frac{M_{12}}{\det M}}, \qquad g_{42}(x)={ \frac{M_{22}}{\det M}}, \\ &g_{51}(x)=0, \qquad g_{52}(x)=0, \\ &g_{61}(x)={\frac{M_{13}}{\det M}}, \qquad g_{62}(x)=-{ \frac{M_{23}}{\det M}}, \\ &g_{71}(x)=0, \qquad g_{72}(x)=0, \\ &g_{81}(x)=-{\frac{M_{14}}{\det M}} ,\qquad g_{82}(x)={ \frac{M_{24}}{\det M}}. \end{aligned}$$

Thus, the state-space model of the tower-crane is written as

$$\begin{aligned} \begin{pmatrix} \dot{x}_{1} \\ \dot{x}_{2} \\ \dot{x}_{3} \\ \dot{x}_{4} \\ \dot{x}_{5} \\ \dot{x}_{6} \\ \dot{x}_{7} \\ \dot{x}_{8} \end{pmatrix} = \begin{pmatrix} f_{1}(x)\\ f_{2}(x)\\ f_{3}(x)\\ f_{4}(x)\\ f_{5}(x)\\ f_{6}(x)\\ f_{7}(x)\\ f_{8}(x) \end{pmatrix} + \begin{pmatrix} g_{11}(x) & g_{12}(x)\\ g_{21}(x) & g_{22}(x)\\ g_{31}(x) & g_{32}(x)\\ g_{41}(x) & g_{42}(x)\\ g_{51}(x) & g_{52}(x)\\ g_{61}(x) & g_{62}(x)\\ g_{71}(x) & g_{72}(x)\\ g_{81}(x) & g_{82}(x) \end{pmatrix} \begin{pmatrix} \tau _{1} \\ \tau _{2} \end{pmatrix} \end{aligned}$$
(14)

or in concise form one has the affine-in-the-input nonlinear state-space model

$$\begin{aligned} \dot{x}=f(x)+g(x)u, \end{aligned}$$
(15)

where \(x\in R^{8{\times}1}\), \(f(x)\in R^{8{\times}1}\), \(g(x)\in R^{8{\times}2}\), and \(u\in R^{2{\times}1}\). It is noted that the underactuated tower crane is not a 0-flat system. To be brought to a differentially flat form the dynamic extension approach has to be applied [36].

Approximate linearization of the dynamic model of the robotic crane

Approximate linearization with Taylor series expansion

The dynamic model of the tower crane being initially expressed in the state-space form

$$\begin{aligned} \dot{x}=f(x)+g(x)u \end{aligned}$$
(16)

undergoes approximate linearization at each sampling instance around the temporary operating point \((x^{*},u^{*})\), where \(x^{*}\) is the present value of the system’s state vector and \(u^{*}\) is the last sampled value of the control inputs vector. The linearization process is based on Taylor series expansion and gives

$$\begin{aligned} \dot{x}=Ax+Bu+\tilde{d}, \end{aligned}$$
(17)

where is the cumulative disturbances vector which may be due to truncation of higher-order terms from the Taylor series expansion, exogenous perturbations, and sensor measurements noise of any distribution. Matrices A and B are Jacobian matrices of the Taylor series expansion which are defined as:

$$\begin{aligned} &A={\nabla _{x}} \bigl[f(x)+g(x)u \bigr]|_{(x^{*},u^{*})}\quad{\Rightarrow} \\ & A={\nabla _{x}}f(x)|_{(x^{*},u^{*})} +{ \nabla _{x}} {g_{1}}(x)u|_{(x^{*},u^{*})} \\ &\phantom{A=}{}+{\nabla _{x}} {g_{2}}(x)u|_{(x^{*},u^{*})}, \end{aligned}$$
(18)
$$\begin{aligned} &B={\nabla _{u}} \bigl[f(x)+g(x)u \bigr]|_{(x^{*},u^{*})}\quad{\Rightarrow} \\ & B=g(x)|_{(x^{*},u^{*})}. \end{aligned}$$
(19)

This linearization approach which has been followed for implementing the nonlinear optimal control scheme results into a quite accurate model of the system’s dynamics. Consider for instance the following affine-in-the-input state-space model

$$\begin{aligned} \dot{x}={}&f(x)+g(x)u\quad {\Rightarrow} \\ \dot{x}= {}&\bigl[f \bigl(x^{*} \bigr)+{\nabla _{x}}f(x)|_{x^{*}} \bigl(x-x^{*} \bigr) \bigr] \\ &{}+ \bigl[g \bigl(x^{*} \bigr)+{\nabla _{x}}g(x)|_{x^{*}} \bigl(x-x^{*} \bigr) \bigr]u^{*}+g \bigl(x^{*} \bigr)u^{*} \\ &{}+g \bigl(x^{*} \bigr) \bigl(u-u^{*} \bigr)+\tilde{d}_{1}\quad{ \Rightarrow} \\ \dot{x}={}& \bigl[{\nabla _{x}}f(x)|_{x^{*}}+{\nabla _{x}}g(x)|_{x^{*}}u^{*} \bigr]x \\ &{}+g \bigl(x^{*} \bigr)u- \bigl[{\nabla _{x}}f(x)|_{x^{*}}+{\nabla _{x}}g(x)|_{x^{*}}u^{*} \bigr]x^{*} \\ &{}+f \bigl(x^{*} \bigr) +g \bigl(x^{*} \bigr)u^{*}+\tilde{d}_{1}, \end{aligned}$$
(20)

where \(\tilde{d}_{1}\) is the modelling error due to truncation of higher order terms in the Taylor series expansion of \(f(x)\) and \(g(x)\). Next, by defining \(A=[{\nabla _{x}}f(x)|_{x^{*}}+{\nabla _{x}}g(x)|_{x^{*}}u^{*}]\), \(B=g(x^{*})\) one obtains

$$\begin{aligned} \dot{x}=Ax+Bu-Ax^{*}+f \bigl(x^{*} \bigr)+g \bigl(x^{*} \bigr)u^{*}+\tilde{d}_{1}. \end{aligned}$$
(21)

Moreover by denoting \(\tilde{d}=-Ax^{*}+f(x^{*})+g(x^{*})u^{*}+\tilde{d}_{1}\) about the cumulative modelling error term in the Taylor series expansion procedure one has

$$\begin{aligned} \dot{x}=Ax+Bu+\tilde{d}, \end{aligned}$$
(22)

which is the approximately linearized model of the dynamics of the system of Eq. (17). The term \(f(x^{*})+g(x^{*})u^{*}\) is the derivative of the state vector at \((x^{*},u^{*})\) which is almost annihilated by \(-Ax^{*}\).

Computation of Jacobian matrices

The computation of the Jacobian matrices A and B proceeds as follows:

Computation of the Jacobian matrix \({\nabla _{x}}f(x)|_{(x^{*},u^{*})}\).

First row of the Jacobian matrix \({\nabla _{x}}f(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}f_{1}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}f_{1}}{{\partial}x_{2}}}=1\), \({\frac{{\partial}f_{1}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}f_{1}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}f_{1}}{{\partial}x_{5}}}=0\), \({\frac{{\partial}f_{1}}{{\partial}x_{6}}}=0\), \({\frac{{\partial}f_{1}}{{\partial}x_{7}}}=0\) and \({\frac{{\partial}f_{1}}{{\partial}x_{8}}}=0\).

Second row of the Jacobian matrix \({\nabla _{x}}f(x)|_{(x^{*},u^{*})}\): It holds that \(f_{2}(x)={\frac{f_{2,\mathrm{num}}}{f_{2,\mathrm{den}}}}\) with \(f_{2,\mathrm{num}}=-M_{11}(c_{1}+g_{1}+d+1)+M_{21}(c_{2}+g_{2}+d_{2})-M_{31}(c_{3}+g_{3}+d_{3})+M_{41}(c_{4}+g_{4}+d_{4})\) and \(f_{2,\mathrm{den}}=\det M\). Thus, for \(i=1,2,\ldots,8\) one has

$$\begin{aligned} &{\frac{{\partial}f_{2,\mathrm{num}}}{{\partial}x_{1}}} \\ &\quad={-} { \frac{{\partial}M_{11}}{{\partial}x_{i}}}(c_{1}+g_{1}+d_{1})- M_{11} \biggl({\frac{{\partial}c_{1}}{{\partial}x_{i}}}+{\frac{{\partial}g_{1}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{1}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}+{\frac{{\partial}M_{21}}{{\partial}x_{i}}}(c_{2}+g_{2}+d_{2})+ M_{21} \biggl({\frac{{\partial}c_{2}}{{\partial}x_{i}}}+{\frac{{\partial}g_{2}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{2}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}-{\frac{{\partial}M_{31}}{{\partial}x_{i}}}(c_{3}+g_{3}+d_{3})- M_{31} \biggl({\frac{{\partial}c_{3}}{{\partial}x_{i}}}+{\frac{{\partial}g_{3}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{3}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}+{\frac{{\partial}M_{41}}{{\partial}x_{i}}}(c_{4}+g_{4}+d_{4}) \\ &\qquad{}+ M_{41} \biggl({\frac{{\partial}c_{4}}{{\partial}x_{i}}}+{\frac{{\partial}g_{4}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{4}}{{\partial}x_{i}}} \biggr) \end{aligned}$$
(23)

and also

$$\begin{aligned} {\frac{{\partial}f_{2,\mathrm{den}}}{{\partial}x_{i}}}={\frac{{\partial}\det M}{{\partial}x_{i}}} \end{aligned}$$
(24)

and finally

$$\begin{aligned} {\frac{{\partial}f_{2}}{{\partial}x_{i}}}={\frac{{{\frac{{\partial}f_{2,\mathrm{num}}}{{\partial}x_{i}}}f_{2,\mathrm{den}}-f_{2,\mathrm{num}} {\frac{{\partial}f_{2,\mathrm{den}}}{{\partial}x_{i}}}}}{\det M^{2}}}. \end{aligned}$$
(25)

Third row of the Jacobian matrix \({\nabla _{x}}f(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}f_{3}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}f_{3}}{{\partial}x_{2}}}=0\), \({\frac{{\partial}f_{3}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}f_{3}}{{\partial}x_{4}}}=1\), \({\frac{{\partial}f_{3}}{{\partial}x_{5}}}=0\), \({\frac{{\partial}f_{3}}{{\partial}x_{6}}}=0\), \({\frac{{\partial}f_{3}}{{\partial}x_{7}}}=0\) and \({\frac{{\partial}f_{3}}{{\partial}x_{8}}}=0\).

Fourth row of the Jacobian matrix \({\nabla _{x}}f(x)|_{(x^{*},u^{*})}\): It holds that \(f_{4}(x)={\frac{f_{4,\mathrm{num}}}{f_{4,\mathrm{den}}}}\) with \(f_{4,\mathrm{num}}=M_{12}(c_{1}+g_{1}+d+1)-M_{22}(c_{2}+g_{2}+d_{2})+M_{32}(c_{3}+g_{3}+d_{3})-M_{42}(c_{4}+g_{4}+d_{4})\) and \(f_{4,\mathrm{den}}=\det M\). Thus, for \(i=1,2,\ldots,8\) one has

$$\begin{aligned} &{\frac{{\partial}f_{4,\mathrm{num}}}{{\partial}x_{1}}} \\ &\quad= {\frac{{\partial}M_{12}}{{\partial}x_{i}}}(c_{1}+g_{1}+d_{1})+ M_{12} \biggl({\frac{{\partial}c_{1}}{{\partial}x_{i}}}+{\frac{{\partial}g_{1}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{1}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}-{\frac{{\partial}M_{22}}{{\partial}x_{i}}}(c_{2}+g_{2}+d_{2})- M_{22} \biggl({\frac{{\partial}c_{2}}{{\partial}x_{i}}}+{\frac{{\partial}g_{2}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{2}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}- {\frac{{\partial}M_{32}}{{\partial}x_{i}}}(c_{3}+g_{3}+d_{3})+ M_{32} \biggl({\frac{{\partial}c_{3}}{{\partial}x_{i}}}+{\frac{{\partial}g_{3}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{3}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}-{\frac{{\partial}M_{42}}{{\partial}x_{i}}}(c_{4}+g_{4}+d_{4}) \\ &\qquad{}- M_{42} \biggl({\frac{{\partial}c_{4}}{{\partial}x_{i}}}+{\frac{{\partial}g_{4}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{4}}{{\partial}x_{i}}} \biggr) \end{aligned}$$
(26)

and also

$$\begin{aligned} {\frac{{\partial}f_{4,\mathrm{den}}}{{\partial}x_{i}}}={\frac{{\partial}\det M}{{\partial}x_{i}}} \end{aligned}$$
(27)

and finally

$$\begin{aligned} {\frac{{\partial}f_{4}}{{\partial}x_{i}}}={\frac{{{\frac{{\partial}f_{4,\mathrm{num}}}{{\partial}x_{i}}}f_{4,\mathrm{den}}-f_{4,\mathrm{num}} {\frac{{\partial}f_{4,\mathrm{den}}}{{\partial}x_{i}}}}}{\det M^{2}}}. \end{aligned}$$
(28)

Fifth row of the Jacobian matrix \({\nabla _{x}}f(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}f_{5}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}f_{5}}{{\partial}x_{2}}}=0\), \({\frac{{\partial}f_{5}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}f_{5}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}f_{5}}{{\partial}x_{5}}}=0\), \({\frac{{\partial}f_{5}}{{\partial}x_{6}}}=1\), \({\frac{{\partial}f_{5}}{{\partial}x_{7}}}=0\) and \({\frac{{\partial}f_{5}}{{\partial}x_{8}}}=0\).

Sixth row of the Jacobian matrix \({\nabla _{x}}f(x)|_{(x^{*},u^{*})}\): It holds that \(f_{6}(x)={\frac{f_{6,\mathrm{num}}}{f_{6,\mathrm{den}}}}\) with \(f_{6,\mathrm{num}}=-M_{13}(c_{1}+g_{1}+d+1)+M_{23}(c_{2}+g_{2}+d_{2})-M_{33}(c_{3}+g_{3}+d_{3})+M_{43}(c_{4}+g_{4}+d_{4})\) and \(f_{6,\mathrm{den}}=\det M\). Thus, for \(i=1,2,\ldots,8\) one has

$$\begin{aligned} &{\frac{{\partial}f_{6,\mathrm{num}}}{{\partial}x_{1}}} \\ &\quad =-{ \frac{{\partial}M_{13}}{{\partial}x_{i}}}(c_{1}+g_{1}+d_{1})- M_{13} \biggl({\frac{{\partial}c_{1}}{{\partial}x_{i}}}+{\frac{{\partial}g_{1}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{1}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}+{\frac{{\partial}M_{23}}{{\partial}x_{i}}}(c_{2}+g_{2}+d_{2})+ M_{23} \biggl({\frac{{\partial}c_{2}}{{\partial}x_{i}}}+{\frac{{\partial}g_{2}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{2}}{{\partial}x_{i}}} \biggr) \\ &\qquad{} -{\frac{{\partial}M_{33}}{{\partial}x_{i}}}(c_{3}+g_{3}+d_{3})- M_{33} \biggl({\frac{{\partial}c_{3}}{{\partial}x_{i}}}+{\frac{{\partial}g_{3}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{3}}{{\partial}x_{i}}} \biggr) \\ &\qquad{} +{\frac{{\partial}M_{43}}{{\partial}x_{i}}}(c_{4}+g_{4}+d_{4}) \\ &\qquad{}+ M_{43} \biggl({\frac{{\partial}c_{4}}{{\partial}x_{i}}}+{\frac{{\partial}g_{4}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{4}}{{\partial}x_{i}}} \biggr) \end{aligned}$$
(29)

and also

$$\begin{aligned} {\frac{{\partial}f_{6,\mathrm{den}}}{{\partial}x_{i}}}={\frac{{\partial}\det M}{{\partial}x_{i}}} \end{aligned}$$
(30)

and finally

$$\begin{aligned} {\frac{{\partial}f_{6}}{{\partial}x_{i}}}={\frac{{{\frac{{\partial}f_{6,\mathrm{num}}}{{\partial}x_{i}}}f_{6,\mathrm{den}}-f_{6,\mathrm{num}} {\frac{{\partial}f_{6,\mathrm{den}}}{{\partial}x_{i}}}}}{\det M^{2}}}. \end{aligned}$$
(31)

Seventh row of the Jacobian matrix \({\nabla _{x}}f(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}f_{7}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}f_{7}}{{\partial}x_{2}}}=0\), \({\frac{{\partial}f_{7}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}f_{7}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}f_{7}}{{\partial}x_{5}}}=0\), \({\frac{{\partial}f_{7}}{{\partial}x_{6}}}=0\), \({\frac{{\partial}f_{7}}{{\partial}x_{7}}}=0\) and \({\frac{{\partial}f_{7}}{{\partial}x_{8}}}=0\).

Eighth row of the Jacobian matrix \({\nabla _{x}}f(x)|_{(x^{*},u^{*})}\): It holds that \(f_{4}(x)={\frac{f_{8,\mathrm{num}}}{f_{8,\mathrm{den}}}}\) with \(f_{8,\mathrm{num}}=M_{14}(c_{1}+g_{1}+d+1)-M_{24}(c_{2}+g_{2}+d_{2})+M_{34}(c_{3}+g_{3}+d_{3})-M_{44}(c_{4}+g_{4}+d_{4})\) and \(f_{8,\mathrm{den}}=\det M\). Thus, for \(i=1,2,\ldots,8\) one has

$$\begin{aligned} &{\frac{{\partial}f_{8,\mathrm{num}}}{{\partial}x_{1}}} \\ &\quad={ \frac{{\partial}M_{14}}{{\partial}x_{i}}}(c_{1}+g_{1}+d_{1})+ M_{14} \biggl({\frac{{\partial}c_{1}}{{\partial}x_{i}}}+{\frac{{\partial}g_{1}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{1}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}-{\frac{{\partial}M_{24}}{{\partial}x_{i}}}(c_{2}+g_{2}+d_{2})- M_{24} \biggl({\frac{{\partial}c_{2}}{{\partial}x_{i}}}+{\frac{{\partial}g_{2}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{2}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}- {\frac{{\partial}M_{34}}{{\partial}x_{i}}}(c_{3}+g_{3}+d_{3})+ M_{34} \biggl({\frac{{\partial}c_{3}}{{\partial}x_{i}}}+{\frac{{\partial}g_{3}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{3}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}-{\frac{{\partial}M_{44}}{{\partial}x_{i}}}(c_{4}+g_{4}+d_{4}) \\ &\qquad{}- M_{44} \biggl({\frac{{\partial}c_{4}}{{\partial}x_{i}}}+{\frac{{\partial}g_{4}}{{\partial}x_{i}}}+{ \frac{{\partial}d_{4}}{{\partial}x_{i}}} \biggr) \end{aligned}$$
(32)

and also

$$\begin{aligned} {\frac{{\partial}f_{8,\mathrm{den}}}{{\partial}x_{i}}}={\frac{{\partial}\det M}{{\partial}x_{i}}} \end{aligned}$$
(33)

and finally

$$\begin{aligned} {\frac{{\partial}f_{8}}{{\partial}x_{i}}}={ \frac{{{\frac{{\partial}f_{8,\mathrm{num}}}{{\partial}x_{i}}}f_{8,\mathrm{den}}-f_{8,\mathrm{num}} {\frac{{\partial}f_{8,\mathrm{den}}}{{\partial}x_{i}}}}}{\det M^{2}}}. \end{aligned}$$
(34)

Computation of the Jacobian matrix \({\nabla _{x}}g_{1}(x)|_{(x^{*},u^{*})}\).

First row of the Jacobian matrix \({\nabla _{x}}g_{1}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{11}(x)}{{\partial}x_{1}}}=0\) for \(i=1,2,\ldots,8\).

Second row of the Jacobian matrix \({\nabla _{x}}g_{1}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{21}(x)}{{\partial}x_{i}}}={ \frac{{{\frac{{\partial}M_{11}}{{\partial}x_{i}}}\det M-M_{11}{\frac{{\partial}\det M}{{\partial}x_{i}}}}}{\det M^{2}}}\), for \(i=1,2,\ldots,8\).

Third row of the Jacobian matrix \({\nabla _{x}}g_{1}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{31}(x)}{{\partial}x_{i}}}=0\), for \(i=1,2,\ldots,8\).

Fourth row of the Jacobian matrix \({\nabla _{x}}g_{1}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{41}(x)}{{\partial}x_{i}}}={ \frac{{-{\frac{{\partial}M_{12}}{{\partial}x_{i}}}\det M+M_{12}{\frac{{\partial}\det M}{{\partial}x_{i}}}}}{\det M^{2}}}\), for \(i=1,2,\ldots,8\).

Fifth row of the Jacobian matrix \({\nabla _{x}}g_{1}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{51}(x)}{{\partial}x_{i}}}=0\), for \(i=1,2,\ldots,8\).

Sixth row of the Jacobian matrix \({\nabla _{x}}g_{1}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{61}(x)}{{\partial}x_{i}}}={ \frac{{{\frac{{\partial}M_{13}}{{\partial}x_{i}}}\det M-M_{13}{\frac{{\partial}\det M}{{\partial}x_{i}}}}}{\det M^{2}}}\), for \(i=1,2,\ldots,8\).

Seventh row of the Jacobian matrix \({\nabla _{x}}g_{1}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{71}(x)}{{\partial}x_{i}}}=0\), for \(i=1,2,\ldots,8\).

Eighth row of the Jacobian matrix \({\nabla _{x}}g_{1}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{81}(x)}{{\partial}x_{i}}}={ \frac{{-{\frac{{\partial}M_{14}}{{\partial}x_{i}}}\det M+M_{14}{\frac{{\partial}\det M}{{\partial}x_{i}}}}}{\det M^{2}}}\), for \(i=1,2,\ldots,8\).

Computation of the Jacobian matrix \({\nabla _{x}}g_{2}(x)|_{(x^{*},u^{*})}\).

First row of the Jacobian matrix \({\nabla _{x}}g_{2}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{12}(x)}{{\partial}x_{1}}}=0\) for \(i=1,2,\ldots,8\).

Second row of the Jacobian matrix \({\nabla _{x}}g_{2}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{22}(x)}{{\partial}x_{i}}}={ \frac{{-{\frac{{\partial}M_{21}}{{\partial}x_{i}}}\det M+M_{21}{\frac{{\partial}\det M}{{\partial}x_{i}}}}}{\det M^{2}}}\), for \(i=1,2,\ldots,8\).

Third row of the Jacobian matrix \({\nabla _{x}}g_{2}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{32}(x)}{{\partial}x_{i}}}=0\), for \(i=1,2,\ldots,8\).

Fourth row of the Jacobian matrix \({\nabla _{x}}g_{2}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{42}(x)}{{\partial}x_{i}}}={ \frac{{{\frac{{\partial}M_{22}}{{\partial}x_{i}}}\det M-M_{22}{\frac{{\partial}\det M}{{\partial}x_{i}}}}}{\det M^{2}}}\), for \(i=1,2,\ldots,8\).

Fifth row of the Jacobian matrix \({\nabla _{x}}g_{2}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{52}(x)}{{\partial}x_{i}}}=0\), for \(i=1,2,\ldots,8\).

Sixth row of the Jacobian matrix \({\nabla _{x}}g_{2}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{62}(x)}{{\partial}x_{i}}}={ \frac{{-{\frac{{\partial}M_{23}}{{\partial}x_{i}}}\det M+M_{23}{\frac{{\partial}\det M}{{\partial}x_{i}}}}}{\det M^{2}}}\), for \(i=1,2,\ldots,8\).

Seventh row of the Jacobian matrix \({\nabla _{x}}g_{2}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{72}(x)}{{\partial}x_{i}}}=0\), for \(i=1,2,\ldots,8\).

Eighth row of the Jacobian matrix \({\nabla _{x}}g_{2}(x)|_{(x^{*},u^{*})}\): \({\frac{{\partial}g_{82}(x)}{{\partial}x_{i}}}={ \frac{{{\frac{{\partial}M_{24}}{{\partial}x_{i}}}\det M-M_{24}{\frac{{\partial}\det M}{{\partial}x_{i}}}}}{\det M^{2}}}\), for \(i=1,2,\ldots,8\).

Next, one computes the partial derivatives of the sub-determinants \(M_{ij}\) and of the determinant detM:

$$\begin{aligned} {\frac{{\partial}M_{11}}{{\partial}x_{i}}}={}&{ \frac{{\partial}m_{22}}{{\partial}x_{i}}}(m_{33}m_{44}-m_{43}m_{34}) \\ &{}+m_{22} \biggl({\frac{{\partial}m_{33}}{{\partial}x_{i}}}m_{44}+m_{33}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{43}}{{\partial}x_{i}}}m_{34}-m_{43}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \biggr) \\ &{}-{\frac{{\partial}m_{23}}{{\partial}x_{i}}}(m_{32}m_{44}-m_{42}m_{34}) \\ &{}-m_{23} \biggl({\frac{{\partial}m_{33}}{{\partial}x_{i}}}m_{44}+m_{32}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{42}}{{\partial}x_{i}}}m_{34}-m_{42}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \biggr) \\ &{}+{\frac{{\partial}m_{24}}{{\partial}x_{i}}}(m_{32}m_{43}-m_{42}m_{33}) \\ &{}+m_{24} \biggl({\frac{{\partial}m_{32}}{{\partial}x_{i}}}m_{43}+m_{32}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{42}}{{\partial}x_{i}}}m_{33}-m_{42}{ \frac{{\partial}m_{33}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(35)

Equivalently, one has

$$\begin{aligned} &{\frac{{\partial}M_{12}}{{\partial}x_{i}}} \\ &\quad ={\frac{{\partial}m_{21}}{{\partial}x_{i}}}(m_{33}m_{44}-m_{43}m_{34}) \\ &\qquad{}+m_{21} \biggl({\frac{{\partial}m_{13}}{{\partial}x_{i}}}m_{44}+m_{13}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{43}}{{\partial}x_{i}}}m_{34}-m_{43}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}-{\frac{{\partial}m_{23}}{{\partial}x_{i}}}(m_{31}m_{44}-m_{41}m_{34}) \\ &\qquad{}-m_{23} \biggl({\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{44}+m_{31}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{34}-m_{41}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}+{\frac{{\partial}m_{24}}{{\partial}x_{i}}}(m_{31}m_{43}-m_{41}m_{33}) \\ &\qquad{}+m_{24} \biggl({\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{43}+m_{31}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{33}-m_{41}{ \frac{{\partial}m_{33}}{{\partial}x_{i}}} \biggr) . \end{aligned}$$
(36)

Moreover, it holds that

$$\begin{aligned} &{\frac{{\partial}M_{13}}{{\partial}x_{i}}} \\ &\quad={\frac{{\partial}m_{21}}{{\partial}x_{i}}}(m_{32}m_{44}-m_{42}m_{34}) \\ &\qquad{}+m_{21} \biggl({\frac{{\partial}m_{32}}{{\partial}x_{i}}}m_{44}+m_{32}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{43}}{{\partial}x_{i}}}m_{34}-m_{43}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}-{\frac{{\partial}m_{23}}{{\partial}x_{i}}}(m_{31}m_{44}-m_{41}m_{34}) \\ &\qquad{}-m_{23} \biggl({\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{44}+m_{31}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{34}-m_{41}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}+{\frac{{\partial}m_{24}}{{\partial}x_{i}}}(m_{31}m_{42}-m_{41}m_{32}) \\ &\qquad{}+m_{24} \biggl({\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{42}+m_{31}{ \frac{{\partial}m_{42}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{32}-m_{41}{ \frac{{\partial}m_{32}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(37)

Additionally, it holds that

$$\begin{aligned} &{\frac{{\partial}M_{14}}{{\partial}x_{i}}} \\ &\quad ={ \frac{{\partial}m_{21}}{{\partial}x_{i}}}(m_{32}m_{43}-m_{42}m_{33}) \\ &\qquad{}+m_{21} \biggl({\frac{{\partial}m_{32}}{{\partial}x_{i}}}m_{43}+m_{32}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{44}}{{\partial}x_{i}}}m_{33}-m_{42}{ \frac{{\partial}m_{32}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}-{\frac{{\partial}m_{22}}{{\partial}x_{i}}}(m_{31}m_{43}-m_{41}m_{33}) \\ &\qquad{}-m_{22} \biggl({\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{43}+m_{31}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{33}}{{\partial}x_{i}}}m_{33}-m_{41}{ \frac{{\partial}m_{33}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}+{\frac{{\partial}m_{23}}{{\partial}x_{i}}}(m_{31}m_{42}-m_{41}m_{32}) \\ &\qquad{}+m_{23} \biggl({\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{42}+m_{31}{ \frac{{\partial}m_{42}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{32}-m_{41}{ \frac{{\partial}m_{32}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(38)

In a similar manner one obtains

$$\begin{aligned} &{\frac{{\partial}M_{21}}{{\partial}x_{i}}} \\ &\quad={\frac{{\partial}m_{12}}{{\partial}x_{i}}}(m_{33}m_{44}-m_{43}m_{34}) \\ &\qquad{}+m_{12} \biggl({\frac{{\partial}m_{33}}{{\partial}x_{i}}}m_{44}+m_{33}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{43}}{{\partial}x_{i}}}m_{33}-m_{43}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}-{\frac{{\partial}m_{13}}{{\partial}x_{i}}}(m_{32}m_{44}-m_{42}m_{34}) \\ &\qquad{}-m_{13} \biggl({\frac{{\partial}m_{32}}{{\partial}x_{i}}}m_{44}+m_{32}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{42}}{{\partial}x_{i}}}m_{34}-m_{42}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}+{\frac{{\partial}m_{14}}{{\partial}x_{i}}}(m_{32}m_{43}-m_{42}m_{33}) \\ &\qquad{}+m_{14} \biggl({\frac{{\partial}m_{32}}{{\partial}x_{i}}}m_{43}+m_{32}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{42}}{{\partial}x_{i}}}m_{33}-m_{42}{ \frac{{\partial}m_{33}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(39)

Equivalently one has

$$\begin{aligned} &{\frac{{\partial}M_{22}}{{\partial}x_{i}}} \\ &\quad={\frac{{\partial}m_{11}}{{\partial}x_{i}}}(m_{33}m_{44}-m_{43}m_{34}) \\ &\qquad{}+m_{11} \biggl({\frac{{\partial}m_{33}}{{\partial}x_{i}}}m_{44}+m_{33}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{43}}{{\partial}x_{i}}}m_{34}-m_{43}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}-{\frac{{\partial}m_{13}}{{\partial}x_{i}}}(m_{31}m_{44}-m_{41}m_{24}) \\ &\qquad{}-m_{13} \biggl({\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{44}+m_{31}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{24}-m_{41}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}+{\frac{{\partial}m_{14}}{{\partial}x_{i}}}(m_{31}m_{43}-m_{41}m_{23}) \\ &\qquad{}+m_{14} \biggl({\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{43}+m_{31}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{23}-m_{41}{ \frac{{\partial}m_{23}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(40)

Following this procedure one gets

$$\begin{aligned} &{\frac{{\partial}M_{23}}{{\partial}x_{i}}} \\ &\quad ={\frac{{\partial}m_{11}}{{\partial}x_{i}}}(m_{32}m_{44}-m_{42}m_{34}) \\ &\qquad{}+m_{11} \biggl({\frac{{\partial}m_{32}}{{\partial}x_{i}}}m_{44}+m_{32}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{42}}{{\partial}x_{i}}}m_{34}-m_{42}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}-{\frac{{\partial}m_{12}}{{\partial}x_{i}}}(m_{31}m_{43}-m_{41}m_{33}) \\ &\qquad{}-m_{12} \biggl({\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{43}+m_{31}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{33}-m_{41}{ \frac{{\partial}m_{33}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}+{\frac{{\partial}m_{14}}{{\partial}x_{i}}}(m_{31}m_{42}-m_{41}m_{32}) \\ &\qquad{}+m_{14} \biggl({\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{43}+m_{31}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{32}-m_{41}{ \frac{{\partial}m_{32}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(41)

Additionally, it holds that

$$\begin{aligned} &{\frac{{\partial}M_{24}}{{\partial}x_{i}}} \\ &\quad={ \frac{{\partial}m_{11}}{{\partial}x_{i}}}(m_{32}m_{43}-m_{42}m_{33}) \\ &\qquad{}+m_{11} \biggl({\frac{{\partial}m_{32}}{{\partial}x_{i}}}m_{43}+m_{32}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{42}}{{\partial}x_{i}}}m_{33}-m_{42}{ \frac{{\partial}m_{33}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}-{\frac{{\partial}m_{12}}{{\partial}x_{i}}}(m_{31}m_{43}-m_{41}m_{33}) \\ &\qquad{}-m_{12} \biggl({\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{43}+m_{31}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{33}-m_{41}{ \frac{{\partial}m_{33}}{{\partial}x_{i}}} \biggr) \\ &\qquad{}+{\frac{{\partial}m_{13}}{{\partial}x_{i}}}(m_{31}m_{42}-m_{41}m_{22}) \\ &\qquad{}+m_{13} \biggl({\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{42}+m_{31}{ \frac{{\partial}m_{42}}{{\partial}x_{i}}} \\ &\qquad{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{22}-m_{41}{ \frac{{\partial}m_{22}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(42)

In this context one obtains

$$\begin{aligned} {\frac{{\partial}M_{31}}{{\partial}x_{i}}}={}&{ \frac{{\partial}m_{12}}{{\partial}x_{i}}}(m_{23}m_{44}-m_{43}m_{24}) \\ &{}+m_{12} \biggl({\frac{{\partial}m_{23}}{{\partial}x_{i}}}m_{44}+m_{23}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{43}}{{\partial}x_{i}}}m_{24}-m_{43}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &{}-{\frac{{\partial}m_{13}}{{\partial}x_{i}}}(m_{22}m_{44}-m_{42}m_{24}) \\ &{}-m_{13} \biggl({\frac{{\partial}m_{22}}{{\partial}x_{i}}}m_{44}+m_{22}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{42}}{{\partial}x_{i}}}m_{24}-m_{42}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &{}+{\frac{{\partial}m_{14}}{{\partial}x_{i}}}(m_{22}m_{43}-m_{42}m_{23}) \\ &{}+m_{14} \biggl({\frac{{\partial}m_{32}}{{\partial}x_{i}}}m_{43}+m_{22}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{42}}{{\partial}x_{i}}}m_{23}-m_{42}{ \frac{{\partial}m_{23}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(43)

Additionally, one has

$$\begin{aligned} {\frac{{\partial}M_{32}}{{\partial}x_{i}}}={}&{ \frac{{\partial}m_{11}}{{\partial}x_{i}}}(m_{23}m_{44}-m_{43}m_{24}) \\ &{}+m_{11} \biggl({\frac{{\partial}m_{23}}{{\partial}x_{i}}}m_{44}+m_{23}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{43}}{{\partial}x_{i}}}m_{24}-m_{43}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &{}-{\frac{{\partial}m_{13}}{{\partial}x_{i}}}(m_{21}m_{44}-m_{41}m_{24}) \\ &{}-m_{13} \biggl({\frac{{\partial}m_{21}}{{\partial}x_{i}}}m_{44}+m_{21}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{24}-m_{41}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &{}+{\frac{{\partial}m_{14}}{{\partial}x_{i}}}(m_{12}m_{43}-m_{41}m_{23}) \\ &{}+m_{14} \biggl({\frac{{\partial}m_{12}}{{\partial}x_{i}}}m_{43}+m_{12}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{23}-m_{41}{ \frac{{\partial}m_{23}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(44)

Furthermore, one has

$$\begin{aligned} {\frac{{\partial}M_{33}}{{\partial}x_{i}}}={}&{ \frac{{\partial}m_{11}}{{\partial}x_{i}}}(m_{22}m_{44}-m_{42}m_{24}) \\ &{}+m_{11} \biggl({\frac{{\partial}m_{22}}{{\partial}x_{i}}}m_{44}+m_{22}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{42}}{{\partial}x_{i}}}m_{24}-m_{42}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &{}-{\frac{{\partial}m_{12}}{{\partial}x_{i}}}(m_{21}m_{44}-m_{41}m_{24}) \\ &{}-m_{12} \biggl({\frac{{\partial}m_{21}}{{\partial}x_{i}}}m_{44}+m_{21}{ \frac{{\partial}m_{44}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{24}-m_{41}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &{}+{\frac{{\partial}m_{14}}{{\partial}x_{i}}}(m_{41}m_{22}-m_{21}m_{42}) \\ &{}+m_{14} \biggl({\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{22}+m_{41}{ \frac{{\partial}m_{22}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{21}}{{\partial}x_{i}}}m_{42}-m_{21}{ \frac{{\partial}m_{42}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(45)

Continuing in this manner one gets

$$\begin{aligned} {\frac{{\partial}M_{34}}{{\partial}x_{i}}}={}&{ \frac{{\partial}m_{11}}{{\partial}x_{i}}}(m_{22}m_{43}-m_{42}m_{23}) \\ &{}+m_{11} \biggl({\frac{{\partial}m_{22}}{{\partial}x_{i}}}m_{43}+m_{22}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{42}}{{\partial}x_{i}}}m_{23}-m_{42}{ \frac{{\partial}m_{23}}{{\partial}x_{i}}} \biggr) \\ &{}-{\frac{{\partial}m_{12}}{{\partial}x_{i}}}(m_{21}m_{43}-m_{41}m_{23}) \\ &{}-m_{12} \biggl({\frac{{\partial}m_{21}}{{\partial}x_{i}}}m_{43}+m_{21}{ \frac{{\partial}m_{43}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{23}-m_{41}{ \frac{{\partial}m_{23}}{{\partial}x_{i}}} \biggr) \\ &{}+{\frac{{\partial}m_{13}}{{\partial}x_{i}}}(m_{21}m_{42}-m_{41}m_{22}) \\ &{}+m_{13} \biggl({\frac{{\partial}m_{22}}{{\partial}x_{i}}}m_{42}+m_{22}{ \frac{{\partial}m_{42}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{41}}{{\partial}x_{i}}}m_{22}-m_{41}{ \frac{{\partial}m_{22}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(46)

Besides, one has

$$\begin{aligned} {\frac{{\partial}M_{41}}{{\partial}x_{i}}}={}&{ \frac{{\partial}m_{12}}{{\partial}x_{i}}}(m_{22}m_{34}-m_{33}m_{24}) \\ &{}+m_{12} \biggl({\frac{{\partial}m_{22}}{{\partial}x_{i}}}m_{34}+m_{22}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{33}}{{\partial}x_{i}}}m_{24}-m_{33}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &{}-{\frac{{\partial}m_{13}}{{\partial}x_{i}}}(m_{22}m_{34}-m_{32}m_{24}) \\ &{}-m_{13} \biggl({\frac{{\partial}m_{22}}{{\partial}x_{i}}}m_{34}+m_{22}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{32}}{{\partial}x_{i}}}m_{24}-m_{32}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &{}+{\frac{{\partial}m_{14}}{{\partial}x_{i}}}(m_{22}m_{33}-m_{32}m_{23}) \\ &{}+m_{14} \biggl({\frac{{\partial}m_{22}}{{\partial}x_{i}}}m_{33}+m_{22}{ \frac{{\partial}m_{33}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{32}}{{\partial}x_{i}}}m_{23}-m_{32}{ \frac{{\partial}m_{23}}{{\partial}x_{i}}} \biggr) . \end{aligned}$$
(47)

Equivalently, one obtains

$$\begin{aligned} {\frac{{\partial}M_{42}}{{\partial}x_{i}}}={}&{ \frac{{\partial}m_{11}}{{\partial}x_{i}}}(m_{23}m_{34}-m_{33}m_{24}) \\ &{}+m_{11} \biggl({\frac{{\partial}m_{23}}{{\partial}x_{i}}}m_{34}+m_{23}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{33}}{{\partial}x_{i}}}m_{24}-m_{33}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &{}-{\frac{{\partial}m_{13}}{{\partial}x_{i}}}(m_{21}m_{34}-m_{31}m_{24}) \\ &{}-m_{13} \biggl({\frac{{\partial}m_{21}}{{\partial}x_{i}}}m_{34}+m_{21}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{24}-m_{31}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &{}+{\frac{{\partial}m_{14}}{{\partial}x_{i}}}(m_{21}m_{33}-m_{31}m_{23}) \\ &{}+m_{14} \biggl({\frac{{\partial}m_{21}}{{\partial}x_{i}}}m_{33}+m_{21}{ \frac{{\partial}m_{33}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{23}-m_{31}{ \frac{{\partial}m_{23}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(48)

In a similar manner one gets

$$\begin{aligned} {\frac{{\partial}M_{43}}{{\partial}x_{i}}}={}&{ \frac{{\partial}m_{11}}{{\partial}x_{i}}}(m_{22}m_{34}-m_{32}m_{24}) \\ &{}+m_{11} \biggl({\frac{{\partial}m_{22}}{{\partial}x_{i}}}m_{34}+m_{22}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{32}}{{\partial}x_{i}}}m_{24}-m_{32}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &{}-{\frac{{\partial}m_{12}}{{\partial}x_{i}}}(m_{21}m_{34}-m_{31}m_{24}) \\ &{}-m_{12} \biggl({\frac{{\partial}m_{21}}{{\partial}x_{i}}}m_{34}+m_{21}{ \frac{{\partial}m_{34}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{24}-m_{31}{ \frac{{\partial}m_{24}}{{\partial}x_{i}}} \biggr) \\ &{}+{\frac{{\partial}m_{14}}{{\partial}x_{i}}}(m_{21}m_{32}-m_{31}m_{22}) \\ &{}+m_{14} \biggl({\frac{{\partial}m_{21}}{{\partial}x_{i}}}m_{32}+m_{21}{ \frac{{\partial}m_{32}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{22}-m_{31}{ \frac{{\partial}m_{22}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(49)

Finally, one has that

$$\begin{aligned} {\frac{{\partial}M_{44}}{{\partial}x_{i}}}={}&{ \frac{{\partial}m_{22}}{{\partial}x_{i}}}(m_{22}m_{33}-m_{32}m_{23}) \\ &{}+m_{11} \biggl({\frac{{\partial}m_{22}}{{\partial}x_{i}}}m_{33}+m_{22}{ \frac{{\partial}m_{33}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{32}}{{\partial}x_{i}}}m_{23}-m_{32}{ \frac{{\partial}m_{23}}{{\partial}x_{i}}} \biggr) \\ &{}-{\frac{{\partial}m_{12}}{{\partial}x_{i}}}(m_{22}m_{33}-m_{31}m_{23}) \\ &{}-m_{12} \biggl({\frac{{\partial}m_{22}}{{\partial}x_{i}}}m_{33}+m_{23}{ \frac{{\partial}m_{33}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{23}-m_{31}{ \frac{{\partial}m_{23}}{{\partial}x_{i}}} \biggr) \\ &{}+{\frac{{\partial}m_{13}}{{\partial}x_{i}}}(m_{21}m_{32}-m_{31}m_{22}) \\ &{}+m_{13} \biggl({\frac{{\partial}m_{21}}{{\partial}x_{i}}}m_{32}+m_{21}{ \frac{{\partial}m_{32}}{{\partial}x_{i}}} \\ &{}- {\frac{{\partial}m_{31}}{{\partial}x_{i}}}m_{22}-m_{31}{ \frac{{\partial}m_{22}}{{\partial}x_{i}}} \biggr). \end{aligned}$$
(50)

About the partial derivatives of the determinant detM one has for \(i=1,2,\ldots,8\)

$$\begin{aligned} {\frac{{\partial}\det M}{{\partial}x_{i}}}={}&{ \frac{{\partial}m_{11}}{{\partial}x_{i}}}M_{11}+m_{11}{ \frac{{\partial}M_{11}}{{\partial}x_{i}}}-{ \frac{{\partial}m_{12}}{{\partial}x_{i}}}M_{12} \\ &{}-m_{12}{ \frac{{\partial}M_{12}}{{\partial}x_{i}}} +{\frac{{\partial}m_{13}}{{\partial}x_{i}}}M_{13} \\ &{}+m_{13}{\frac{{\partial}M_{13}}{{\partial}x_{i}}}- { \frac{{\partial}m_{14}}{{\partial}x_{i}}}M_{14}-m_{14}{\frac{{\partial}M_{14}}{{\partial}x_{i}}}. \end{aligned}$$
(51)

Next, the derivatives of the elements of the inertia matrix M are computed.

It holds that \(m_{11}=m(\sin^{2}(x_{3})\cos^{2}(x_{7})+\sin^{2}(x_{7})){L^{2}}+2mL{x_{3}}\cos(x_{7})\sin(x_{3})+(m+M){x_{3}^{2}}+J\). Thus one has:

$$\begin{aligned} &{\frac{{\partial}m_{11}}{{\partial}x_{1}}}=0,\qquad {\frac{{\partial}m_{11}}{{\partial}x_{2}}}=0,\\ & { \frac{{\partial}m_{11}}{{\partial}x_{3}}}=2mL\cos(x_{7})\sin(x_{5})+2(m+M){x_{3}}, \\ &{\frac{{\partial}m_{11}}{{\partial}x_{4}}}=0,\\ & {\frac{{\partial}m_{11}}{{\partial}x_{5}}}=m\bigl(2 \sin(x_{5})\cos(x_{5})\cos^{2}(x_{7}) \bigr){L^{2}}\\ &\phantom{{\frac{{\partial}m_{11}}{{\partial}x_{5}}}=}{}+2mL{x_{3}}\cos(x_{7}) \cos(x_{5}), \\ &{\frac{{\partial}m_{11}}{{\partial}x_{6}}}=0,\\ & {\frac{{\partial}m_{11}}{{\partial}x_{7}}}=m\bigl(-2 \sin^{2}(x_{5})\cos(x_{7})\sin(x_{7})\\ &\phantom{{\frac{{\partial}m_{11}}{{\partial}x_{7}}}=}{}+ 2\sin(x_{7})\cos(x_{7})\bigr)L^{2}\\ &\phantom{{\frac{{\partial}m_{11}}{{\partial}x_{7}}}=}{}-2mL{x_{3}} \sin(x_{7})\sin(x_{5}), {\frac{{\partial}m_{11}}{{\partial}x_{8}}}=0. \end{aligned}$$

Besides, it holds that \(m_{12}=m_{21}=-mL\sin(x_{7})\), thus \({\frac{{\partial}m_{12}}{{\partial}x_{i}}}={ \frac{{\partial}m_{21}}{{\partial}x_{i}}}=0\) if \(i=1,2,\ldots,8\) and \(i{\neq}7\), \({\frac{{\partial}m_{12}}{{\partial}x_{7}}}={ \frac{{\partial}m_{21}}{{\partial}x_{7}}}=-mL\cos(x_{7})\).

Moreover, it holds that \(m_{13}=m_{31}=-mL\cos(x_{5})\times \cos(x_{7})\sin(x_{7})\), thus \({\frac{{\partial}m_{13}}{{\partial}x_{i}}}={ \frac{{\partial}m_{31}}{{\partial}x_{i}}}=0\) if \(i=1,2,\ldots,8\) and \(i{\neq}5,7\), \({\frac{{\partial}m_{13}}{{\partial}x_{5}}}={ \frac{{\partial}m_{31}}{{\partial}x_{5}}}= m{L^{2}}\sin(x_{5})\cos(x_{7})\sin(x_{7})\), \({\frac{{\partial}m_{13}}{{\partial}x_{7}}}= { \frac{{\partial}m_{31}}{{\partial}x_{7}}} =-m{L^{2}}\cos(x_{5})[-\sin^{2}(x_{7})+\cos^{2}(x_{7})]\).

Additionally, it holds that \(m_{14}=m_{41}=mL({x_{3}}\cos(x_{7})+L\sin(x_{5}))\), thus \({\frac{{\partial}m_{14}}{{\partial}x_{i}}}={ \frac{{\partial}m_{41}}{{\partial}x_{i}}}=0\) for \(i=1,2,\ldots,8\). and \(i{\neq}3,5, 7\), \({\frac{{\partial}m_{14}}{{\partial}x_{3}}}={ \frac{{\partial}m_{41}}{{\partial}x_{3}}}=mL\cos(x_{7})=mL\cos(x_{7})\), \({\frac{{\partial}m_{14}}{{\partial}x_{5}}}={ \frac{{\partial}m_{41}}{{\partial}x_{5}}}=mL\cos(x_{7})=m{L^{2}}\cos(x_{5})\), \({\frac{{\partial}m_{14}}{{\partial}x_{7}}}={ \frac{{\partial}m_{41}}{{\partial}x_{7}}}=mL\cos(x_{7})= -mL{x_{3}}\sin(x_{7})\).

Furthermore, it holds that \(m_{23}=m_{32}=mL\cos(x_{5})\times \cos(x_{7})\), thus \({\frac{{\partial}m_{23}}{{\partial}x_{i}}}={ \frac{{\partial}m_{23}}{{\partial}x_{i}}}=0\) for \(i=1,2,\ldots,8\). and \(i{\neq}5,7\), \({\frac{{\partial}m_{23}}{{\partial}x_{i}}}={ \frac{{\partial}m_{32}}{{\partial}x_{i}}}=-mL\sin(x_{5})\cos(x_{7})\), \({\frac{{\partial}m_{23}}{{\partial}x_{7}}}={ \frac{{\partial}m_{32}}{{\partial}x_{7}}}= -mL\cos(x_{5})\sin(x_{7})\).

Additionally, it holds that \(m_{34}=m_{43}=-mL\sin(x_{5})\times \cos(x_{7})\), thus \({\frac{{\partial}m_{34}}{{\partial}x_{i}}}={ \frac{{\partial}m_{43}}{{\partial}x_{i}}}=0\), for \(i=1,2,\ldots,8\). and \(i{\neq}5,7\), \({\frac{{\partial}m_{34}}{{\partial}x_{5}}}={ \frac{{\partial}m_{43}}{{\partial}x_{5}}}=-mL\cos(x_{5})\cos(x_{7})\), \({\frac{{\partial}m_{34}}{{\partial}x_{7}}}={ \frac{{\partial}m_{43}}{{\partial}x_{7}}}= mL\sin(x_{5})\sin(x_{7})\).

Finally, about the computation of the partial derivatives of the Coriolis forces vector one has

$$\begin{aligned} C(q,\dot{q})= \begin{pmatrix} c_{11}x_{2}+c_{12}x_{4}+c_{13}x_{6}+c_{14}{x_{8}} \\ c_{21}x_{2}+c_{22}x_{4}+c_{23}x_{6}+c_{24}{x_{8}} \\ c_{31}x_{2}+c_{22}x_{4}+c_{23}x_{6}+c_{24}{x_{8}} \\ c_{41}x_{2}+c_{42}x_{4}+c_{43}x_{6}+c_{44}{x_{8}} \end{pmatrix}. \end{aligned}$$
(52)

It holds that for \(i=1.3,5,7\)

$$\begin{aligned} {\frac{{\partial}{c_{1}}}{{\partial}x_{i}}}={ \frac{{\partial}{c_{11}}}{{\partial}x_{i}}}x_{2}+ {\frac{{\partial}{c_{12}}}{{\partial}x_{i}}}x_{4}+{ \frac{{\partial}{c_{13}}}{{\partial}x_{i}}}x_{6}+ {\frac{{\partial}{c_{14}}}{{\partial}x_{i}}}x_{8} \end{aligned}$$
(53)

and also

$$\begin{aligned} &{\frac{{\partial}{c_{1}}}{{\partial}x_{2}}}={ \frac{{\partial}{c_{11}}}{{\partial}x_{2}}}x_{2}+c_{11}+ {\frac{{\partial}{c_{12}}}{{\partial}x_{2}}}x_{4}+{ \frac{{\partial}{c_{13}}}{{\partial}x_{2}}}x_{6}+ {\frac{{\partial}{c_{14}}}{{\partial}x_{2}}}x_{8}, \end{aligned}$$
(54)
$$\begin{aligned} &{\frac{{\partial}{c_{1}}}{{\partial}x_{4}}}={ \frac{{\partial}{c_{11}}}{{\partial}x_{4}}}x_{2}+ {\frac{{\partial}{c_{12}}}{{\partial}x_{4}}}x_{4}+c_{12}+{ \frac{{\partial}{c_{13}}}{{\partial}x_{4}}}x_{6}+ {\frac{{\partial}{c_{14}}}{{\partial}x_{4}}}x_{8}, \end{aligned}$$
(55)
$$\begin{aligned} &{\frac{{\partial}{c_{1}}}{{\partial}x_{6}}}={ \frac{{\partial}{c_{11}}}{{\partial}x_{6}}}x_{2}+ {\frac{{\partial}{c_{12}}}{{\partial}x_{6}}}x_{4}+{ \frac{{\partial}{c_{13}}}{{\partial}x_{6}}}x_{6}+c_{13}+ {\frac{{\partial}{c_{14}}}{{\partial}x_{6}}}x_{8}, \end{aligned}$$
(56)
$$\begin{aligned} &{\frac{{\partial}{c_{1}}}{{\partial}x_{8}}}={ \frac{{\partial}{c_{11}}}{{\partial}x_{8}}}x_{2}+ {\frac{{\partial}{c_{12}}}{{\partial}x_{8}}}x_{4}+{ \frac{{\partial}{c_{13}}}{{\partial}x_{8}}}x_{6}+ {\frac{{\partial}{c_{14}}}{{\partial}x_{8}}}x_{8}+c_{14}. \end{aligned}$$
(57)

Equivalently it holds that for \(i=1.3,5,7\)

$$\begin{aligned} {\frac{{\partial}{c_{2}}}{{\partial}x_{i}}}={ \frac{{\partial}{c_{21}}}{{\partial}x_{i}}}x_{2}+ {\frac{{\partial}{c_{22}}}{{\partial}x_{i}}}x_{4}+{ \frac{{\partial}{c_{23}}}{{\partial}x_{i}}}x_{6}+ {\frac{{\partial}{c_{24}}}{{\partial}x_{i}}}x_{8} \end{aligned}$$
(58)

and also

$$\begin{aligned} &{\frac{{\partial}{c_{2}}}{{\partial}x_{2}}}={ \frac{{\partial}{c_{21}}}{{\partial}x_{2}}}x_{2}+c_{21}+ {\frac{{\partial}{c_{22}}}{{\partial}x_{2}}}x_{4}+{ \frac{{\partial}{c_{23}}}{{\partial}x_{2}}}x_{6}+ {\frac{{\partial}{c_{24}}}{{\partial}x_{2}}}x_{8}, \end{aligned}$$
(59)
$$\begin{aligned} &{\frac{{\partial}{c_{2}}}{{\partial}x_{4}}}={ \frac{{\partial}{c_{21}}}{{\partial}x_{4}}}x_{2}+ {\frac{{\partial}{c_{22}}}{{\partial}x_{4}}}x_{4}+c_{22}+{ \frac{{\partial}{c_{23}}}{{\partial}x_{4}}}x_{6}+ {\frac{{\partial}{c_{24}}}{{\partial}x_{4}}}x_{8}2, \end{aligned}$$
(60)
$$\begin{aligned} &{\frac{{\partial}{c_{2}}}{{\partial}x_{6}}}={ \frac{{\partial}{c_{1}}}{{\partial}x_{6}}}x_{2}+ {\frac{{\partial}{c_{22}}}{{\partial}x_{6}}}x_{4}+{ \frac{{\partial}{c_{23}}}{{\partial}x_{6}}}x_{6}+c_{23}+ {\frac{{\partial}{c_{24}}}{{\partial}x_{6}}}x_{8}, \end{aligned}$$
(61)
$$\begin{aligned} &{\frac{{\partial}{c_{2}}}{{\partial}x_{8}}}={ \frac{{\partial}{c_{21}}}{{\partial}x_{8}}}x_{2}+ {\frac{{\partial}{c_{22}}}{{\partial}x_{8}}}x_{4}+{ \frac{{\partial}{c_{23}}}{{\partial}x_{8}}}x_{6}+ {\frac{{\partial}{c_{24}}}{{\partial}x_{8}}}x_{8}+c_{24}. \end{aligned}$$
(62)

Similarly, it holds that for \(i=1.3,5,7\)

$$\begin{aligned} {\frac{{\partial}{c_{3}}}{{\partial}x_{i}}}={ \frac{{\partial}{c_{31}}}{{\partial}x_{i}}}x_{2}+ {\frac{{\partial}{c_{32}}}{{\partial}x_{i}}}x_{4}+{ \frac{{\partial}{c_{33}}}{{\partial}x_{i}}}x_{6}+ {\frac{{\partial}{c_{34}}}{{\partial}x_{i}}}x_{8} \end{aligned}$$
(63)

and also

$$\begin{aligned} &{\frac{{\partial}{c_{3}}}{{\partial}x_{2}}}={ \frac{{\partial}{c_{31}}}{{\partial}x_{2}}}x_{2}+c_{31}+ {\frac{{\partial}{c_{32}}}{{\partial}x_{2}}}x_{4}+{ \frac{{\partial}{c_{33}}}{{\partial}x_{2}}}x_{6}+ {\frac{{\partial}{c_{34}}}{{\partial}x_{2}}}x_{8}, \end{aligned}$$
(64)
$$\begin{aligned} &{\frac{{\partial}{c_{3}}}{{\partial}x_{4}}}={ \frac{{\partial}{c_{31}}}{{\partial}x_{4}}}x_{2}+ {\frac{{\partial}{c_{32}}}{{\partial}x_{4}}}x_{4}+c_{32}+{ \frac{{\partial}{c_{33}}}{{\partial}x_{4}}}x_{6}+ {\frac{{\partial}{c_{34}}}{{\partial}x_{4}}}x_{8}, \end{aligned}$$
(65)
$$\begin{aligned} &{\frac{{\partial}{c_{3}}}{{\partial}x_{6}}}={ \frac{{\partial}{c_{3}}}{{\partial}x_{6}}}x_{2}+ {\frac{{\partial}{c_{32}}}{{\partial}x_{6}}}x_{4}+{ \frac{{\partial}{c_{33}}}{{\partial}x_{6}}}x_{6}+c_{33}+ {\frac{{\partial}{c_{34}}}{{\partial}x_{6}}}x_{8}, \end{aligned}$$
(66)
$$\begin{aligned} &{\frac{{\partial}{c_{3}}}{{\partial}x_{8}}}={ \frac{{\partial}{c_{31}}}{{\partial}x_{8}}}x_{2}+ {\frac{{\partial}{c_{32}}}{{\partial}x_{8}}}x_{4}+{ \frac{{\partial}{c_{33}}}{{\partial}x_{8}}}x_{6}+ {\frac{{\partial}{c_{34}}}{{\partial}x_{8}}}x_{8}+c_{34}. \end{aligned}$$
(67)

Finally, it holds that for \(i=1.3,5,7\)

$$\begin{aligned} {\frac{{\partial}{c_{4}}}{{\partial}x_{i}}}={ \frac{{\partial}{c_{41}}}{{\partial}x_{i}}}x_{2}+ {\frac{{\partial}{c_{42}}}{{\partial}x_{i}}}x_{4}+{ \frac{{\partial}{c_{43}}}{{\partial}x_{i}}}x_{6}+ {\frac{{\partial}{c_{44}}}{{\partial}x_{i}}}x_{8} \end{aligned}$$
(68)

and also

$$\begin{aligned} &{\frac{{\partial}{c_{4}}}{{\partial}x_{2}}}={ \frac{{\partial}{c_{41}}}{{\partial}x_{2}}}x_{2}+c_{41}+ {\frac{{\partial}{c_{42}}}{{\partial}x_{2}}}x_{4}+{ \frac{{\partial}{c_{43}}}{{\partial}x_{2}}}x_{6}+ {\frac{{\partial}{c_{44}}}{{\partial}x_{2}}}x_{8}, \end{aligned}$$
(69)
$$\begin{aligned} &{\frac{{\partial}{c_{4}}}{{\partial}x_{4}}}={ \frac{{\partial}{c_{41}}}{{\partial}x_{4}}}x_{2}+ {\frac{{\partial}{c_{42}}}{{\partial}x_{4}}}x_{4}+c_{42}+{ \frac{{\partial}{c_{43}}}{{\partial}x_{4}}}x_{6}+ {\frac{{\partial}{c_{44}}}{{\partial}x_{4}}}x_{8}, \end{aligned}$$
(70)
$$\begin{aligned} &{\frac{{\partial}{c_{4}}}{{\partial}x_{6}}}={ \frac{{\partial}{c_{4}}}{{\partial}x_{6}}}x_{2}+ {\frac{{\partial}{c_{42}}}{{\partial}x_{6}}}x_{4}+{ \frac{{\partial}{c_{43}}}{{\partial}x_{6}}}x_{6}+c_{43}+ {\frac{{\partial}{c_{44}}}{{\partial}x_{6}}}x_{8}, \end{aligned}$$
(71)
$$\begin{aligned} &{\frac{{\partial}{c_{4}}}{{\partial}x_{8}}}={ \frac{{\partial}{c_{41}}}{{\partial}x_{8}}}x_{2}+ {\frac{{\partial}{c_{42}}}{{\partial}x_{8}}}x_{4}+{ \frac{{\partial}{c_{43}}}{{\partial}x_{8}}}x_{6}+ {\frac{{\partial}{c_{44}}}{{\partial}x_{8}}}x_{8}+c_{44}. \end{aligned}$$
(72)

Next, the following partial derivatives of the elements \(c_{ij}\) \(i=1,2,3,4\) and \(j=1,2,3,4\) of the Coriolis matrix are computed. It holds

$$\begin{aligned} c_{11}={}&(m+M){x_{3}} {x_{4}}+mL{x_{3}}\cos(x_{5}) \cos(x_{7})x_{6} \\ &{}-mL{x_{3}}\sin(x_{5}) \sin(x_{7})x_{8} \\ &{}+ mL\sin(x_{5})\sin(x_{7})x_{4} \\ &{}+m{L^{2}} \sin(x_{5})\cos(x_{5})\cos^{2}(x_{7})x_{6} \\ &{} +m{L^{2}}\cos^{2}(x_{5})\sin(x_{7}) \cos(x_{7})x_{8}. \end{aligned}$$
(73)

Thus, \({\frac{{\partial}c_{11}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}c_{11}}{{\partial}x_{2}}}=0\), \({\frac{{\partial}c_{11}}{{\partial}x_{3}}}=(m+M)x_{4}+ mL\cos(x_{5})\cos(x_{7})x_{6}-mL\sin(x_{5})\sin(x_{7})x_{8}\), \({\frac{{\partial}c_{11}}{{\partial}x_{4}}}= (m+M)x_{3}+mL\sin(x_{5})\sin(x_{7})\), \({\frac{{\partial}c_{11}}{{\partial}x_{5}}}=-mL{x_{3}}\sin(x_{5})\times \cos(x_{7})x_{6}-mL{x_{3}}\cos(x_{5})\sin(x_{7})x_{8}+ mL\cos(x_{5})\sin(x_{7})x_{4}+m{L^{2}}[\cos^{2}(x_{5})-\sin^{2}(x_{5})]\cos^{2}(x_{7})x_{6}- m{L^{2}}[-2\cos(x_{5})\times \sin(x_{5})\sin(x_{7})\cos(x_{7})]x_{8}\), \({ \frac{{\partial}c_{11}}{{\partial}x_{6}}}= mL{x_{3}}\cos(x_{5})\cos(x_{7}) + m{L^{2}}\sin(x_{5})\cos(x_{5})\cos^{2}(x_{7})\), \({ \frac{{\partial}c_{11}}{{\partial}x_{7}}}= -mL{x_{3}}\cos(x_{5})\times \sin(x_{7})x_{6}-mL{x_{3}}\sin(x_{5}) \cdot \cos(x_{7})x_{8}+ -mL\sin(x_{5})\cos(x_{7})x_{4} +m{L^{2}}\sin(x_{5})\cos(x_{5})[-2\cos(x_{7})\sin(x_{7})]x_{6} -m{L^{2}}\cos^{2}(x_{5})\times [\cos^{2}(x_{7})-\sin^{2}(x_{7})]x_{8}\), \({\frac{{\partial}c_{11}}{{\partial}x_{8}}}=-mL{x_{3}}\sin(x_{5})\sin(x_{7})+ m{L^{2}}\cos^{2}(x_{5})\sin(x_{7})\cos(x_{7})\).

Additionally, it holds that

$$\begin{aligned} c_{12}=mL\sin(x_{5}) \cos(x_{7})x_{2}+(m+M){x_{3}} {x_{2}}. \end{aligned}$$
(74)

Thus, \({\frac{{\partial}c_{12}}{{\partial}x_{7}}}=0\), \({\frac{{\partial}c_{11}}{{\partial}x_{2}}}=mL\sin(x_{5})\cos(x_{7})+(m+M)x_{3}\), \({\frac{{\partial}c_{12}}{{\partial}x_{3}}}=(m+M)x_{2}\), \({\frac{{\partial}c_{12}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}c_{12}}{{\partial}x_{5}}}=mL\cos(x_{5})\cos(x_{7})x_{2}\), \({\frac{{\partial}c_{12}}{{\partial}x_{6}}}=0\), \({\frac{{\partial}c_{12}}{{\partial}x_{7}}}=-mL\sin(x_{5})\sin(x_{7})x_{2}\), \({\frac{{\partial}c_{11}}{{\partial}x_{8}}}=0\).

Moreover, it holds that

$$\begin{aligned} c_{13}={}&mL{x_{3}} \cos(x_{5})\cos(x_{7})x_{2} \\ &{}+m{L^{2}} \sin(x_{5})\sin(x_{7})\cos(x_{7}){x_{6}} \\ &{}+ m{L^{2}}\sin(x_{5})\cos(x_{5}) \cos^{2}(x_{7})x_{2} \\ &{}+m{L^{2}} \cos(x_{5})\sin^{2}(x_{7})x_{8}. \end{aligned}$$
(75)

Thus, \({\frac{{\partial}c_{13}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}c_{13}}{{\partial}x_{1}}}=mL{x_{3}}\cos(x_{5})\cos(x_{7})+ m{L^{2}}\sin(x_{5})\cos(x_{5})\cos^{2}(x_{7})\), \({\frac{{\partial}c_{13}}{{\partial}x_{3}}}=mL\cos(x_{5}) \cdot \cos(x_{7})x_{2}\), \({\frac{{\partial}c_{13}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}c_{13}}{{\partial}x_{5}}}=-mL{x_{3}}\sin(x_{5})\cos(x_{7})x_{2}-m{L^{2}}\cos(x_{5})\times \sin(x_{7})\cos(x_{7})x_{6}+ m{L^{2}}[\cos^{2}(x_{5})-\sin^{2}(x_{5})]\cos^{2}(x_{7})x_{2}- m{L^{2}}\sin(x_{5})\sin^{2}(x_{7})x_{8}\), \({\frac{{\partial}c_{13}}{{\partial}x_{6}}}=m{L^{2}}\sin(x_{5})\sin(x_{7})\cos(x_{7})\), \({\frac{{\partial}c_{13}}{{\partial}x_{7}}}=-mL{x_{3}}\cos(x_{5}) \cdot \sin(x_{7})x_{2}+m{L^{2}}\sin(x_{5})\cos(x_{5}) \cdot [-2\cos(x_{7})\sin(x_{7})]x_{2}+m{L^{2}}\cos(x_{5})[2\sin(x_{7})\cos(x_{7})]x_{8}\), \({\frac{{\partial}c_{13}}{{\partial}x_{8}}}=m{L^{2}}\cos(x_{5}) \cdot \sin^{2}(x_{7})\).

Additionally, it holds that

$$\begin{aligned} c_{14}={}&{-}mL{x_{3}} \sin(x_{5})\sin(x_{7})x_{2}-mL{x_{3}} \sin(x_{7}){x_{8}} \\ &{} +m{L^{2}}\cos^{2}(x_{5})\sin(x_{7}) \cos(x_{7}){x_{2}} \\ &{}+m{L^{2}}\cos(x_{5}) \sin^{2}(x_{7})x_{6}. \end{aligned}$$
(76)

Thus, one obtains \({\frac{{\partial}c_{14}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}c_{14}}{{\partial}x_{2}}}=-mL{x_{3}}\sin(x_{5})\sin(x_{7})+m{L^{2}}\cos^{2}(x_{5})\sin(x_{7})\cos(x_{7})\), \({\frac{{\partial}c_{14}}{{\partial}x_{3}}}=-mL \cdot \sin(x_{5})\sin(x_{7})x_{2}-mL\sin(x_{7})x_{8}\), \({\frac{{\partial}c_{14}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}c_{14}}{{\partial}x_{5}}}= -mL{x_{3}} \cdot \cos(x_{5})\sin(x_{7})x_{2}+ m{L^{2}}[-2\cos(x_{5})\sin(x_{5})] \cdot \sin(x_{7})\cos(x_{7})x_{2}-m{L^{2}}\sin(x_{5})\times \sin^{2}(x_{7})x_{6}\), \({\frac{{\partial}c_{14}}{{\partial}x_{6}}}=m{L^{2}}\cos(x_{5})\sin^{2}(x_{7})\), \({\frac{{\partial}c_{14}}{{\partial}x_{7}}}=-mL{x_{3}}\times \sin(x_{5})\cos(x_{7})x_{2}-mL{x_{3}}\cos(x_{7}){x_{8}}-m{L^{2}}\cos^{2}(x_{5}) [\cos^{2}(x_{7})-\sin^{2}(x_{7})]x_{2}+m{L^{2}}\cos(x_{5})[2\sin(x_{7})\cos(x_{7})]x_{6}\), \({\frac{{\partial}c_{14}}{{\partial}x_{8}}}= -mL{x_{3}}\sin(x_{7})\).

Additionally, it holds that

$$\begin{aligned} c_{21}={}&-(m+M){x_{2}} {x_{3}}-mL\sin(x_{5})\cos(x_{7}){x_{2}} \\ &{}-mL \cos(x_{7}){x_{8}}. \end{aligned}$$
(77)

Thus, \({\frac{{\partial}c_{21}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}c_{21}}{{\partial}x_{2}}}=-(m+M)x_{3}-mL\sin(x_{7})\cos(x_{7})\), \({\frac{{\partial}c_{21}}{{\partial}x_{3}}}=-(m+M)x_{2}\), \({\frac{{\partial}c_{21}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}c_{21}}{{\partial}x_{5}}}=-mL\cos(x_{5})\cos(x_{7})x_{2}\), \({\frac{{\partial}c_{21}}{{\partial}x_{6}}}=0\), \({\frac{{\partial}c_{21}}{{\partial}x_{7}}}=mL\sin(x_{5})\sin(x_{7})x_{2}+mL\sin(x_{7}){x_{8}}\), \({\frac{{\partial}c_{21}}{{\partial}x_{8}}}=-mL\cos(x_{7})\).

Furthermore, it holds that \(c_{22}=0\). Thus, one obtains \({\frac{{\partial}c_{22}}{{\partial}x_{i}}}=0\), for \(i=1,2,\ldots,8\).

Moreover, it holds that

$$\begin{aligned} c_{23}=-mL \bigl( \sin(x_{5})\cos(x_{7})x_{6}+\cos(x_{5}) \sin(x_{7})x_{8} \bigr). \end{aligned}$$
(78)

Thus, \({\frac{{\partial}c_{23}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}c_{23}}{{\partial}x_{2}}}=0\), \({\frac{{\partial}c_{23}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}c_{23}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}c_{23}}{{\partial}x_{5}}}= -mL(\cos(x_{5})\cos(x_{7})x_{6}-\sin(x_{5})\sin(x_{7})x_{8})\), \({\frac{{\partial}c_{23}}{{\partial}x_{6}}}=-mL \sin(x_{5})\cos(x_{7})\), \({\frac{{\partial}c_{23}}{{\partial}x_{7}}}= -mL(-\sin(x_{5})\sin(x_{7})x_{6}+\cos(x_{5}) \cos(x_{7})x_{8})\), \({\frac{{\partial}c_{23}}{{\partial}x_{8}}}=-mL\cos(x_{5})\sin(x_{7})\).

Furthermore, it holds that

$$\begin{aligned} c_{24}={}&{-}mL \bigl( \cos(x_{5})\sin(x_{7})x_{6}+\sin(x_{5}) \cos(x_{7})x_{8} \\ &{}+\cos(x_{7})x_{2} \bigr). \end{aligned}$$
(79)

Thus, one obtains \({\frac{{\partial}c_{24}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}c_{24}}{{\partial}x_{2}}}=-mL\cos(x_{7})\), \({\frac{{\partial}c_{24}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}c_{24}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}c_{24}}{{\partial}x_{5}}}=-mL(-\sin(x_{5})\sin(x_{7})x_{6}+\cos(x_{5})\cos(x_{7})x_{8})\), \({\frac{{\partial}c_{24}}{{\partial}x_{6}}}=-mL\cos(x_{5})\sin(x_{7})\), \({\frac{{\partial}c_{24}}{{\partial}x_{7}}}=-mL(\cos(x_{5})\cos(x_{7})x_{6}-\sin(x_{5})\sin(x_{7})x_{8})-\sin(x_{7})x_{2}\), \({\frac{{\partial}c_{24}}{{\partial}x_{8}}}=-mL\sin(x_{5})\cos(x_{7})\).

Additionally, one has that

$$\begin{aligned} c_{31}={}&{-}mL\cos(x_{5}) \cos(x_{7}) \bigl(x_{3}+L\sin(x_{5}) \cos(x_{7}) \bigr)x_{2} \\ &{}-m{L^{2}} \cos(x_{5})\cos^{2}(x_{7})x_{8}. \end{aligned}$$
(80)

Thus, \({\frac{{\partial}c_{31}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}c_{31}}{{\partial}x_{2}}}=-mL\cos(x_{5})\cos(x_{7})(x_{3}+L\sin(x_{5}) \cos(x_{7}))\), \({\frac{{\partial}c_{31}}{{\partial}x_{3}}}=-mL\cos(x_{5})\cos(x_{7})x_{2}\), \({\frac{{\partial}c_{31}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}c_{31}}{{\partial}x_{5}}}= -mL(-\sin(x_{5}))\cos(x_{7})(x_{3}+L\sin(x_{5})\cos(x_{7}))x_{2}+ mL\times \cos(x_{5})\cos(x_{7})(L\cos(x_{5})\cos(x_{7}))x_{2}+m{L^{2}}\sin(x_{5})\cos(x_{7})x_{8}\), \({\frac{{\partial}c_{31}}{{\partial}x_{6}}}=0\), \({\frac{{\partial}c_{31}}{{\partial}x_{7}}}=mL\cos(x_{5})\sin(x_{7})(x_{3}+L\sin(x_{5})\cos(x_{7}))x_{2}+mL\cos(x_{5})\cos(x_{7}) \cdot (L\sin(x_{5})\sin(x_{7}))+m{L^{2}}\cos(x_{5})\times (2\cos(x_{7})\sin(x_{7}))x_{8}\), \({\frac{{\partial}c_{31}}{{\partial}x_{8}}}=-m{L^{2}}\cos(x_{5})\cos^{2}(x_{7})\).

Furthermore, it holds that \(c_{32}=0\). Thus, one obtains \({\frac{{\partial}c_{32}}{{\partial}x_{i}}}=0\), for \(i=1,2,\ldots,8\).

Moreover, it holds that

$$\begin{aligned} c_{33}=-m{L^{2}} \sin(x_{7})\cos(x_{7})x_{8} . \end{aligned}$$
(81)

Thus, \({\frac{{\partial}c_{33}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}c_{33}}{{\partial}x_{2}}}=0\), \({\frac{{\partial}c_{33}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}c_{33}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}c_{33}}{{\partial}x_{5}}}=0\), \({\frac{{\partial}c_{33}}{{\partial}x_{6}}}=0\), \({\frac{{\partial}c_{33}}{{\partial}x_{7}}}= -m{L^{2}}[\cos^{2}(x_{7})-\sin^{2}(x_{7})]x_{8}\), \({\frac{{\partial}c_{33}}{{\partial}x_{8}}}=-m{L^{2}}\sin(x_{7}) \cos(x_{7})\).

Additionally, it holds that

$$ c_{34}=-m{L^{2}} \bigl( \cos(x_{5})\cos^{2}(x_{7})x_{2}+ \sin(x_{5})\cos(x_{7})x_{6} \bigr). $$
(82)

Thus, \({\frac{{\partial}c_{34}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}c_{34}}{{\partial}x_{2}}}=-m{L^{2}}\cos(x_{5})\cos^{2}(x_{7})\), \({\frac{{\partial}c_{34}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}c_{34}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}c_{34}}{{\partial}x_{5}}}=-m{L^{2}}(-\sin(x_{5})\cos^{2}(x_{7})x_{2}-\cos(x_{5})\times \cos(x_{7})x_{6})\), \({\frac{{\partial}c_{34}}{{\partial}x_{6}}}=-m{L^{2}}(\sin(x_{5})\cos(x_{7}))\), \({\frac{{\partial}c_{37}}{{\partial}x_{7}}}= -m{L^{2}}(-2\cos(x_{5})\cos(x_{7})\sin(x_{7})x_{2}-\sin(x_{5})\sin(x_{7})x_{6})\), \({\frac{{\partial}c_{34}}{{\partial}x_{8}}}=0\).

Furthermore, one has that

$$\begin{aligned} c_{41}={}&mL \bigl(m \sin(x_{5}) \sin(x_{7}) \\ &{}-L\cos^{2}(x_{5}) \sin(x_{7}) \cos(x_{7}) \bigr)x_{2} \\ &{}+m{L^{2}}\cos(x_{5})\cos^{2}(x_{7})x_{2}+mL \cos(x_{7})x_{4}. \end{aligned}$$
(83)

Thus, \({\frac{{\partial}c_{41}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}c_{41}}{{\partial}x_{1}}}=mL(m\sin(x_{5})\sin(x_{7})-L\cos^{2}(x_{5}) \sin(x_{7})\cos(x_{7}))+m{L^{2}} \cos(x_{5})\cos^{(}x_{7})\), \({\frac{{\partial}c_{41}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}c_{41}}{{\partial}x_{4}}}= mL\cos(x_{7})\), \({\frac{{\partial}c_{41}}{{\partial}x_{5}}}=mL(m\cos(x_{5})\sin(x_{7})-2L\cos(x_{5})\times \sin(x_{5})\sin(x_{7})\cos(x_{7}))x_{2} -m{L^{2}} \cdot \sin(x_{5})\cos^{2}(x_{7})x_{2}\), \({\frac{{\partial}c_{41}}{{\partial}x_{6}}}=0\), \({\frac{{\partial}c_{41}}{{\partial}x_{7}}}=mL(m\sin(x_{5})\cos(x_{7})-L\cos^{2}(x_{5}))[\cos^{2}(x_{7})- \sin^{2}(x_{7})]x_{2} -2m{L^{2}}\cos(x_{5}) \cdot \cos(x_{7})\sin(x_{7})x_{2}-mL\sin(x_{7})x_{4}\), \({\frac{{\partial}c_{41}}{{\partial}x_{8}}}=0\).

Moreover, it holds that

$$\begin{aligned} c_{42}=mL\cos(x_{7})x_{2}. \end{aligned}$$
(84)

Thus, \({\frac{{\partial}c_{42}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}c_{42}}{{\partial}x_{2}}}=mL\cos(x_{7})\), \({\frac{{\partial}c_{42}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}c_{42}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}c_{42}}{{\partial}x_{5}}}=0\), \({\frac{{\partial}c_{42}}{{\partial}x_{6}}}=0\), \({\frac{{\partial}c_{42}}{{\partial}x_{7}}}=-mL\sin(x_{7})x_{2}\), \({\frac{{\partial}c_{42}}{{\partial}x_{8}}}=0\).

Furthermore, it holds that

$$\begin{aligned} c_{43}=m{L^{2}} \bigl( \cos(x_{5})\cos^{2}(x_{7})x_{2}+ \sin(x_{5})\cos(x_{7})x_{6} \bigr). \end{aligned}$$
(85)

Thus, \({\frac{{\partial}c_{43}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}c_{43}}{{\partial}x_{2}}}=m{L^{2}}\cos(x_{5})\cos^{2}(x_{7})\), \({\frac{{\partial}c_{43}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}c_{43}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}c_{43}}{{\partial}x_{5}}}=m{L^{2}}(-\sin(x_{5})\cos^{2}(x_{7})x_{2}+\cos(x_{5})\cos(x_{7})x_{6})\), \({\frac{{\partial}c_{43}}{{\partial}x_{6}}}=m{L^{2}}(\sin(x_{5})\cos(x_{7}))\), \({\frac{{\partial}c_{43}}{{\partial}x_{7}}}= m{L^{2}}(-2\cos(x_{5})\cos(x_{7})\sin(x_{7})-\sin(x_{5})\sin(x_{7})x_{6})\), \({\frac{{\partial}c_{43}}{{\partial}x_{8}}}=0\).

Finally, it holds that \(c_{44}=0\). Thus, one obtains \({\frac{{\partial}c_{44}}{{\partial}x_{i}}}=0\), for \(i=1,2,\ldots,8\).

In a similar manner one computes the partial derivatives of the elements of the gravitational forces matrix. It holds that \(g_{11}=0\) that one obtains \({\frac{{\partial}g_{11}}{{\partial}x_{i}}}=0\), for \(i=1,2,\ldots,8\).

Additionally, it holds that \(g_{21}=0\) that one obtains \({\frac{{\partial}g_{21}}{{\partial}x_{i}}}=0\), for \(i=1,2,\ldots,8\).

Moreover it holds that

$$\begin{aligned} g_{31}=gmL\sin(x_{5}) \sin(x_{7}). \end{aligned}$$
(86)

Thus, one obtains \({\frac{{\partial}g_{31}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}g_{31}}{{\partial}x_{2}}}=0\), \({\frac{{\partial}g_{31}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}g_{31}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}g_{31}}{{\partial}x_{5}}}=gmL\cos(x_{5})\sin(x_{7})\), \({\frac{{\partial}g_{31}}{{\partial}x_{6}}}=0\), \({\frac{{\partial}g_{31}}{{\partial}x_{7}}}=gmL\sin(x_{5})\times \cos(x_{7})\), \({\frac{{\partial}g_{31}}{{\partial}x_{8}}}=0\).

Finally it holds that

$$\begin{aligned} g_{41}=gL\cos(x_{5}) \sin(x_{7}). \end{aligned}$$
(87)

Thus, one obtains \({\frac{{\partial}g_{41}}{{\partial}x_{1}}}=0\), \({\frac{{\partial}g_{41}}{{\partial}x_{2}}}=0\), \({\frac{{\partial}g_{41}}{{\partial}x_{3}}}=0\), \({\frac{{\partial}g_{41}}{{\partial}x_{4}}}=0\), \({\frac{{\partial}g_{41}}{{\partial}x_{5}}}=-gmL\sin(x_{5})\sin(x_{7})\), \({\frac{{\partial}g_{41}}{{\partial}x_{6}}}=0\), \({\frac{{\partial}g_{41}}{{\partial}x_{7}}}=gmL\cos(x_{5})\times \cos(x_{7})\), \({\frac{{\partial}g_{41}}{{\partial}x_{8}}}=0\).

Design of an H-infinity nonlinear feedback controller

Equivalent linearized dynamics of the tower crane

After linearization around its current operating point, the dynamic model for the tower crane is written as

$$\begin{aligned} \dot{x}=Ax+Bu+d_{1}. \end{aligned}$$
(88)

Parameter \(d_{1}\) stands for the linearization error in the tower crane’s model that was given previously in Eq. (17). The reference setpoints for the state vector of the aforementioned dynamic model are denoted by \({\mathbf{{x_{d}}}}=[x_{1}^{d},\ldots,x_{8}^{d}]\). Tracking of this trajectory is achieved after applying the control input \(u^{*}\). At every time instant the control input \(u^{*}\) is assumed to differ from the control input u appearing in Eq. (88) by an amount equal to Δu, that is \(u^{*}=u+{\Delta}u\)

$$\begin{aligned} \dot{x}_{d}=Ax_{d}+Bu^{*}+d_{2}. \end{aligned}$$
(89)

The dynamics of the controlled system described in Eq. (88) can be also written as

$$\begin{aligned} \dot{x}=Ax+Bu+Bu^{*}-Bu^{*}+d_{1} \end{aligned}$$
(90)

and by denoting \(d_{3}=-Bu^{*}+d_{1}\) as an aggregate disturbance term one obtains

$$\begin{aligned} \dot{x}=Ax+Bu+Bu^{*}+d_{3}. \end{aligned}$$
(91)

By subtracting Eq. (89) from Eq. (91) one has

$$\begin{aligned} \dot{x}-\dot{x}_{d}=A(x-x_{d})+Bu+d_{3}-d_{2}. \end{aligned}$$
(92)

By denoting the tracking error as \(e=x-x_{d}\) and the aggregate disturbance term as \(\tilde{d}=d_{3}-d_{2}\), the tracking error dynamics becomes

$$\begin{aligned} \dot{e}=Ae+Bu+\tilde{d}. \end{aligned}$$
(93)

The above linearized form of the tower crane’s model can be efficiently controlled after applying an H-infinity feedback control scheme.

The nonlinear H-infinity control

The initial nonlinear model of the tower crane is in the form

$$\begin{aligned} \dot{x}=f(x,u) x\in R^{n},\quad u\in R^{m}. \end{aligned}$$
(94)

Linearization of the model of the tower crane is performed at each iteration of the control algorithm around its present operating point \({(x^{*},u^{*})}=(x(t),u(t-T_{s}))\). The linearized equivalent of the system is described by

$$\begin{aligned} \dot{x}=Ax+Bu+L\tilde{d} \quad x\in R^{n},\ u\in R^{m},\ \tilde{d}\in R^{q}, \end{aligned}$$
(95)

where matrices A and B are obtained from the computation of the previously defined Jacobians and vector denotes disturbance terms due to linearization errors. The problem of disturbance rejection for the linearized model that is described by

$$\begin{aligned} \begin{aligned} &\dot{x}=Ax+Bu+L\tilde{d}, \\ &y=Cx, \end{aligned} \end{aligned}$$
(96)

where \(x\in R^{n}\), \(u\in R^{m}\), \(\tilde{d}\in R^{q}\) and \(y\in R^{p}\), cannot be handled efficiently if the classical LQR control scheme is applied. This is because of the existence of the perturbation term . The disturbance term apart from modeling (parametric) uncertainty and external perturbation terms can also represent noise terms of any distribution.

In the \(H_{\infty}\) control approach, a feedback control scheme is designed for trajectory tracking by the system’s state vector and simultaneous disturbance rejection, considering that the disturbance affects the system in the worst possible manner. The disturbances’ effects are incorporated in the following quadratic cost function:

$$\begin{aligned} &J(t)={\frac{1}{2}} { \int _{0}^{T}} \bigl[{y^{T}}(t)y(t)+r{u^{T}}(t)u(t)-{ \rho ^{2}} {\tilde{d}^{T}}(t)\tilde{d}(t) \bigr]\,dt, \\ &\quad r,{ \rho}>0 . \end{aligned}$$
(97)

The significance of the negative sign in the cost function’s term that is associated with the perturbation variable \(\tilde{d}(t)\) is that the disturbance tries to maximize the cost function \(J(t)\) while the control signal \(u(t)\) tries to minimize it. The physical meaning of the relation given above is that the control signal and the disturbances compete to each other within a min-max differential game. This problem of min-max optimization can be written as \({\min_{u}}{\max_{\tilde{d}}}J(u,\tilde{d})\).

The objective of the optimization procedure is to compute a control signal \(u(t)\) which can compensate for the worst possible disturbance, that is externally imposed to the tower crane. However, the solution to the min-max optimization problem is directly related to the value of the parameter ρ. This means that there is an upper bound in the disturbances magnitude that can be annihilated by the control signal.

Computation of the feedback control gains

For the linearized system given by Eq. (96) the cost function of Eq. (97) is defined, where coefficient r determines the penalization of the control input and weight coefficient ρ determines the reward of the disturbances’ effects. It is assumed that (i) The energy that is transferred from the disturbances signal \(\tilde{d}(t)\) is bounded, that is \({\int _{0}^{\infty}}{\tilde{d}^{T}(t)}\tilde{d}(t)\,{dt}<\infty \), (ii) matrices \([A, B]\) and \([A, L]\) are stabilizable, (iii) matrix \([A, C]\) is detectable. In the case of a tracking problem the optimal feedback control law is given by

$$\begin{aligned} u(t)=-Ke(t) \end{aligned}$$
(98)

with \(e=x-x_{d}\) to be the tracking error, and \(K={\frac{1}{r}}{B^{T}}P\) where P is a positive definite symmetric matrix. As it will be proven in Sect. 5, matrix P is obtained from the solution of the Riccati equation

$$\begin{aligned} {A^{T}}P+PA+Q-P \biggl({ \frac{2}{r}}B{B^{T}}-{\frac{1}{\rho ^{2}}}L{L^{T}} \biggr)P=0, \end{aligned}$$
(99)

where Q is a positive semi-definite symmetric matrix. The worst case disturbance is given by

$$\begin{aligned} \tilde{d}(t)={\frac{1}{\rho ^{2}}} {L^{T}}Pe(t). \end{aligned}$$
(100)

The solution of the H-infinity feedback control problem for the tower crane and the computation of the worst case disturbance that the related controller can sustain, comes from superposition of Bellman’s optimality principle when considering that the robotic crane is affected by two separate inputs: the control input u and the cumulative disturbance input \(\tilde{d}(t)\). Solving the optimal control problem for u, that is for the minimum variation (optimal) control input that achieves elimination of the state vector’s tracking error, gives \(u=-{\frac{1}{r}}{B^{T}}Pe\). Equivalently, solving the optimal control problem for , that is for the worst case disturbance that the control loop can sustain gives \(\tilde{d}={\frac{1}{\rho ^{2}}}{L^{T}}Pe\).

The diagram of the considered control loop for the tower crane is depicted in Fig. 2.

Figure 2
figure 2

Diagram of the control scheme for the 4-DOF underactuated tower crane

Lyapunov stability analysis

Stability proof

Through Lyapunov stability analysis it will be shown that the proposed nonlinear control scheme assures \(H_{\infty}\) tracking performance for the underactuated tower crane, and that in case of bounded disturbance terms asymptotic convergence to the reference setpoints is achieved. The tracking error dynamics for the tower crane is written in the form

$$\begin{aligned} \dot{e}=Ae+Bu+L\tilde{d}, \end{aligned}$$
(101)

where in the tower crane’s case \(L=\in R^{8{\times}8}\) to be the disturbance inputs gain matrix. Variable denotes model uncertainties and external disturbances of the tower crane’s model. The following Lyapunov equation is considered

$$\begin{aligned} V={\frac{1}{2}} {e^{T}}Pe, \end{aligned}$$
(102)

where \(e=x-x_{d}\) is the tracking error. By differentiating with respect to time one obtains

$$\begin{aligned} &\dot{V}={\frac{1}{2}} { \dot{e}^{T}}Pe+{\frac{1}{2}}eP\dot{e} \quad{\Rightarrow} \\ &\dot{V}={\frac{1}{2}} {[Ae+Bu+L\tilde{d}]^{T}}Pe \\ &\phantom{\dot{V}=}{}+{ \frac{1}{2}} {e^{T}}P[Ae+Bu+L\tilde{d}]\quad{\Rightarrow} \end{aligned}$$
(103)
$$\begin{aligned} &\dot{V}={\frac{1}{2}} \bigl[{e^{T}} {A^{T}}+{u^{T}} {B^{T}}+{ \tilde{d}^{T}} {L^{T}} \bigr]Pe \\ &\phantom{\dot{V}=}{}+{\frac{1}{2}} {e^{T}}P[Ae+Bu+L\tilde{d}] \quad{\Rightarrow} \end{aligned}$$
(104)
$$\begin{aligned} &\dot{V}={\frac{1}{2}} {e^{T}} {A^{T}}Pe+{\frac{1}{2}} {u^{T}} {B^{T}}Pe+{\frac{1}{2}} {\tilde{d}^{T}} {L^{T}}Pe \\ &\phantom{\dot{V}=}{}+ {\frac{1}{2}} {e^{T}}PAe+{ \frac{1}{2}} {e^{T}}PBu+{\frac{1}{2}} {e^{T}}PL\tilde{d}. \end{aligned}$$
(105)

The previous equation is rewritten as

$$\begin{aligned} \dot{V}={}&{\frac{1}{2}} {e^{T}} \bigl({A^{T}}P+PA \bigr)e+ \biggl({ \frac{1}{2}} {u^{T}} {B^{T}}Pe+{\frac{1}{2}} {e^{T}}PBu \biggr) \\ &{}+ \biggl({\frac{1}{2}} {\tilde{d}^{T}} {L^{T}}Pe+{ \frac{1}{2}} {e^{T}}PL\tilde{d} \biggr). \end{aligned}$$
(106)

Assumption

For given positive definite matrix Q and coefficients r and ρ there exists a positive definite matrix P, which is the solution of the following matrix equation

$$\begin{aligned} {A^{T}}P+PA=-Q+P \biggl({ \frac{2}{r}}B{B^{T}}-{\frac{1}{\rho ^{2}}}L{L^{T}} \biggr)P. \end{aligned}$$
(107)

Moreover, the following feedback control law is applied to the system

$$\begin{aligned} u=-{\frac{1}{r}} {B^{T}}Pe. \end{aligned}$$
(108)

By substituting Eq. (107) and Eq. (108) one obtains

$$\begin{aligned} \dot{V}={}&{\frac{1}{2}} {e^{T}} \biggl[-Q+P \biggl({\frac{2}{r}}B{B^{T}}-{ \frac{1}{\rho ^{2}}}L{L^{T}} \biggr)P \biggr]e \\ &{}+{e^{T}}PB \biggl(-{\frac{1}{r}} {B^{T}}Pe \biggr)+{e^{T}}PL\tilde{d} \quad{\Rightarrow} \end{aligned}$$
(109)
$$\begin{aligned} \dot{V}={}&{-} {\frac{1}{2}} {e^{T}}Qe+{\frac{1}{r}} {e^{T}}PB{B^{T}}Pe-{ \frac{1}{2\rho ^{2}}} {e^{T}}PL{L^{T}}Pe \\ &{}-{\frac{1}{r}} {e^{T}}PB{B^{T}}Pe+{e^{T}}PL \tilde{d}, \end{aligned}$$
(110)

which after intermediate operations gives

$$\begin{aligned} \dot{V}=-{\frac{1}{2}} {e^{T}}Qe-{\frac{1}{2\rho ^{2}}} {e^{T}}PL{L^{T}}Pe+{e^{T}}PL \tilde{d} \end{aligned}$$
(111)

or, equivalently

$$\begin{aligned} \dot{V}={}&{-} {\frac{1}{2}} {e^{T}}Qe-{\frac{1}{2\rho ^{2}}} {e^{T}}PL{L^{T}}Pe \\ &{}+{\frac{1}{2}} {e^{T}}PL\tilde{d}+{\frac{1}{2}} { \tilde{d}^{T}} {L^{T}}Pe. \end{aligned}$$
(112)

Lemma

The following inequality holds

$$\begin{aligned} {\frac{1}{2}} {e^{T}}L \tilde{d}+{\frac{1}{2}}\tilde{d} {L^{T}}Pe-{\frac{1}{2\rho ^{2}}} {e^{T}}PL{L^{T}}Pe\leq {\frac{1}{2}} {\rho ^{2}} {\tilde{d}^{T}}\tilde{d}. \end{aligned}$$
(113)

Proof

The binomial \(({\rho}{\alpha}-{\frac{1}{\rho}}b)^{2}\) is considered. Expanding the left part of the above inequality one gets

$$\begin{aligned} \begin{aligned} &{\rho ^{2}} {a^{2}}+{ \frac{1}{\rho ^{2}}} {b^{2}}-2ab \geq 0 \quad\Rightarrow\\ & { \frac{1}{2}} {\rho ^{2}} {a^{2}}+{ \frac{1}{2\rho ^{2}}} {b^{2}}-ab \geq 0\quad \Rightarrow \\ &ab-{\frac{1}{2\rho ^{2}}} {b^{2}} \leq {\frac{1}{2}} {\rho ^{2}} {a^{2}}\quad \Rightarrow\\ & {\frac{1}{2}}ab+{ \frac{1}{2}}ab-{\frac{1}{2\rho ^{2}}} {b^{2}} \leq { \frac{1}{2}} {\rho ^{2}} {a^{2}} .\end{aligned} \end{aligned}$$
(114)

The following substitutions are carried out: \(a=\tilde{d}\) and \(b={e^{T}}{P}L\) and the previous relation becomes

$$\begin{aligned} {\frac{1}{2}} { \tilde{d}^{T}} {L^{T}}Pe+{\frac{1}{2}} {e^{T}}PL\tilde{d}-{\frac{1}{2\rho ^{2}}} {e^{T}}PL{L^{T}}Pe{ \leq} {\frac{1}{2}} {\rho ^{2}}\tilde{d}^{T} \tilde{d}. \end{aligned}$$
(115)

Equation (115) is substituted in Eq. (112) and the inequality is enforced, thus giving

$$\begin{aligned} \dot{V} \leq -{\frac{1}{2}} {e^{T}}Qe+{\frac{1}{2}} {\rho ^{2}} { \tilde{d}^{T}}\tilde{d}. \end{aligned}$$
(116)

Equation (116) shows that the \(H_{\infty}\) tracking performance criterion is satisfied. The integration of from 0 to T gives

$$\begin{aligned} \begin{aligned} &{ \int _{0}^{T}}\dot{V}(t)\,dt\\ &\quad \leq -{ \frac{1}{2}} { \int _{0}^{T}} { \Vert e \Vert _{Q}^{2}}\,{dt}+{\frac{1}{2}} {\rho ^{2}} { \int _{0}^{T}} { \Vert \tilde{d} \Vert ^{2}}\,{dt}\quad {\Rightarrow} \\ &2V(T)+{ \int _{0}^{T}} { \Vert e \Vert _{Q}^{2}}\,{dt} \\ &\quad\leq 2V(0)+{\rho ^{2}} { \int _{0}^{T}} { \Vert \tilde{d} \Vert ^{2}}\,dt. \end{aligned} \end{aligned}$$
(117)

Moreover, if there exists a positive constant \(M_{d}>0\) such that

$$\begin{aligned} \int _{0}^{\infty}{ \Vert \tilde{d} \Vert ^{2}}\,dt \leq M_{d} \end{aligned}$$
(118)

then one gets

$$\begin{aligned} { \int _{0}^{\infty}} { \Vert e \Vert _{Q}^{2}}\,dt \leq 2V(0)+{\rho ^{2}} {M_{d}}. \end{aligned}$$
(119)

Thus, the integral \({\int _{0}^{\infty}}{\Vert e\Vert _{Q}^{2}}\,dt\) is bounded. Moreover, \(V(T)\) is bounded and from the definition of the Lyapunov function V in Eq. (102) it becomes clear that \(e(t)\) will be also bounded since \(e(t) \in \Omega _{e}=\{e|{e^{T}}Pe\leq 2V(0)+{\rho ^{2}}{M_{d}} \}\). According to the above and with the use of Barbalat’s Lemma one obtains \(\lim_{t \rightarrow \infty}{e(t)}=0\).

After following the stages of the stability proof one arrives at Eq. (116) which shows that the H-infinity tracking performance criterion holds. By selecting the attenuation coefficient ρ to be sufficiently small and in particular to satisfy \(\rho ^{2}<\Vert e\Vert ^{2}_{Q} / \Vert \tilde{d}\Vert ^{2}\) one has that the first derivative of the Lyapunov function is upper bounded by 0. This condition holds at each sampling instance and consequently global stability for the control loop can be concluded. □

Robust state estimation with the use of the \(H_{\infty}\) Kalman filter

The control loop has to be implemented with the use of information provided by a small number of sensors and by processing only a small number of state variables. To reconstruct the missing information about the state vector of the tower crane it is proposed to use a filtering scheme and based on it to apply state estimation-based control [1, 36]. By denoting as \(A(k)\), \(B(k)\) and \(C(k)\) the discrete-time equivalents of matrices A, B and C of the linearized state-space model of the system, the recursion of the \(H_{\infty}\) Kalman Filter for the model of the tower crane, can be formulated in terms of a measurement update and a time update part.

Measurement update:

$$\begin{aligned} &D(k)= \bigl[I-{\theta}W(k)P^{-}(k)+{C^{T}}(k)R(k)^{-1}C(k)P^{-}(k) \bigr]^{-1}, \\ &K(k)=P^{-}(k)D(k){C^{T}}(k)R(k)^{-1}, \\ &\hat{x}(k)=\hat{x}^{-}(k)+K(k) \bigl[y(k)-C\hat{x}^{-}(k) \bigr]. \end{aligned}$$
(120)

Time update:

$$\begin{aligned} \begin{aligned} &\hat{x}^{-}(k+1)=A(k)x(k)+B(k)u(k), \\ &P^{-}(k+1)=A(k)P^{-}(k)D(k)A^{T}(k)+Q(k), \end{aligned} \end{aligned}$$
(121)

where it is assumed that parameter θ is sufficiently small to assure that the covariance matrix \({P^{-}(k)}^{-1}-{\theta}W(k)+C^{T}(k)R(k)^{-1}C(k)\) will be positive definite. When \(\theta =0\) the \(H_{\infty}\) Kalman Filter becomes equivalent to the standard Kalman Filter. One can measure only a part of the state vector of the crane, for instance state variables \(x_{1}\), \(x_{3}\), \(x_{5}\), and \(x_{7}\) and can estimate through filtering the rest of the state vector elements (rate of change of ϕ, η, \(\delta _{1}\) and \(\delta _{2}\)). Moreover, the proposed Kalman filtering method can be used for sensor fusion purposes.

Simulation tests

The global stability properties of the control method and the elimination of the state vector’s tracking error which were previously proven through Lyapunov analysis are further confirmed through simulation experiments. To compute the stabilizing feedback gains of the controller, the algebraic Riccati equation of Eq. (107) had to be repetitively solved at each iteration of the control algorithm. The parameters of the dynamic model of the tower crane which have been used in the simulation experiments were according to [2, 3]. All parameters and variables of the crane’s model are measured in SI units. The obtained results are depicted in Fig. 3 to Fig. 18. The real values of the state variables of the tower crane are printed in blue, their estimates which are provided by the H-infinity Kalman Filter are printed in green colour while the associated setpoints are printed in red. The performance of the nonlinear optimal control method was very satisfactory. Actually, through all test cases it has been shown that the control method can achieve fast and accurate tracking of reference trajectories (setpoints) under moderate variations of the control inputs. The simulation tests come to confirm that the control method has global (and not local) stability properties. Under the nonlinear optimal control method the state variables of the tower crane can track precisely setpoints with fast and abrupt changes. Moreover, the convergence to these setpoints is independent from initial conditions.

Figure 3
figure 3

Tracking of setpoint 1 for the tower crane (a) convergence of state variables \(x_{1}\) to \(x_{4}\) to their reference setpoints (red line: setpoint, blue line: real value, green line: estimated value), (b) convergence of state variables \(x_{5}\) to \(x_{8}\) to their reference setpoints

Figure 4
figure 4

Tracking of setpoint 1 for the tower crane (a) control inputs \(u_{1}\), \(u_{2}\) applied to crane, (b) tracking error variables \(e_{1}\), \(e_{3}\), \(e_{5}\), \(e_{7}\) of the tower crane

Figure 5
figure 5

Tracking of setpoint 2 for the tower crane (a) convergence of state variables \(x_{1}\) to \(x_{4}\) to their reference setpoints (red line: setpoint, blue line: real value, green line: estimated value), (b) convergence of state variables \(x_{5}\) to \(x_{8}\) to their reference setpoints

Figure 6
figure 6

Tracking of setpoint 2 for the tower crane (a) control inputs \(u_{1}\), \(u_{2}\) applied to crane, (b) tracking error variables \(e_{1}\), \(e_{3}\), \(e_{5}\), \(e_{7}\) of the tower crane

Figure 7
figure 7

Tracking of setpoint 3 for the tower crane (a) convergence of state variables \(x_{1}\) to \(x_{4}\) to their reference setpoints (red line: setpoint, blue line: real value, green line: estimated value), (b) convergence of state variables \(x_{5}\) to \(x_{8}\) to their reference setpoints

Figure 8
figure 8

Tracking of setpoint 3 for the tower crane (a) control inputs \(u_{1}\), \(u_{2}\) applied to crane, (b) tracking error variables \(e_{1}\), \(e_{3}\), \(e_{5}\), \(e_{7}\) of the tower crane

Figure 9
figure 9

Tracking of setpoint 4 for the tower crane (a) convergence of state variables \(x_{1}\) to \(x_{4}\) to their reference setpoints (red line: setpoint, blue line: real value, green line: estimated value), (b) convergence of state variables \(x_{5}\) to \(x_{8}\) to their reference setpoints

Figure 10
figure 10

Tracking of setpoint 4 for the tower crane (a) control inputs \(u_{1}\), \(u_{2}\) applied to crane, (b) tracking error variables \(e_{1}\), \(e_{3}\), \(e_{5}\), \(e_{7}\) of the tower crane

Figure 11
figure 11

Tracking of setpoint 5 for the tower crane (a) convergence of state variables \(x_{1}\) to \(x_{4}\) to their reference setpoints (red line: setpoint, blue line: real value, green line: estimated value), (b) convergence of state variables \(x_{5}\) to \(x_{8}\) to their reference setpoints

Figure 12
figure 12

Tracking of setpoint 5 for the tower crane (a) control inputs \(u_{1}\), \(u_{2}\) applied to crane, (b) tracking error variables \(e_{1}\), \(e_{3}\), \(e_{5}\), \(e_{7}\) of the tower crane

Figure 13
figure 13

Tracking of setpoint 6 for the tower crane (a) convergence of state variables \(x_{1}\) to \(x_{4}\) to their reference setpoints (red line: setpoint, blue line: real value, green line: estimated value), (b) convergence of state variables \(x_{5}\) to \(x_{8}\) to their reference setpoints

Figure 14
figure 14

Tracking of setpoint 6 for the tower crane (a) control inputs \(u_{1}\), \(u_{2}\) applied to crane, (b) tracking error variables \(e_{1}\), \(e_{3}\), \(e_{5}\), \(e_{7}\) of the tower crane

Figure 15
figure 15

Tracking of setpoint 7 for the tower crane (a) convergence of state variables \(x_{1}\) to \(x_{4}\) to their reference setpoints (red line: setpoint, blue line: real value, green line: estimated value), (b) convergence of state variables \(x_{5}\) to \(x_{8}\) to their reference setpoints

Figure 16
figure 16

Tracking of setpoint 7 for the tower crane (a) control inputs \(u_{1}\), \(u_{2}\) applied to crane, (b) tracking error variables \(e_{1}\), \(e_{3}\), \(e_{5}\), \(e_{7}\) of the tower crane

Figure 17
figure 17

Tracking of setpoint 8 for the tower crane (a) convergence of state variables \(x_{1}\) to \(x_{4}\) to their reference setpoints (red line: setpoint, blue line: real value, green line: estimated value), (b) convergence of state variables \(x_{5}\) to \(x_{8}\) to their reference setpoints

Figure 18
figure 18

Tracking of setpoint 8 for the tower crane (a) control inputs \(u_{1}\), \(u_{2}\) applied to crane, (b) tracking error variables \(e_{1}\), \(e_{3}\), \(e_{5}\), \(e_{7}\) of the tower crane

Regarding the selection of values for the controller gains it can be noted that parameters r, ρ and Q which appear in the method’s algebraic Riccati equations are assigned offline constant values, where the gains vector K is updated at each sampling instance, based on the positive definite and symmetric matrix P which is the solution of the method’s algebraic Riccati equation. The tracking accuracy and the transient performance of the control scheme depends on the values of coefficients r, ρ and on the values of the elements of the diagonal matrix Q. Actually, for relatively small values of r one achieves elimination of the state vector’s tracking error one. Moreover, for relatively high values of the diagonal elements of matrix Q one achieves fast convergence the state variables’ reference trajectories, Finally, the smallest value of the attenuation coefficient ρ that results into a valid solution of the method’s Riccati equation in the form of the positive definite and symmetric matrix P, it the one that provides the control loop with maximum robustness.

Comparing to past attempts for solving the H-infinity control problem for nonlinear dynamical systems, the article’s control approach is substantially different [16]. Preceding results on the use of H-infinity control to nonlinear dynamical systems were limited to the case of affine-in-the-input systems with drift-only dynamics and considered that the control inputs gain matrix is not dependent on the values of the system’s state vector. Moreover, in these approaches the linearization was performed around points of the desirable trajectory whereas in the present article’s control method the linearization points are related with the value of the state vector at each sampling instant as well as with the last sampled value of the control inputs vector. The Riccati equation which has been proposed for computing the feedback gains of the controller is novel, so is the presented global stability proof through Lyapunov analysis.

The proposed H-infinity (optimal) control method for the robotic tower crane exhibits several advantages when compared against other linear or nonlinear control schemes [16]. For instance: (i) In contrast to global linearization-based control schemes (Lie algebra-based control and differential flatness theory-based control) it does not need complicated changes of state-variables (diffeomorphisms) and does not come against singularity problems in the computation of the control inputs, (ii) In contrast to sliding-mode control or to backstepping control the proposed nonlinear optimal control scheme does not require the state-space model of the system to be in a specific form (e.g. triangular, canonical, etc.) (iii) In contrast to PID control the proposed nonlinear optimal control method is globally stable and functions well at changes of operating points, (iv) In contrast to multi-models based control and linearization around multiple operating points, the nonlinear optimal control scheme requires linearization around one single operating point and thus it avoids the computational load for solving multiple Riccati equations or LMIs.

To elaborate on the tracking performance and on the robustness of the proposed nonlinear optimal control method for the ball and plate system the following Tables are given: (i) Table 1 which provides information about the accuracy of tracking of the reference setpoints by the state variables of the tower crane’s state-space model, (ii) Table 2 which provides information about the robustness of the control method to parametric changes in the model of the tower crane’s dynamics (change \({\Delta}a\%\) in the mass M of the trolley), (iii) Table 3 which provides information about the precision in state variables’ estimation that is achieved by the H-infinity Kalman Filter, (iv) Table 4 which provides the approximate convergence times of the tower crane’s state variables to the associated setpoints.

Table 1 Tracking RMSE ×10−3 for the robotic tower crane in the disturbance-free case
Table 2 Tracking RMSE ×10−3 for the robotic tower crane in the case of disturbances
Table 3 RMSE ×10−3 for the estimation performed by the H-infinity KF
Table 4 Convergence time (sec) for the robotic tower crane’s state variables

Conclusions

Tower cranes are mechatronic systems with complicated nonlinear and multivariable dynamics which exhibit also underactuation. They are also exposed to undesirable swinging and swaying motions of the payload and such phenomena may prevent the precise positioning of the transferred cargos or may slow down the execution and completion of load transport tasks. To circumvent such deficiencies, full automation of tower cranes’ operation has been pursued with the development of elaborated nonlinear control algorithms. In the present article a novel nonlinear optimal control approach has been proposed for the dynamic model of the 4-DOF underactuated tower crane. At a first-stage the tower crane’s dynamic model undergoes approximate linearization with the use of the first-order Taylor series expansion and through the computation of the associated Jacobian matrices. The linearization point is updated at each sampling instance and is defined by the present value of the system’s state vector and by the last sampled value of the control inputs vector.

At a second stage a stabilizing H-infinity feedback controller is designed. To compute the stabilizing feedback gains of the H-infinity controller an algebraic Riccati equation had to be repetitively solved at each time-step of the control algorithm. The global stability properties of the control scheme have been proven through Lyapunov analysis. To implement state estimation-based control, the H-infinity Kalman Filter has been used as a robust state estimator. The nonlinear optimal control approach retains the advantages of the standard linear optimal control, that is fast and accurate tracking of reference setpoints under moderate variations of the control inputs. Finally, it is noted that the nonlinear optimal control method is of generic use and can be applied to a variety of robotic cranes, such as 4-DOF underactuated overhead (moving bridge and trolley) cranes, offshore boom cranes, double-pendulum overhead cranes, 4-DOF underactuated tower cranes, and quay-side cranes and so on.