1 Introduction

Hydraulically actuated systems are widely used in heavy machinery, being present in a large variety of industries and research applications. Some examples of hydraulic systems used in daily life are aircrafts (activation and motion of landing gears or flaps), hydraulic lifts, mobile machines (cranes or excavators), hydraulic power steering, braking systems of vehicles, hydraulic jacks or shock absorbers. The modeling and simulation of hydraulic systems enables evaluating their behavior for a wide range of operating conditions. Positioning accuracy of the systems or identification of peak stresses are examples of important issues that can be addressed by means of simulation of hydraulic systems.

The use of the lumped fluid theory [1] allows obtaining computationally efficient models of hydraulic circuits. This theory can be applied to hydraulic systems in which the effect of acoustic waves is negligible, which is generally the case of mobile working machine applications, where the motions are relatively slow and pipelines are usually short. The lumped fluid method is widely used in several works with hydraulically actuated multibody systems [2,3,4,5] and modeling complex hydraulic circuits for real-time simulation [6].

Different approaches exist to include the behavior of hydraulic actuators in the simulation of multibody systems. One simplified technique is the kinematic guidance of the variable corresponding to the endpoints of the hydraulic actuator [7]. Nevertheless, including the dynamics of the hydraulic actuator is necessary in many applications [8, 9]. From the standpoint of integration of the multiphysics problem, two main approaches exist in the literature: the monolithic approach and multirate integration.

The first one, known as monolithic approach or unified scheme, consists of the combination of the multibody system and the hydraulic equations, obtaining a single system of differential equations that can be integrated in time [10, 11]. Docquier et al. [12] presented a multibody model of a modern car equipped with a novel suspension system using a monolithic scheme. Ylinen et al. [13] proposed a hydraulic cylinder model for dynamic simulations, coupling the hydraulic and mechanical variables in a monolithic way. A monolithic formulation, for combined simulation of multibody and hydraulic systems, based on the index-3 augmented Lagrangian, was presented by Naya et al. [14]. Rahikainen et al. [15] combined the index-3 semi-recursive formulation [16] and the lumped fluid theory for hydraulically driven multibody systems, and an improvement of the proposed monolithic formulation was proposed by introducing the singular perturbation method [2]. Lastly, within the monolithic framework, the friction modeling in the hydraulic cylinder, which plays an important role in the accuracy of the simulations and can introduce numerical stiffness [17], was thoroughly studied by Jaiswal et al. [5]. Four friction modeling approaches were compared in terms of the work cycle, friction force, energy balance and numerical efficiency. As an alternative to the monolithic schemes, in a second approach, known as multirate integration, there exist different subsystems that are integrated separately, exchanging information between them in predetermined time intervals. This can be carried out by using a single environment where the different problems are integrated separately (co-integration) [18, 19] or resorting to a different software for each problem (co-simulation) [20,21,22]. Some relevant aspects have been addressed in the literature, such as co-simulation configuration [23], energy-based coupling error minimization [23, 24] or the multirate co-simulation [25].

Different possibilities exist to carry out the linearization of the equations of motion of multibody systems, depending on the form of these nonlinear equations. Some approaches are based on the direct linearization of the Differential-Algebraic system of Equations (DAE) [26,27,28], while others resort to a coordinate partitioning to reduce the nonlinear DAE system to a nonlinear system of Ordinary Differential Equations (ODEs) [27, 29, 30]. Agúndez et al. [30] proposed a linearization approach, consisting in the linearization of the index-2 DAE system and then the reduction to a linear ODE system. The procedure, which showed an excellent accuracy and computational efficiency with complex multibody systems as the bicycle benchmark of Meijaard et al. [31], achieves the maximum reduction of the linearized equations of motion of constrained multibody systems. Nevertheless, to the best knowledge of the authors, there is no procedure for systematically obtaining the linearized equations of motion of hydraulically actuated multibody systems, which is required in several applications.

First, an important application is the building of state and input estimators, like Kalman filters, existing different works in the framework of hydraulically driven multibody systems. Khadim et al. [32] proposed a parameter estimation algorithm, consisting in the combination of the augmented discrete extended Kalman filter (ADEKF) with a curve-fitting method, and Jaiswal et al. [33] presented a state estimator based on an indirect Kalman filter. Secondly, another important application is the performance of linear stability analyses and the design of linear feedback controllers. Hydraulic steering systems play a key role in keeping the directional stability and tracking the steer-handling capability of articulated steering vehicles (ASVs). After some simplified models without considering the dynamics characteristics [34, 35], where the hydraulic steering system was modeled as a torsion spring, the full-hydraulic steering control unit of the steering system model was modeled as a directional control valve by Pazooki et al. [36]. Several works are devoted to improving the yaw stability of ASVs, being some techniques increasing the damping at the articulation joint [37], introducing leakage across the cylinders [34], or other active strategies as differential braking [38], torque vectoring [35] and active steering [39]. Gao et al. [40] analyzed the stability of an ASV and designed a stability controller to avoid the oscillatory yaw motion, with the application of the optimal control theory. An optimal tuned cascade control strategy, based on feedback linearization, is proposed by Nedić et al. [41] to carry out the reference trajectory of a 6-DOF parallel robot platform. An optimal design of the parameters of the cascade load force controller was effectively performed. In these applications, a linearized version of the equations of motion is required.

The main objective of this work is to present an approach for systematically linearizing the equations of motion of hydraulically actuated multibody systems with holonomic and nonholonomic constraints. The procedure corresponds to an extension of the approach presented and validated by Agúndez et al. [30] for mechanical multibody systems. The main advantages of the proposed procedure are its computational efficiency and accuracy, which are compared with a linearization counterpart approach; the maximum reduction of the linearized equations of motion, which allows the elimination of spurious null eigenvalues in the performance of linear stability analyses; and the capacity of the proposed approach to generate the exact linearized equations of motion in terms of the mechanical and hydraulic parameters of the multibody system under study.

The paper is structured as follows. Following the Introduction, Sect. 2 summarizes the main aspects of the hydraulic modeling, using the lumped fluid method, and presents the nonlinear equations of motion of hydraulically actuated multibody systems. Next, Sect. 3 develops in detail the linearization approach and derives the resulting Jacobian matrix. In Sect. 4, the use of the procedure is illustrated with a hydraulically actuated three-dimensional four-bar mechanism model and validated by means of the forward dynamics simulation of the linear and nonlinear systems. Finally, Sect. 5 summarizes the main conclusions drawn from the present work.

2 Formulation of the problem

In this section, the fundamental modeling aspects of a hydraulic linear actuator system are presented. Moreover, the nonlinear equations of motion of hydraulically actuated multibody systems with holonomic and nonholonomic constraints are shown below.

2.1 Modeling of the hydraulic system

In this work, the lumped fluid theory is used to model the hydraulic system. The hydraulic circuit is divided into discrete volumes of uniformly distributed pressure. Considering a discrete control volume V, the evolution of the pressure p is given by the following first-order differential equation:

$$\begin{aligned} \dot{p} = \dfrac{B_{{e}}}{V}\left( {\sum _{k=1}^{n_f} Q_{k}-\dfrac{\textrm{d}V}{\textrm{d}t}}\right) , \end{aligned}$$
(1)

where \(Q_{k}\) represents the incoming (positive value) or outcoming (negative value) flows of the control volume, \(n_f\) is the number of hydraulic flows going in or out of the volume, \({\dfrac{\textrm{d}V}{\textrm{d}t}}\) is the volume change term that usually represents the piston movement inside the cylinder and \(B_{e}\) is the effective bulk modulus of the hydraulic volume, given by:

$$\begin{aligned} \dfrac{1}{B_{{e}}} = \dfrac{1}{B_{\textrm{oil}}}+\sum _{k=1}^{n_s} \dfrac{V_k}{V B_k}. \end{aligned}$$
(2)

In Eq. (2), \(B_{\textrm{oil}}\) is the oil bulk modulus, \(n_s\) is the number of subvolumes \(V_k\) forming the volume V and \(B_k\) is the bulk modulus of the subvolume \(V_k\).

The semi-empirical modeling method [42] is used to describe the valves in the hydraulic circuit. First, the volume flow rate through a directional control valve \(Q_d\) is:

$$\begin{aligned} Q_d = C_{v_d}U\sqrt{|\Delta p|}\dfrac{\Delta p}{|\Delta p|}, \end{aligned}$$
(3)

where \(C_{v_d}\) is the semi-empirical flow rate coefficient of the directional control valve; \(\Delta p\) is the pressure difference, which presents the same direction as the volume flow rate; and U is a normalized spool displacement, which determines the spool position in the control valve. The time evolution of U is given by the following first-order differential equation:

$$\begin{aligned} \dot{U} = \dfrac{U_{\textrm{ref}}-U}{\tau }, \end{aligned}$$
(4)

where \(U_{\textrm{ref}}\) is the reference normalized spool displacement and \(\tau \) is the time constant of the valve.

In the case of a throttle valve, the flow rate \(Q_t\) is expressed as:

$$\begin{aligned} Q_t = C_{v_t}\sqrt{|\Delta p|}\dfrac{\Delta p}{|\Delta p|}, \; \; \textrm{with}\;\; C_{v_t}=C_dA_t\sqrt{\dfrac{2}{\rho _{\textrm{oil}}}}. \end{aligned}$$
(5)

In Eq. (5), \(A_t\) is the area of the throttle valve, \(C_d\) is the coefficient of discharge and \(\rho _{\textrm{oil}}\) is the oil density. The expressions of the volume flow rates in Eqs. (3) and (5) correspond to a turbulent flow, with a Reynolds number of \({\textrm{Re}}>2400\). The derivatives of these expressions with respect to the pressure drop may lead to numerical problems for small pressure differences, since the square root functions of Eqs. (3) and (5) present a vertical tangent for \(\Delta p \rightarrow 0\). Therefore, the laminar regime of the volume flow rates is considered for pressure drops lower than a predefined \(\Delta p_{\textrm{lim}}\), following a linear relation with the pressure difference. In this study, it is assumed that \(\Delta p_{\textrm{lim}} = 2\; \textrm{bar}\). The volume flow rate through a directional control valve or a throttle valve can be written as:

$$\begin{aligned} Q = \left\{ \begin{array}{ll} \gamma _1\Delta p &{} \Delta p \le \Delta p_{\textrm{lim}} \\ \gamma _2\sqrt{|\Delta p|}\dfrac{\Delta p}{|\Delta p|} &{} \Delta p > \Delta p_{\textrm{lim}} \end{array} \right. \end{aligned}$$
(6)

where \(\gamma _1\) and \(\gamma _2\) are a function of the valve parameters. To ensure the continuity of the laminar and turbulent regimes at \(\Delta p_{\textrm{lim}}\), corresponding to a volume flow rate \(Q_{\textrm{lim}}\) (see Fig. 1), the relation \(\gamma _1 = \dfrac{\sqrt{\Delta p_{\textrm{lim}}}}{\Delta p_{\textrm{lim}}}\gamma _2\) is verified. From Eq. (3), \(\gamma _2 = C_{v_d}U\) and \(\gamma _1 = \dfrac{C_{v_d}U}{\Delta p_{\textrm{lim}}}\sqrt{\Delta p_{\textrm{lim}}}\) in the case of a directional control valve, while \(\gamma _2 = C_{v_t}\) and \(\gamma _1 = \dfrac{C_{v_t}}{\Delta p_{\textrm{lim}}}\sqrt{\Delta p_{\textrm{lim}}}\) for throttle valves.

Fig. 1
figure 1

Volume flow rate Q as a function of drop pressure \(\Delta p\): laminar and turbulent regimes

The hydraulic actuation is performed by means of a hydraulic cylinder, which transforms hydraulic pressure into mechanical force. The force in the extension direction of the cylinder, denoted by \(F_{\textrm{cyl}}\), is computed as follows:

$$\begin{aligned} F_{\textrm{cyl}} = A_1 p_1 - A_2 p_2 - F_{\mu }, \end{aligned}$$
(7)

where \(A_1\) and \(A_2\) are the piston and piston-rod side areas of the cylinder, respectively; \(p_1\) is the pressure of the piston side chamber; \(p_2\) is the pressure of the piston-rod side chamber and \(F_{\mu }\) is the friction force, arising from the contact between the seal material with the cylinder wall and cylinder rod. Figure 2 shows a free-body diagram of the hydraulic cylinder.

Fig. 2
figure 2

Free-body diagram of the hydraulic cylinder

Following Ref. [5], the Brown and McPhee model [43] is numerically one of the most efficient approaches to describe the friction force in hydraulically driven multibody systems. This friction model incorporates the Coulomb, stiction and viscous friction, and is valid for both positive and negative relative tangential velocity. Therefore, the force \(F_{\mu }\) can be written as:

$$\begin{aligned} F_{\mu }= & {} F_c\tanh \left( {4\dfrac{\dot{s}}{v_s}}\right) +\nonumber \\{} & {} \left( {F_s-F_c}\right) \dfrac{\dfrac{\dot{s}}{v_s}}{\left( {\dfrac{1}{4}\left( {\dfrac{\dot{s}}{v_s}}\right) ^2+\dfrac{3}{4}}\right) ^2}+\sigma _2\dot{s}, \end{aligned}$$
(8)

where \(F_c\) and \(F_s\) are the Coulomb and static friction forces, respectively, \(v_s\) is the Stribeck velocity and \(\sigma _2\) is the coefficient of viscous friction.

2.2 Nonlinear equations of motion of hydraulically actuated constrained multibody systems

In the present work, a multibody system with n generalized coordinates, m holonomic constraints, l nonholonomic constraints, a hydraulic system with r discrete volumes and u normalized spool displacement variables, which determine the spool positions of the directional control valves, is considered. The equations of motion of a hydraulically actuated constrained multibody system constitute an index-3 Differential-Algebraic system of Equations (DAE), given by the dynamic equilibrium equations, the holonomic and nonholonomic constraints, the hydraulic equations and the valves dynamics equations:

$$\begin{aligned}&\varvec{M}\left( \varvec{x}\right) \varvec{\ddot{x}} + \varvec{D}^\textrm{T}\left( \varvec{x}\right) \varvec{\Lambda } = \varvec{Q}\left( \varvec{x},\varvec{\dot{x}},\varvec{p} \right) , \end{aligned}$$
(9)
$$\begin{aligned}&\varvec{C}\left( \varvec{x}\right) =\varvec{0}, \end{aligned}$$
(10)
$$\begin{aligned}&\varvec{C}_{nh}\left( {\varvec{x},\varvec{\dot{x}}}\right) =\varvec{B}\left( \varvec{x}\right) \varvec{\dot{x}}=\varvec{0}, \end{aligned}$$
(11)
$$\begin{aligned}&\varvec{\dot{p}} = \varvec{H}\left( {\varvec{x},\varvec{\dot{x}},\varvec{p},\varvec{U}}\right) , \end{aligned}$$
(12)
$$\begin{aligned}&\varvec{\dot{U}} = \varvec{W}\left( {\varvec{U},\varvec{U}_{\textrm{ref}}}\right) . \end{aligned}$$
(13)

In Eqs. (9)–(13), \(\varvec{x}\) is the \(n\times 1\) vector of generalized coordinates, which belongs to a domain of \({\mathbb {R}}^n\); \(\varvec{p}\) is the \(r\times 1\) vector of pressures of the hydraulic system, defined in \({\mathbb {R}}^r\); \(\varvec{U}\) is the \(u\times 1\) vector of normalized spool displacement variables existing in the hydraulic system; \(\varvec{U}_{\textrm{ref}}\) is the \(u\times 1\) vector of reference normalized spool displacements; \(\varvec{\Lambda }\) is the \((m+l)\times 1\) vector of Lagrange multipliers; \(\varvec{M}\left( \varvec{x}\right) \) is the \(n\times n\) mass matrix; \(\varvec{Q}\left( \varvec{x},\varvec{\dot{x}},\varvec{p} \right) \) is the \(n\times 1\) vector of generalized forces; \(\varvec{H}\left( {\varvec{x},\dot{\varvec{x}},\varvec{p},\varvec{U}}\right) \) corresponds to the right-hand side of the pressure equations, which are built based on Eq. (1); \(\varvec{W}\left( {\varvec{U},\varvec{U}_{\textrm{ref}}}\right) \) is the right-hand side of the valves dynamics equations, computed as defined in Eq. (4); \(\varvec{C}\left( \varvec{x}\right) \) is the \(m\times 1\) vector of holonomic constraints; and \(\varvec{C}_{nh}\left( \varvec{x},\varvec{\dot{x}}\right) \) is the \(l\times 1\) vector of nonholonomic constraints, linearly dependent on velocities. The matrices \(\varvec{B}\left( \varvec{x}\right) \) and \(\varvec{D}\left( \varvec{x}\right) \) are \(l\times n\) and \((m+l)\times n\), respectively, given by:

$$\begin{aligned} \varvec{B}\left( \varvec{x}\right) = \frac{\partial \varvec{C}_{nh}\left( {\varvec{x},\varvec{\dot{x}}}\right) }{\partial \varvec{\dot{x}}}, \; \;\varvec{D}\left( \varvec{x}\right) = \left( \begin{array}{c} \varvec{C}_{\varvec{x}}\left( \varvec{x}\right) \\ \varvec{B}\left( \varvec{x}\right) \end{array}\right) , \end{aligned}$$
(14)

where \(\varvec{C}_{\varvec{x}}=\frac{\partial \varvec{C}}{\partial \varvec{x}}\).

The time derivative of the holonomic constraints can be assembled with the nonholonomic constraints, resulting in the following nonlinear index-2 DAE system:

$$\begin{aligned}&\varvec{M}\left( \varvec{x}\right) \varvec{\ddot{x}} + \varvec{D}^\textrm{T}\left( \varvec{x}\right) \varvec{\Lambda } = \varvec{Q}\left( \varvec{x},\varvec{\dot{x}},\varvec{p}\right) ,\nonumber \\&\varvec{D}\left( \varvec{x}\right) \varvec{\dot{x}}=\varvec{0},\nonumber \\&\varvec{\dot{p}} = \varvec{H}\left( {\varvec{x},\varvec{\dot{x}},\varvec{p},\varvec{U}}\right) ,\nonumber \\&\varvec{\dot{U}} = \varvec{W}\left( {\varvec{U},\varvec{U}_{\textrm{ref}}}\right) . \end{aligned}$$
(15)

3 Linearization approach for hydraulically actuated multibody systems

Consider a reference solution of the system of equations (9)–(13), given by \(\varvec{x}^0(t)\), \(\varvec{\dot{x}}^0(t)\), \(\varvec{\ddot{x}}^0(t)\), \(\varvec{\Lambda }^0(t)\), \(\varvec{p}^0(t)\), \(\varvec{\dot{p}}^0(t)\), \(\varvec{U}^0(t)\) and \(\varvec{\dot{U}}^0(t)\). Therefore, the following relations are verified:

$$\begin{aligned}&\varvec{M}\left( \varvec{x}^0\right) \varvec{\ddot{x}}^0 + \varvec{D}^\textrm{T}\left( \varvec{x}^0\right) \varvec{\Lambda }^0 = \varvec{Q}\left( \varvec{x}^0,\varvec{\dot{x}}^0,\varvec{p}^0 \right) , \end{aligned}$$
(16)
$$\begin{aligned}&\varvec{C}\left( \varvec{x}^0\right) =\varvec{0}, \end{aligned}$$
(17)
$$\begin{aligned}&\varvec{C}_{nh}\left( {\varvec{x}^0,\varvec{\dot{x}}^0}\right) =\varvec{B}\left( \varvec{x}^0\right) \varvec{\dot{x}}^0=\varvec{0}, \end{aligned}$$
(18)
$$\begin{aligned}&\varvec{\dot{p}}^0=\varvec{H}\left( {\varvec{x}^0,\varvec{\dot{x}}^0,\varvec{p}^0,\varvec{U}^0}\right) , \end{aligned}$$
(19)
$$\begin{aligned}&\varvec{\dot{U}}^0=\varvec{W}\left( {\varvec{U}^0,\varvec{U}_{\textrm{ref}}}\right) , \end{aligned}$$
(20)

where the time dependence has been omitted for simplicity.

First, the variations \(\varvec{\tilde{x}},\;\varvec{\dot{\tilde{x}}},\;\varvec{\ddot{\tilde{x}}},\;\varvec{\tilde{\Lambda }}, \;\varvec{\tilde{p}},\;\varvec{\dot{\tilde{p}}},\;\varvec{\tilde{U}}\; \textrm{and} \; \varvec{\dot{\tilde{U}}}\) with respect to this reference solution are defined as:

$$\begin{aligned}&\varvec{\tilde{x}} = \varvec{x}- \varvec{x}^0, \;{} & {} \varvec{\tilde{\Lambda }} = \varvec{\Lambda }- \varvec{\Lambda }^0, \nonumber \\&\varvec{\dot{\tilde{x}}}=\varvec{\dot{x}}-\varvec{\dot{x}}^0, \;{} & {} \varvec{\tilde{p}}=\varvec{p}- \varvec{p}^0, \nonumber \\&\varvec{\ddot{\tilde{x}}}=\varvec{\ddot{x}}- \varvec{\ddot{x}}^0, \;{} & {} \varvec{\dot{\tilde{p}}}=\varvec{\dot{p}}-\varvec{\dot{p}}^0, \nonumber \\&\varvec{\tilde{U}} = \varvec{U} - \varvec{U}^0, \;{} & {} \varvec{\dot{\tilde{U}}}= \varvec{\dot{U}} - \varvec{\dot{U}}^0. \end{aligned}$$
(21)

Performing the Taylor expansion of the dynamic equilibrium equations:

$$\begin{aligned}{} & {} \left( \varvec{M}\left( {\varvec{x}^0}\right) + \sum _{j=1}^n \left. \dfrac{\partial \left( {\varvec{M}\left( {\varvec{x}}\right) }\right) }{\partial {x}_j}\right| _{0} {\tilde{x}}_j+\cdots \right) \left( \varvec{\ddot{\tilde{x}}}+ \varvec{\ddot{x}}^0\right) \nonumber \\{} & {} \quad +\left( \varvec{D}^\textrm{T}\left( {\varvec{x}^0}\right) + \sum _{j=1}^n \left. \dfrac{\partial \left( {\varvec{D}^\textrm{T} \left( {\varvec{x}}\right) }\right) }{\partial {x}_j}\right| _{0}{\tilde{x}}_j+\cdots \right) \left( \varvec{\tilde{\Lambda }}+\varvec{\Lambda }^0\right) \nonumber \\{} & {} = \varvec{Q}\left( {\varvec{x}^0,\varvec{\dot{x}}^0,\varvec{p}^0}\right) + \left. \dfrac{\partial \varvec{Q}}{\partial \varvec{x}}\right| _{0}\varvec{{\tilde{x}}}+ \left. \dfrac{\partial \varvec{Q}}{\partial \varvec{\dot{x}}}\right| _{0}\varvec{\dot{\tilde{x}}}+\left. \dfrac{\partial \varvec{Q}}{\partial \varvec{p}}\right| _{0}\varvec{\tilde{p}}... \end{aligned}$$
(22)

Equation (22) can be linearized by retaining up to first-order terms. Using Eq. (16) yields:

$$\begin{aligned} \begin{aligned}&\varvec{M}\left( {\varvec{x}^0}\right) \varvec{\ddot{\tilde{x}}} + \left. \dfrac{\partial \left( {\varvec{M}\left( {\varvec{x}}\right) \varvec{\ddot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0}\varvec{\tilde{x}} \\&\quad +\varvec{D}^\textrm{T}\left( {\varvec{x}^0}\right) \varvec{\tilde{\Lambda }} + \left. \dfrac{\partial \left( {\varvec{D}^\textrm{T}\left( {\varvec{x}}\right) \varvec{\Lambda }^0}\right) }{\partial \varvec{x}}\right| _{0}\varvec{\tilde{x}} \\&= \left. \dfrac{\partial \varvec{Q}}{\partial \varvec{x}}\right| _{0}\varvec{{\tilde{x}}}+ \left. \dfrac{\partial \varvec{Q}}{\partial \varvec{\dot{x}}}\right| _{0}\varvec{\dot{\tilde{x}}}+\left. \dfrac{\partial \varvec{Q}}{\partial \varvec{p}}\right| _{0}\varvec{\tilde{p}}, \end{aligned} \end{aligned}$$
(23)

where the partial derivatives are evaluated for the reference solution. Similarly, the linearization of the velocity constraints in Eq. (15) leads to:

$$\begin{aligned} \varvec{D}\left( {\varvec{x}^0}\right) \varvec{\dot{\tilde{x}}} + \left. \dfrac{\partial \left( {\varvec{D}\left( {\varvec{x}}\right) \varvec{\dot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0}\varvec{\tilde{x}} = \varvec{0}, \end{aligned}$$
(24)

where it has been used that \(\varvec{D}\left( {\varvec{x}^0}\right) \varvec{\dot{x}}^0 = \varvec{0}\).

Furthermore, the Taylor expansion of the hydraulic equations (12) with respect to the reference solution yields:

$$\begin{aligned}{} & {} \varvec{\dot{\tilde{p}}}+\varvec{\dot{p}}^0 = \varvec{H}\left( {\varvec{x}^0,\varvec{\dot{x}}^0,\varvec{p}^0,\varvec{U}^0}\right) \nonumber \\{} & {} \quad +\left. \dfrac{\partial \varvec{H}}{\partial \varvec{x}}\right| _{0}\varvec{{\tilde{x}}}+ \left. \dfrac{\partial \varvec{H}}{\partial \varvec{\dot{x}}}\right| _{0}\varvec{\dot{\tilde{x}}}+\left. \dfrac{\partial \varvec{H}}{\partial \varvec{p}}\right| _{0}\varvec{\tilde{p}} +\left. \dfrac{\partial \varvec{H}}{\partial \varvec{U}}\right| _{0}\varvec{\tilde{U}}... \nonumber \\ \end{aligned}$$
(25)

Simplifying by using Eq. (19) and retaining up to first-order terms in Eq. (25):

$$\begin{aligned} \varvec{\dot{\tilde{p}}} = \left. \dfrac{\partial \varvec{H}}{\partial \varvec{x}}\right| _{0}\varvec{{\tilde{x}}}+ \left. \dfrac{\partial \varvec{H}}{\partial \varvec{\dot{x}}}\right| _{0}\varvec{\dot{\tilde{x}}}+\left. \dfrac{\partial \varvec{H}}{\partial \varvec{p}}\right| _{0}\varvec{\tilde{p}} +\left. \dfrac{\partial \varvec{H}}{\partial \varvec{U}}\right| _{0}\varvec{\tilde{U}}. \end{aligned}$$
(26)

Lastly, the Taylor expansion of the first-order differential equations (13) describing the valves dynamics results in:

$$\begin{aligned} \varvec{\dot{\tilde{U}}}+\varvec{\dot{U}}^0 = \varvec{W}\left( {\varvec{U}^0,\varvec{U}_{\textrm{ref}}}\right) +\left. \dfrac{\partial \varvec{W}}{\partial \varvec{U}}\right| _{0}\varvec{{\tilde{U}}}... \end{aligned}$$
(27)

Using Eq. (20) and that the second- and higher-order derivatives in Eq. (27) are null yields:

$$\begin{aligned} \varvec{\dot{\tilde{U}}} = \left. \dfrac{\partial \varvec{W}}{\partial \varvec{U}}\right| _{0}\varvec{{\tilde{U}}}. \end{aligned}$$
(28)

To reduce the linearized equations of motion, the generalized coordinate partition of Ref. [30] is used. Given that the index-3 DAE system of equations (9)–(13) present m nonlinear holonomic constraints, the n-coordinates vector is split into m dependent coordinates \(\varvec{x}_d\) and \(n-m\) admissible position coordinates \(\varvec{x}_a\): \(\varvec{x}= \left( \begin{array}{cc} \varvec{x}_a&\varvec{x}_d \end{array}\right) ^\textrm{T}\). Moreover, the l nonholonomic constraints allow distinguishing between l dependent admissible velocities \(\varvec{\dot{x}}_{ad}\) and \(n-m-l\) independent admissible velocities \(\varvec{\dot{x}}_{ai}\) in the set of admissible velocities \(\varvec{\dot{x}}_a\), and therefore \(\varvec{\dot{x}}_a= \left( \begin{array}{cc} \varvec{\dot{x}}_{ai}&\varvec{\dot{x}}_{ad} \end{array}\right) ^\textrm{T}\). The same partition can be considered at position level:

$$\begin{aligned} \varvec{x}= \left( \begin{array}{ccc} \varvec{x}_{ai}&\varvec{x}_{ad}&\varvec{x}_{d} \end{array}\right) ^\textrm{T}, \end{aligned}$$
(29)

and for the vector of variations \(\varvec{\tilde{x}}\):

$$\begin{aligned} \varvec{\tilde{x}} = \left( \begin{array}{ccc} \varvec{\tilde{x}}_{ai}&\varvec{\tilde{x}}_{ad}&\varvec{\tilde{x}}_{d} \end{array}\right) ^\textrm{T}. \end{aligned}$$
(30)

The admissible dependent coordinates \(\varvec{\tilde{x}}_{ad}\) and the dependent coordinates \(\varvec{\tilde{x}}_{d}\) can be grouped in the set \(\varvec{\tilde{x}}_{dd}=\left( { \begin{array}{cc} \varvec{\tilde{x}}_{ad}&\varvec{\tilde{x}}_{d} \end{array} }\right) ^\textrm{T}\).

The following transformation matrix is defined:

$$\begin{aligned} \varvec{T}\left( \varvec{x}\right) = \left( \begin{array}{c} \varvec{I}_{(n-m-l)} \\ \varvec{T}_{dd}\left( \varvec{x}\right) \end{array}\right) , \end{aligned}$$
(31)

where \(\varvec{T}_{dd}\left( \varvec{x}\right) = -\left( {\varvec{D}_{dd}\left( {\varvec{x}}\right) }\right) ^{-1}\varvec{D}_{ai}\left( {\varvec{x}}\right) \). In Eq. (31), \(\varvec{I}_{(n-m-l)}\) is the identity matrix of dimension \(n-m-l\), \(\varvec{D}_{dd}\left( \varvec{x}\right) \) is a \((m+l)\)-square matrix, formed by the columns of matrix \(\varvec{D}\left( \varvec{x}\right) \) associated with the coordinates \(\varvec{\tilde{x}}_{dd}\), and \(\varvec{D}_{ai}\left( \varvec{x}\right) \) is built from the columns of \(\varvec{D}\left( \varvec{x}\right) \) associated with the independent coordinates \(\varvec{\tilde{x}}_{ai}\). The steps of the approach to obtain the linearized equations of motion are listed below, with the main result of each step shown in a box.

Step 1. Eliminate the Lagrange multipliers variations and reduce the linearized dynamic equations. By premultiplying Eq. (23) by \(\varvec{T}^\textrm{T}\left( {\varvec{x}^0}\right) \), the Lagrange multipliers variations \(\varvec{\tilde{\Lambda }}\) are eliminated, given that \(\varvec{T}^\textrm{T}\left( {\varvec{x}^0}\right) \varvec{D}^\textrm{T}\left( {\varvec{x}^0}\right) = \varvec{0}\). By defining \(\varvec{T}_0 = \varvec{T}\left( {\varvec{x}^0}\right) \), the linearized dynamic equations (23) become:

$$\begin{aligned} \boxed {\begin{aligned}&\varvec{T}_0^\textrm{T}\varvec{M}\left( {\varvec{x}^0}\right) \varvec{\ddot{\tilde{x}}} + \varvec{T}_0^\textrm{T}\left. \dfrac{\partial \left( {\varvec{M}\left( {\varvec{x}}\right) \varvec{\ddot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0}\varvec{\tilde{x}} \\&\quad +\varvec{T}_0^\textrm{T}\left. \dfrac{\partial \left( {\varvec{D}^\textrm{T}\left( {\varvec{x}}\right) \varvec{\Lambda }^0}\right) }{\partial \varvec{x}}\right| _{0}\varvec{\tilde{x}} \\&=\varvec{T}_0^\textrm{T}\left( {\left. \dfrac{\partial \varvec{Q}}{\partial \varvec{x}}\right| _{0}\varvec{{\tilde{x}}}+ \left. \dfrac{\partial \varvec{Q}}{\partial \varvec{\dot{x}}}\right| _{0}\varvec{\dot{\tilde{x}}}+\left. \dfrac{\partial \varvec{Q}}{\partial \varvec{p}}\right| _{0}\varvec{\tilde{p}}}\right) . \end{aligned}} \end{aligned}$$
(32)

Step 2. Obtain a transformation at velocity level: express the velocities \(\varvec{\dot{\tilde{x}}}\) in terms of the independent velocities \(\varvec{\dot{\tilde{x}}}_{ai}\) and positions \(\varvec{\tilde{x}}\). Next, the objective is to express Eq. (32) in terms of \(\varvec{{\tilde{x}}}_{ai}\) and its time derivatives. By using the linearized velocity constraints (24), the dependent velocities are written as follows:

$$\begin{aligned} \varvec{\dot{\tilde{x}}}_{dd}= \varvec{T}_{dd}\left( \varvec{x}^0\right) \varvec{\dot{\tilde{x}}}_{ai} + \bar{\varvec{V}}\left( {\varvec{x}^0,\varvec{\dot{x}}^0}\right) \varvec{{\tilde{x}}}, \end{aligned}$$
(33)

where

$$\begin{aligned} \bar{\varvec{V}}\left( {\varvec{x}^0,\varvec{\dot{x}}^0}\right) = -\left( {\varvec{D}_{dd}\left( {\varvec{x}^0}\right) }\right) ^{-1} \left. \dfrac{\partial \left( {\varvec{D}\left( {\varvec{x}}\right) \varvec{\dot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0}. \end{aligned}$$
(34)

From Eq. (33), the following transformation at velocity level is obtained:

$$\begin{aligned} \boxed {\varvec{\dot{\tilde{x}}} = \varvec{T}\left( \varvec{x}^0\right) \varvec{\dot{\tilde{x}}}_{ai} + \bar{\bar{\varvec{V}}}\left( {\varvec{x}^0,\varvec{\dot{x}}^0}\right) \varvec{\tilde{x}},} \end{aligned}$$
(35)

where \(\bar{\bar{\varvec{V}}}\left( {\varvec{x}^0,\varvec{\dot{x}}^0}\right) = \left( {\begin{array}{c} \varvec{0}_{(n-m-l)\times n}\\ \bar{\varvec{V}}\left( {\varvec{x}^0,\varvec{\dot{x}}^0}\right) \end{array} }\right) \).

Step 3. Obtain a transformation at acceleration level: express the accelerations \(\varvec{\ddot{\tilde{x}}}\) in terms of the independent accelerations \(\varvec{\ddot{\tilde{x}}}_{ai}\), velocities \(\varvec{\dot{\tilde{x}}}\) and positions \(\varvec{\tilde{x}}\). Secondly, the velocity constraints in Eq. (15) are differentiated with respect to time:

(36)

with \(\varvec{d}\left( {\varvec{x},\varvec{\dot{x}}}\right) =\dfrac{\partial \left( {\varvec{D}\left( {\varvec{x}}\right) \varvec{\dot{x}}}\right) }{\partial \varvec{x}}\varvec{\dot{x}}\). The linearization of Eq. (36) yields:

$$\begin{aligned} \varvec{D}\left( {\varvec{x}^0}\right) \varvec{\ddot{\tilde{x}}} + \left. \dfrac{\partial \left( {\varvec{D}\left( {\varvec{x}}\right) \varvec{\ddot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0}\varvec{\tilde{x}} + \left. \dfrac{\partial \varvec{d}}{\partial \varvec{x}}\right| _{0}\varvec{{\tilde{x}}}+ \left. \dfrac{\partial \varvec{d}}{\partial \varvec{\dot{x}}}\right| _{0}\varvec{\dot{\tilde{x}}} = \varvec{0}. \end{aligned}$$
(37)

From Eq. (37), the dependent accelerations \(\varvec{\ddot{\tilde{x}}}_{dd}\) can be obtained as a function of \(\varvec{\ddot{\tilde{x}}}_{ai}\), and the following relation at acceleration level is derived as:

$$\begin{aligned} \boxed {\varvec{\ddot{\tilde{x}}} = \varvec{T}\left( {\varvec{x}^0}\right) \varvec{\ddot{\tilde{x}}}_{ai} + \varvec{U}\left( {\varvec{x}^0,\varvec{\dot{x}}^0}\right) \varvec{\dot{\tilde{x}}} + \varvec{V}\left( {\varvec{x}^0,\varvec{\dot{x}}^0,\varvec{\ddot{x}}^0}\right) \varvec{\tilde{x}},} \end{aligned}$$
(38)

with

$$\begin{aligned}&\varvec{U}\left( {\varvec{x}^0,\varvec{\dot{x}}^0}\right) = \left( { \begin{array}{c} \varvec{0}_{(n-m-l)\times n}\\ -\left( {\varvec{D}_{dd}\left( {\varvec{x}^0}\right) }\right) ^{-1}\left. \dfrac{\partial \varvec{d}}{\partial \varvec{\dot{x}}}\right| _{0} \end{array} }\right) ,\end{aligned}$$
(39)
$$\begin{aligned}&\varvec{V}\left( {\varvec{x}^0,\varvec{\dot{x}}^0,\varvec{\ddot{x}}^0}\right) = \left( { \begin{array}{c} \varvec{0}_{(n-m-l)\times n}\\ -\left( {\varvec{D}_{dd}\left( {\varvec{x}^0}\right) }\right) ^{-1}\left( {\left. \dfrac{\partial \left( {\varvec{D}\left( {\varvec{x}}\right) \varvec{\ddot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0} + \left. \dfrac{\partial \varvec{d}}{\partial \varvec{x}}\right| _{0}}\right) \end{array} }\right) . \end{aligned}$$
(40)

Step 4. Obtain a transformation at position level: eliminate the dependent coordinates \(\varvec{\tilde{x}}_{d}\) by using the linearized holonomic constraints. To achieve the maximum reduction of the linearized equations of motion, the approach of Ref. [30] removes the dependent coordinates \(\varvec{\tilde{x}}_{d}\) by linearizing the holonomic constraints:

$$\begin{aligned} \left. \frac{\partial \varvec{C}}{\partial \varvec{x}_{ai}}\right| _{0}\varvec{\tilde{x}}_{ai} + \left. \frac{\partial \varvec{C}}{\partial \varvec{x}_{ad}}\right| _{0}\varvec{\tilde{x}}_{ad} + \left. \frac{\partial \varvec{C}}{\partial \varvec{x}_{d}}\right| _{0}\varvec{\tilde{x}}_{d}=\varvec{0}. \end{aligned}$$
(41)

Therefore, Eq. (41) allows expressing the dependent coordinates \(\varvec{\tilde{x}}_{d}\) as a function of \(\varvec{\tilde{x}}_{ai}\) and \(\varvec{\tilde{x}}_{ad}\):

$$\begin{aligned} \varvec{\tilde{x}}_{d} = - \left( \left. \frac{\partial \varvec{C}}{\partial \varvec{x}_{d}}\right| _{0} \right) ^{-1}\left( {\left. \frac{\partial \varvec{C}}{\partial \varvec{x}_{ai}}\right| _{0}\varvec{\tilde{x}}_{ai} + \left. \frac{\partial \varvec{C}}{\partial \varvec{x}_{ad}}\right| _{0}\varvec{\tilde{x}}_{ad}}\right) . \end{aligned}$$
(42)

The use of Eq. (42) leads to the following transformation at position level:

$$\begin{aligned} \boxed {\varvec{\tilde{x}} = \varvec{V}^{h,ai}_0 \varvec{\tilde{x}}_{ai} + \varvec{V}^{h,ad}_0 \varvec{\tilde{x}}_{ad},} \end{aligned}$$
(43)

where

$$\begin{aligned}&\varvec{V}^{h,ai}_0 = \left( {\begin{array}{c} \varvec{I}_{\left( {n-m-l}\right) }\\ \varvec{0}_{l\times \left( {n-m-l}\right) }\\ - \left( \left. \frac{\partial \varvec{C}}{\partial \varvec{x}_{d}}\right| _{0} \right) ^{-1}\left. \frac{\partial \varvec{C}}{\partial \varvec{x}_{ai}}\right| _{0} \end{array}}\right) ,\nonumber \\&\varvec{V}^{h,ad}_0 = \left( {\begin{array}{c} \varvec{0}_{\left( {n-m-l}\right) \times l}\\ \varvec{I}_{l}\\ - \left( \left. \frac{\partial \varvec{C}}{\partial \varvec{x}_{d}}\right| _{0} \right) ^{-1}\left. \frac{\partial \varvec{C}}{\partial \varvec{x}_{ad}}\right| _{0} \end{array} }\right) . \end{aligned}$$
(44)

Step 5. Express the velocities \(\varvec{\dot{\tilde{x}}}_{ad}\) in terms of \(\varvec{\tilde{x}}_{ai}\), \(\varvec{\dot{\tilde{x}}}_{ai}\) and \(\varvec{\tilde{x}}_{ad}\): use of the time derivative of the holonomic constraints. Furthermore, an expression of the velocities \(\varvec{\dot{\tilde{x}}}_{ad}\) as a function of \(\varvec{\tilde{x}}_{ai}\), \(\varvec{\dot{\tilde{x}}}_{ai}\) and \(\varvec{\tilde{x}}_{ad}\) can be derived from the time derivative of the holonomic constraints and the nonholonomic constraints. Computing the time derivative of the holonomic constraints:

$$\begin{aligned} \varvec{C_x}\left( {\varvec{x}}\right) \varvec{\dot{x}}=\varvec{0}, \end{aligned}$$
(45)

the linearization of Eq. (45) with respect to the reference solution yields:

$$\begin{aligned} \varvec{C_x}\left( {\varvec{x}^0}\right) \varvec{\dot{\tilde{x}}} + \left. \dfrac{\partial \left( {\varvec{C_x}\left( {\varvec{x}}\right) \varvec{\dot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0}\varvec{\tilde{x}} = \varvec{0}. \end{aligned}$$
(46)

Resorting to Eq. (46), the following transformation is obtained:

$$\begin{aligned} \boxed {\varvec{\dot{\tilde{x}}} = \varvec{T}^h_0\varvec{\dot{\tilde{x}}}_a + \varvec{V}^h_0\varvec{\tilde{x}},} \end{aligned}$$
(47)

where

$$\begin{aligned} \begin{aligned}&\varvec{T}^h_0 = \left( \begin{array}{c} \varvec{I}_{(n-m)} \\ -\left( \varvec{C}_{\varvec{x}_d}\left( \varvec{x}^0\right) \right) ^{-1}\varvec{C}_{\varvec{x}_a}\left( \varvec{x}^0\right) \end{array}\right) , \\&\varvec{V}^h_0= \left( {\begin{array}{c} \varvec{0}_{\left( {n-m}\right) \times n}\\ -\left( \varvec{C}_{\varvec{x}_d}\left( \varvec{x}^0\right) \right) ^{-1}\left. \dfrac{\partial \left( {\varvec{C_x}\left( {\varvec{x}}\right) \varvec{\dot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0} \end{array} }\right) . \end{aligned} \end{aligned}$$
(48)

Step 6. Express the velocities \(\varvec{\dot{\tilde{x}}}_{ad}\) in terms of \(\varvec{\tilde{x}}_{ai}\), \(\varvec{\dot{\tilde{x}}}_{ai}\) and \(\varvec{\tilde{x}}_{ad}\): use of the nonholonomic constraints. Finally, the nonholonomic constraints (11) are linearized:

$$\begin{aligned} \varvec{B}\left( {\varvec{x}^0}\right) \varvec{\dot{\tilde{x}}} + \left. \dfrac{\partial \left( {\varvec{B}\left( {\varvec{x}}\right) \varvec{\dot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0}\varvec{\tilde{x}} = \varvec{0}. \end{aligned}$$
(49)

Substituting Eq. (47) in Eq. (49):

$$\begin{aligned} \varvec{B}\left( {\varvec{x}^0}\right) \varvec{T}^h_0\varvec{\dot{\tilde{x}}}_a + \left( {\varvec{B}\left( {\varvec{x}^0}\right) \! \varvec{V}^h_0 \!+\! \left. \dfrac{\partial \left( {\varvec{B}\left( {\varvec{x}}\right) \!\varvec{\dot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0}}\right) \!\varvec{\tilde{x}} \! = \!\varvec{0}, \end{aligned}$$
(50)

and defining \(\bar{\varvec{B}}\left( {\varvec{x}^0}\right) =\varvec{B}\left( {\varvec{x}^0}\right) \varvec{T}_0^h\), the following expression for the velocities \(\varvec{\dot{\tilde{x}}}_{ad}\) is obtained:

$$\begin{aligned} \boxed {\varvec{\dot{\tilde{x}}}_{ad} = \varvec{U}^{nh,ai}_0 \varvec{\dot{\tilde{x}}}_{ai}+ \varvec{V}^{nh,ai}_0 \varvec{\tilde{x}}_{ai} + \varvec{V}^{nh,ad}_0 \varvec{\tilde{x}}_{ad},} \end{aligned}$$
(51)

where

$$\begin{aligned} \begin{aligned}&\varvec{U}_0^{nh,ai} = -\left( {\bar{\varvec{B}}_{ad}\left( {\varvec{x}^0}\right) }\right) ^{-1}\bar{\varvec{B}}_{ai}\left( {\varvec{x}^0}\right) ,\\&\varvec{V}_0^{nh,ai} = -\left( {\bar{\varvec{B}}_{ad}\left( {\varvec{x}^0}\right) }\right) ^{-1}\left( {\varvec{B}\left( {\varvec{x}^0}\right) \varvec{V}^h_0 +\left. \dfrac{\partial \left( {\varvec{B}\left( {\varvec{x}}\right) \varvec{\dot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0}}\right) \varvec{V}^{h,ai}_0, \\&\varvec{V}^{nh,ad}_0 = -\left( {\bar{\varvec{B}}_{ad}\left( {\varvec{x}^0}\right) }\right) ^{-1}\left( {\varvec{B}\left( {\varvec{x}^0}\right) \varvec{V}^h_0 +\left. \dfrac{\partial \left( {\varvec{B}\left( {\varvec{x}}\right) \varvec{\dot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0}}\right) \varvec{V}^{h,ad}_0. \end{aligned} \end{aligned}$$
(52)

Step 7. Obtain the linearized equations of motion and the Jacobian matrix. The transformations at velocity level (result of Step 2), acceleration level (result of Step 3) and position level (result of Step 4), given by Eqs. (35), (38) and (43), respectively, are used in the linearized dynamic equations (32) (result of Step 1) and the linearized hydraulic equations (26). Furthermore, including Eq. (51) (result of Step 5 and Step 6) and Eq. (28), yield the following linear ODE system of equations:

$$\begin{aligned} \varvec{\ddot{\tilde{x}}}_{ai}&= \varvec{m}_0^{-1}\left( {\varvec{R}_0\varvec{\bar{\bar{V}}}_0+\varvec{S}_0}\right) \varvec{V}^{h,ai}_0\varvec{\tilde{x}}_{ai} + \varvec{m}_0^{-1}\varvec{R}_0\varvec{T}_0\varvec{\dot{\tilde{x}}}_{ai} \nonumber \\&+ \varvec{m}_0^{-1}\left( {\varvec{R}_0\varvec{\bar{\bar{V}}}_0\!+\!\varvec{S}_0}\right) \varvec{V}^{h,ad}_0\varvec{\tilde{x}}_{ad}\!+\!\varvec{m}_0^{-1}\varvec{T}_0^\textrm{T}\left. \dfrac{\partial \varvec{Q}}{\partial \varvec{p}}\right| _{0}\varvec{\tilde{p}}, \end{aligned}$$
(53)
$$\begin{aligned} \varvec{\dot{\tilde{x}}}_{ad}&= \varvec{V}^{nh,ai}_0\varvec{\tilde{x}}_{ai} + \varvec{U}^{nh,ai}_0 \varvec{\dot{\tilde{x}}}_{ai} + \varvec{V}^{nh,ad}_0\varvec{\tilde{x}}_{ad}, \end{aligned}$$
(54)
$$\begin{aligned} \varvec{\dot{\tilde{p}}}&= \varvec{H}_0\varvec{V}^{h,ai}_0\varvec{\tilde{x}}_{ai}+ \left. \dfrac{\partial \varvec{H}}{\partial \varvec{\dot{x}}}\right| _{0}\varvec{T}_0 \varvec{\dot{\tilde{x}}}_{ai} + \varvec{H}_0\varvec{V}^{h,ad}_0\varvec{\tilde{x}}_{ad}\nonumber \\&+\left. \dfrac{\partial \varvec{H}}{\partial \varvec{p}}\right| _{0}\varvec{\tilde{p}} +\left. \dfrac{\partial \varvec{H}}{\partial \varvec{U}}\right| _{0}\varvec{\tilde{U}}, \end{aligned}$$
(55)
$$\begin{aligned} \varvec{\dot{\tilde{U}}}&= \left. \dfrac{\partial \varvec{W}}{\partial \varvec{U}}\right| _{0}\varvec{{\tilde{U}}}, \end{aligned}$$
(56)

where \(\varvec{\bar{\bar{V}}}_0=\varvec{\bar{\bar{V}}}\left( {\varvec{x}^0,\varvec{\dot{x}}^0}\right) \) and the matrices \(\varvec{m}_0\), \(\varvec{R}_0\), \(\varvec{S}_0\), \(\varvec{H}_0\) are given by:

$$\begin{aligned}&\varvec{m}_0 = \varvec{T}_0^\textrm{T}\varvec{M}\left( {\varvec{x}^0}\right) \varvec{T}_0, \end{aligned}$$
(57)
$$\begin{aligned}&\varvec{R}_0 = \varvec{T}_0^\textrm{T}\left( {\left. \dfrac{\partial \varvec{Q}}{\partial \varvec{\dot{x}}}\right| _{0} -\varvec{M}\left( {\varvec{x}^0}\right) \varvec{U}\left( {\varvec{x}^0,\varvec{\dot{x}}^0}\right) }\right) , \end{aligned}$$
(58)
$$\begin{aligned}&\varvec{S}_0 = \varvec{T}_0^\textrm{T}\left( \left. \dfrac{\partial \varvec{Q}}{\partial \varvec{x}}\right| _{0} - \varvec{M}\left( {\varvec{x}^0}\right) \varvec{V}\left( {\varvec{x}^0,\varvec{\dot{x}}^0,\varvec{\ddot{x}}^0}\right) \right. \nonumber \\&\qquad \left. - \left. \dfrac{\partial \left( {\varvec{M}\left( {\varvec{x}}\right) \varvec{\ddot{x}}^0}\right) }{\partial \varvec{x}}\right| _{0} - \left. \dfrac{\partial \left( {\varvec{D}^\textrm{T}\left( {\varvec{x}}\right) \varvec{\Lambda }^0}\right) }{\partial \varvec{x}}\right| _{0}\right) , \end{aligned}$$
(59)
$$\begin{aligned}&\varvec{H}_0 = \left. \dfrac{\partial \varvec{H}}{\partial \varvec{x}}\right| _{0} + \left. \dfrac{\partial \varvec{H}}{\partial \varvec{\dot{x}}}\right| _{0} \varvec{\bar{\bar{V}}}_0. \end{aligned}$$
(60)

Note that the linear ODE system (53)–(56) is comprised of \(n-m-l\) linearized dynamic equations, l equations associated with the linearized nonholonomic constraints, r linearized hydraulic equations and u linear equations associated with the valves dynamics. It must be pointed out that, in contrast to the holonomic constraints, which are nonlinear algebraic equations that can be eliminated after the linearization, the nonholonomic constraints cannot be eliminated due to their non-integrable nature.

By defining \(\varvec{\tilde{X}}= \left( \begin{array}{ccccc} \varvec{\tilde{x}}_{ai}&\varvec{\dot{\tilde{x}}}_{ai}&\varvec{\tilde{x}}_{ad}&\varvec{\tilde{p}}&\varvec{\tilde{U}} \end{array}\right) ^\textrm{T}\), the linearized equations of motion (53)–(56) can be written as a first-order system of the form \(\varvec{\dot{\tilde{X}}}= \varvec{J}\varvec{\tilde{X}}\), where \(\varvec{J}\) is the Jacobian matrix:

(61)

In Eq. (61), the following blocks of the Jacobian matrix verify:

$$\begin{aligned} \begin{array}{ll} \varvec{J}_{21} \in {\mathbb {R}}^{(n-m-l)\times (n-m-l)}, \; &{}\varvec{J}_{22} \in {\mathbb {R}}^{(n-m-l)\times (n-m-l)},\\ \varvec{J}_{23} \in {\mathbb {R}}^{(n-m-l)\times l}, \; &{}\varvec{J}_{24} \in {\mathbb {R}}^{(n-m-l)\times r}, \\ \varvec{J}_{31} \in {\mathbb {R}}^{l \times (n-m-l)}, \; &{}\varvec{J}_{32} \in {\mathbb {R}}^{l \times (n-m-l)},\\ \varvec{J}_{33} \in {\mathbb {R}}^{l \times l}, \; &{}\varvec{J}_{41} \in {\mathbb {R}}^{r\times (n-m-l)}, \\ \varvec{J}_{42} \in {\mathbb {R}}^{r\times (n-m-l)}, \; &{}\varvec{J}_{43} \in {\mathbb {R}}^{r\times l},\\ \varvec{J}_{44} \in {\mathbb {R}}^{r\times r}, \; &{}\varvec{J}_{45} \in {\mathbb {R}}^{r\times u}, \\ \varvec{J}_{55} \in {\mathbb {R}}^{u \times u}. \; &{} \end{array} \end{aligned}$$
(62)

The size of the Jacobian matrix (61) is \((2n-2m-l+r+u)\times (2n-2m-l+r+u)\). This Jacobian matrix represents the maximum possible reduction of the linearized equations of motion of a general hydraulically actuated multibody system with holonomic and nonholonomic constraints. In the particular case of a multibody system only with holonomic constraints (\(l = 0\)), the Steps 5 and 6 previously presented are not necessary and the linearized equations of motion (53)–(56) become:

$$\begin{aligned}&\varvec{\ddot{\tilde{x}}}_{ai} = \varvec{m}_0^{-1}\left( {\varvec{R}_0\varvec{\bar{\bar{V}}}_0+\varvec{S}_0}\right) \varvec{V}^{h,ai}_0\varvec{\tilde{x}}_{ai}\nonumber \\&\quad + \varvec{m}_0^{-1}\varvec{R}_0\varvec{T}_0\varvec{\dot{\tilde{x}}}_{ai} +\varvec{m}_0^{-1}\varvec{T}_0^\textrm{T}\left. \dfrac{\partial \varvec{Q}}{\partial \varvec{p}}\right| _{0}\varvec{\tilde{p}},\nonumber \\&\varvec{\dot{\tilde{p}}} = \varvec{H}_0\varvec{V}^{h,ai}_0\varvec{\tilde{x}}_{ai} + \left. \dfrac{\partial \varvec{H}}{\partial \varvec{\dot{x}}}\right| _{0}\varvec{T}_0 \varvec{\dot{\tilde{x}}}_{ai} + \left. \dfrac{\partial \varvec{H}}{\partial \varvec{p}}\right| _{0}\varvec{\tilde{p}}+\left. \dfrac{\partial \varvec{H}}{\partial \varvec{U}}\right| _{0}\varvec{\tilde{U}},\nonumber \\&\varvec{\dot{\tilde{U}}} = \left. \dfrac{\partial \varvec{W}}{\partial \varvec{U}}\right| _{0}\varvec{{\tilde{U}}}, \end{aligned}$$
(63)

and defining \(\varvec{\tilde{X}} = \left( \begin{array}{cccc} \varvec{\tilde{x}}_{ai}&\varvec{\dot{\tilde{x}}}_{ai}&\varvec{\tilde{p}}&\varvec{\tilde{U}} \end{array}\right) ^\textrm{T}\), the first-order system \(\varvec{\dot{\tilde{X}}}= \varvec{J}\varvec{\tilde{X}}\) is obtained, with the Jacobian matrix:

(64)

4 Validation of the approach with a three-dimensional hydraulically actuated four-bar mechanism model

In this section, the procedure developed in Sect. 3 is validated with the forward dynamics simulation of a three-dimensional hydraulically driven four-bar mechanism model. Moreover, a comparative analysis between the proposed approach and a conventional linearization counterpart procedure is performed. The comparison is made in terms of the preliminary steps required to compute the linearized equations of motion; the size of the resulting Jacobian matrix; the capability to analytically obtain the coefficients of the Jacobian matrix; the computational efficiency and the accuracy.

Fig. 3
figure 3

Three-dimensional four-bar mechanism model with hydraulic actuation: numbering of the bodies, coordinates and body frames

4.1 Description of the four-bar mechanism model with hydraulic actuator

The hydraulically actuated four-bar mechanism presents four rigid bodies: the ground link (inertial frame) is designated as body 1; the input link is denoted as body 2; the coupler is body 3, and the output link corresponds to body 4. The centres of mass \(G_j\), with \(j = \lbrace 2\ldots 4\rbrace \), correspond to the origins of the body frames. The origin of the inertial frame is located at \(O_1\), which also corresponds to the revolute joint connecting body 1 with body 2. The hydraulic actuation is performed by means of a hydraulic cylinder, consisting of the cylinder chamber and the piston-rod, whose masses are assumed to be negligible compared to those of the mechanism links. The endpoints of the hydraulic cylinder are placed at \(O_c\), which corresponds to a revolute joint between the cylinder and the ground link, and \(G_2\). The input link is connected to the coupler by means of the revolute joint C, and the revolute joint D allows the rotation of the output link with respect to the coupler. The output link is connected with the ground link by means of the revolute joint \(O_2\). A set of \(n = 10\) generalized coordinates is used to describe the system, with the \(n\times 1\) vector of coordinates \(\varvec{x}\) given by:

$$\begin{aligned} \varvec{x} = \left( \begin{array}{ccccccccccccccc} x_{G_2}&y_{G_2}&z_{G_2}&\psi _2&\theta _2&\phi _2&\phi _{32}&\phi _{43}&s&\alpha \end{array}\right) ^\textrm{T}. \end{aligned}$$
(65)

The position of \(G_2\) is located by means of the coordinates \(x_{G_2}\), \(y_{G_2}\) and \(z_{G_2}\), and the orientation of the input link is determined with the angles \(\psi _2\), \(\theta _2\) and \(\phi _2\), the latter being the rotation of the input link in the \(Y_1Z_1\)-plane; the angle \(\phi _{32}\) represents the relative rotation of the coupler with respect to the input link; and \(\phi _{43}\) corresponds to the relative rotation of the output link with respect to the coupler. Note that the constraints of the multibody system must ensure that the motion of the mechanism takes place in the \(Y_1Z_1\)-plane. Moreover, the length of the hydraulic cylinder (distance between the points \(O_c\) and point \(G_2\)) is given by the coordinate s. Lastly, \(\alpha \) corresponds to the angle between the hydraulic cylinder and the horizontal axis \(Y_1\). Figure 3 shows a three-dimensional view of the four-bar mechanism model, with the numbering of the bodies, all the coordinates and the body frames. The orientation matrices of the body frames, expressed as a function of the elemental rotation matrices, are given by:

$$\begin{aligned}&\varvec{R}_2\left( {\varvec{x}}\right) =\varvec{R}_{\psi _2}\varvec{R}_{\theta _2}\varvec{R}_{\phi _2}, \;{} & {} \varvec{R}_{3}\left( {\varvec{x}}\right) = \varvec{R}_2\varvec{R}_{\phi _{32}}, \nonumber \\&\varvec{R}_{4}\left( {\varvec{x}}\right) = \varvec{R}_{3}\varvec{R}_{\phi _{43}}, \;{} & {} \varvec{R}_c\left( {\varvec{x}}\right) =\varvec{R}_{\psi _2}\varvec{R}_{\theta _2}\varvec{R}_{\alpha }, \end{aligned}$$
(66)

where \(\varvec{R}_c\left( {\varvec{x}}\right) \) determines the orientation of the hydraulic cylinder.

Table 1 List of the mechanical parameters of the four-bar mechanism model, with the corresponding numerical values

The lengths and masses of the links are denoted by \(L_j\) and \(m_j\), respectively, with \(j = \lbrace 1\ldots 4\rbrace \), and \(d_1\) is the distance between the revolute joints \(O_c\) and \(O_1\). The moments of inertia of the bodies, which are assumed to be slender rods, are expressed with respect to their centres of mass and are given by \(\bar{I}_{j_{xx}} = \bar{I}_{j_{zz}} = \dfrac{1}{12}m_j L_j^2\) and \(\bar{I}_{j_{yy}} = 0\). The products of inertia are also zero because of the symmetries of the bodies. Table 1 summarizes all the mechanical parameters (geometric and inertial) of the multibody system, including their numerical values, being shown in Fig. 4. The mechanical parameters shown in Table 1 are grouped in the set \(\varvec{P}_m\).

Fig. 4
figure 4

View of the four-bar mechanism in the \(Y_1Z_1\)-plane: parameters \(L_j\) and \(d_1\)

Given that \(n = 10\) coordinates are used, a total of \(m = 9\) holonomic constraints are required, since the number of degrees of freedom of the multibody system is \(n_g = n-m = 1\). The set of holonomic constraints \(\varvec{C}\left( \varvec{x}\right) \) is given by:

$$\begin{aligned} \varvec{C}\left( \varvec{x}\right) =\left( \begin{array}{c} \varvec{r}_{O_1} \\ \varvec{u}_1\cdot \varvec{v} \\ \varvec{u}_2\cdot \varvec{v} \\ r^Y_{O_2}-L_1 \\ r^Z_{O_2} \\ d_1+r^Y_{O_cG_2}-r^Y_{O_1G_2} \\ r^Z_{O_cG_2}-r^Z_{O_1G_2} \end{array}\right) = \varvec{0}_{9\times 1}. \end{aligned}$$
(67)

In Eq. (67), the first five constraints arise from the revolute joint connecting bodies 1 and 2 in \(O_1\), since this joint allows only the rotation of body 2 in the \(Y_1Z_1\)-plane. The absolute position vector of the revolute joint \(O_1\) is \(\varvec{r}_{O_1}\); \(\varvec{v}\) is the unit vector along the \(X_2\)-axis, expressed in the body frame 1, which is constrained to be parallel to the \(X_1\)-axis by means of the fourth and fifth holonomic constraints; and \(\varvec{u}_1\), \(\varvec{u}_2\) are unit vectors, perpendicular to the \(X_1\)-axis. These vectors are computed as follows:

$$\begin{aligned} \begin{array}{ll} \varvec{r}_{O_1}= \varvec{r}_{G_2} + \varvec{R}_{2}\bar{\varvec{r}}_{G_2O_1}^2, \;&\varvec{r}_{G_2} = \left( \begin{array}{ccc} x_{G_2} &{} y_{G_2} &{} z_{G_2} \end{array}\right) ^\textrm{T}, \\ \bar{\varvec{r}}_{G_2O_1}^2 = \left( \begin{array}{ccc} 0 &{} -\dfrac{L_2}{2} &{} 0 \end{array}\right) ^\textrm{T}, \;&\varvec{u}_1 = \left( \begin{array}{ccc} 0 &{}1 &{} 0 \end{array}\right) ^\textrm{T},\\ \varvec{u}_2 = \left( \begin{array}{ccc} 0 &{} 0 &{} 1 \end{array}\right) ^\textrm{T}, \; &{}\varvec{v} = \left( \begin{array}{ccc} \cos \left( {\psi _2}\right) \cos \left( {\theta _2}\right) &{} \\ \sin \left( {\psi _2}\right) \cos \left( {\theta _2}\right) &{} \\ -\sin \left( {\theta _2}\right) \end{array}\right) . \end{array} \end{aligned}$$
(68)

In the next two holonomic constraints of Eq. (67), \(r^Y_{O_2}\) and \(r^Z_{O_2}\) are the Y and Z-components of the vector \(\varvec{r}_{O_2}\), which is computed as follows:

$$\begin{aligned} \varvec{r}_{O_2} = \varvec{r}_2+\varvec{r}_3+\varvec{r}_4, \end{aligned}$$
(69)

where

$$\begin{aligned}&\varvec{r}_{2}= \varvec{r}_{G_2} + \varvec{R}_{2}\bar{\varvec{r}}_{G_2C}^2, \;{} & {} \bar{\varvec{r}}_{G_2C}^2 = \left( \begin{array}{ccc} 0&\dfrac{L_2}{2}&0 \end{array}\right) ^\textrm{T}, \nonumber \\&\varvec{r}_{3}= \varvec{R}_{3}\bar{\varvec{r}}_{CD}^3, \;{} & {} \bar{\varvec{r}}_{CD}^3 = \left( \begin{array}{ccc} 0&L_3&0 \end{array}\right) ^\textrm{T}, \nonumber \\&\varvec{r}_{4}= \varvec{R}_{4}\bar{\varvec{r}}_{DO_4}^4, \;{} & {} \bar{\varvec{r}}_{DO_4}^4= \left( \begin{array}{ccc} 0&L_4&0 \end{array}\right) ^\textrm{T}. \end{aligned}$$
(70)

Finally, the last two holonomic constraints arise from the Y and Z-components of the loop formed by the hydraulic cylinder, the ground link and the input link, which involves the vectors \(\varvec{r}_{O_cG_2}\), \(\varvec{r}_{O_1O_c}\) and \(\varvec{r}_{O_1G_2}\):

$$\begin{aligned}&\varvec{r}_{O_cG_2} = \varvec{R}_{c}\bar{\varvec{r}}_{O_cG_2}, \;{} & {} \bar{\varvec{r}}_{O_cG_2} = \left( \begin{array}{ccc} 0&s&0 \end{array}\right) ^\textrm{T}, \nonumber \\&\varvec{r}_{O_1G_2} = \varvec{R}_{2}\bar{\varvec{r}}_{O_1G_2}^2, \;{} & {} \bar{\varvec{r}}_{O_1G_2}^2 = \left( \begin{array}{ccc} 0&\dfrac{L_2}{2}&0 \end{array}\right) ^\textrm{T}, \nonumber \\&\varvec{r}_{O_1O_c} = \left( \begin{array}{ccc} 0&-d_1&0 \end{array}\right) ^\textrm{T}. \;{} & {} \end{aligned}$$
(71)

4.2 Description of the hydraulic circuit

The hydraulic circuit considered in this work consists of a double-acting hydraulic cylinder, a throttle valve, a directional control valve, a pump, a tank and the connecting hoses. For sake of simplicity, leakage in the hydraulic components is neglected. The hydraulic circuit is divided into three control volumes, denoted by \(V_1\), \(V_2\) and \(V_3\). These control volumes are highlighted in Fig. (5) and are given by:

$$\begin{aligned}&V_1 = V_{h_1}, \nonumber \\&V_2 = V_{h_2} + A_2 l_2, \nonumber \\&V_3 = V_{h_3} + A_3 l_3. \end{aligned}$$
(72)

In Eq. (72), \(V_{h_1}\), \(V_{h_2}\) and \(V_{h_3}\) are the volumes of the hoses of the corresponding control volumes; \(A_2\) and \(A_3\) are the surfaces of the piston and piston-rod sides sections, respectively; and \(l_2\), \(l_3\) are the lengths of the piston and piston-rod sides. These lengths are a function of the coordinate s and can be computed as:

$$\begin{aligned}&l_2\left( {s}\right) = s-c_1-c_2, \nonumber \\&l_3\left( {s}\right) = l-l_2\left( {s}\right) , \end{aligned}$$
(73)

where \(c_1\) is the length between the revolute joint \(O_c\) and the base of the cylinder chamber, \(c_2\) is the length of the piston and l is the length of the cylinder chamber. The dimensions \(c_1\), \(c_2\) and l, and the lengths \(l_2\), \(l_3\) are shown in detail in Fig. 5.

Fig. 5
figure 5

Scheme of the hydraulic circuit

The pressures of the control volumes \(p_1\), \(p_2\) and \(p_3\) can be computed, following Eq. (1), as follows:

$$\begin{aligned}&\dot{p}_1 = \dfrac{B_{e_1}}{V_1}\left( {Q_{A_1}-Q_{A_2}}\right) , \nonumber \\&\dot{p}_2 = \dfrac{B_{e_2}}{V_2}\left( {Q_{A_2}-A_2\dot{s}}\right) , \nonumber \\&\dot{p}_3 = \dfrac{B_{e_3}}{V_3}\left( {A_3\dot{s}-Q_{B_1}}\right) , \end{aligned}$$
(74)

where \(B_{e_1}\), \(B_{e_2}\) and \(B_{e_3}\) are the effective bulk moduli of the corresponding control volumes. These moduli are computed following Eq. (2):

$$\begin{aligned}&\dfrac{1}{B_{e_1}} = \dfrac{1}{B_{\textrm{oil}}}+\dfrac{V_{h_1}}{V_1B_h}, \dfrac{1}{B_{e_2}} = \dfrac{1}{B_{\textrm{oil}}}+\dfrac{V_{h_2}}{V_2B_h}+\dfrac{A_2l_2}{V_2B_c},\nonumber \\&\dfrac{1}{B_{e_3}} = \dfrac{1}{B_{\textrm{oil}}}+\dfrac{V_{h_3}}{V_3B_h}+\dfrac{A_3l_3}{V_3B_c}, \end{aligned}$$
(75)

with \(B_{h}\) and \(B_{c}\) being the bulk moduli of the hoses and the hydraulic cylinder, respectively. The volume flow rates \(Q_{A_1}\), \(Q_{A_2}\) and \(Q_{B_1}\) of Eq. (74) are defined as shown in Fig. 5. The parameters of the hydraulic circuit are listed in Table 2, with their corresponding numerical values being those of Ref. [5]. The hydraulic parameters shown in Table 2 are grouped in the set \(\varvec{P}_h\).

Table 2 List of the hydraulic parameters and numerical values

Equations (74) of the hydraulic circuit can be written in vector form as in Eq. (12): \(\varvec{\dot{p}} = \varvec{H}\left( {\varvec{x},\varvec{\dot{x}},\varvec{p},U}\right) \). Note that, in the hydraulic circuit of the present example, there is only one directional control valve, and thus only one normalized spool displacement U is required. Therefore, the equations of motion of the hydraulically actuated four-bar mechanism model are given by the dynamic equilibrium equations, which are computed following Ref. [44], the set of holonomic constraints (67), the hydraulic equations (74) and Eq. (13), which describes the dynamics of the directional control valve. The following index-3 DAE system is obtained:

$$\begin{aligned}&\varvec{M}\left( \varvec{x}\right) \varvec{\ddot{x}} + \varvec{C_x}^\textrm{T}\left( {\varvec{x}}\right) \varvec{\Lambda } = \varvec{Q}\left( \varvec{x},\varvec{\dot{x}},\varvec{p} \right) ,\nonumber \\&\varvec{C}\left( \varvec{x}\right) =\varvec{0},\nonumber \\&\varvec{\dot{p}} = \varvec{H}\left( {\varvec{x},\varvec{\dot{x}},\varvec{p},U}\right) ,\nonumber \\&\dot{U}=\dfrac{U_{\textrm{ref}}-U}{\tau }. \end{aligned}$$
(76)

Note that, due to the absence of nonholonomic constraints, the matrix \(\varvec{D}\left( {\varvec{x}}\right) \) defined in Eq. (14) becomes \(\varvec{C}_{\varvec{x}}\left( {\varvec{x}}\right) \).

4.3 Computation of the Jacobian matrix

Prior to the linearization, the equilibrium of the four-bar mechanism multibody model is defined. In the equilibrium configuration, which corresponds to the neutral position of the directional control valve (\(U = 0\)), the coordinates are given by:

$$\begin{aligned} \varvec{x}^0 = \left( \begin{array}{ccccccccccccccc} x_{G_2}^0&y_{G_2}^0&z_{G_2}^0&\psi _2^0&\theta _2^0&\phi _2^0&\phi _{32}^0&\phi _{43}^0&s^0&\alpha ^0 \end{array}\right) ^\textrm{T}, \end{aligned}$$
(77)

where

$$\begin{aligned} \begin{array}{ll} x_{G_2}^0 = 0, \; &{}y_{G_2}^0 = \dfrac{L_2}{2}\cos \left( {\phi _2^0}\right) ,\\ z_{G_2}^0 = \dfrac{L_2}{2}\sin \left( {\phi _2^0}\right) , \; &{}\psi _2^0 = 0,\\ \theta _2^0 = 0, \; &{}s^0 = \sqrt{d_1^2+\left( {\dfrac{L_2}{2}}\right) ^2+d_1L_2\cos \left( {\phi _2^0}\right) }, \\ \tan \left( {\alpha ^0}\right) = \dfrac{\sin \left( {\phi _2^0}\right) }{\cos \left( {\phi _2^0}\right) +\dfrac{2d_1}{L_2}}. \; &{} \end{array} \end{aligned}$$
(78)

Given an equilibrium angle of the input link \(\phi _2^0\), the values of the coordinates in the equilibrium configuration can be obtained from the holonomic constraints particularized for the equilibrium position: \(\varvec{C}\left( {\varvec{x}^0}\right) = \varvec{0}\). The angles \(\phi _{32}^0\) and \(\phi _{43}^0\) are numerically obtained from nonlinear equations, while the remaining coordinates can be determined analytically with Eq. (78). Furthermore, by using the dynamic equilibrium equations and the hydraulic equations particularized for the equilibrium position:

$$\begin{aligned}&\varvec{M}\left( \varvec{x}^0\right) \varvec{\ddot{x}}^0 + \varvec{D}^\textrm{T}\left( \varvec{x}^0\right) \varvec{\Lambda }^0 = \varvec{Q}\left( \varvec{x}^0,\varvec{\dot{x}}^0,\varvec{p}^0\right) , \end{aligned}$$
(79)
$$\begin{aligned}&\varvec{\dot{p}}^0=\varvec{H}\left( {\varvec{x}^0,\varvec{\dot{x}}^0,\varvec{p}^0,U^0}\right) , \end{aligned}$$
(80)

where \(U^0 = 0\) and \(\varvec{\dot{x}}^0 = \varvec{\ddot{x}}^0 = \varvec{\dot{p}}^0 = \varvec{0}\) in the equilibrium, the pressures \(\varvec{p}^0\) are obtained:

$$\begin{aligned} \varvec{p}^0 = \left( \begin{array}{ccc} p_1^0&p_2^0&p_3^0 \end{array}\right) ^\textrm{T}, \end{aligned}$$
(81)

with

$$\begin{aligned}&p_1^0 = p_2^0, p_2^0 = g(p_3^0,\varvec{x}^0,\varvec{P}_m,\varvec{P}_h). \end{aligned}$$
(82)

Note that, in Eq. (82), \(g(p_3^0,\varvec{x}^0,\varvec{P}_m,\varvec{P}_h)\) allows obtaining the equilibrium pressure \(p_2^0\) as a function of \(p_3^0\), and is given by:

$$\begin{aligned}&g(p_3^0,\varvec{x}^0,\varvec{P}_m,\varvec{P}_h) = \dfrac{A_3}{A_2}p_3 ^0 - \dfrac{g\left( {\left( {m_2+m_3}\right) \sin \left( {\phi _2^0-\phi _{43}^0}\right) +\left( {m_3+m_4}\right) \sin \left( {\phi _2^0+2\phi _{32}^0+\phi _{43}^0}\right) }\right) }{2A_2\sin \left( {\alpha ^0-\phi _2^0}\right) \sin \left( {\phi _{43}^0}\right) } \nonumber \\&- \dfrac{g\left( {m_2+2m_3+m_4}\right) \sin \left( {\phi _2^0+\phi _{43}^0}\right) }{2A_2\sin \left( {\alpha ^0-\phi _2^0}\right) \sin \left( {\phi _{43}^0}\right) }. \end{aligned}$$
(83)

Lastly, the Lagrange multipliers in the equilibrium \(\varvec{\Lambda }^0\) are also derived from Eqs. (79), leading to:

$$\begin{aligned} \varvec{\Lambda }^0= \left( \begin{array}{ccccccccc} 0&\Lambda _{2}^0&\Lambda _{3}^0&0&0&\Lambda _{6}^0&\Lambda _{7}^0&0&0 \end{array}\right) ^\textrm{T}, \end{aligned}$$
(84)

with the nonzero Lagrange multipliers being:

$$\begin{aligned}&\Lambda _{2}^0 = \dfrac{g}{8\sin \left( {\alpha ^0-\phi _{2}^0}\right) \sin \left( {\phi _{43}^0}\right) }\mu _1\left( {\varvec{x}^0,\varvec{P}_m}\right) , \nonumber \\&\Lambda _{3}^0 = \dfrac{g}{8\sin \left( {\alpha ^0-\phi _{2}^0}\right) \sin \left( {\phi _{43}^0}\right) }\mu _2\left( {\varvec{x}^0,\varvec{P}_m}\right) , \nonumber \\&\Lambda _{6}^0 = -\dfrac{g\left( {m_3+m_4}\right) }{4\sin \left( {\phi _{43}^0}\right) } \left( {\cos \left( {2\phi _2^0+2\phi _{32}^0+\phi _{43}^0}\right) +\cos \left( {\phi _{43}^0}\right) }\right) , \nonumber \\&\Lambda _{7}^0 = -\dfrac{g}{4\sin \left( {\phi _{43}^0}\right) }\left( \left( {m_3+m_4}\right) \sin \left( {2\phi _2^0+2\phi _{32}^0+\phi _{43}^0}\right) \right. \nonumber \\&\qquad \quad \left. +\left( {m_3+3m_4}\right) \sin \left( {\phi _{43}^0}\right) \right) . \end{aligned}$$
(85)

In Eq. (85), \(\mu _1\left( {\varvec{x}^0,\varvec{P}_m}\right) \) and \(\mu _2\left( {\varvec{x}^0,\varvec{P}_m}\right) \) are functions of the coordinates in the equilibrium position \(\varvec{x}^0\) and the mechanical parameters \(\varvec{P}_m\):

$$\begin{aligned}&\mu _1\left( {\varvec{x}^0,\varvec{P}_m}\right) = -\left( {m_3+m_4}\right) \left( \sin \left( {\alpha ^0+\phi _{2}^0+2\phi _{32}^0+\phi _{43}^0}\right) \right. \nonumber \\&\quad \left. +\sin \left( {3\phi _{2}^0-\alpha ^0+2\phi _{32}^0+\phi _{43}^0}\right) \right) \nonumber \\&\quad +\left( {2m_2 + 4m_3 + 2m_4}\right) \sin \left( {\alpha ^0+\phi _{2}^0+\phi _{43}^0}\right) \nonumber \\&\quad +\left( {2m_2 + 3m_3 + m_4}\right) \sin \left( {\phi _{2}^0-\alpha ^0+\phi _{43}^0}\right) \nonumber \\&\quad +\left( {2m_2 + 3m_3 + m_4}\right) \sin \left( {\alpha ^0 - \phi _{2}^0+\phi _{43}^0}\right) \nonumber \\&\quad -2\left( {m_2 + m_3}\right) \sin \left( {\phi _{2}^0+\alpha ^0 - \phi _{43}^0}\right) \nonumber \\&\quad -2\left( {m_3+m_4}\right) \sin \left( {\phi _{2}^0-\alpha ^0 + 2\phi _{32}^0 + \phi _{43}^0}\right) , \nonumber \\&\mu _2\left( {\varvec{x}^0,\varvec{P}_m}\right) = \left( {m_3+m_4}\right) \left( \cos \left( {\alpha ^0+\phi _{2}^0+2\phi _{32}^0 +\phi _{43}^0}\right) \right. \nonumber \\&\quad \left. +\cos \left( {3\phi _{2}^0-\alpha ^0+2\phi _{32}^0+\phi _{43}^0}\right) \right) \nonumber \\&\quad -\left( {2m_2 + 4m_3 + 2m_4}\right) \cos \left( {\alpha ^0+\phi _{2}^0+\phi _{43}^0}\right) \nonumber \\&\quad +\left( {m_3 + m_4 - 2m_2}\right) \cos \left( {\phi _{2}^0-\alpha ^0+\phi _{43}^0}\right) \nonumber \\&\quad +\left( {2m_2 + m_3 + m_4}\right) \cos \left( {\alpha ^0 - \phi _{2}^0+\phi _{43}^0}\right) \nonumber \\&\quad +2\left( {m_2 + m_3}\right) \cos \left( {\phi _{2}^0+\alpha ^0 - \phi _{43}^0}\right) \nonumber \\&\quad -2\left( {m_3+m_4}\right) \cos \left( {\phi _{2}^0-\alpha ^0 + 2\phi _{32}^0 + \phi _{43}^0}\right) . \end{aligned}$$
(86)

Given that the system presents one degree of freedom, the input link angle \(\phi _2\) is chosen as independent coordinate. The sets of independent and dependent coordinates \(\varvec{{\tilde{x}}}_{ai}\) and \(\varvec{{\tilde{x}}}_{d}\), defined in Eq. (30), are therefore given by:

$$\begin{aligned} \varvec{{\tilde{x}}}_{ai} = \tilde{\phi }_2, \; \; \; \; \varvec{{\tilde{x}}}_{d} = \left( \begin{array}{cccccccccccc} \tilde{x}_{G_2}&\tilde{y}_{G_2}&\tilde{z}_{G_2}&\tilde{\psi }_2&\tilde{\theta }_2&\tilde{\phi }_{32}&\tilde{\phi }_{43}&\tilde{s}&\tilde{\alpha } \end{array}\right) ^\textrm{T}. \end{aligned}$$
(87)

The use of Eq. (64), particularized for the equilibrium of the four-bar mechanism model, leads to the following Jacobian matrix:

(88)

where the coefficients \(\nu _k\) in Eq. (88), with \(k = \lbrace 1\ldots 8\rbrace \), are functions of the coordinates and pressures in the equilibrium, \(\varvec{x}^0\) and \(\varvec{p}^0\), respectively, and the geometric and hydraulic parameters \(\varvec{P}_m\) and \(\varvec{P}_h\): \(\nu _k = \nu _k\left( {\varvec{x}^0,\varvec{p}^0,\varvec{P}_m,\varvec{P}_h}\right) \). In the computation of the linearized hydraulic equations, the laminar regime of the volume flow rates through the directional control valve and the throttle valve described in Eq. (6) has been considered. Note that, in this case, \(n=10\), \(m=9\), \(l=0\), \(r = 3\) and \(u = 1\), and therefore the Jacobian matrix (88) is \((2n-2m-l+r+u)\times (2n-2m-l+r+u) = 6 \times 6\).

4.4 Numerical results: validation of the approach

To validate the results obtained from the linearization, the forward dynamics simulations of the nonlinear four-bar mechanism multibody model and the linear system are performed. To carry out the numerical integration of the nonlinear system (performed with MATLAB ODE15s solver), the holonomic constraints in Eq. (76) are differentiated twice with respect to time, leading to the following index-1 DAE system:

$$\begin{aligned}&\varvec{M}\left( \varvec{x}\right) \varvec{\ddot{x}} + \varvec{C_x}^\textrm{T}\left( {\varvec{x}}\right) \varvec{\Lambda } = \varvec{Q}\left( \varvec{x},\varvec{\dot{x}},\varvec{p} \right) +\varvec{Q}_M\left( \varvec{x}\right) ,\nonumber \\&\varvec{C}_{\varvec{x}}\left( \varvec{x}\right) \varvec{\ddot{x}} = -\varvec{\dot{C}}_{\varvec{x}}\left( \varvec{x}\right) \varvec{\dot{x}}-2\beta \varvec{\dot{C}}\left( \varvec{x}\right) -\gamma ^2\varvec{C}\left( \varvec{x}\right) , \nonumber \\&\varvec{\dot{p}} = \varvec{H}\left( {\varvec{x},\varvec{\dot{x}},\varvec{p},U}\right) ,\nonumber \\&\dot{U}=\dfrac{U_{\textrm{ref}}-U}{\tau }. \end{aligned}$$
(89)

Note that the differentiation of the holonomic constraints may result in the violation of the constraints. Therefore, Baumgarte stabilization method [45] is used in Eq. (89) to avoid numerical drift, \(\beta \) and \(\gamma \) being the Baumgarte stabilization constants. To minimize the numerical drift of the constraints, while keeping the numerical cost of integration reasonably low, a numerical value of \(\beta = \gamma = 50\) has been used. It has been verified that the results of the forward dynamics simulation are not dependent on the numerical values of these stabilization constants. Since the linearization has been performed around the equilibrium, corresponding to the neutral position of the directional control valve \((U = 0)\), a reference normalized spool displacement \(U_{\textrm{ref}} = 0\) is considered in the simulation. The equilibrium position \(\varvec{x}^{0}\) in Eq. (77) is considered as initial condition at position level: \(\varvec{x}\left( {0}\right) = \varvec{x}^{0}\), with the following numerical values:

$$\begin{aligned} \begin{array}{ll} x_{G_2}\left( {0}\right) = 0 \; \textrm{m}, \; &{}y_{G_2}\left( {0}\right) = 0.5\; \textrm{m}, \;\\ z_{G_2}\left( {0}\right) \simeq 0.866\; \textrm{m}, \; &{}\psi _2\left( {0}\right) = 0, \\ \theta _2\left( {0}\right) = 0, \; &{}\phi _2\left( {0}\right) = 60^{\circ }, \;\\ \phi _{32}\left( {0}\right) \simeq 322.1^{\circ }, \; &{}\phi _{43}\left( {0}\right) \simeq 266.4^{\circ }, \\ s\left( {0}\right) = \sqrt{3} \; \textrm{m}, \; &{}\alpha \left( {0}\right) = 30^{\circ }. \;\\ \end{array} \end{aligned}$$
(90)

The exact numerical values in Eq. (90), corresponding to \(\phi _2\left( {0}\right) = 60^{\circ }\), can be computed by solving the holonomic constraints for this equilibrium angle, as detailed after Eq. (78). Moreover, \(\varvec{\dot{x}}\left( {0}\right) = \varvec{0}_{10\times 1}\) at velocity level and the equilibrium pressures \(\varvec{p}^0\) given by Eq. (82) are considered as initial pressures: \(\varvec{p}\left( {0}\right) = \varvec{p}_0\), with \(p_3^0 = 3.5\;\textrm{MPa}\):

$$\begin{aligned} p_1\left( {0}\right)= & {} p_2\left( {0}\right) \simeq 2.82\;\textrm{MPa},\nonumber \\ p_3\left( {0}\right)= & {} 3.5\; \textrm{MPa}. \end{aligned}$$
(91)

Note that the exact numerical value of \(p_2\left( {0}\right) \) is computed by using Eq. (82). The term \(\varvec{Q}_M\left( \varvec{x}\right) \) in Eq. (89) is the generalized force vector associated with the external torque \(M_2\), which is applied in the input link of the mechanism:

$$\begin{aligned} M_2 = \left\{ \begin{array}{lll} \dfrac{M_0}{t_1}t &{} t<t_1 \\ M_0 &{} t_1\le t\le t_2 \\ 0 &{} t>t_2 \end{array} \right. \end{aligned}$$
(92)

The external torque \(M_2\), whose time evolution is described in Eq. (92) and shown in Fig. 6, linearly increases with time until \(t = t_1\), maintaining its maximum value \(M_0\) until \(t = t_2\), when it is suddenly removed. Note that this torque deviates the multibody system from its equilibrium position. In the present case, \(t_1 = 1\;\textrm{s}\), \(t_2 = 1.5\;\textrm{s}\) and \(M_0 = 250\;\mathrm {N\cdot m}\).

Fig. 6
figure 6

Time evolution of the external torque \(M_2\) acting on the input link

Furthermore, the forward dynamics simulation of the linear system is performed. From Eq. (88), the linearized equations of motion are given by:

$$\begin{aligned}&\dot{\tilde{\phi }}_2 = \tilde{\omega }_2, \nonumber \\&\dot{\tilde{\omega }}_2 = \nu _1\tilde{\phi }_2 + \nu _2\tilde{\omega }_2 + \nu _3\tilde{p}_2 + \nu _4\tilde{p}_3, \nonumber \\&\dot{\tilde{p}}_1 = \nu _5\tilde{p}_1 - \nu _5\tilde{p}_2, \nonumber \\&\dot{\tilde{p}}_2 = \nu _6\tilde{\omega }_2 + \nu _7\tilde{p}_1 - \nu _{7}\tilde{p}_2, \nonumber \\&\dot{\tilde{p}}_3 = \nu _{8}\tilde{\omega }_2, \nonumber \\&\dot{\tilde{U}} = -\dfrac{\tilde{U}}{\tau }. \end{aligned}$$
(93)

The numerical integration of the linear system of equations (93) is performed from \(t = t_2\) onwards, which corresponds to the instant of time when the external torque disappears. Therefore, \(\tilde{\phi }_2\left( {t_2}\right) \), \(\tilde{\omega }_2\left( {t_2}\right) \), \(\tilde{\varvec{p}}\left( {t_2}\right) \) and \(\tilde{U}\left( {t_2}\right) \) are considered as initial conditions for the numerical integration, with:

$$\begin{aligned}&\tilde{\phi }_2\left( {t_2}\right) = \phi _2\left( {t_2}\right) -\phi _2^0, \;{} & {} \tilde{\omega }_2\left( {t_2}\right) = \dot{\phi }_2\left( {t_2}\right) , \nonumber \\&\tilde{\varvec{p}}\left( {t_2}\right) = \varvec{p}\left( {t_2}\right) - \varvec{p}^0, \;{} & {} \tilde{U}\left( {t_2}\right) = 0, \end{aligned}$$
(94)

where the numerical values of \(\phi _2\left( {t_2}\right) \), \(\dot{\phi }_2\left( {t_2}\right) \) and \(\varvec{p}\left( {t_2}\right) \) are obtained from the forward dynamics simulation of the nonlinear system.

The time evolution of the linear system can be predicted from the linear stability analysis. The eigenvalues are computed for three different scenarios, corresponding to different values of the friction force parameters \(F_c\), \(F_s\) and \(\sigma _2\). Denoting as \(F_c^*\), \(F_s^*\) and \(\sigma _2^*\) the numerical values of \(F_c\), \(F_s\) and \(\sigma _2\) used in Ref. [5], with \(F_c^* = 210\;\textrm{N}\), \(F_s^* = 830\;\textrm{N}\) and \(\sigma _2^* = 330\;\mathrm {Ns/m}\), Table 3 shows the numerical values of the eigenvalues \(\lambda _k\), with \(k = \lbrace 1\ldots 6\rbrace \), obtained from the Jacobian matrix (88). The results are shown with fourteen decimal digits for those readers who may wish to compare their results.

Table 3 Numerical values of the eigenvalues \(\lambda _k\), with \(k = \lbrace 1\ldots 6\rbrace \), for different values of \(F_c\), \(F_s\) and \(\sigma _2\)

In the linear system of equations (93), it can be seen that the linear hydraulic equation of \(\dot{\tilde{p}}_2\) can be obtained from a linear combination of the linearized equations of \(\dot{\tilde{p}}_1\) and \(\dot{\tilde{p}}_3\), which leads to one of the null eigenvalues shown in all the scenarios of Table 3. The second null eigenvalue arises from the linear dependence between the linear equation of \(\dot{\tilde{p}}_3\) and \(\dot{\tilde{\phi }}_2\). Furthermore, the eigenvalue \(\lambda _6 = -\dfrac{1}{\tau }\), which is associated with the linearized equation of the valve dynamics in Eq. (93), is obtained in all the cases, since this equation is decoupled. Lastly, the eigenvalues \(\lambda _3\), \(\lambda _4\) and \(\lambda _5\) correspond to the remaining three linearized equations. The numerical values of \(\lambda _3\), \(\lambda _4\) and \(\lambda _5\) are highly sensitive to the variation of the Coulomb friction \(F_c\), the static friction \(F_s\) and the coefficient of viscous friction \(\sigma _2\).

Overdamped scenario. In the first case, with \(F_c=F_c^*, \; F_s=F_s^* \; \textrm{and} \; \sigma _2=\sigma _2^*\), the system is overdamped and \(\lambda _3\), \(\lambda _4\) and \(\lambda _5\) are negative real eigenvalues.

Fig. 7
figure 7

Overdamped scenario: \(\phi _2\left( {t}\right) \) in the nonlinear (NL) and linear (L) dynamic simulations

Fig. 8
figure 8

Overdamped scenario: time evolution of the pressures in the nonlinear (NL) and linear (L) dynamic simulations. The difference between the pressures \(p_1\) and \(p_2\), both in the linear and nonlinear cases, is negligible because the dynamic simulation is performed in the laminar regime

Fig. 9
figure 9

Underdamped scenario (high friction): \(\phi _2\left( {t}\right) \) in the nonlinear (NL) and linear (L) dynamic simulations

Fig. 10
figure 10

Underdamped scenario (high friction): time evolution of the pressures in the nonlinear (NL) and linear (L) dynamic simulations. The difference between the pressures \(p_1\) and \(p_2\), both in the linear and nonlinear cases, is negligible because the dynamic simulation is performed in the laminar regime

Figure 7a shows the time evolution of the variation of the coordinate \(\phi _2\left( {t}\right) \) with respect to the equilibrium position \(\phi _2^0 = 60^{\circ }\), in the nonlinear and linear dynamic simulations. According to the time evolution of the external torque \(M_2\) in Eq. (92), the angle \(\phi _2\left( {t}\right) \) increases and deviates from \(\phi _2^0\) for \(t<t_1\), with \(t_1 = 1\; \textrm{s}\). Next, for \(t_1\le t\le t_2\), with \(t_2 = 1.5\; \textrm{s}\), \(M_2\) is constant and the angle maintains its value over time. Lastly, for \(t>t_2\), the external torque vanishes and the input link approximately returns to its equilibrium position. Figure 7b shows in detail the time evolutions, in the nonlinear and linear cases, of the variations of \(\phi _2\left( {t}\right) \) with respect to \(\phi _2^0 = 60^{\circ }\) for \(t>t_2\). Moreover, Fig. 8a represents the evolution of \(p_1\) and \(p_2\) over time, and Fig. 8b shows the time evolution of \(p_3\). In all the figures, the nonlinear responses are denoted by NL and the linear results are labelled with L. It can be seen that the linear responses accurately reproduce the nonlinear results.

Underdamped scenario (high friction). Secondly, the numerical values of the friction parameters are reduced to \(F_c = \dfrac{1}{10}F_c^*, \; F_s = \dfrac{1}{10}F_s^* \; \textrm{and} \; \sigma _2 = \dfrac{1}{10}\sigma _2^*\). In this scenario, the system is underdamped: as shown in Table 3, the eigenvalue \(\lambda _5\) remains real and negative, while \(\lambda _3\) and \(\lambda _4\) are, in this case, a complex conjugate pair of eigenvalues with negative real parts.

Fig. 11
figure 11

Underdamped scenario (low friction): \(\phi _2\left( {t}\right) \) in the nonlinear (NL) and linear (L) dynamic simulations

Fig. 12
figure 12

Underdamped scenario (low friction): time evolution of the pressures in the nonlinear (NL) and linear (L) dynamic simulations. The difference between the pressures \(p_1\) and \(p_2\), both in the linear and nonlinear cases, is negligible because the dynamic simulation is performed in the laminar regime

Figure 9a shows the time evolution of the variation of the coordinate \(\phi _2\left( {t}\right) \) with respect to the equilibrium position \(\phi _2^0 = 60^{\circ }\), in the nonlinear and linear dynamic simulations. Note that, until \( t = t_2 = 1.5\; \textrm{s}\), the time evolution of \(\phi _2\left( {t}\right) \) is similar to that shown in the overdamped scenario in Fig. 7. Nevertheless, for \(t>t_2\), the system exhibits its underdamped behavior by oscillating around the equilibrium position \(\phi _2^0\). These oscillations did not exist in Fig. 7, due to its overdamped behavior. The same applies to the pressures \(p_1\left( {t}\right) \) and \(p_2\left( {t}\right) \), shown in Fig. 10a, and \(p_3\left( {t}\right) \), plotted in Fig. 10b.

Underdamped scenario (low friction). Lastly, in the third scenario, the numerical values of the friction parameters are significantly reduced, with \(F_c = \dfrac{1}{100}F_c^*, \; F_s = \dfrac{1}{100}F_s^* \; \textrm{and} \; \sigma _2 = \dfrac{1}{100}\sigma _2^*\).

As in the previous case, the system is underdamped, with the corresponding eigenvalues shown in Table 3. Note that, despite there is very small variation in \(\lambda _5\), the real parts of \(\lambda _3\) and \(\lambda _4\) substantially decrease. The underdamped behavior is shown in Fig. 11a, b, with the time evolution of the variation of the coordinate \(\phi _2\left( {t}\right) \) with respect to the equilibrium position \(\phi _2^0 = 60^{\circ }\). Furthermore, the pressures \(p_1\left( {t}\right) \) and \(p_2\left( {t}\right) \) are shown in Fig. 12a, and \(p_3\left( {t}\right) \) is plotted in Fig. 12b. Due to the reduction of the friction, the amplitude and frequency of the oscillations in Figs. 11a, b and 12a, b significantly increase with respect to those of the second scenario. In the particular case of no friction force (\(F_c = F_s = \sigma _2 = 0\)), the time evolutions of \(\phi _2\left( {t}\right) \) and the pressures are qualitatively similar to those of this scenario (\(F_c = \dfrac{1}{100}F_c^*, \; F_s = \dfrac{1}{100}F_s^* \; \textrm{and} \; \sigma _2 = \dfrac{1}{100}\sigma _2^*\)), given that there exists a second source of dissipation due to the throttle valve, and the eigenvalues \(\lambda _3\) and \(\lambda _4\) present negative real parts. The numerical values of \(F_c = \dfrac{1}{100}F_c^*, \; F_s = \dfrac{1}{100}F_s^* \; \textrm{and} \; \sigma _2 = \dfrac{1}{100}\sigma _2^*\) have been chosen to improve the visualization of the oscillations of the system.

Fig. 13
figure 13

First-order Taylor approximation of the friction force \(F_\mu \)

As in the overdamped case, the linear responses of the underdamped scenarios accurately reproduce the nonlinear results for small amplitude oscillations. Moreover, a decrease in the numerical value of the maximum external torque \(M_0\) in Eq. (92) further improves the results of the linear model, since the multibody system is closer to its equilibrium position. In contrast, when the external torque is too high, the multibody system deviates significantly from the equilibrium position, and therefore the linear model ceases to be valid. Despite the linearized system accurately reproduces the nonlinear system in all the cases, the results in the overdamped scenario are better than in the underdamped cases. This can be explained with the linearization of the friction force. Figure 13 shows the friction force \(F_\mu \) presented in Eq. (8), with \(F_c = 210\;\textrm{N}\), \(F_s = 830\;\textrm{N}\) and \(\sigma _2 = 330\;\mathrm {Ns/m}\), together with its first-order Taylor approximation, denoted as \(T_\mu ^1\). It can be seen that the linear approximation is excellent for low values of the velocity \(\dot{s}\), as is the case of the overdamped scenario. Nevertheless, the approximation becomes worse for larger values of \(\dot{s}\), which is the case of the underdamped scenarios.

4.5 Comparison of the proposed linearization procedure with a conventional counterpart approach

The proposed linearization approach is compared with a conventional counterpart. This counterpart procedure is based on the linearization of an ODE system and the numerical computation of the required partial derivatives by using finite differences. The main steps of this counterpart procedure are shown below.

Consider the index-2 DAE system (15). The velocity constraints \(\varvec{D}\left( \varvec{x}\right) \varvec{\dot{x}}=\varvec{0}\) can be differentiated once with respect to time, leading to the following index-1 DAE system:

$$\begin{aligned}&\varvec{M}\left( \varvec{x}\right) \varvec{\ddot{x}} + \varvec{D}^\textrm{T}\left( \varvec{x}\right) \varvec{\Lambda } = \varvec{Q}\left( \varvec{x},\varvec{\dot{x}},\varvec{p}\right) ,\nonumber \\&\varvec{D}\left( {\varvec{x}}\right) \varvec{\ddot{x}} = \varvec{Q}_d\left( {\varvec{x},\varvec{\dot{x}}}\right) ,\nonumber \\&\varvec{\dot{p}}=\varvec{H}\left( {\varvec{x},\varvec{\dot{x}},\varvec{p},\varvec{U}}\right) ,\nonumber \\&\dot{\varvec{U}}=\varvec{W}\left( {\varvec{U},\varvec{U}_{\textrm{ref}}}\right) , \end{aligned}$$
(95)

where \(\varvec{Q}_d\left( {\varvec{x},\varvec{\dot{x}}}\right) = -\dfrac{\partial \left( {\varvec{D}\left( {\varvec{x}}\right) \varvec{\dot{x}}}\right) }{\partial \varvec{x}}\varvec{\dot{x}}\). Defining \(\varvec{\dot{x}} = \varvec{v}\), Eqs. (95) can be rewritten as the following DAE system:

(96)

Alternatively, by defining \(\varvec{X} = \left( \begin{array}{cccc} \varvec{x}&\varvec{v}&\varvec{p}&\varvec{U} \end{array}\right) ^\textrm{T}\), Eq. (95) can be expressed as follows:

$$\begin{aligned} \left( \begin{array}{c} \varvec{\dot{X}} \\ \varvec{\Lambda } \end{array}\right) = \varvec{\mathcal {A}}^{-1}\left( {\varvec{x}}\right) \varvec{f}\left( {\varvec{X},\varvec{U}_{\textrm{ref}}}\right) = \varvec{\mathcal {F}}\left( {\varvec{X},\varvec{U}_{\textrm{ref}}}\right) , \end{aligned}$$
(97)

where the matrix \(\varvec{\mathcal {A}}\) and the vector \(\varvec{f}\) are defined in Eq. (96). Denoting the first \(2n+r+u\) components of \(\varvec{\mathcal {F}}\left( {\varvec{X},\varvec{U}_{\textrm{ref}}}\right) \) as \(\varvec{F}\left( \varvec{X},\varvec{U}_{\textrm{ref}}\right) \), the following ODE system is obtained:

$$\begin{aligned} \varvec{\dot{X}} = \varvec{F}\left( \varvec{X},\varvec{U}_{\textrm{ref}}\right) . \end{aligned}$$
(98)

Note that the last \(m+l\) equations of Eq. (97) provide the expressions of the Lagrange multipliers \(\varvec{\Lambda }\).

The linearization of the ODE system (98) with respect to an arbitrary reference solution \(\varvec{X}^0 = \left( \begin{array}{cccc} \varvec{x}^0&\varvec{\dot{x}}^0&\varvec{p}^0&\varvec{U}^0 \end{array}\right) ^\textrm{T}\) leads to the following Jacobian matrix:

$$\begin{aligned} \varvec{J} = \left. \dfrac{\partial \varvec{F}}{\partial \varvec{X}}\right| _{0} = \left( \begin{array}{ccccc} \varvec{J}_1&\cdots&\varvec{J}_j&\cdots&\varvec{J}_N \end{array}\right) . \end{aligned}$$
(99)

In Eq. (99), \(N = 2n+r+u\) and \(\varvec{J}_j\) represents the \(j\textrm{th}\) column of the Jacobian matrix, with \(j = \lbrace 1 \cdots N \rbrace \). The term \(\varvec{J}_j\) is computed as follows:

$$\begin{aligned}&\varvec{J}_j = \left. \dfrac{\partial \varvec{F}}{\partial X_j}\right| _{0} \simeq \dfrac{\varvec{F}\left( {\varvec{X}^0+h\varvec{e}_j}\right) -\varvec{F}\left( {\varvec{X}^0-h\varvec{e}_j}\right) }{2h}, \end{aligned}$$
(100)

where the partial derivative in Eq. (100) can be numerically computed by using central finite differences. In Eq. (100), h is the step used in the computation of the finite differences, and \(\varvec{e}_j\) corresponds to the \(j\textrm{th}\) column of the identity matrix \(\varvec{I}_N\). Note that the Jacobian matrix (99) is \(\left( {2n+r+u}\right) \times \left( {2n+r+u}\right) \).

A detailed comparison between the linearization approach proposed in Sect. 3 and this counterpart procedure is performed by means of the hydraulically actuated four-bar mechanism model described in Subsects. 4.1 and 4.2. First, a qualitative comparative analysis is carried out. The preliminary steps required to compute the Jacobian matrices (61) and (99) differ significantly. The counterpart approach first computes the index-1 form of the nonlinear DAE system (96); then obtains the first-order ODE system (98) by removing the equations associated with the Lagrange multipliers and finally performs the linearization, obtaining the Jacobian matrix (99). In contrast, the proposed linearization approach follows the steps described in Sect. 3. The DAE system (15) is first linearized along the reference solution; then, a coordinate partition in terms of independent and dependent coordinates is used to reduce the linearized dynamic equations and eliminate the variations of the Lagrange multipliers (see Eq. (32)); next, the linearized constraints at velocity and acceleration levels are used to express the complete set of velocity and acceleration variations \(\varvec{\dot{\tilde{x}}}\) and \(\varvec{\ddot{\tilde{x}}}\) in terms of the independent ones, \(\varvec{\dot{\tilde{x}}}_{ai}\), \(\varvec{\ddot{\tilde{x}}}_{ai}\); and finally, the linearized holonomic constraints are used to express the variations of the dependent coordinates \(\varvec{\tilde{x}}_{d}\) in terms of the independent ones \(\varvec{\tilde{x}}_{ai}\). All these steps lead to a reduced system of linear equations, which in the case of a multibody system with only holonomic constraints as the four-bar mechanism, is only expressed in terms of the variations of the independent coordinates \(\varvec{\tilde{x}}_{ai}\) and their time derivatives.

An important advantage of the proposed approach is that it leads to the maximum possible reduction of the linearized equations of motion. For the general case of a hydraulically driven multibody system with holonomic and nonholonomic constraints, the Jacobian matrix (61) is \((2n-2m-l+r+u)\times (2n-2m-l+r+u)\), while the conventional counterpart is a bulky linearization procedure that provides an augmented Jacobian matrix (see Eq. (99)), which is \(\left( {2n+r+u}\right) \times \left( {2n+r+u}\right) \). Therefore, the proposed approach provides \(2n-2m-l+r+u\) eigenvalues, among which \(2\left( {n-m-l}\right) +r+u\) correspond to the real spectrum of the problem, and l spurious null eigenvalues are obtained, associated with the linearized nonholonomic constraints (54). In the particular case of a holonomic multibody system, the proposed approach leads to \(2\left( {n-m}\right) +r+u\) eigenvalues, which correspond to the real spectrum, and no spurious eigenvalues are obtained. In contrast, the use of the counterpart linearization approach results in \(2n+r+u\) eigenvalues, with \(2\left( {n-m-l}\right) +r+u\) eigenvalues corresponding to the real spectrum, and \(2\left( {m+l}\right) \) spurious null eigenvalues associated with the \(m+l\) dependent coordinates. In the particular case of the four-bar mechanism model, the proposed approach leads to the Jacobian matrix (88), which is \(6\times 6\), obtaining the eigenvalues \(\lambda _k\), with \(k = \lbrace 1\ldots 6\rbrace \), of Table 3. Conversely, the Jacobian matrix (99) is \(24\times 24\), obtaining the six eigenvalues \(\lambda _k\) of Table 3 and eighteen additional spurious null eigenvalues. Therefore, the use of the proposed approach allows for the reduction of the linearized equations of motion and the elimination of the spurious null eigenvalues associated with the dependent coordinates, while retaining all the stability information.

Another important advantage to highlight is the power of the proposed approach. This procedure allows generating the exact linearized equations of motion as a function of the geometric, dynamic and hydraulic parameters of the multibody system under study. In the particular case of the four-bar mechanism model, the coefficients \(\nu _k\) of the Jacobian matrix (88), with \(k = \lbrace 1\ldots 8\rbrace \), are computed analytically as a function of the coordinates and pressures in the equilibrium, \(\varvec{x}^0\) and \(\varvec{p}^0\), respectively, and the geometric and hydraulic parameters \(\varvec{P}_m\) and \(\varvec{P}_h\): \(\nu _k = \nu _k\left( {\varvec{x}^0,\varvec{p}^0,\varvec{P}_m,\varvec{P}_h}\right) \). This significantly eases the performance of detailed eigenvalues sensitivity analyses, since the eigenvalues of the system are parameterized in terms of the design parameters. In contrast, the analytical computation of the Jacobian matrix (99) is not possible for complex multibody systems with large number of coordinates, constraints and long kinematic chains, since the symbolic computation of the inverse matrix \(\varvec{\mathcal {A}}^{-1}\left( {\varvec{x}}\right) \) in Eq. (97) is required. For this reason, the Jacobian matrix (99) is numerically computed by using finite differences.

A quantitative comparative analysis is also included. The computational efficiency and accuracy of the proposed and counterpart approaches are compared. The computational efficiency is assessed by means of the required time of computation of the Jacobian matrices (88) and (99). For the particular case of the four-bar mechanism model, the average time of computation of the Jacobian matrix (88) is \(0.005\;\textrm{s}\). In contrast, the required time for computing the Jacobian matrix (99) is \(0.016\;\textrm{s}\). The assessment was carried out by using a computer HP with Intel(R) Core(TM) i7-6700HQ \(2.6 \; \textrm{GHz}\) and \(12 \; \textrm{GB}\) of RAM. Therefore, the proposed approach is more efficient, with a time of computation approximately three times lower for the four-bar mechanism.

Regarding the accuracy, the conventional counterpart provides an approximation of the Jacobian matrix, whose accuracy is highly sensitive to the step h used in the computation of the finite differences in Eq. (99). In contrast, the proposed approach leads to the exact linearized equations of motion. To compare the accuracy of both approaches, the relative errors \(\epsilon _3\) and \(\epsilon _4\) in the computation of the eigenvalues \(\lambda _3\) and \(\lambda _4\) of the overdamped scenario (see Table 3) are computed. Figure 14a, b show the variations of the relative errors \(\epsilon _3\) and \(\epsilon _4\), respectively, with the step h. To ease the visualization, a logarithmic scale is used for the X-axis. In Fig. 14a, b, it can be seen that the relative errors \(\epsilon _3\) and \(\epsilon _4\) significantly increase for very low and high values of the step h. The counterpart approach provides the most accurate results of the eigenvalues \(\lambda _3\) and \(\lambda _4\) for an intermediate value of \(h\simeq 10^{-5}\), with \(\epsilon _3\simeq 0\) and \(\epsilon _4\simeq 0\). Therefore, the choice of an appropriate step is crucial for the accuracy of the alternative procedure. On the other hand, this problem does not arise in the proposed approach, since the linearization procedure presents a high capability to compute the exact Jacobian matrix. The use of a first-order finite difference formula (as for example the forward finite difference) to numerically calculate the Jacobian matrix could certainly decrease the computational burden of the counterpart approach due to a smaller number of function evaluations required, at the cost of decreasing the accuracy of the approximation.

Fig. 14
figure 14

Relative errors \(\epsilon _3\) and \(\epsilon _4\) in the computation of the eigenvalues \(\lambda _3\) and \(\lambda _4\): influence of the step h used in the central finite differences scheme (100)

5 Conclusions and future work

In this work, a linearization approach for systematically linearizing the equations of motion of hydraulically actuated multibody systems with holonomic and nonholonomic constraints has been presented. The proposed procedure provides the exact linearized equations of motion of the multibody system, and enables the computation of the Jacobian matrix analytically or numerically. The procedure has been validated by means of the forward dynamics simulation of a three-dimensional four-bar mechanism model. By comparing the time evolution of the input link angle and the pressures of the hydraulic circuit in the nonlinear and linear systems, it has been shown that the linearized model accurately reproduces the results of the nonlinear multibody system. The procedure presents a great power, which is demonstrated by generating the Jacobian matrix as a function of the mechanical and hydraulic parameters of the three-dimensional four-bar mechanism model. This allows performing a linear stability analysis of the system, computing the eigenvalues for different scenarios. In this particular case, the eigenvalues have been computed for three-different set of values of the Brown and McPhee friction model parameters. The results show that these eigenvalues are highly sensitive to the Coulomb and static friction forces and the coefficient of viscous friction. Despite the linearized model reproduces well the results of the nonlinear system in the vicinity of the equilibrium configuration for all the scenarios, the results of the overdamped case improve compared to those of the underdamped cases, given that the linear approximation of the friction force becomes better in the overdamped scenario. The proposed approach is also compared with a counterpart procedure, presenting several advantages. First, the maximum reduction of the linearized equations of motion is obtained, which simplifies working with the resulting Jacobian matrix. In the performance of linear stability analyses, this leads to the elimination of the spurious null eigenvalues associated with the dependent coordinates of the multibody system model. Secondly, the proposed approach is more efficient than its counterpart. The computational efficiency is assessed by means of the required time of computation of both Jacobian matrices for the hydraulically driven four-bar mechanism. A time of computation of approximately three times lower was obtained with the proposed approach. Lastly, the accuracy of the procedure was also demonstrated. While the procedure developed in this work provides the exact Jacobian matrix of the system, the counterpart approach is highly sensitive to the step used in the numerical computation of the partial derivatives required in the Jacobian matrix. To illustrate this, the variation of the relative errors with the step, in the computation of the eigenvalues of the system, was shown.

It is important to note that, in this study, the linearization has been carried out around the equilibrium position of the four-bar mechanism multibody model. Therefore, the resulting Jacobian matrix presents constant (time-independent) coefficients, which are a function of the multibody system parameters. In contrast, in other applications, as state observers based on the linearized equations of motions like Kalman filters, a linear approximation of the dynamics of the multibody system is required at each instant of time. In this case, the Jacobian matrix must be updated and its coefficients vary throughout the reference solution. In future work, the proposed procedure will be used for developing state observers and linear feedback controllers of hydraulically actuated multibody systems.