1 Introduction

1.1 Background information and significance of this research work

From a general perspective, the dynamic analysis of multibody mechanical systems can be subdivided into two general problems, namely a transient nonlinear analysis and a steady-state linear analysis [1,2,3,4]. In the former case, the focus is on predicting the dynamic behavior through dynamical simulations observing the system on a certain time interval, whereas in the latter case the perturbation of the system around a given configuration is of interest [5,6,7]. In both cases, it is necessary to simultaneously enforce the algebraic constraints imposed on the multibody system at the position, velocity, and acceleration levels to correctly capture its dynamic behavior [8,9,10,11]. The stability analysis of multibody systems, which is the object of the present investigation, belongs to the second class of dynamical problems mentioned before.

As it is known from the study of mechanical vibrations, the eigenvalues arising from a linear problem associated with the dynamics of a mechanical system can be real or complex conjugates. According to the stability theory based on the Lyapunov criteria commonly adopted in physics and engineering, the stability properties of a nonlinear system can be assessed by analyzing the stability characteristics of its linearized counterpart, namely by computing the eigenvalues of the linearized dynamical system and by checking their mathematical form [12]. In particular, it is well known that an eigenvalue having a positive real part is associated with an unstable motion, an eigenvalue having a negative real part leads to a stable motion, two real eigenvalues of opposite sign are associated with an unstable dynamical behavior, two complex conjugate eigenvalues with positive real parts involve an unstable motion, two complex conjugate eigenvalues with negative real parts are associated with a stable motion, and an eigenvalue characterized by a zero real part corresponds to a marginally stable motion. In the last scenario, the dynamic behavior is called critically stable because the linearized system cannot be used for predicting the stability characteristics of its nonlinear counterpart. Consequently, six types of singular points of a linearized dynamical system can be, respectively, recognized, namely an unstable node, a stable node, a saddle point, an unstable focus, a stable focus, and a center.

For each eigenvalue found for a linear dynamical system, one can determine its corresponding eigenvector that represents the mode shape associated with that eigenvalue. Since the complete solution of a linear dynamical system can be expressed as the linear combination of the eigenvectors associated with the eigenvalues, it is sufficient to have only one unstable eigenvalue with a positive real part to induce the instability to the entire solution. In this case, the linearized system and its nonlinear counterpart are said to be unstable. In the case of a critically stable system having eigenvalues with zero real part, on the other hand, the indirect approach based on the study of the stability analysis of the linearized system fails and the direct use of nonlinear dynamical simulations is required. In this paper, a general method for the stability study is introduced and its effectiveness is demonstrated by using dynamical simulations performed in the case of a set of simple benchmarks multibody systems.

1.2 Formulation of the problem of interest for this investigation

In general, the dynamic equations that mathematically formalize the description of the complex motion of a multibody mechanical system are highly nonlinear differential-algebraic equations [13]. The nonlinearity of the equations of motion serves to the correct description of large displacements and large finite rotations performed by the rigid bodies that interact with each other because of the presence of complex force fields and/or kinematic joints [14].

A fundamental aspect related to the analysis of the time response of a multibody mechanical system to the loading conditions to which it is subjected is the identification of the potential presence of static and dynamic instabilities [15]. Basically, the stability of such complex systems can be analyzed employing two different approaches that, for simplicity, are herein referred to as the direct method and the indirect method. The first approach (direct method) consists of performing computer simulations of the dynamic model of the multibody mechanical system in several different scenarios that are all characterized by the presence of perturbations of the system configuration around the desired state of interest for the stability study [16]. This approach relies on the numerical results obtained from the dynamic simulations and, therefore, can be impractical or computationally expensive for large multibody mechanical systems. On the other hand, the second approach (indirect method) involves a stability study based on the formulation of a linear problem obtained by linearizing the differential-algebraic equations of motion around a given set point of the state space. By doing so, the information on the stability of the configuration points of interest is found by numerically solving an appropriate eigenproblem and does not require any dynamical simulation performed in the time domain. The methodologies discussed in this section, as well as the alternative method proposed later in the manuscript, belong to this second class of stability methods and can effectively serve to shed light on the dynamic behavior of a given multibody system. Thus, in both cases, a set of eigenvalues is numerically found and its nature is subsequently analyzed to study the system stability.

The principal challenge associated with the problem of interest for this investigation is twofold and is described in detail below. First, while the advantages and drawbacks associated with the analytical methods adopted for the stability study of mechanical systems described by linearized ordinary differential equations are mostly well understood, it is not completely clear which is the most appropriate approach for the stability analysis of multibody systems whose motion is restricted by holonomic and/or nonholonomic constraints. Second, even in the case of relatively less complex systems, the direct linearization of the equations of motion of a mechanical system, in which the effect of the constraint equations is automatically embedded using the analytical methods of multibody dynamics, leads to an extremely contrived form of the matrix and vector terms which are difficult, if not impossible, to handle by using computer programs based on symbolic manipulations. Therefore, the analytical developments, the computational algorithm, and the numerical experiments based on the general approach presented in this paper are aimed at shedding light on these important issues and propose a practical solution strategy.

1.3 Literature review

The stability analysis is a powerful mathematical tool to evaluate the dynamical behavior of a mechanical system in the proximity of a given reference point of the configuration space, without actually solving the equations of motion [17]. While the stability analysis of a set of ordinary differential equations (ODEs) is a well-established topic, the analysis of a set of differential-algebraic equations (DAEs) can be a challenging task. Furthermore, the equations of motion obtained from the multibody approach are typically nonlinear. Therefore, a proper linearization approach is essential to study the stability of multibody mechanical systems.

In general, the stability analysis of a nonlinear system can be performed by studying an equivalent system that is linearized around a predefined generalized equilibrium position. For this purpose, different strategies are available and the work of Vukic et al. is a good reference for this subject [18]. In the case of mechanical systems constrained by kinematic pairs, a common approach is to rearrange the algebraic equations in advance and to analyze the consequent set of ordinary differential equations, which is described using only the independent coordinates [19, 20]. When the mechanical system of interest grows in dimension, a reduced model can also be a good choice to study its dynamical behavior. In [21], Ripepi and Masarati proposed a method to obtain reduced-order models and analyze the linearized models in order to perform an eigenanalysis of the reduced mechanical system of interest. Other interesting reduction techniques are also exposed in the work of Lehner and Eberhard [22], as well as in the work of Koutsovasilis and Beitelschmidt [23].

The stability analysis of a given set of DAEs, which typically arise from the multibody approach to the dynamics of constrained mechanical systems, can be performed with a direct strategy or by following an indirect approach, as already mentioned in the paper. An example of a direct analysis can be found in [24], where Nikravesh and Gim analyzed the dynamical behavior of a race car through numerical simulations of its multibody model. In [25], Kim et al. studied the stability of a flying insect modeled as a multibody system by using the direct approach and compared their numerical results with those found by Sun et al. [26], which used an indirect technique. Other examples of a direct analysis can be found in the references [27, 28].

Recently, an indirect analysis approach has been proposed by many authors in many different ways. For this purpose, Escalona and Chamorro devised a method that is an alternative to the Floquet theory to analyze the trajectory stability of wheeled systems [29]. In [30], Quaranta et al. developed a method to extract the dominant eigenvalues of the transition matrix without directly solving it. In [31], Masarati introduced an approach to linearize a set of differential-algebraic equations and defined how to identify the eigenvalues that arise as a consequence of the algebraic equations. Another interesting example based on the linearization of the set of index-three differential-algebraic equations is presented by Negrut and Ortiz in [32, 33], in which a computational technique that is analytically equivalent to a state-space formulation is devised. In [34], Nichkawde et al. proposed a method that do not require the linearization and the decoupling of the equations of motion to analyze the vehicle dynamics coupled with the sloshing inertial effects. In [35], Bencsik et al. developed a method based on the stability analysis to tune the control parameters that can be directly applied to a set of DAEs.

In this work, both holonomic and nonholonomic multibody mechanical systems are studied. As observed by Zenkov et al. in [36], nonholonomic systems have a peculiar property; that is, these systems may exhibit asymptotic stability even without an explicit presence of dissipation in the system model. In this respect, one of the most popular examples is the Chaplygin sleigh, which can be found in the work of Neimark and Fufaev [37]. This interesting example is also reproduced by Ruina in [38], where some interesting dynamical properties of these systems are discussed. On the other hand, the use of nonholonomic constraints is common in the fields of robotics and mechatronics. In [39], Pollard et al. showed some similarities shared by the dissipative Chaplygin sleigh and a swimming robot, while in [40] Zhang et al. developed control strategies conceptually suitable also for nonholonomic robots. In general, nonholonomic mechanical systems are also employed in the field of mechanical engineering to mathematically model in a straightforward fashion the dynamical interaction of the system of interest with the external environment [41, 42].

The high number of research works devoted to the stability analysis of multibody mechanical systems constrained by holonomic and/or nonholonomic algebraic equations is a good indication of the importance of the research topics addressed in this investigation.

1.4 Scope and contributions of this study

This paper is focused on the development of an effective analytical method for solving the stability problem of multibody mechanical systems composed of rigid bodies and subjected to a general set of algebraic equations representing holonomic and/or nonholonomic constraints. The key idea is to directly start from the original index-three form of the equations of motion to devise a computational algorithm that is easily applicable in general-purpose multibody computer codes.

In this research work, the differential-algebraic form of the equations of motion of multiboby mechanical systems is first obtained considering a general set of holonomic and nonholonomic constraints. This is done by employing one of the most fundamental methods of classical mechanics, namely the D’Alembert–Lagrange principle of virtual work combined with the analytical technique based on the use of the Lagrange multipliers. The principle of virtual work represents a skillful mathematical tool that is suitable for handling holonomic and nonholonomic algebraic constraints applied to general multibody mechanical systems. This method leads to a straightforward mathematical formulation of the index-three equations of motion, which can be readily transformed into the corresponding index-one differential-algebraic form, as shown in detail in the manuscript.

As far as the stability analysis is concerned, the standard analytical techniques employed as multibody solution procedures are first recalled in the manuscript. These computational methods can be effectively implemented for obtaining the generalized acceleration vector of a mechanical system constrained by kinematic joints, as well as for the determination of a linearized form of the dynamic equations which is amenable to be used for the stability analysis. To this end, the augmented formulation, the embedding technique, the amalgamated formulation, the projection method, and the fundamental equations of constrained motion are considered [43].

As shown in the literature, although the analytical methods cited above are perfectly appropriate for the development of general-purpose multibody computer programs entirely relying on a systematic computational approach, all these standard analytical techniques are based on the index-one form of the equations of motion [44]. Therefore, in the case of the stability analysis, the implementation of these methods in a multibody computer code based on a mixed symbolic-numeric calculation paradigm is challenging since they can involve complex analytical expressions even in the case of the stability analysis of relatively simple multibody mechanical systems. This computational obstacle is one of the substantial reasons why, in commercial and academic multibody software, the stability analysis of a mechanical system constrained by kinematic joints perturbed in the neighborhood of a given equilibrium point is not available or is limited to very simple configurations. In this investigation, on the other hand, an alternative computational approach is proposed for addressing these issues.

To overcome the difficulties discussed above, in this work, a new method directly based on the index-three form of the multibody equations of motion is developed and its use is demonstrated by means of numerical experiments. As discussed in detail in the paper, unlike the conventional methods that rely on the elimination of the actions of the constraint forces for the definition of a standard eigenvalue problem, the proposed approach leads to the formulation of a generalized eigenproblem that is consistent with the presence of holonomic and/or nonholonomic algebraic constraints having a general structure. When compared with the conventional state-space approach, the proposed method has several advantages, as discussed in detail below.

  1. (1)

    In the stability analysis, the total number of equations to be solved by using the proposed analytical technique is equal to the original dimension of the dynamical problem at hand.

  2. (2)

    In the computational algorithm introduced in this work, there is no need to perform a coordinate partitioning into independent and dependent generalized coordinates, namely the entire vector of generalized coordinates is considered in the stability study, thereby simplifying the mathematical formulation of the problem.

  3. (3)

    In the construction of the composite mass, damping, and stiffness matrices necessary for the definition of the generalized eigenvalue problem considered in this paper, the sparsity of the matrices that appear in the original index-three form of the equations of motion is preserved.

  4. (4)

    In the case of multibody systems described by a stiff set of differential-algebraic equations of motion, the additional information needed for the formulation of the matrix quantities involved in the definition of the stability problem is exactly the same information necessary for the computer implementation of an implicit numerical integration scheme based on the second-order form of the dynamic equations, such as the generalized alpha method associated with the Newmark-beta integration scheme or the Hilber–Hughes–Taylor integration technique. Furthermore, although not fully explored in this investigation, in principle, the numerical differentiation could also be employed as an alternative strategy for the determination of the structural matrices of interest for the stability analysis.

  5. (5)

    As demonstrated in the manuscript by employing simple numerical examples, another advantage associated with the proposed computational algorithm is the ease of implementation of parametric studies based on a mixed symbolic-numeric paradigm for the construction of the dynamical maps describing the stability charts of multibody mechanical systems.

  6. (6)

    The method for the stability analysis proposed in this work can be readily extended in the case of the stability problem of flexible multibody systems and in the case of the presence of rigid body contacts, as will be demonstrated in future investigations.

On the other hand, the principal drawback of the computational methodology developed in this investigation is the enlargement of the dimensions of the eigenvalue problem to be solved for performing the stability analysis.

In this investigation, five benchmark examples are analyzed and used for performing numerical experiments on the analytical method devised in this paper in comparison with the other fundamental approaches that can be found in the multibody literature. While in the case of the first four illustrative examples considered in the paper one can equivalently employ the proposed method or other consolidated techniques used in the field of applied mechanics for performing the stability study, the fifth and last numerical example considered as a demonstrative multibody system is a more complex dynamical system which is analyzed using the proposed approach to show its advantages also in the case of a relatively more complicated system that presents some difficulties due to the necessity of symbolically solve the nonlinear equations of motion to obtain the explicit expressions of the generalized acceleration vector and the Lagrange multipliers vector. In fact, while the multibody systems employed as the first four numerical examples are a physical pendulum, a wheeled inverted pendulum, a spinning top, and a rolling disk, which are relatively less complicated mechanical systems, the fifth and last example is a multibody model of a Watt centrifugal governor, which is a slightly more complex system compared to the others. Besides, the fifth model is a closed-loop multibody mechanism, whereas the previous four models are all open-loop mechanical systems. In general, it is well known that the analysis of closed-chain mechanisms can be quite more challenging due to the relatively greater number of closed-chain constraint equations that have a direct effect on the solution algorithm. Even for a relatively simple and well-known mechanism such as the centrifugal regulator considered in this work, the symbolic solution of the system of algebraic equations necessary to obtain the generalized accelerations vector and the Lagrange multipliers vector results in a hardly solvable task. In this case, the analytical approach proposed in this investigation for the stability analysis turned out to be the only alternative to the direct analysis of the nonlinear model to gain information about the stability of the closed-chain multibody mechanical system of interest.

1.5 Organization of the manuscript

The remaining part of this manuscript is organized according to the following structure. In Sect. 2, the index-three and index-one analytical forms of the equations of motion of a general multibody system subjected to holonomic and/or nonholonomic constraints are recalled. In Sect. 3, the conventional stability methods based on the index-one form of the equations of motion are discussed, while the proposed stability technique that is directly applicable to the index-three form of the dynamic equations is described in detail in Sect. 4. In Sect. 5, a set of numerical results and their corresponding discussion are reported to corroborate the effectiveness of the analytical method proposed in this research study. For this purpose, five simple demonstrative examples are considered for performing a comparative analysis of the computational methodologies discussed in the paper and to evaluate the stability properties of both holonomic and nonholonomic multibody mechanical systems. In Sect. 6, a concise summary of the paper, the conclusions that are drawn in this investigation, and some interesting ideas that will be considered as future directions of research are provided.

2 Equations of motion of holonomic and nonholonomic multibody systems

2.1 Virtual work of the generalized constraint forces

Consider a multibody mechanical system described by a set of \(n_q\) configuration parameters grouped in the generalized coordinate vector denoted with \({\mathbf{q}} \equiv {\mathbf{q}}(t)\), where t indicates the time treated as an independent variable and \({n_q} \times 1\) are the dimensions of the generalized coordinate vector [45, 46]. Assume that the general multibody system under consideration is subjected to a nonlinear set of \(n_{c,h}\) holonomic constraints included in the holonomic constraint vector \({\mathbf{C}} \equiv {\mathbf{C}}({\mathbf{q}},t)\) having dimensions \({n_{c,h}} \times 1\), as well as to another nonlinear set of \(n_{c,nh}\) algebraic equations that represent the system nonholonomic constraints aggregated in the nonholonomic constraint vector \({\mathbf{D}} \equiv {\mathbf{D}}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) of dimensions \({n_{c,nh}} \times 1\). While the holonomic constraints are position-level constraints typically associated with the action of the kinematic joints, the nonholonomic constraints are velocity-level constraints which cannot be integrated or reduced to an equivalent set of position-level constraints and are used for describing some peculiar limitations on the dynamic behavior of a given multibody mechanical system [47]. In classical mechanics, during a virtual change of the system configuration, the time variation is assumed to be zero, namely the time is fixed [48]. Thus, a virtual variation is always associated with an infinitesimal variation in the generalized coordinates denoted with the vector \(\delta {\mathbf{q}} \equiv \delta {\mathbf{q}}(t)\) of dimensions \({n_q} \times 1\). In particular, a virtual variation of the system configuration leads to virtual displacements that are consistent with the holonomic and nonholonomic constraints enforced on the motion of the multibody system. A virtual change of the set of holonomic constraint equations can be analytically written as:

$$\begin{aligned} {\mathbf{C}} = {\mathbf{0}}\quad \Rightarrow \quad \delta {\mathbf{C}} = {{\mathbf{C}}_{\mathbf{q}}}\delta {\mathbf{q}} \end{aligned}$$
(1)

where \({{\mathbf{C}}_{\mathbf{q}}} \equiv {{\mathbf{C}}_{\mathbf{q}}}({\mathbf{q}},t) = {{\partial {\mathbf{C}}} \big / {\partial {\mathbf{q}}}}\) represents the Jacobian matrix associated with the set of holonomic constraints having dimensions \({n_{c,h}} \times {n_q}\) that is computed by differentiating the holonomic constraint vector \({\mathbf{C}}\) with respect to the generalized coordinate vector \({\mathbf{q}}\) [49]. Without loss of generality, it is assumed that the holonomic constraints form a set of \({n_{c,h}}\) independent algebraic equations. Thus, the Jacobian matrix associated with the holonomic constraints has full row rank. In analogy, one can compute the virtual change of the nonholonomic constraint equations as follows:

$$\begin{aligned} {\mathbf{D}} = {\mathbf{0}}\quad \Rightarrow \quad \delta {\mathbf{D}} = {{\mathbf{D}}_{{\dot{\mathbf{q}}}}}\delta {\mathbf{q}} \end{aligned}$$
(2)

where \({{\mathbf{D}}_{{\dot{\mathbf{q}}}}} \equiv {{\mathbf{D}}_{{\dot{\mathbf{q}}}}}({\mathbf{q}},{\dot{\mathbf{q}}},t) = {{\partial {\mathbf{D}}}\big / {\partial {\dot{\mathbf{q}}}}}\) denotes the Jacobian matrix of the nonholonomic constraint equations of dimensions \({n_{c,nh}} \times {n_q}\) which is computed by differentiating the nonholonomic constraint vector \({\mathbf{D}}\) with respect to the generalized velocity vector \({\dot{\mathbf{q}}}\) [50]. For simplicity, the set of \({n_{c,nh}}\) nonholonomic constraints are assumed to be independent as well, thereby leading to a Jacobian matrix of the nonholonomic constraints having full row rank.

The effect of both the holonomic and nonholonomic constraint equations induced on the dynamics of a general multibody system can be taken into account by employing the method of Lagrange multipliers [51]. For this purpose, consider a vector of Lagrange multipliers associated with the holonomic constraints denoted with \({\varvec{\lambda }} \equiv {\varvec{\lambda }}(t)\) having dimensions \({n_{c,h}} \times 1\). At the same time, assume the existence of an additional unknown vector of Lagrange multipliers \({\varvec{\mu }} \equiv {\varvec{\mu }}(t)\) of dimensions \({n_{c,nh}} \times 1\) in relation to the set of nonholonomic constraint equations. By using the Lagrange multiplier technique, one can express the virtual work of the generalized forces associated with the holonomic constraint equations denoted with \(\delta {W_{c,h}}\) as:

$$\begin{aligned} \delta {W_{c,h}} = - {{\varvec{\lambda }}^\mathrm{T}}\delta {\mathbf{C}} = - {{\varvec{\lambda }}^\mathrm{T}}{{\mathbf{C}}_{\mathbf{q}}}\delta {\mathbf{q}} = - {\left( {{\mathbf{C}}_{\mathbf{q}}^\mathrm{T}{\varvec{\lambda }}} \right) ^\mathrm{T}}\delta {\mathbf{q}} = {\mathbf{Q}}_{c,h}^\mathrm{T}\delta {\mathbf{q}} = 0 \end{aligned}$$
(3)

where the equality to zero is based on the hypothesis of workless constraints commonly used in classical mechanics and \({{\mathbf{Q}}_{c,h}} \equiv {{\mathbf{Q}}_{c,h}}({\mathbf{q}},t)\) is the generalized force vector associated with the set of holonomic constraints having dimensions \({n_q} \times 1\) and given by:

$$\begin{aligned} {{\mathbf{Q}}_{c,h}} = - {\mathbf{C}}_{\mathbf{q}}^\mathrm{T}{\varvec{\lambda }} \end{aligned}$$
(4)

Similarly, the virtual work of the generalized constraint forces relative to the nonholonomic constraints denoted with \(\delta {W_{c,nh}}\) can be analytically written by using the method of Lagrange multipliers as:

$$\begin{aligned} \delta {W_{c,nh}} = - {{\varvec{\mu }}^\mathrm{T}}\delta {\mathbf{D}} = - {{\varvec{\mu }}^\mathrm{T}}{{\mathbf{D}}_{{\dot{\mathbf{q}}}}}\delta {\mathbf{q}} = - {\left( {{\mathbf{D}}_{{\dot{\mathbf{q}}}}^\mathrm{T}{\varvec{\mu }}} \right) ^\mathrm{T}}\delta {\mathbf{q}} = {\mathbf{Q}}_{c,nh}^\mathrm{T}\delta {\mathbf{q}} \end{aligned}$$
(5)

where \({{\mathbf{Q}}_{c,nh}} \equiv {{\mathbf{Q}}_{c,nh}}({\mathbf{q}}, {\dot{\mathbf{q}}},t)\) is the generalized force vector corresponding to the presence of the nonholonomic constraints having dimensions \({n_q} \times 1\) that is mathematically defined as:

$$\begin{aligned} {{\mathbf{Q}}_{c,nh}} = - {\mathbf{D}}_{{\dot{\mathbf{q}}}}^\mathrm{T}{\varvec{\mu }} \end{aligned}$$
(6)

Consequently, the total virtual work relative to the action of the constraint forces of holonomic and nonholonomic nature denoted with \(\delta {W_c}\) is equal to:

$$\begin{aligned} \delta {W_c} = \delta {W_{c,h}} + \delta {W_{c,nh}} = {\mathbf{Q}}_{c,h}^\mathrm{T}\delta {\mathbf{q}} + {\mathbf{Q}}_{c,nh}^\mathrm{T}\delta {\mathbf{q}} = {\mathbf{Q}}_c^\mathrm{T}\delta {\mathbf{q}} \end{aligned}$$
(7)

where \({{\mathbf{Q}}_c} \equiv {{\mathbf{Q}}_c}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) denotes the total generalized force vector of dimensions \({n_q} \times 1\) associated with the constraint equations which can be conveniently rewritten using a matrix form as follows:

$$\begin{aligned} {{\mathbf{Q}}_c} = {{\mathbf{Q}}_{c,h}} + {{\mathbf{Q}}_{c,nh}} = - {\mathbf{C}}_{\mathbf{q}}^\mathrm{T}{\varvec{\lambda }} - {\mathbf{D}}_{{\dot{\mathbf{q}}}}^\mathrm{T}{\varvec{\mu }} = - \left[ {\begin{array}{*{20}{c}} {{\mathbf{C}}_{\mathbf{q}}^\mathrm{T}}&{{\mathbf{D}}_{{\dot{\mathbf{q}}}}^\mathrm{T}} \end{array}} \right] \left[ {\begin{array}{*{20}{c}} {\varvec{\lambda }}\\ {\varvec{\mu }} \end{array}} \right] = - {{\mathbf{J}}^\mathrm{T}}{\mathbf{v}} \end{aligned}$$
(8)

where \({n_c} = {n_{c,h}} + {n_{c,nh}}\) is the total number of algebraic constraints, \({\mathbf{v}} \equiv {\mathbf{v}}(t)\) represents the total vector of Lagrange multipliers having dimensions \({n_c} \times 1\), and \({\mathbf{J}} \equiv {\mathbf{J}}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) indicates the total Jacobian matrix relative to the constraint equations of dimensions \({n_c} \times {n_q}\). These vector and matrix quantities are, respectively, defined as:

$$\begin{aligned} {\mathbf{v}} = \left[ {\begin{array}{*{20}{c}} {\varvec{\lambda }}\\ {\varvec{\mu }} \end{array}} \right] ,\quad {\mathbf{J}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{C}}_{\mathbf{q}}}}\\ {{{\mathbf{D}}_{{\dot{\mathbf{q}}}}}} \end{array}} \right] \end{aligned}$$
(9)

For simplicity, the holonomic and nonholonomic constraint equations can be grouped in a comprehensive vector of algebraic constraints denoted with \({\mathbf{E}} \equiv {\mathbf{E}}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) having dimensions \({n_c} \times 1\) and given by:

$$\begin{aligned} {\mathbf{E}} = \left[ {\begin{array}{*{20}{c}} {\mathbf{C}}\\ {\mathbf{D}} \end{array}} \right] \end{aligned}$$
(10)

In general, the holonomic constraint equations represent position-level algebraic constraints, whereas the nonholonomic constraint equations imply velocity-level algebraic constraints. Thus, the set of holonomic constraints induces limitations of the configuration space (positions and orientations) of the multibody mechanical system, while the set of nonholonomic constraints involve restrictions only on the velocity space of the system [52]. However, both the sets of holonomic and nonholonomic algebraic constraints can be reformulated at the acceleration level by, respectively, evaluating their second and first time derivatives since they also represent specific restrictions of the acceleration space of the multibody mechanical system, namely they directly influence the system equations of motion [53]. Therefore, the holonomic and nonholonomic constraint equations can be rewritten at the acceleration level as follows:

$$\begin{aligned} \left\{ \begin{array}{l} {{\mathbf{C}}_{\mathbf{q}}}{\ddot{\mathbf{q}}} = {{\mathbf{Q}}_{d,h}}\\ {{\mathbf{D}}_{{\dot{\mathbf{q}}}}}{\ddot{\mathbf{q}}} = {{\mathbf{Q}}_{d,nh}} \end{array} \right. \quad \Leftrightarrow \quad \left[ {\begin{array}{*{20}{c}} {{{\mathbf{C}}_{\mathbf{q}}}}\\ {{{\mathbf{D}}_{{\dot{\mathbf{q}}}}}} \end{array}} \right] {\ddot{\mathbf{q}}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{Q}}_{d,h}}}\\ {{{\mathbf{Q}}_{d,nh}}} \end{array}} \right] \quad \Leftrightarrow \quad {\mathbf{J} \ddot{\mathbf{q}}} = {{\mathbf{Q}}_d} \end{aligned}$$
(11)

where \({{\mathbf{Q}}_{d,h}} \equiv {{\mathbf{Q}}_{d,h}}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) represents the holonomic constraint quadratic velocity vector of dimensions \({n_q} \times 1\), \({{\mathbf{Q}}_{d,nh}} \equiv {{\mathbf{Q}}_{d,nh}}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) indicates the nonholonomic constraint quadratic velocity vector dimensions \({n_q} \times 1\), and \({{\mathbf{Q}}_d} \equiv {{\mathbf{Q}}_d}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) is the total vector having dimensions \({n_q} \times 1\) that absorbs the terms that are quadratic in the generalized velocities and appear in the constraint equations rewritten at the acceleration level [54]. The quadratic velocity vectors associated with the holonomic and nonholonomic constraints can be, respectively, computed as follows:

$$\begin{aligned} {{\mathbf{Q}}_{d,h}} = - {{\mathbf{C}}_{t,t}} - {\left( {{{\mathbf{C}}_{\mathbf{q}}}{\dot{\mathbf{q}}}} \right) _{\mathbf{q}}}{\dot{\mathbf{q}}} - 2{{\mathbf{C}}_{{\mathbf{q}},t}}{\dot{\mathbf{q}}},\quad {{\mathbf{Q}}_{d,nh}} = - {{\mathbf{D}}_t} - {{\mathbf{D}}_{\mathbf{q}}}{\dot{\mathbf{q}}} \end{aligned}$$
(12)

The total constraint quadratic velocity vector associated with both sets of holonomic and nonholonomic constraints is simply defined as:

$$\begin{aligned} {{\mathbf{Q}}_d} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{Q}}_{d,h}}}\\ {{{\mathbf{Q}}_{d,nh}}} \end{array}} \right] \end{aligned}$$
(13)

As discussed below, it is important to emphasize the point that the quadratic velocity vector associated with the total set of algebraic constraint equations plays a fundamental role in the definition of the index-one differential-algebraic form of the equations of motion of a general multibody mechanical system subjected to holonomic and nonholonomic constraints.

2.2 Virtual work of the generalized external forces

The total virtual work associated with the external forces applied to a general multibody system denoted with \(\delta {W_e}\) can be concisely written as follows:

$$\begin{aligned} \delta {W_e} = {\mathbf{Q}}_e^\mathrm{T}\delta {\mathbf{q}} \end{aligned}$$
(14)

where \({{\mathbf{Q}}_e} \equiv {{\mathbf{Q}}_e}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) is the total generalized force vector of dimensions \({n_q} \times 1\) associated with the complete set of external forces acting on the multibody mechanical system. For example, for a multibody system deployed in a space of dimensions d, the generic external force \({{\mathbf{F}}_e} \equiv {{\mathbf{F}}_e}(t)\) having dimensions \(d \times 1\) and applied to a given material point P produces an external generalized force vector given by:

$$\begin{aligned} {{\mathbf{Q}}_e} = {\mathbf{L}}_P^\mathrm{T}{{\mathbf{F}}_e} \end{aligned}$$
(15)

where \({{\mathbf{L}}_P} \equiv {{\mathbf{L}}_P}({\mathbf{q}},t) = \partial {{{{\mathbf{r}}_P}} \big / {\partial {\mathbf{q}}}}\) identifies the \(d \times {n_q}\) Jacobian matrix of the position field \({{\mathbf{r}}_P} \equiv {{\mathbf{r}}_P}({\mathbf{q}},t)\) relative to the rigid body on which the material point P is collocated that is obtained by differentiating the body position field with respect to the generalized coordinate vector [55].

2.3 Virtual work of the generalized inertia forces

One can readily demonstrate that the virtual work associated with the generalized inertia forces of a multibody system composed only of rigid bodies denoted with \(\delta {W_i}\) can be analytically expressed as follows:

$$\begin{aligned} \delta {W_i} = {\mathbf{Q}}_i^\mathrm{T}\delta {\mathbf{q}} \end{aligned}$$
(16)

where the nonlinear vector \({{\mathbf{Q}}_i} \equiv {{\mathbf{Q}}_i}({\mathbf{q}},{\dot{\mathbf{q}}},{\ddot{\mathbf{q}}},t)\) of dimensions \({n_q} \times 1\) identifies the inertia generalized force vector of the assembled multibody system which can be conveniently rewritten as:

$$\begin{aligned} {{\mathbf{Q}}_i} = - {\mathbf{M}\ddot{\mathbf{q}}} + {{\mathbf{Q}}_v} \end{aligned}$$
(17)

where \({\mathbf{M}} \equiv {\mathbf{M}}({\mathbf{q}},t)\) represents the mass matrix of the multibody system having dimensions \({n_q} \times {n_q}\) and \({{\mathbf{Q}}_v} \equiv {{\mathbf{Q}}_v}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) corresponds to the system inertia quadratic velocity vector that absorbs the inertia terms which are quadratic in the generalized velocities such as the Coriolis and centrifugal generalized inertia forces [56].

2.4 D’Alembert–Lagrange principle of virtual work

At this stage, the total virtual work of all the forces acting on the multibody mechanical system can be evaluated and set equal to zero in order to apply the D’Alembert–Lagrange principle of virtual work and obtain the system equations of motion written in the general differential-algebraic form based on a redundant set of generalized coordinates [57]. For this purpose, one can write:

$$\begin{aligned} \delta {W_i} + \delta {W_e} + \delta {W_c} = 0 \end{aligned}$$
(18)

or equivalently:

$$\begin{aligned} {\left( {{{\mathbf{Q}}_i} + {{\mathbf{Q}}_e} + {{\mathbf{Q}}_c}} \right) ^\mathrm{T}}\delta {\mathbf{q}} = 0\quad \Leftrightarrow \quad {\left( {{{\mathbf{Q}}_a} - {{\mathbf{J}}^\mathrm{T}}{\mathbf{v}}} \right) ^\mathrm{T}}\delta {\mathbf{q}} = 0 \end{aligned}$$
(19)

where the nonlinear vector \({{\mathbf{Q}}_a} \equiv {{\mathbf{Q}}_a}({\mathbf{q}},{\dot{\mathbf{q}}},{\ddot{\mathbf{q}}},t)\) of dimensions \({n_q} \times 1\) denotes the generalized force vector associated with the active forces that embed the system inertia and external forces, while the nonlinear vector \({{\mathbf{Q}}_c} \equiv {{\mathbf{Q}}_c}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) of dimensions \({n_q} \times 1\) represents the total constraint generalized force vector. As expected, these vector quantities can be computed as follows:

$$\begin{aligned} {{\mathbf{Q}}_a} = {{\mathbf{Q}}_i} + {{\mathbf{Q}}_e},\quad {{\mathbf{Q}}_c} = - {{\mathbf{J}}^\mathrm{T}}{\mathbf{v}} \end{aligned}$$
(20)

Because of the presence of the algebraic constraints, respectively, of holonomic and nonholonomic nature, which are grouped in the constraint vectors \({\mathbf{C}}\) and \({\mathbf{D}}\), the mathematical quantities contained in the virtual change of the generalized coordinate vector \(\delta {\mathbf{q}}\) cannot be varied or chosen independently from each other. Thus, one cannot directly equate the sum of the active generalized force vector \({{\mathbf{Q}}_a}\) with the constraint generalized force vector \({{\mathbf{Q}}_c}\) to the zero vector. However, in order to overcome this difficulty, one can exploit the extra freedom arising from the introduction of the Lagrange multipliers vectors \({\varvec{\lambda }}\) and \({\varvec{\mu }}\) that are, respectively, associated with the holonomic and nonholonomic constraints. This can be done following an analytical procedure based on the Lagrange multiplier technique that resembles the typical approach used in classical mechanics in which only holonomic constraints are considered [58]. In order to apply this analytical approach, one can partition the generalized coordinate vector \({\mathbf{q}}\) into two subvectors of independent and dependent generalized coordinates, which are, respectively, denoted with the vector \({{\mathbf{q}}_i} \equiv {{\mathbf{q}}_i}(t)\) having dimensions \({n_f} \times 1\) and the vector \({{\mathbf{q}}_d} \equiv {{\mathbf{q}}_d}(t)\) of dimensions \({n_c} \times 1\), where \({n_f} = {n_q} - {n_c}\) is the number of degrees of freedom of the specific multibody mechanical system under consideration. It is important to note that, in general, the integer number \(n_f\) can be different from the number of degrees of freedom of a given mechanical system since, in the determination of this parameter, the set of holonomic and nonholonomic constraints must both be considered at the same time. More precisely, the integer number \(n_f\) should be interpreted as the number of free parameters that can be independently varied in the virtual change of the generalized coordinate vector, which corresponds also to the number of independent virtual generalized velocities as well as to the number of independent virtual generalized accelerations. Therefore, the parameter \(n_f\) can be recognized as the dimension of the space of the independent virtual variations of the system generalized coordinates, whereas the number of degrees of freedom represents the dimension of the space of the system independent configuration coordinates. However, in the present work, for simplicity, the integer parameter \(n_f\) is referred to as the number of degrees of freedom. Thus, one can write:

$$\begin{aligned} {\mathbf{q}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{q}}_i}}\\ {{{\mathbf{q}}_d}} \end{array}} \right] \quad \Rightarrow \quad \delta {\mathbf{q}} = \left[ {\begin{array}{*{20}{c}} {\delta {{\mathbf{q}}_i}}\\ {\delta {{\mathbf{q}}_d}} \end{array}} \right] \end{aligned}$$
(21)

In a similar manner, one can partition the generalized force vector corresponding to the active forces applied on the multibody mechanical system as well as the total Jacobian matrix relative to the algebraic constraints according to the subdivision into independent and dependent generalized coordinates as follows:

$$\begin{aligned} {{\mathbf{Q}}_a} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{Q}}_{a,i}}}\\ {{{\mathbf{Q}}_{a,d}}} \end{array}} \right] ,\quad {\mathbf{J}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{J}}_i}}&{{{\mathbf{J}}_d}} \end{array}} \right] \end{aligned}$$
(22)

where \({{\mathbf{Q}}_{a,i}} \equiv {{\mathbf{Q}}_{a,i}}({\mathbf{q}},{\dot{\mathbf{q}}}, {\ddot{\mathbf{q}}},t)\) is the active generalized force vector of dimensions \({n_f} \times 1\) associated with the subset of independent generalized coordinates, \({{\mathbf{Q}}_{a,d}} \equiv {{\mathbf{Q}}_{a,d}}({\mathbf{q}},{\dot{\mathbf{q}}},{\ddot{\mathbf{q}}},t)\) is the active generalized force vector of dimensions \({n_c} \times 1\) associated with the subset of dependent generalized coordinates, \({{\mathbf{J}}_i} \equiv {{\mathbf{J}}_i}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) is the partition of the constraint Jacobian matrix having dimensions \({n_c} \times {n_f}\) relative to the independent generalized coordinates, and \({{\mathbf{J}}_d} \equiv {{\mathbf{J}}_d}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) is the partition of the constraint Jacobian matrix having dimensions \({n_c} \times {n_c}\) relative to the dependent generalized coordinates. It is important to emphasize the fact that if the constraint equations are correctly formulated, namely there are no redundant or incompatible algebraic equations, and, at the same time, the partition into independent and dependent generalized coordinates is properly performed, then the constraint Jacobian submatrix associated with the dependent generalized coordinates \({{\mathbf{J}}_d}\) is a square nonsingular matrix [59]. As a result, the coordinate partitioning approach can be conveniently applied to the mathematical expression of the total virtual work arising from the invocation of the D’Alembert–Lagrange principle to yield:

$$\begin{aligned} \delta {{\mathbf{q}}^\mathrm{T}}\left( {{{\mathbf{Q}}_a} - {{\mathbf{J}}^\mathrm{T}}{\mathbf{v}}} \right) = 0\quad \Leftrightarrow \quad \left[ {\begin{array}{*{20}{c}} {\delta {\mathbf{q}}_i^\mathrm{T}}&{\delta {\mathbf{q}}_d^\mathrm{T}} \end{array}} \right] \left( {\left[ {\begin{array}{*{20}{c}} {{{\mathbf{Q}}_{a,i}}}\\ {{{\mathbf{Q}}_{a,d}}} \end{array}} \right] - \left[ {\begin{array}{*{20}{c}} {{\mathbf{J}}_i^\mathrm{T}}\\ {{\mathbf{J}}_d^\mathrm{T}} \end{array}} \right] {\mathbf{v}}} \right) = 0 \end{aligned}$$
(23)

or equivalently:

$$\begin{aligned} \delta {\mathbf{q}}_i^\mathrm{T}\left( {{{\mathbf{Q}}_{a,i}} - {\mathbf{J}}_i^\mathrm{T}{\mathbf{v}}} \right) + \delta {\mathbf{q}}_d^\mathrm{T}\left( {{{\mathbf{Q}}_{a,d}} - {\mathbf{J}}_d^\mathrm{T}{\mathbf{v}}} \right) = 0 \end{aligned}$$
(24)

where it is important to observe that the two apparently separated sets of dynamic equations associated with the independent and dependent generalized coordinates are indeed coupled by the presence of the complete vector of Lagrange multipliers which cannot be partitioned. The virtual change of the vector of independent generalized coordinates can be arbitrarily varied and, therefore, one can deduce that the subset of dynamic equations associated with the independent generalized coordinates is satisfied leading to:

$$\begin{aligned} {{\mathbf{Q}}_{a,i}} - {\mathbf{J}}_i^\mathrm{T}{\mathbf{v}} = {\mathbf{0}} \end{aligned}$$
(25)

On the other hand, one can assume that the total vector of Lagrange multipliers is selected equal to the unique solution of the following system of linear algebraic equations:

$$\begin{aligned} {\mathbf{J}}_d^\mathrm{T}{\mathbf{v}} = {{\mathbf{Q}}_{a,d}} \end{aligned}$$
(26)

As mentioned before, this assumption is consistent with the fact that the Jacobian submatrix associated with the dependent subset of generalized coordinates has full rank, namely:

$$\begin{aligned} \mathrm{{rank(}}{\mathbf{J}}_d^\mathrm{T}\mathrm{{)}} = \mathrm{{rank(}}{{\mathbf{J}}_d}\mathrm{{)}} = \mathrm{{dim(}}{\mathbf{J}}_d^\mathrm{T}\mathrm{{)}} = \mathrm{{dim(}}{{\mathbf{J}}_d}\mathrm{{)}} = {n_q} - {n_f} = {n_c} \end{aligned}$$
(27)

Therefore, one can write:

$$\begin{aligned} {{\mathbf{Q}}_{a,d}} - {\mathbf{J}}_d^\mathrm{T}{\mathbf{v}} = {\mathbf{0}} \end{aligned}$$
(28)

which corresponds to the subset of dynamic equations associated with the dependent generalized coordinates. The assembly of the two subsets of dynamic equations leads to the differential part of the set of equations of motion of the multibody system which can be recasted in the following compact matrix form:

$$\begin{aligned} \left\{ \begin{array}{l} {{\mathbf{Q}}_{a,i}} - {\mathbf{J}}_i^\mathrm{T}{\mathbf{v}} = {\mathbf{0}}\\ {{\mathbf{Q}}_{a,d}} - {\mathbf{J}}_d^\mathrm{T}{\mathbf{v}} = {\mathbf{0}} \end{array} \right. \quad \Leftrightarrow \quad {{\mathbf{Q}}_a} - {{\mathbf{J}}^\mathrm{T}}{\mathbf{v}} = {\mathbf{0}}\quad \Leftrightarrow \quad {{\mathbf{Q}}_i} + {{\mathbf{Q}}_e} - {{\mathbf{J}}^\mathrm{T}}{\mathbf{v}} = {\mathbf{0}} \end{aligned}$$
(29)

or equivalently:

$$\begin{aligned} - \mathbf{M}{\ddot{\mathbf{q}}} + {{\mathbf{Q}}_v} + {{\mathbf{Q}}_e} - {{\mathbf{J}}^\mathrm{T}}{\mathbf{v}} = {\mathbf{0}}\quad \Leftrightarrow \quad {\mathbf{M}\ddot{\mathbf{q}}} = {{\mathbf{Q}}_b} - {{\mathbf{J}}^\mathrm{T}}{\mathbf{v}} \end{aligned}$$
(30)

where \({{\mathbf{Q}}_b} \equiv {{\mathbf{Q}}_b}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) indicates the total body generalized force vector of dimensions \({n_q} \times 1\) that includes the inertial and external forces applied on the multibody system which is given by:

$$\begin{aligned} {{\mathbf{Q}}_b} = {{\mathbf{Q}}_v} + {{\mathbf{Q}}_e} \end{aligned}$$
(31)

The definition of the total vector of generalized forces \({{\mathbf{Q}}_b}\) applied on the bodies of the mechanical system constrained by kinematic joints simplifies the final mathematical expression of the equations of motion.

2.5 Differential-Algebraic equations of motion

The index-three differential-algebraic equations of motion of a general multibody system subjected to holonomic and nonholonomic constraints can thus be analytically written in a compact matrix form [60]. Thus, one can write:

$$\begin{aligned} \left\{ \begin{array}{l} {{\mathbf{M}\ddot{\mathbf{q}}}} = {{\mathbf{Q}}_b} - {{\mathbf{J}}^\mathrm{T}}{\mathbf{v}}\\ {\mathbf{E}} = {\mathbf{0}} \end{array} \right. \end{aligned}$$
(32)

Furthermore, one can readily obtain the index-one form of the differential-algebraic equations of motion of a general multibody system by replacing the definition of the constraint equations at the position level with their acceleration-level counterpart [61]. By doing so, one obtains the following equations:

$$\begin{aligned} \left\{ {\begin{array}{*{20}{l}} {{{\mathbf{M}\ddot{\mathbf{q}}}} = {{\mathbf{Q}}_b} - {{\mathbf{J}}^\mathrm{T}}{\mathbf{v}}}\\ {{{\mathbf{J}\ddot{\mathbf{q}}}} = {{\mathbf{Q}}_d}} \end{array}} \right. \end{aligned}$$
(33)

In particular, when the set of nonholonomic constraints is absent, the index-one differential-algebraic equations reduce to the following form:

$$\begin{aligned} \left\{ {\begin{array}{*{20}{l}} {{{\mathbf{M}\ddot{\mathbf{q}}}} = {{\mathbf{Q}}_b} - {\mathbf{C}}_{\mathbf{q}}^\mathrm{T}{\varvec{\lambda }}}\\ {{{\mathbf{C}}_{\mathbf{q}}}{\ddot{\mathbf{q}}} = {{\mathbf{Q}}_{d,h}}} \end{array}} \right. \end{aligned}$$
(34)

If, on the other hand, the mechanical system is subjected only to a set of nonholonomic constraints, one obtains a set of differential-algebraic dynamic equations characterized by an analogous mathematical structure:

$$\begin{aligned} \left\{ {\begin{array}{*{20}{l}} {{{\mathbf{M}\ddot{\mathbf{q}}}} = {{\mathbf{Q}}_b} - {\mathbf{D}}_{{\dot{\mathbf{q}}}}^\mathrm{T}{\varvec{\mu }}}\\ {{{\mathbf{D}}_{{\dot{\mathbf{q}}}}}{\ddot{\mathbf{q}}} = {{\mathbf{Q}}_{d,nh}}} \end{array}} \right. \end{aligned}$$
(35)

It is well known that the index-one form of the dynamic equations, although mathematically equivalent to the original index-three form, is numerically prone to the drift phenomenon of the algebraic constraints that is particularly detrimental in dynamical simulations ranging on long time spans [62]. This issue is present even in the case of interest for this investigation in which both holonomic and nonholonomic constraint equations are included in the mathematical model of the class of multibody systems considered. However, the numerical procedure for eliminating the constraint violations can be readily extended to the case in which also a set of holonomic constraints are considered [63]. For example, the robust generalized coordinate partitioning method or the direct correction approach can be effectively employed as constraint stabilization techniques [64, 65]. More importantly, in the stability analysis of multibody mechanical systems, the analytical techniques available in the literature are substantially based on the index-one form of the dynamic equations [66]. Although there is no theoretical obstacle to the analytical techniques based on this approach, in practice, these methodologies are cumbersome or inapplicable when a mixed symbolic-numeric strategy is employed for the stability analysis of complex multibody mechanical systems. As discussed more in detail below, the method proposed in this investigation for assessing the stability characteristics of a multibody system offers a solution to this challenging issue concerning large-scale multibody mechanical systems and this is done starting from the original index-three form of the equations of motion.

3 Standard analytical techniques for the stability analysis

3.1 Explicit form of the equations of motion

The general stability concepts discussed in the manuscript in the case of dynamical systems governed by ordinary differential equations are also applicable to the case of multibody mechanical systems that involve the presence of nonlinear algebraic constraints in addition to the intrinsic nonlinearities of the differential equations of motion [67]. However, in this general case, the nonlinear generalized force vector associated with the algebraic constraints must be eliminated or expressed as an explicit function of the generalized displacements and velocities of the multibody mechanical system [68]. This mathematical process is necessary in order to be able to formulate the stability study as a standard eigenvalue problem. For this purpose, the methodologies considered in this section start from the index-one form of the differential-algebraic equations of motion and lead to the following explicit formulation of the equations of motion expressed in terms of the system configuration vector and its time derivative:

$$\begin{aligned} {\ddot{\mathbf{q}}} = {\mathbf{a}} \end{aligned}$$
(36)

where the nonlinear vector function \({\mathbf{a}} \equiv {\mathbf{a}}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) of dimensions \({n_q} \times 1\) represents the analytical description of the generalized acceleration vector of the multibody system which can be determined by using the different computational approaches described below.

3.2 Augmented formulation

In the case of the augmented formulation [69], one can write the index-one form of the differential-algebraic equations of motion employing a block matrix form as follows:

$$\begin{aligned} {{\mathbf{M}}_{au}}{{\mathbf{q}}_{au}} = {{\mathbf{Q}}_{au}} \end{aligned}$$
(37)

where the characteristic dimension of the problem is \({n_{au}} = {n_q} + {n_c}\), the matrix \({{\mathbf{M}}_{au}} \equiv {{\mathbf{M}}_{au}}({\mathbf{q}},t)\) of dimensions \({n_{au}} \times {n_{au}}\) identifies the augmented mass matrix of the multibody system, the vector \({{\mathbf{q}}_{au}} \equiv {{\mathbf{q}}_{au}}(t)\) having dimensions \({n_{au}} \times 1\) represents the augmented generalized acceleration vector of the mechanical system, and \({{\mathbf{Q}}_{au}} \equiv {{\mathbf{Q}}_{au}}({\mathbf{q}},{\dot{\mathbf{q}}},t)\) denotes the augmented generalized force vector of dimensions \({n_{au}} \times 1\). These matrix and vector quantities are readily given by:

$$\begin{aligned} {{\mathbf{M}}_{au}} = \left[ {\begin{array}{*{20}{c}} {\mathbf{M}}&{}{{{\mathbf{J}}^\mathrm{T}}}\\ {\mathbf{J}}&{}{\mathbf{O}} \end{array}} \right] ,\quad {{\mathbf{q}}_{au}} = \left[ {\begin{array}{*{20}{c}} {{\ddot{\mathbf{q}}}}\\ {\mathbf{v}} \end{array}} \right] ,\quad {{\mathbf{Q}}_{au}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{Q}}_b}}\\ {{{\mathbf{Q}}_d}} \end{array}} \right] \end{aligned}$$
(38)

The computational method based on the augmented formulation can be effectively employed for obtaining an analytical expression of the generalized acceleration vector of a multibody mechanical system by solving a system of linear equations written in terms of the augmented generalized acceleration vector. However, for multibody systems composed of a large numbers of rigid bodies, the symbolic lower-upper factorization of the augmented mass matrix can lead to complex analytical expressions. A set of alternative methods for the determination of the generalized acceleration vector of a multibody system is reported in detail in “Appendix A” of the manuscript [70,71,72,73,74,75,76,77,78,79].

3.3 Formulation of the stability problem in the standard form

Once that the nonlinear vector function that analytically describes the generalized acceleration vector of the multibody system has been obtained by using one of the computational methods mentioned above, one can go ahead with the stability analysis. For this purpose, the configuration of interest for the stability study is first identified. For simplicity, assume as the reference configuration the constant vector denoted with \({{\mathbf{q}}_0}\) of dimensions \({n_q} \times 1\). Note that, in general, one can use a time-varying reference configuration without altering the mathematical structure of the methodology discussed herein. However, in any case, it is assumed that the reference configuration is a particular solution for the nonlinear set of equations of motion. The perturbation of the system configuration around the reference configuration is given by:

$$\begin{aligned} \varDelta {\mathbf{q}} = {\mathbf{q}} - {{\mathbf{q}}_0} \end{aligned}$$
(39)

where \(\varDelta {\mathbf{q}} \equiv \varDelta {\mathbf{q}}(t)\) is a vector having dimensions \({n_q} \times 1\) that represents the deviation of the current system configuration from the reference configuration of interest for the stability analysis. The perturbation of the analytical function that represents the system generalized acceleration vector can be performed by considering its Taylor series expansion truncated at the first order defined as:

$$\begin{aligned} \begin{array}{*{20}{l}} {{\mathbf{a}} \simeq {\mathbf{a}}({{\mathbf{q}}_0},{{{\dot{\mathbf{q}}}}_0}, {t_0}) + {{\left. {\frac{{\partial {\mathbf{a}}}}{{\partial {\mathbf{q}}}}} \right| }_{{{\mathbf{q}}_0},{{{\dot{\mathbf{q}}}}_0}, {t_0}}}\left( {{\mathbf{q}} - {{\mathbf{q}}_0}} \right) + {{\left. {\frac{{\partial {\mathbf{a}}}}{{\partial {\dot{\mathbf{q}}}}}} \right| }_{{{\mathbf{q}}_0},{{{\dot{\mathbf{q}}}}_0},{t_0}}} \left( {{\dot{\mathbf{q}}} - {{{\dot{\mathbf{q}}}}_0}} \right) }\\ {}\\ {\;\;\, = {{\left. {\mathbf{a}} \right| }_0} + {{\left. {{{\mathbf{a}}_{\mathbf{q}}}} \right| }_0}\varDelta {\mathbf{q}} + {{\left. {{{\mathbf{a}}_{{\dot{\mathbf{q}}}}}} \right| }_0}\varDelta {\dot{\mathbf{q}}}} \end{array} \end{aligned}$$
(40)

where the sum of the generalized acceleration vector with the first vector term in the Taylor series is equal to the zero vector since the reference configuration satisfies the equations of motion. The series expansion yields to the following linearized index-one form of the equations of motion of the multibody system:

$$\begin{aligned} {{\mathbf{M}}_0}\varDelta {\ddot{\mathbf{q}}} + {{\mathbf{R}}_0}\varDelta {\dot{\mathbf{q}}} + {{\mathbf{K}}_0}\varDelta {\mathbf{q}} = {\mathbf{0}} \end{aligned}$$
(41)

where \({{\mathbf{M}}_0}\) is the linearized mass matrix of the multibody system having dimensions \({n_q} \times {n_q}\), \({{\mathbf{R}}_0}\) is the linearized damping matrix of the multibody system having dimensions \({n_q} \times {n_q}\), and \({{\mathbf{K}}_0}\) is the linearized stiffness matrix of the multibody system having dimensions \({n_q} \times {n_q}\). These constant matrices are, respectively, defined as:

$$\begin{aligned} {{\mathbf{M}}_0} = {\mathbf{I}},\quad {{\mathbf{R}}_0} = {\mathbf{R}}({{\mathbf{q}}_0},{{\dot{\mathbf{q}}}_0},{t_0}),\quad {{\mathbf{K}}_0} = {\mathbf{K}}({{\mathbf{q}}_0},{{\dot{\mathbf{q}}}_0},{t_0}) \end{aligned}$$
(42)

where

$$\begin{aligned} {\mathbf{R}} = - {{\mathbf{a}}_{{\dot{\mathbf{q}}}}},\quad {\mathbf{K}} = - {{\mathbf{a}}_{\mathbf{q}}} \end{aligned}$$
(43)

where \({\mathbf{I}}\) is the identity matrix of dimensions \({n_q} \times {n_q}\). It is apparent that the linearized stiffness matrix \({\mathbf{K}}\) is given by the opposite of the Jacobian of the equations of motion computed with respect to the vector of generalized coordinates, the linearized damping matrix \({\mathbf{R}}\) is equal to the opposite of the Jacobian of the equations of motion computed with respect to the vector of generalized velocities, and the linearized mass matrix \({\mathbf{M}}\) arises from the opposite of the Jacobian of the equations of motion computed with respect to the vector of generalized accelerations. These matrices are all evaluated in correspondence of the reference configuration and, therefore, are constant matrices for a given instant of time. In the linearization process applied to the equations of motion that is performed around a given reference configuration, it is important to note that while the system mass matrix is always a symmetric positive definite matrix, the stiffness and damping matrices are not necessarily symmetric positive definite matrices [80]. The structure of the system stiffness and damping matrices depends both on the type of reference configuration and on the stability properties of the multibody mechanical system linearized around that particular configuration point.

3.4 Standard eigenvalue problem associated with the stability analysis

At this stage, the state-space form of the linearized equations of motion defined in the configuration space can be readily obtained by introducing a state vector of dimensions \({n_z} \times 1\) denoted with \(\varDelta {\mathbf{z}} \equiv \varDelta {\mathbf{z}}(t)\) and given by:

$$\begin{aligned} \varDelta {\mathbf{z}} = \left[ {\begin{array}{*{20}{c}} {\varDelta {\mathbf{q}}}\\ {\varDelta {\dot{\mathbf{q}}}} \end{array}} \right] \end{aligned}$$
(44)

where \({n_z} = 2{n_q}\). By doing so, the following standard state-space model of the linearized equations of motion can be readily obtained:

$$\begin{aligned} \varDelta {\dot{\mathbf{z}}} = {{\mathbf{A}}_0}\varDelta {\mathbf{z}} \end{aligned}$$
(45)

where the constant matrix \({{\mathbf{A}}_0}\) having dimensions \({n_z} \times {n_z}\) represents the state matrix associated with the linearized equations of motion in which the effect of the algebraic constraints is automatically embedded [81]. The state matrix can be readily assembled as a block matrix as follows:

$$\begin{aligned} {{\mathbf{A}}_0} = \left[ {\begin{array}{*{20}{c}} {\mathbf{O}}&{}{\mathbf{I}}\\ { - {\mathbf{M}}_0^{ - 1}{{\mathbf{K}}_0}}&{}{ - {\mathbf{M}}_0^{ - 1}{{\mathbf{R}}_0}} \end{array}} \right] \end{aligned}$$
(46)

where \({\mathbf{I}}\) is the identity matrix of dimensions \({n_q} \times {n_q}\). As already discussed before, the definition of the state matrix is of fundamental importance for the stability analysis of a multibody system since the eigenvalues of this matrix arising from the linearized equations of motion contain information on the nonlinear dynamic behavior of the mechanical system. This can be done by solving a standard eigenvalue problem associated with the state matrix obtained from the standard state-space form of the linearized equations of motion. To this end, one can search for a particular analytical solution labeled with the natural number k having the following mathematical form:

$$\begin{aligned} \varDelta {\mathbf{z}} = {{\varvec{\psi }}_k}{e^{{s_k}}},\quad k = 1,2, \ldots ,{n_z} \end{aligned}$$
(47)

where \({{s_k}}\) is a complex scalar number that identifies the generic eigenvalue and \({{\varvec{\psi }}_k}\) is the corresponding complex eigenvector of dimensions \({n_z} \times 1\). Both the eigenvalue and the eigenvector k are associated with the particular solution of the linear dynamical model. By substituting the trial solution into the linearized state-space model written in the standard form, one obtains:

$$\begin{aligned} {{\mathbf{A}}_0}{{\varvec{\psi }}_k} = {s_k}{{\varvec{\psi }}_k}\quad \Leftrightarrow \quad \left( {{{\mathbf{A}}_0} - {s_k}{\mathbf{I}}} \right) {{\varvec{\psi }}_k} = {\mathbf{0}} \end{aligned}$$
(48)

where \({\mathbf{I}}\) is the identity matrix of dimensions \({n_z} \times {n_z}\). This equation defines a standard eigenvalue problem. In order to have solutions different from the trivial one, the following condition must be satisfied:

$$\begin{aligned} \det ({{\mathbf{A}}_0} - {s_k}{\mathbf{I}}) = \left| {{{\mathbf{A}}_0} - {s_k}{\mathbf{I}}} \right| = 0 \end{aligned}$$
(49)

This characteristic equation obtained by computing the matrix determinant has \(n_z\) roots that correspond to the \(n_z\) system eigenvalues associated to which there are the \(n_z\) system eigenvectors that can be computed from the original matrix equation. For a mechanical system subjected to externally applied forces that are dependent on the generalized velocities, as is typical in the case of multibody systems, the eigenvalues obtained from the linearization around a given system configuration appear in complex conjugate pairs. For instance, considering two complex conjugate eigenvalues, respectively, denoted with \({s_k}\) and \({s_{k+1}}\), one can write:

$$\begin{aligned} {s_k} = {a_k} + i{b_k},\quad {s_{k + 1}} = {a_k} - i{b_k} \end{aligned}$$
(50)

where \(i = \sqrt{ - 1} \) is the imaginary unit, \({a_k}\) is the real part, and \({b_k}\) is the imaginary part of the complex conjugate eigenvalues k and \(k+1\).

4 Proposed computational approach for the stability analysis

4.1 Implicit form of the equations of motion

The computational technique for the stability analysis proposed in this work is directly applicable to the index-three differential-algebraic form of the equations of motion associated with a general multibody system. For this purpose, the index-three dynamic equations are rewritten as follows:

$$\begin{aligned} \left\{ \begin{array}{l} {\mathbf{M}\ddot{\mathbf{q}}} - {{\mathbf{Q}}_b} + {{\mathbf{J}}^\mathrm{T}}{\mathbf{v}} = {\mathbf{0}}\\ {\mathbf{E}} = {\mathbf{0}} \end{array} \right. \;\quad \Leftrightarrow \quad \left\{ \begin{array}{l} {\mathbf{F}} = {\mathbf{0}}\\ {\mathbf{E}} = {\mathbf{0}} \end{array} \right. \; \end{aligned}$$
(51)

where \({\mathbf{F}} \equiv {\mathbf{F}}({\mathbf{q}},{\dot{\mathbf{q}}},{\ddot{\mathbf{q}}}, {\mathbf{v}},t)\) is a nonlinear vector function of dimensions \({n_q} \times 1\) that contains the differential part of the equations of motion. This vector quantity is defined as:

$$\begin{aligned} {\mathbf{F}} = {\mathbf{M}\ddot{\mathbf{q}}} - {{\mathbf{Q}}_b} + {{\mathbf{J}}^\mathrm{T}}{\mathbf{v}} \end{aligned}$$
(52)

In analogy with the partition of the equations of motion into a differential and an algebraic part, one can define a composite coordinate vector obtained from the combination of the system generalized coordinate vector and the vector of Lagrange multipliers. This vector is denoted with \({\mathbf{p}} \equiv {\mathbf{p}}(t)\), has dimensions \({n_p} \times 1\), and is given by:

$$\begin{aligned} {\mathbf{p}} = \left[ {\begin{array}{*{20}{c}} {\mathbf{q}}\\ {\mathbf{v}} \end{array}} \right] \end{aligned}$$
(53)

where \({n_p} = {n_q} + {n_c}\). It follows that the differential-algebraic dynamic equations can be easily written in a composite form by assembling a nonlinear vector function as:

$$\begin{aligned} {\mathbf{g}} = {\mathbf{0}} \end{aligned}$$
(54)

where \({\mathbf{g}} \equiv {\mathbf{g}}({\mathbf{p}},{\dot{\mathbf{p}}},{\ddot{\mathbf{p}}},t)\) is a nonlinear vector function having dimensions \({n_p} \times 1\) that encapsulates the entire differential-algebraic set of equations of motion as follows:

$$\begin{aligned} {\mathbf{g}} = \left[ {\begin{array}{*{20}{c}} {\mathbf{F}}\\ {\mathbf{E}} \end{array}} \right] \end{aligned}$$
(55)

The definition of the vector function \({\mathbf{g}}\) allows for a straightforward formulation of the stability problem in the generalized form.

4.2 Formulation of the stability problem in the generalized form

Let \({{\mathbf{p}}_0}\) be the composite configuration vector of dimensions \({n_p} \times 1\) that identifies the reference configuration of interest for the stability analysis. In the vector \({{\mathbf{p}}_0}\), around which the stability study is performed, the reference configuration \({{\mathbf{q}}_0}\) having dimensions \({n_q} \times 1\) and the reference Lagrange multiplier vector \({{\mathbf{v}}_0}\) having dimensions \({n_c} \times 1\) are both embedded. It is important to note that the reference vector of Lagrange multipliers can be readily obtained from the reference configuration vector by using one of the analytical methods for the determination of the generalized accelerations discussed in the previous section [82]. Furthermore, let the vector \(\varDelta {\mathbf{p}} \equiv \varDelta {\mathbf{p}}(t)\) of dimensions \({n_p} \times 1\) be the perturbation of the current composite configuration vector from the reference composite configuration vector defined as:

$$\begin{aligned} \varDelta {\mathbf{p}} = {\mathbf{p}} - {{\mathbf{p}}_0} \end{aligned}$$
(56)

By perturbing the composite vector function associated with the equations of motion, one obtains the following Taylor series expansion truncated at the first order:

$$\begin{aligned} \begin{array}{*{20}{l}} \begin{array}{l} {\mathbf{g}} \simeq {\mathbf{g}}({{\mathbf{p}}_0},{{{\dot{\mathbf{p}}}}_0}, {{{\ddot{\mathbf{p}}}}_0},{t_0}) + {\left. {\frac{{\partial {\mathbf{g}}}}{{\partial {\mathbf{p}}}}} \right| _{{{\mathbf{p}}_0},{{{\dot{\mathbf{p}}}}_0}, {{{\ddot{\mathbf{p}}}}_0},{t_0}}}\left( {{\mathbf{p}} - {{\mathbf{p}}_0}} \right) \\ \\ \quad \quad \, + {\left. {\frac{{\partial {\mathbf{g}}}}{{\partial {\dot{\mathbf{p}}}}}} \right| _{{{\mathbf{p}}_0},{{{\dot{\mathbf{p}}}}_0},{{{\ddot{\mathbf{p}}}}_0},{t_0}}}\left( {{\dot{\mathbf{p}}} - {{{\dot{\mathbf{p}}}}_0}} \right) + {\left. {\frac{{\partial {\mathbf{g}}}}{{\partial {\ddot{\mathbf{p}}}}}} \right| _{{{\mathbf{p}}_0},{{{\dot{\mathbf{p}}}}_0},{{{\ddot{\mathbf{p}}}}_0},{t_0}}}\left( {{\ddot{\mathbf{p}}} - {{{\ddot{\mathbf{p}}}}_0}} \right) \end{array}\\ {}\\ {\;\;\, = {{\left. {\mathbf{g}} \right| }_0} + {{\left. {{{\mathbf{g}}_{\mathbf{p}}}} \right| }_0}\varDelta {\mathbf{p}} + {{\left. {{{\mathbf{g}}_{{\dot{\mathbf{p}}}}}} \right| }_0}\varDelta {\dot{\mathbf{p}}} + {{\left. {{{\mathbf{g}}_{{\ddot{\mathbf{p}}}}}} \right| }_0}\varDelta {\ddot{\mathbf{p}}}} \end{array} \end{aligned}$$
(57)

where the first vector term in the series expansion is identically equal to zero because it is assumed that the nonlinear functions considered in the definition of the composite reference configuration satisfy the equations of motion. Thus,

$$\begin{aligned} {\mathbf{g}}({{\mathbf{p}}_0},{{\dot{\mathbf{p}}}_0},{{\ddot{\mathbf{p}}}_0},{t_0}) = {\mathbf{0}} \end{aligned}$$
(58)

By means of simple mathematical manipulations, one can readily show that the Taylor series expansion leads to the following linearized form of the index-three set of differential-algebraic dynamic equations:

$$\begin{aligned} {{\bar{\mathbf{M}}}_0}\varDelta {\ddot{\mathbf{p}}} + {{\bar{\mathbf{R}}}_0}\varDelta {\dot{\mathbf{p}}} + {{\bar{\mathbf{K}}}_0}\varDelta {\mathbf{p}} = {\mathbf{0}} \end{aligned}$$
(59)

where \({{\bar{\mathbf{M}}}_0}\) is the composite mass matrix of the multibody system, \({{\bar{\mathbf{R}}}_0}\) is the composite damping matrix of the multibody system, and \({{\bar{\mathbf{K}}}_0}\) is the composite stiffness matrix of the multibody system that have dimensions \({n_p} \times {n_p}\). These constant matrices are all associated with the linearized version of the multibody dynamical model and are, respectively, given by:

$$\begin{aligned} {{\bar{\mathbf{M}}}_0} = {\bar{\mathbf{M}}}({{\mathbf{p}}_0},{t_0}),\quad {{\bar{\mathbf{R}}}_0} = {\bar{\mathbf{R}}}({{\mathbf{p}}_0},{{\dot{\mathbf{p}}}_0},{t_0}),\quad {{\bar{\mathbf{K}}}_0} = {\bar{\mathbf{K}}}({{\mathbf{p}}_0},{{\dot{\mathbf{p}}}_0},{{\ddot{\mathbf{p}}}_0},{t_0}) \end{aligned}$$
(60)

where

$$\begin{aligned} {\bar{\mathbf{M}}} = {{\mathbf{g}}_{{\ddot{\mathbf{p}}}}},\quad {\bar{\mathbf{R}}} = {{\mathbf{g}}_{{\dot{\mathbf{p}}}}},\quad {\bar{\mathbf{K}}} = {{\mathbf{g}}_{\mathbf{p}}} \end{aligned}$$
(61)

It is, therefore, apparent that the composite stiffness matrix \({\bar{\mathbf{K}}}\) is given by the Jacobian of the equations of motion computed with respect to the vector of composite coordinates, the composite damping matrix \({\bar{\mathbf{R}}}\) is equal to the Jacobian of the equations of motion computed with respect to the vector of composite velocities, and the composite mass matrix \({\bar{\mathbf{M}}}\) arises from the Jacobian of the equations of motion computed with respect to the vector of composite accelerations. In particular, the composite mass matrix is a block matrix and has the following structure:

$$\begin{aligned} {{\bar{\mathbf{M}}}_0} = {\left. {{{\mathbf{g}}_{{\ddot{\mathbf{p}}}}}} \right| _0} = \left[ {\begin{array}{*{20}{c}} {{{\left. {{{\mathbf{g}}_{{\ddot{\mathbf{q}}}}}} \right| }_0}}&{{{\left. {{{\mathbf{g}}_{{\ddot{\mathbf{v}}}}}} \right| }_0}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {{{\left. {{{\mathbf{F}}_{{\ddot{\mathbf{q}}}}}} \right| }_0}}&{}{{{\left. {{{\mathbf{F}}_{{\ddot{\mathbf{v}}}}}} \right| }_0}}\\ {{{\left. {{{\mathbf{E}}_{{\ddot{\mathbf{q}}}}}} \right| }_0}}&{}{{{\left. {{{\mathbf{E}}_{{\ddot{\mathbf{v}}}}}} \right| }_0}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {{\bar{\mathbf{M}}}_{1,1}^0}&{}{{\bar{\mathbf{M}}}_{1,2}^0}\\ {{\bar{\mathbf{M}}}_{2,1}^0}&{}{{\bar{\mathbf{M}}}_{2,2}^0} \end{array}} \right] \end{aligned}$$
(62)

where

$$\begin{aligned} \left\{ \begin{array}{l} {\bar{\mathbf{M}}}_{1,1}^0 = {\left. {\mathbf{M}} \right| _0},\quad {\bar{\mathbf{M}}}_{1,2}^0 = {\mathbf{O}}\\ {\bar{\mathbf{M}}}_{2,1}^0 = {\mathbf{O}},\quad {\bar{\mathbf{M}}}_{2,2}^0 = {\mathbf{O}} \end{array} \right. \end{aligned}$$
(63)

where \({\bar{\mathbf{M}}}_{1,1}^0\), \({\bar{\mathbf{M}}}_{1,2}^0\), \({\bar{\mathbf{M}}}_{2,1}^0\), \({\bar{\mathbf{M}}}_{2,2}^0\) are constant matrices of dimensions \({n_q} \times {n_q}\), \({n_q} \times {n_c}\), \({n_c} \times {n_q}\), and \({n_c} \times {n_c}\), respectively. The composite damping matrix assumes the following matrix block form:

$$\begin{aligned} {{\bar{\mathbf{R}}}_0} = {\left. {{{\mathbf{g}}_{{\dot{\mathbf{p}}}}}} \right| _0} = \left[ {\begin{array}{*{20}{c}} {{{\left. {{{\mathbf{g}}_{{\dot{\mathbf{q}}}}}} \right| }_0}}&{{{\left. {{{\mathbf{g}}_{{\dot{\mathbf{v}}}}}} \right| }_0}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {{{\left. {{{\mathbf{F}}_{{\dot{\mathbf{q}}}}}} \right| }_0}}&{}{{{\left. {{{\mathbf{F}}_{{\dot{\mathbf{v}}}}}} \right| }_0}}\\ {{{\left. {{{\mathbf{E}}_{{\dot{\mathbf{q}}}}}} \right| }_0}}&{}{{{\left. {{{\mathbf{E}}_{{\dot{\mathbf{v}}}}}} \right| }_0}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {{\bar{\mathbf{R}}}_{1,1}^0}&{}{{\bar{\mathbf{R}}}_{1,2}^0}\\ {{\bar{\mathbf{R}}}_{2,1}^0}&{}{{\bar{\mathbf{R}}}_{2,2}^0} \end{array}} \right] \end{aligned}$$
(64)

where

$$\begin{aligned} \left\{ \begin{array}{l} {\bar{\mathbf{R}}}_{1,1}^0 = {\left. { - \frac{{\partial {{\mathbf{Q}}_b}}}{{\partial {\dot{\mathbf{q}}}}}} \right| _0},\quad {\bar{\mathbf{R}}}_{1,2}^0 = {\mathbf{O}}\\ {\bar{\mathbf{R}}}_{2,1}^0 = {\left. {\frac{{\partial {\mathbf{E}}}}{{\partial {\dot{\mathbf{q}}}}}} \right| _0},\quad {\bar{\mathbf{R}}}_{2,2}^0 = {\mathbf{O}} \end{array} \right. \end{aligned}$$
(65)

where \({\bar{\mathbf{R}}}_{1,1}^0\), \({\bar{\mathbf{R}}}_{1,2}^0\), \({\bar{\mathbf{R}}}_{2,1}^0\), \({\bar{\mathbf{R}}}_{2,2}^0\) are constant matrices of dimensions \({n_q} \times {n_q}\), \({n_q} \times {n_c}\), \({n_c} \times {n_q}\), and \({n_c} \times {n_c}\), respectively. The composite stiffness matrix is also a block matrix given by:

$$\begin{aligned} {{\bar{\mathbf{K}}}_0} = {\left. {{{\mathbf{g}}_{\mathbf{p}}}} \right| _0} = \left[ {\begin{array}{*{20}{c}} {{{\left. {{{\mathbf{g}}_{\mathbf{q}}}} \right| }_0}}&{{{\left. {{{\mathbf{g}}_{\mathbf{v}}}} \right| }_0}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {{{\left. {{{\mathbf{F}}_{\mathbf{q}}}} \right| }_0}}&{}{{{\left. {{{\mathbf{F}}_{\mathbf{v}}}} \right| }_0}}\\ {{{\left. {{{\mathbf{E}}_{\mathbf{q}}}} \right| }_0}}&{}{{{\left. {{{\mathbf{E}}_{\mathbf{v}}}} \right| }_0}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {{\bar{\mathbf{K}}}_{1,1}^0}&{}{{\bar{\mathbf{K}}}_{1,2}^0}\\ {{\bar{\mathbf{K}}}_{2,1}^0}&{}{{\bar{\mathbf{K}}}_{2,2}^0} \end{array}} \right] \end{aligned}$$
(66)

where

$$\begin{aligned} \left\{ \begin{array}{l} {\bar{\mathbf{K}}}_{1,1}^0 = {\left. {\frac{{\partial \left( {{\mathbf{M}\ddot{\mathbf{q}}}} \right) }}{{\partial {\mathbf{q}}}}} \right| _0} - {\left. {\frac{{\partial {{\mathbf{Q}}_b}}}{{\partial {\mathbf{q}}}}} \right| _0} + {\left. {\frac{{\partial \left( {{{\mathbf{J}}^\mathrm{T}}{\mathbf{v}}} \right) }}{{\partial {\mathbf{q}}}}} \right| _0},\quad {\bar{\mathbf{K}}}_{1,2}^0 = {\left. {{{\mathbf{J}}^\mathrm{T}}} \right| _0}\\ {\bar{\mathbf{K}}}_{2,1}^0 = {\left. {\frac{{\partial {\mathbf{E}}}}{{\partial {\mathbf{q}}}}} \right| _0},\quad {\bar{\mathbf{K}}}_{2,2}^0 = {\mathbf{O}} \end{array} \right. \end{aligned}$$
(67)

where \({\bar{\mathbf{K}}}_{1,1}^0\), \({\bar{\mathbf{K}}}_{1,2}^0\), \({\bar{\mathbf{K}}}_{2,1}^0\), \({\bar{\mathbf{K}}}_{2,2}^0\) are constant matrices of dimensions \({n_q} \times {n_q}\), \({n_q} \times {n_c}\), \({n_c} \times {n_q}\), and \({n_c} \times {n_c}\), respectively. Note that the scenario considered here is more general compared with the case analyzed in the previous section. It is indeed apparent that the composite mass matrix is symmetric but is also indefinite; that is, this matrix is not positive semi-definite and not negative semi-definite. The composite damping and stiffness matrices, on the other hand, are indefinite matrices which are also not necessarily symmetric.

4.3 Generalized eigenvalue problem associated with the stability analysis

In order to carry out the stability analysis of the composite reference configuration employing the proposed analytical method, a state-space reformulation of the linearized equations of motion is necessary. To this end, consider another state vector denoted with \(\varDelta {\mathbf{y}} \equiv \varDelta {\mathbf{y}}(t)\) having dimensions \({n_y} \times 1\) defined in terms of the perturbation of the composite generalized coordinates and velocities as follows:

$$\begin{aligned} \varDelta {\mathbf{y}} = \left[ {\begin{array}{*{20}{c}} {\varDelta {\mathbf{p}}}\\ {\varDelta {\dot{\mathbf{p}}}} \end{array}} \right] \end{aligned}$$
(68)

where \({n_y} = 2{n_p}\). The introduction of the composite state vector defined above leads to the following generalized state-space formulations of the linearized equations of motion:

$$\begin{aligned} {{\bar{\mathbf{U}}}_0}\varDelta {\dot{\mathbf{y}}} = {{\bar{\mathbf{V}}}_0}\varDelta {\mathbf{y}} \end{aligned}$$
(69)

where the constant matrices \({{\bar{\mathbf{U}}}_0}\) and \({{\bar{\mathbf{V}}}_0}\) having dimensions \({n_y} \times {n_y}\) represent two transition matrices associated with the generalized state-space form of the linearized dynamic equations [83]. The structure of these matrices is based on the following block matrix form:

$$\begin{aligned} {{\bar{\mathbf{U}}}_0} = \left[ {\begin{array}{*{20}{c}} {{{{\bar{\mathbf{R}}}}_0}}&{}{{{{\bar{\mathbf{M}}}}_0}}\\ {{{{\bar{\mathbf{M}}}}_0}}&{}{\mathbf{O}} \end{array}} \right] ,\quad {{\bar{\mathbf{V}}}_0} = \left[ {\begin{array}{*{20}{c}} { - {{{\bar{\mathbf{K}}}}_0}}&{}{\mathbf{O}}\\ {\mathbf{O}}&{}{{{{\bar{\mathbf{M}}}}_0}} \end{array}} \right] \end{aligned}$$
(70)

In order to perform the stability analysis of a given composite reference configuration, the generalized eigenvalue problem associated with the generalized state-space form of the linearized differential-algebraic equations of motion can be effectively employed. In this respect, it is important to emphasize the point that, for the same multibody mechanical system, the eigenvalues arising from the formulation of a generalized state-space dynamical model exactly coincide with those obtained from the corresponding standard state-space dynamical model. The only important difference relies in the fact that the set of eigenvalues associated with the generalized eigenproblem contains additional eigenvalues equal to infinite that are due to the presence of the Lagrange multipliers in the definition of the composite coordinate vector. The eigenvectors, on the other hand, show substantial differences in the two models since they are associated with different state vectors. In order to formulate the generalized eigenvalue problem associated with the generalized state-space model, consider the following trial solution labeled with the natural number h:

$$\begin{aligned} \varDelta {\mathbf{y}} = {{\varvec{\varphi }}_h}{e^{{s_h}}},\quad h = 1,2, \ldots ,{n_y} \end{aligned}$$
(71)

where the complex scalar number \({{s_h}}\) denotes the generic eigenvalue labeled with the number h and the vector of complex numbers indicated with \({{\varvec{\varphi }}_h}\) represents the corresponding eigenvector. The introduction of the trial analytical solution into the generalized state-space model leads to the following mathematical expression:

$$\begin{aligned} {{\bar{\mathbf{V}}}_0}{{\varvec{\varphi }}_h} = {s_h}{{\bar{\mathbf{U}}}_0}{{\varvec{\varphi }}_h}\quad \Leftrightarrow \quad \left( {{{{\bar{\mathbf{V}}}}_0} - {s_h}{{{\bar{\mathbf{U}}}}_0}} \right) {{\varvec{\varphi }}_h} = {\mathbf{0}} \end{aligned}$$
(72)

Thus, the vector equation so found represents the basis of the generalized eigenvalue problem associated with the stability of a general multibody mechanical system. Even in this case, the following condition must be enforced for obtaining nontrivial solutions:

$$\begin{aligned} \det ({{\bar{\mathbf{V}}}_0} - {s_h}{{\bar{\mathbf{U}}}_0}) = \left| {{{{\bar{\mathbf{V}}}}_0} - {s_h}{{{\bar{\mathbf{U}}}}_0}} \right| = 0 \end{aligned}$$
(73)

This mathematical condition represents the key equation for the determination of the eigenvalues of the system of interest, which correspond to the \(n_y\) roots of the matrix determinant arising from the generalized eigenproblem associated with the state-space model [84]. As mentioned before, a subset of the eigenvalues found by implementing this approach is not meaningful for the stability analysis since they are equal to infinite. However, the remaining eigenvalues assume finite values and, in general, appear as complex numbers in conjugate pairs. Thus, this second subset of eigenvalues contains valuable information about the stability of the multibody mechanical system. Unlike the stability methods based on the numerical solution of a standard eigenproblem discussed in the previous section, the analytical technique for the stability analysis proposed herein is based on the formulation of a generalized eigenproblem which can be formulated by means of relatively simple symbolic manipulations of the equations of motion that are feasible also in the case of multibody mechanical systems having complex structures.

5 Numerical results and discussion

5.1 Physical pendulum

The first demonstrative example is a two-dimensional physical pendulum modeled as a holonomic multibody system. This holonomic mechanical system is shown in Fig. 1.

The numerical data used for the system parameters are reported in Table 1.

Fig. 1
figure 1

Physical pendulum multibody model

The physical pendulum is a two-dimensional holonomic multibody system composed of one rigid body and one mechanical joint, namely a revolute joint collocated in the point O of Fig. 1. Half of the length of the pendulum is denoted with L, the pendulum mass is denoted with m, the pendulum mass moment of inertia is denoted with \({I_{zz}}\), and the gravitational acceleration is denoted with g. Although the physical pendulum is a mechanical system endowed with \(n_f = 1\) degree of freedom, when a redundant coordinate formulation approach is assumed for modeling this multibody system, one needs to use a vector of \(n_q = 3\) generalized coordinates. To this end, consider the following vector of generalized coordinates denoted with \({\mathbf{q}} \equiv {\mathbf{q}}(t)\):

$$\begin{aligned} {\mathbf{q}} = {\left[ {\begin{array}{*{20}{c}} x&y&\theta \end{array}} \right] ^\mathrm{T}} \end{aligned}$$
(74)

where \(x \equiv x(t)\) is the horizontal displacement of the pendulum center of mass, \(y \equiv y(t)\) is the vertical displacement of the pendulum center of mass, and \(\theta \equiv \theta (t)\) is the pendulum angular displacement evaluated with respect to the positive direction of the horizontal axis of the global frame of reference. The kinetic energy \(T \equiv T({\mathbf{q}},{\dot{\mathbf{q}}},t)\) and the potential energy \(U \equiv U({\mathbf{q}},t)\) of the physical pendulum are, respectively, given by:

$$\begin{aligned} T = \frac{1}{2}m\left( {{{\dot{x}}^2} + {{\dot{y}}^2}} \right) + \frac{1}{2}{I_{zz}}{\dot{\theta } ^2},\quad U = mgy \end{aligned}$$
(75)

The mass matrix \({\mathbf{M}}\) and the total body generalized force vector \({{\mathbf{Q}}_b}\) of the physical pendulum can be, respectively, written as follows:

$$\begin{aligned} {\mathbf{M}} = \mathrm{{diag}}(m,m,{I_{zz}}),\quad {{\mathbf{Q}}_b} = {\left[ {\begin{array}{*{20}{c}} 0&{ - mg}&0 \end{array}} \right] ^\mathrm{T}} \end{aligned}$$
(76)
Table 1 Physical pendulum physical parameters

The holonomic constraint vector \(\mathbf {C}\) of the physical pendulum system due to the presence of the revolute joint in the point O of Fig. 1 can be readily written as:

$$\begin{aligned} {\mathbf{C}} = \left[ {\begin{array}{*{20}{c}} {x - L\cos (\theta )}\\ {y - L\sin (\theta )} \end{array}} \right] \end{aligned}$$
(77)

The holonomic constraint Jacobian matrix \({{\mathbf{C}}_{\mathbf{q}}}\) of the physical pendulum system is given by:

$$\begin{aligned} {{\mathbf{C}}_{\mathbf{q}}} = \left[ {\begin{array}{*{20}{c}} 1&{}0&{}{L\sin \left( \theta \right) }\\ 0&{}1&{}{ - L\cos \left( \theta \right) } \end{array}} \right] \end{aligned}$$
(78)

The holonomic constraint quadratic velocity vector \({{\mathbf{Q}}_{d,h}}\) of the physical pendulum system is defined as follows:

$$\begin{aligned} {{\mathbf{Q}}_{d,h}} = \left[ {\begin{array}{*{20}{c}} { - L{{\dot{\theta } }^2}\cos \left( \theta \right) }\\ { - L{{\dot{\theta } }^2}\sin \left( \theta \right) } \end{array}} \right] \end{aligned}$$
(79)

In the case of the physical pendulum, one can analytically derive the composite matrices \({\bar{\mathbf{M}}}\), \({\bar{\mathbf{R}}}\), and \({\bar{\mathbf{K}}}\) associated with the general stability analysis of this holonomic multibody system by using the computational approach developed in this paper and starting from the system mass matrix \({\mathbf{M}}\), the system total body generalized force vector \({{\mathbf{Q}}_b}\), the system constraint vector \({\mathbf{C}}\), the system constraint Jacobian matrix \({{\mathbf{C}}_{\mathbf{q}}}\), and the system constraint quadratic velocity vector \({{\mathbf{Q}}_{d,h}}\). For this purpose, one can write the matrix blocks that form the composite mass matrix \({\bar{\mathbf{M}}}\) of the physical pendulum as:

$$\begin{aligned} \left\{ \begin{array}{l} {{{\bar{\mathbf{M}}}}_{1,1}} = \mathrm{{diag}}(m,m,{I_{zz}}), \quad {{{\bar{\mathbf{M}}}}_{1,2}} = {\mathbf{O}}\\ \\ {{{\bar{\mathbf{M}}}}_{2,1}} = {\mathbf{O}},\quad {{{\bar{\mathbf{M}}}}_{2,2}} = {\mathbf{O}} \end{array} \right. \end{aligned}$$
(80)

The matrix blocks that form the composite damping matrix \({\bar{\mathbf{R}}}\) of the physical pendulum are given by:

$$\begin{aligned} \left\{ \begin{array}{l} {{{\bar{\mathbf{R}}}}_{1,1}} = {\mathbf{O}},\quad {{{\bar{\mathbf{R}}}}_{1,2}} = {\mathbf{O}}\\ \\ {{{\bar{\mathbf{R}}}}_{2,1}} = {\mathbf{O}},\quad {{{\bar{\mathbf{R}}}}_{2,2}} = {\mathbf{O}} \end{array} \right. \end{aligned}$$
(81)

The matrix blocks that form the composite stiffness matrix \({\bar{\mathbf{K}}}\) of the physical pendulum are defined as follows:

$$\begin{aligned} \left\{ \begin{array}{l} {{{\bar{\mathbf{K}}}}_{1,1}} = \left[ {\begin{array}{*{20}{c}} 0&{}0&{}0\\ 0&{}0&{}0\\ 0&{}0&{}{L\left( {{\lambda _1}\cos (\theta ) + {\lambda _2}\sin (\theta )} \right) } \end{array}} \right] \\ \;\\ {{{\bar{\mathbf{K}}}}_{1,2}} = \left[ {\begin{array}{*{20}{c}} 1&{}0\\ 0&{}1\\ {L\sin (\theta )}&{}{ - L\cos (\theta )} \end{array}} \right] \\ \\ {{{\bar{\mathbf{K}}}}_{2,1}} = {\bar{\mathbf{K}}}_{1,2}^\mathrm{T}\\ \\ {{{\bar{\mathbf{K}}}}_{2,2}} = {\mathbf{O}} \end{array} \right. \end{aligned}$$
(82)

where \({\mathbf{O}}\) is the zero matrix, while \({\lambda _1} \equiv {\lambda _1}(t)\) and \({\lambda _2} \equiv {\lambda _2}(t)\) are the Lagrange multipliers associated with the holonomic constraint equations.

The linearization point of the configuration space used for the stability analysis of the physical pendulum is identified by the following generalized vectors:

$$\begin{aligned} {{\mathbf{q}}_0} = \left[ {\begin{array}{*{20}{c}} {{x_0}}\\ {{y_0}}\\ {{\theta _0}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} 0\\ { - L}\\ {\frac{3}{2}\pi } \end{array}} \right] ,\quad {{\dot{\mathbf{q}}}_0} = {{\ddot{\mathbf{q}}}_0} = {\mathbf{0}} \end{aligned}$$
(83)

In Table 2, the eigenvalues resulting from the stability study of the physical pendulum carried out with the proposed method are reported and used as the reference solution, whereas the eigenvalue errors with respect to the reference solution arising from the application of the other fundamental techniques of applied mechanics are listed immediately after.

Table 2 Physical pendulum eigenvalues

As expected, it is apparent that the reference configuration chosen for performing the stability study is a marginally stable equilibrium configuration since the significant eigenvalues found form a purely imaginary conjugate pair. Furthermore, the numerical results presented in Table 2 demonstrate that there are only negligible errors due to the numerical procedure and the different algorithms used to compute the solution. On the other hand, after the stability analysis, the nonlinear equations of motion of the physical pendulum are numerically solved to verify the qualitative and quantitative information obtained from the stability study by analyzing the angular displacement and the angular velocity of the pendulum. For this purpose, the initial conditions considered include a small perturbation from the equilibrium configuration and are defined as follows:

$$\begin{aligned} \left\{ \begin{array}{l} {x_s} = L\cos ({\theta _s})\\ {y_s} = L\sin ({\theta _s})\\ {\theta _s} = {\theta _0} + \varepsilon \end{array} \right. ,\quad \left\{ \begin{array}{l} {{\dot{x}}_s} = 0\\ {{\dot{y}}_s} = 0\\ {{\dot{\theta } }_s} = 0 \end{array} \right. ,\quad \varepsilon = \frac{\pi }{4} \end{aligned}$$
(84)

where \({x_s}\) is the initial horizontal displacement of the pendulum center of mass, \({y_s}\) is the initial vertical displacement of the pendulum center of mass, \({\theta _s}\) is the initial angular displacement of the physical pendulum, \({{\dot{x}}_s}\) is the initial horizontal velocity of the pendulum center of mass, \({{\dot{y}}_s}\) is the initial vertical velocity of the pendulum center of mass, \({{\dot{\theta } }_s}\) is the initial angular velocity of the physical pendulum, and \(\varepsilon \) represents the perturbation. The time step employed for carrying out the numerical simulation is \(\varDelta t = {10^{ - 3}}\;(s)\), whereas the time interval used for studying the dynamic behavior of the physical pendulum system is \({T_s} = 10\;(s)\). In Fig. 2, the numerical results of the dynamical simulation are shown; that is, Fig. 2a represents the angular displacement of the physical pendulum, while Fig. 2b represents its angular velocity.

Fig. 2
figure 2

Angular displacement \(\theta \) and angular velocity \(\dot{\theta }\) of the physical pendulum

The numerical results arising from the nonlinear dynamic analysis of the physical pendulum confirm the stability properties found by means of the linear stability analysis.

5.2 Wheeled inverted pendulum

The second illustrative example is a two-dimensional wheeled inverted pendulum modeled as a multibody system. This mechanical system is shown in Fig. 3.

Fig. 3
figure 3

Wheeled inverted pendulum multibody model

The numerical data used for the system parameters are reported in Table 3.

The wheeled inverted pendulum is a two-dimensional multibody mechanical system composed of two rigid bodies, that are a disk and a pendulum, one revolute joint collocated in the point \(G_d\) of Fig. 3, one contact constraint between the disk and the ground collocated in the point C of Fig. 3, and one pure rolling nonholonomic constraint. Even if in the case of two-dimensional systems the algebraic equations associated with the pure rolling condition are generally integrable, namely they are reducible from nonholonomic constraints to holonomic constraints, in this numerical example, they are treated as nonholonomic constraints to illustrate the use of the computational method developed in this work in the case of nonholonomic multibody systems. The radius of the disk is indicated with \(R_d\), the mass of the disk is indicated with \(m_d\), the mass moment of inertia of the disk is indicated with \({I_{zz,d}}\), half the length of the pendulum is indicated with \(L_p\), the pendulum mass is indicated with \(m_p\), the mass moment of inertia of the pendulum is indicated with \({I_{zz,p}}\), and the gravitational acceleration is indicated with g. Although the wheeled inverted pendulum is a mechanical system endowed with \(n_f = 2\) degrees of freedom, when a redundant coordinate formulation approach is used for modeling this multibody system, a vector of \(n_q = 6\) generalized coordinates is required. For this purpose, consider a vector of generalized coordinates denoted with \({\mathbf{q}} \equiv {\mathbf{q}}(t)\) and given by:

$$\begin{aligned} {{\mathbf{q}}_d} = \left[ {\begin{array}{*{20}{c}} {{x_d}}\\ {{y_d}}\\ {{\theta _d}} \end{array}} \right] ,\quad {{\mathbf{q}}_p} = \left[ {\begin{array}{*{20}{c}} {{x_p}}\\ {{y_p}}\\ {{\theta _p}} \end{array}} \right] ,\quad {\mathbf{q}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{q}}_d}}\\ {{{\mathbf{q}}_p}} \end{array}} \right] \end{aligned}$$
(85)
Table 3 Wheeled inverted pendulum physical parameters

where \({{\mathbf{q}}_d} \equiv {{\mathbf{q}}_d}(t)\) is the generalized coordinate vector of the disk, \({{\mathbf{q}}_p} \equiv {{\mathbf{q}}_p}(t)\) is the generalized coordinate vector of the pendulum, \({x_d} \equiv {x_d}(t)\) is the horizontal displacement of the disk center of mass, \({y_d} \equiv {y_d}(t)\) is the vertical displacement of the disk center of mass, \({\theta _d} \equiv {\theta _d}(t)\) is the disk angular displacement, \({x_p} \equiv {x_p}(t)\) is the horizontal displacement of the pendulum center of mass, \({y_p} \equiv {y_p}(t)\) is the vertical displacement of the pendulum center of mass, and \({\theta _p} \equiv {\theta _p}(t)\) is the pendulum angular displacement. The kinetic energy T and the potential energy U of the wheeled inverted pendulum are, respectively, given by:

$$\begin{aligned} T = \frac{1}{2}{m_d}\left( {\dot{x}_d^2 + \dot{y}_d^2} \right) + \frac{1}{2}{I_{zz,d}}\dot{\theta } _d^2 + \frac{1}{2}{m_p}\left( {\dot{x}_p^2 + \dot{y}_p^2} \right) + \frac{1}{2}{I_{zz,p}}\dot{\theta } _p^2 \end{aligned}$$
(86)

and

$$\begin{aligned} U = {m_d}g{y_d} + {m_p}g{y_p} \end{aligned}$$
(87)

The mass matrix \({\mathbf{M}}\) and the total body generalized force vector \({{\mathbf{Q}}_b}\) of the wheeled inverted pendulum can be, respectively, written as follows:

$$\begin{aligned} {\mathbf{M}} = \mathrm{{diag}}({m_d},{m_d},{I_{zz,d}},{m_p},{m_p},{I_{zz,p}}) \end{aligned}$$
(88)

and

$$\begin{aligned} {{\mathbf{Q}}_b} = {\left[ {\begin{array}{*{20}{c}} 0&{ - {m_d}g}&0&0&{ - {m_p}g}&0 \end{array}} \right] ^\mathrm{T}} \end{aligned}$$
(89)

The total vector of holonomic constraints \(\mathbf {C}\) of the wheeled inverted pendulum system due to the presence of the revolute joint in the point \(G_d\) of Fig. 3 that connects the disk and the pendulum, as well as to the presence of the contact between the disk and the ground in the point C of Fig. 3, can be readily written as:

$$\begin{aligned} {\mathbf{C}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{j}}^\mathrm{T}}{{\mathbf{r}}_{d,C}}}\\ {{{\mathbf{r}}_{d,{G_d}}} - {{\mathbf{r}}_{p,{G_d}}}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {{y_d} - {R_d}}\\ {{x_d} - {x_p} + {L_p}\cos ({\theta _p})}\\ {{y_d} - {y_p} + {L_p}\sin ({\theta _p})} \end{array}} \right] \end{aligned}$$
(90)

where \({\mathbf{j}}\) is the unit vector associated with the Y axis of the absolute reference frame, \({{{\mathbf{r}}_{d,C}}}\) is the global position of the contact point C collocated on the disk, \({{{\mathbf{r}}_{d,{G_d}}}}\) is the global position of the disk center of mass \(G_d\) measured with respect to the disk, and \({{{\mathbf{r}}_{p,{G_d}}}}\) is the global position of the disk center of mass \(G_d\) measured with respect to the pendulum. These vector quantities are explicitly defined as follows:

$$\begin{aligned} {{\mathbf{r}}_{d,C}}= & {} {{\mathbf{R}}_d} + {{\mathbf{A}}_d}{{\bar{\mathbf{u}}}_{d,C}} = \left[ {\begin{array}{*{20}{c}} {{x_d}}\\ {{y_d} - {R_d}} \end{array}} \right] \end{aligned}$$
(91)
$$\begin{aligned} {{\mathbf{r}}_{d,{G_d}}}= & {} {{\mathbf{R}}_d} = \left[ {\begin{array}{*{20}{c}} {{x_d}}\\ {{y_d}} \end{array}} \right] ,\quad {{\mathbf{r}}_{p,{G_d}}} = {{\mathbf{R}}_p} + {{\mathbf{A}}_p}{{\bar{\mathbf{u}}}_{p,{G_d}}} = \left[ {\begin{array}{*{20}{c}} {{x_p} - {L_p}\cos ({\theta _p})}\\ {{y_p} - {L_p}\sin ({\theta _p})} \end{array}} \right] \end{aligned}$$
(92)

where \({{\mathbf{R}}_d}\) is the global position vector of the disk center of mass, \({{\mathbf{R}}_p}\) is the global position vector of the pendulum center of mass, \({{\mathbf{A}}_d}\) is the disk rotation matrix, \({{\mathbf{A}}_p}\) is the pendulum rotation matrix, \({{\bar{\mathbf{u}}}_{d,C}}\) is the local position vector of the contact point C defined with respect to the disk body-fixed reference frame, and \({{\bar{\mathbf{u}}}_{p,{G_d}}}\) is the local position vector of the disk center of mass \(G_d\) defined with respect to the pendulum body-fixed reference system that are, respectively, given by:

$$\begin{aligned} {{\mathbf{R}}_d}= & {} \left[ {\begin{array}{*{20}{c}} {{x_d}}\\ {{y_d}} \end{array}} \right] ,\quad {{\mathbf{R}}_p} = \left[ {\begin{array}{*{20}{c}} {{x_p}}\\ {{y_p}} \end{array}} \right] \end{aligned}$$
(93)
$$\begin{aligned} {{\mathbf{A}}_d}= & {} \left[ {\begin{array}{*{20}{c}} {\cos ({\theta _d})}&{}{ - \sin ({\theta _d})}\\ {\sin ({\theta _d})}&{}{\cos ({\theta _d})} \end{array}} \right] ,\quad {{\mathbf{A}}_p} = \left[ {\begin{array}{*{20}{c}} {\cos ({\theta _p})}&{}{ - \sin ({\theta _p})}\\ {\sin ({\theta _p})}&{}{\cos ({\theta _p})} \end{array}} \right] \end{aligned}$$
(94)
$$\begin{aligned} {{\bar{\mathbf{u}}}_{d,C}}= & {} \left[ {\begin{array}{*{20}{c}} { - {R_d}\sin ({\theta _d})}\\ { - {R_d}\cos ({\theta _d})} \end{array}} \right] ,\quad {{\bar{\mathbf{u}}}_{p,{G_d}}} = \left[ {\begin{array}{*{20}{c}} { - {L_p}}\\ 0 \end{array}} \right] \end{aligned}$$
(95)

The holonomic constraint Jacobian matrix \({{\mathbf{C}}_{\mathbf{q}}}\) of the wheeled inverted pendulum system is given by:

$$\begin{aligned} {{\mathbf{C}}_{\mathbf{q}}} = \left[ {\begin{array}{*{20}{c}} 0&{}1&{}0&{}0&{}0&{}0\\ 1&{}0&{}0&{}{ - 1}&{}0&{}{ - {L_p}\sin \left( {{\theta _p}} \right) }\\ 0&{}1&{}0&{}0&{}{ - 1}&{}{{L_p}\cos \left( {{\theta _p}} \right) } \end{array}} \right] \end{aligned}$$
(96)

The holonomic constraint quadratic velocity vector \({{\mathbf{Q}}_{d,h}}\) of the wheeled inverted pendulum is defined as follows:

$$\begin{aligned} {{\mathbf{Q}}_{d,h}} = \left[ {\begin{array}{*{20}{c}} 0\\ {{L_p}\dot{\theta } _p^2\cos \left( {{\theta _p}} \right) }\\ {{L_p}\dot{\theta } _p^2\sin \left( {{\theta _p}} \right) } \end{array}} \right] \end{aligned}$$
(97)

On the other hand, the pure rolling condition is mathematically expressed by one nonholonomic constraint equation. For this purpose, the longitudinal velocity of the disk contact point C is set equal to zero. Thus, the nonholonomic constraint vector \({\mathbf{D}}\) of the wheeled inverted pendulum can be written as:

$$\begin{aligned} {\mathbf{D}} = {{\mathbf{i}}^\mathrm{T}}{{\mathbf{v}}_{d,C}} = {\dot{x}_d} + {R_d}{\dot{\theta }_d} \end{aligned}$$
(98)

where \({\mathbf{i}}\) is the unit vector associated with the X axis of the absolute reference frame and \({{\mathbf{v}}_{d,C}}\) is the absolute velocity vector of the contact point C that can be explicitly computed as follows:

$$\begin{aligned} {{\mathbf{v}}_{d,C}} = {{\dot{\mathbf{R}}}_d} + {{\dot{\mathbf{A}}}_d}{{\bar{\mathbf{u}}}_{d,C}} = \left[ {\begin{array}{*{20}{c}} {{{\dot{x}}_d} + {R_d}{{\dot{\theta } }_d}}\\ {{{\dot{y}}_d}} \end{array}} \right] \end{aligned}$$
(99)

The nonholonomic constraint Jacobian matrix \({{\mathbf{D}}_{{\dot{\mathbf{q}}}}}\) of the wheeled inverted pendulum system is given by:

$$\begin{aligned} {{\mathbf{D}}_{{\dot{\mathbf{q}}}}} = \left[ {\begin{array}{*{20}{c}} 1&0&{{R_d}}&0&0&0 \end{array}} \right] \end{aligned}$$
(100)

The nonholonomic constraint quadratic velocity vector \({{\mathbf{Q}}_{d,nh}}\) of the wheeled inverted pendulum is defined as follows:

$$\begin{aligned} {{\mathbf{Q}}_{d,nh}} = 0 \end{aligned}$$
(101)

In the case of the wheeled inverted pendulum, one can analytically derive the composite matrices \({\bar{\mathbf{M}}}\), \({\bar{\mathbf{R}}}\), and \({\bar{\mathbf{K}}}\) associated with the general stability analysis of this nonholonomic multibody system employing the computational approach developed in this paper and starting from the system mass matrix \({\mathbf{M}}\), the system total body generalized force vector \({{\mathbf{Q}}_b}\), the total constraint vector \({\mathbf{E}}\), the total constraint Jacobian matrix \({\mathbf{J}}\), and the total constraint quadratic velocity vector \({{\mathbf{Q}}_d}\). To this end, one can write the matrix blocks that form the composite mass matrix \({\bar{\mathbf{M}}}\) of the wheeled inverted pendulum as:

$$\begin{aligned} \left\{ \begin{array}{l} {{{\bar{\mathbf{M}}}}_{1,1}} = \mathrm{{diag}}({m_d},{m_d}, {I_{zz,d}},{m_p},{m_p},{I_{zz,p}}),\quad {{{\bar{\mathbf{M}}}}_{1,2}} = {\mathbf{O}}\\ \\ {{{\bar{\mathbf{M}}}}_{2,1}} = {\mathbf{O}},\quad {{{\bar{\mathbf{M}}}}_{2,2}} = {\mathbf{O}} \end{array} \right. \end{aligned}$$
(102)

The matrix blocks that form the composite damping matrix \({\bar{\mathbf{R}}}\) of the wheeled inverted pendulum are given by:

$$\begin{aligned} \left\{ \begin{array}{l} {{{\bar{\mathbf{R}}}}_{1,1}} = {\mathbf{O}},\quad {{{\bar{\mathbf{R}}}}_{1,2}} = {\mathbf{O}}\\ \\ {{{\bar{\mathbf{R}}}}_{2,1}} = \left[ {\begin{array}{*{20}{c}} 0&{}0&{}0&{}0&{}0&{}0\\ 0&{}0&{}0&{}0&{}0&{}0\\ 0&{}0&{}0&{}0&{}0&{}0\\ 1&{}0&{}{{R_d}}&{}0&{}0&{}0 \end{array}} \right] ,\quad {{{\bar{\mathbf{R}}}}_{2,2}} = {\mathbf{O}} \end{array} \right. \end{aligned}$$
(103)

The matrix blocks that form the composite stiffness matrix \({\bar{\mathbf{K}}}\) of the wheeled inverted pendulum are defined as follows:

$$\begin{aligned} \left\{ \begin{array}{l} {{{\bar{\mathbf{K}}}}_{1,1}} = \left[ {\begin{array}{*{20}{c}} 0&{}0&{}0&{}0&{}0&{}0\\ 0&{}0&{}0&{}0&{}0&{}0\\ 0&{}0&{}0&{}0&{}0&{}0\\ 0&{}0&{}0&{}0&{}0&{}0\\ 0&{}0&{}0&{}0&{}0&{}0\\ 0&{}0&{}0&{}0&{}0&{}{ - {L_p}\left( {{\lambda _2}\cos ({\theta _p}) + {\lambda _3}\sin ({\theta _p})} \right) } \end{array}} \right] \\ \;\\ {{{\bar{\mathbf{K}}}}_{1,2}} = \left[ {\begin{array}{*{20}{c}} 0&{}1&{}0&{}1\\ 1&{}0&{}1&{}0\\ 0&{}0&{}0&{}{{R_d}}\\ 0&{}{ - 1}&{}0&{}0\\ 0&{}0&{}{ - 1}&{}0\\ 0&{}{ - {L_p}\sin ({\theta _p})}&{}{{L_p}\cos ({\theta _p})}&{}0 \end{array}} \right] \\ \;\\ {{{\bar{\mathbf{K}}}}_{2,1}} = \left[ {\begin{array}{*{20}{c}} 0&{}1&{}0&{}0&{}0&{}0\\ 1&{}0&{}0&{}{ - 1}&{}0&{}{ - {L_p}\sin ({\theta _p})}\\ 0&{}1&{}0&{}0&{}{ - 1}&{}{{L_p}\cos ({\theta _p})}\\ 0&{}0&{}0&{}0&{}0&{}0 \end{array}} \right] \\ \\ {{{\bar{\mathbf{K}}}}_{2,2}} = {\mathbf{O}} \end{array} \right. \end{aligned}$$
(104)

where \({\mathbf{O}}\) is the zero matrix, while \({\lambda _1} \equiv {\lambda _1}(t)\), \({\lambda _2} \equiv {\lambda _2}(t)\), and \({\lambda _3} \equiv {\lambda _3}(t)\) are the Lagrange multipliers associated with the holonomic constraint equations, and \({\mu } \equiv {\mu }(t)\) is the Lagrange multiplier associated with the nonholonomic constraint equation.

The linearization point of the configuration space used for the stability analysis of the wheeled inverted pendulum is identified by the following generalized vectors:

$$\begin{aligned} {{\mathbf{q}}_0} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{q}}_{d,0}}}\\ {{{\mathbf{q}}_{p,0}}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {{x_{d,0}}}\\ {{y_{d,0}}}\\ {{\theta _{d,0}}}\\ {{x_{p,0}}}\\ {{y_{p,0}}}\\ {{\theta _{p,0}}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} 0\\ {{R_d}}\\ 0\\ 0\\ {{R_d} + {L_p}}\\ {\frac{\pi }{2}} \end{array}} \right] ,\quad {{\dot{\mathbf{q}}}_0} = {{\ddot{\mathbf{q}}}_0} = {\mathbf{0}} \end{aligned}$$
(105)

In Table 4, the eigenvalues resulting from the stability study of the wheeled inverted pendulum derived by employing the proposed method are reported and used as the reference solution, while the eigenvalue errors concerning the reference solution arising from the application of the other fundamental techniques of classical mechanics are listed immediately after.

Table 4 Wheeled inverted pendulum eigenvalues

As expected, it is apparent that the reference configuration considered for carrying out the stability study is an unstable equilibrium configuration since the significant eigenvalue found is real and positive. Moreover, the numerical results that are shown in Table 4 indicate that there are only small errors due to the differences in the algorithms used to determine the solution. On the other hand, after the stability analysis, the nonlinear equations of motion of the wheeled inverted pendulum are numerically solved to investigate the qualitative and quantitative information resulting from the stability study by analyzing the angular displacement and the angular velocity of the pendulum. To this end, the initial conditions of the nonlinear analysis involve a small perturbation from the equilibrium configuration and are given by:

$$\begin{aligned} \left\{ \begin{array}{l} {x_{d,s}} = 0\\ {y_{d,s}} = {R_d}\\ {\theta _{d,s}} = 0\\ {x_{p,s}} = {L_p}\cos ({\theta _{p,s}})\\ {y_{p,s}} = {R_d} + {L_p}\sin ({\theta _{p,s}})\\ {\theta _{p,s}} = {\theta _{p,0}} + \varepsilon \end{array} \right. ,\quad \left\{ \begin{array}{l} {{\dot{x}}_{d,s}} = 0\\ {{\dot{y}}_{d,s}} = 0\\ {{\dot{\theta } }_{d,s}} = 0\\ {{\dot{x}}_{p,s}} = 0\\ {{\dot{y}}_{p,s}} = 0\\ {{\dot{\theta } }_{p,s}} = 0 \end{array} \right. ,\quad \varepsilon = \frac{\pi }{{18}} \end{aligned}$$
(106)

where \({x_{d,s}}\) is the initial horizontal displacement of the disk center of mass, \({y_{d,s}}\) is the initial vertical displacement of the disk center of mass, \({\theta _{d,s}}\) is the initial angular displacement of the disk, \({x_{p,s}}\) is the initial horizontal displacement of the pendulum center of mass, \({y_{p,s}}\) is the initial vertical displacement of the pendulum center of mass, \({\theta _{p,s}}\) is the initial angular displacement of the pendulum, \({{\dot{x}}_{d,s}}\) is the initial horizontal velocity of the disk center of mass, \({{\dot{y}}_{d,s}}\) is the initial vertical velocity of the disk center of mass, \({{\dot{\theta } }_{d,s}}\) is the initial angular velocity of the disk, \({{\dot{x}}_{p,s}}\) is the initial horizontal velocity of the pendulum center of mass, \({{\dot{y}}_{p,s}}\) is the initial vertical velocity of the pendulum center of mass, \({{\dot{\theta } }_{d,s}}\) is the initial angular velocity of the pendulum, and \(\varepsilon \) represents the perturbation. The time step employed for carrying out the numerical simulation is \(\varDelta t = {10^{ - 3}}\;(s)\), whereas the time interval used for studying the dynamic behavior of the wheeled inverted pendulum system is \({T_s} = 10\;(s)\). In Fig. 4, the numerical results of the dynamical simulation are shown; that is, Fig. 4(a) represents the angular displacement of the pendulum, while Fig. 4(b) represents its angular velocity.

Fig. 4
figure 4

Angular displacement \({\theta }_p\) and angular velocity \({\dot{\theta }}_p\) of the second body of the wheeled inverted pendulum

Fig. 5
figure 5

Spinning top multibody model

The numerical results arising from the nonlinear dynamic analysis of the wheeled inverted pendulum confirm the stability properties found by means of the linear stability analysis.

5.3 Spinning top

The third benchmark example is a three-dimensional spinning top modeled as a holonomic multibody system. This holonomic mechanical system is shown in Fig. 5. The numerical data used for the system parameters are reported in Table 5. The spinning top is a three-dimensional holonomic multibody system composed of one rigid body, one spherical joint collocated in the point O of Fig. 5, and one driven motion constraint applied to the rotation of the system around its vertical axis. Half of the height of the top is denoted with H, the mass of the top is denoted with m, the principal mass moments of inertia of the top are, respectively, denoted with \({I_{xx}}\), \({I_{yy}}\), and \({I_{zz}}\), while the gravitational acceleration is denoted with g. Although the spinning top is a mechanical system endowed with \(n_f = 2\) degrees of freedom, when a redundant coordinate formulation approach is assumed for modeling this multibody system, one needs to employ a vector of \(n_q = 6\) generalized coordinates. To this end, consider the following vector of generalized coordinates denoted with \({\mathbf{q}} \equiv {\mathbf{q}}(t)\):

$$\begin{aligned} {\mathbf{R}} = {\left[ {\begin{array}{*{20}{c}} x&y&z \end{array}} \right] ^\mathrm{T}},\quad {\varvec{\theta }} = {\left[ {\begin{array}{*{20}{c}} \phi&\theta&\psi \end{array}} \right] ^\mathrm{T}} \end{aligned}$$
(107)

and

$$\begin{aligned} {\mathbf{q}} = {\left[ {\begin{array}{*{20}{c}} {{{\mathbf{R}}^\mathrm{T}}}&{{{\varvec{\theta }}^\mathrm{T}}} \end{array}} \right] ^\mathrm{T}} = {\left[ {\begin{array}{*{20}{c}} x&y&z&\phi&\theta&\psi \end{array}} \right] ^\mathrm{T}} \end{aligned}$$
(108)

where \({\mathbf{R}} \equiv {\mathbf{R}}(t)\) is the vector of translational coordinates of the spinning top, \({\varvec{\theta }} \equiv {\varvec{\theta }}(t)\) is the vector of rotational coordinates of the spinning top that coincides with the set of Euler angles based on the sequence X-Y-Z, \(x \equiv x(t)\) is the horizontal displacement of the top center of mass, \(y \equiv y(t)\) is the lateral displacement of the top center of mass, \(z \equiv z(t)\) is the vertical displacement of the top center of mass, \(\phi \equiv \phi (t)\) is the roll angular displacement of the top, \(\theta \equiv \theta (t)\) is the pitch angular displacement of the top, and \(\psi \equiv \psi (t)\) is the yaw angular displacement of the top. The kinetic energy T and the potential energy U of the spinning top are, respectively, given by:

$$\begin{aligned} T = \frac{1}{2}m{\mathbf{v}}_G^\mathrm{T}{{\mathbf{v}}_G} + \frac{1}{2}{{{\bar{\varvec{\omega }} }}^\mathrm{T}}{{\bar{\mathbf{I}}}_G}{\bar{{\varvec{\omega }} }},\quad U = mgz \end{aligned}$$
(109)

where \({{\mathbf{v}}_G} \equiv {{\mathbf{v}}_G}(t)\) is the global linear velocity of the center of mass G of the spinning top and \({\varvec{\bar{\omega } }} \equiv {\varvec{\bar{\omega } }}(t)\) is the local angular velocity of the spinning top which can be, respectively, written as follows:

$$\begin{aligned} {{\mathbf{v}}_G} = {\dot{\mathbf{R}}},\quad {\bar{\varvec{\omega } }} = {\bar{\mathbf{G}}} \dot{\varvec{\theta }} \end{aligned}$$
(110)

where the \(3 \times 3\) transformation matrix denoted with \({\bar{\mathbf{G}}} \equiv {\bar{\mathbf{G}}}(t)\) is associated with the X-Y-Z sequence of Euler angles and is defined as:

$$\begin{aligned} {\bar{\mathbf{G}}} = \left[ {\begin{array}{*{20}{c}} {\cos (\theta )\cos (\psi )}&{}{\sin (\psi )}&{}0\\ { - \cos (\theta )\sin (\psi )}&{}{\cos (\psi )}&{}0\\ {\sin (\theta )}&{}0&{}1 \end{array}} \right] \end{aligned}$$
(111)
Table 5 Spinning top physical parameters

On the other hand, the \(3 \times 3\) matrix denoted with \({{\bar{\mathbf{I}}}_G}\) that appears in Equation 109 is the principal inertia matrix of the spinning top referred to its center of mass and is given by:

$$\begin{aligned} {{\bar{\mathbf{I}}}_G} = \mathrm{{diag}}({I_{xx}},{I_{yy}},{I_{zz}}) \end{aligned}$$
(112)

The mass matrix \({\mathbf{M}}\) and the total body generalized force vector \({{\mathbf{Q}}_b}\) of the spinning top can be, respectively, written as follows:

$$\begin{aligned} {\mathbf{M}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{M}}_{1,1}}}&{}{\mathbf{O}}\\ {\mathbf{O}}&{}{{{\mathbf{M}}_{2,2}}} \end{array}} \right] ,\quad {{\mathbf{Q}}_b} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{Q}}_{b,1}}}\\ {{{\mathbf{Q}}_{b,2}}} \end{array}} \right] \end{aligned}$$
(113)

where \({\mathbf{O}}\) is the \(3 \times 3\) zero matrix, \({\mathbf{I}}\) is the \(3 \times 3\) identity matrix, and

$$\begin{aligned} {{\mathbf{M}}_{1,1}}= & {} m{\mathbf{I}} = \mathrm{{diag}}(m,m,m) \end{aligned}$$
(114)
$$\begin{aligned} {{\mathbf{M}}_{2,2}}= & {} {{{\bar{\mathbf{G}}}}^\mathrm{T}}{{{\bar{\mathbf{I}}}}_G}{\bar{\mathbf{G}}}\nonumber \\= & {} \left[ {\begin{array}{*{20}{c}} {{I_{zz}}\mathrm{{s}}_\theta ^2 + {I_{xx}}\mathrm{{c}}_\psi ^2\mathrm{{c}}_\theta ^2 + {I_{yy}}\mathrm{{c}}_\theta ^2\mathrm{{s}}_\psi ^2}&{}{({I_{xx}} - {I_{yy}}){\mathrm{{c}}_\psi }{\mathrm{{s}}_\psi }{\mathrm{{c}}_\theta }}&{}{{I_{zz}}{\mathrm{{s}}_\theta }}\\ {({I_{xx}} - {I_{yy}}){\mathrm{{c}}_\psi }{\mathrm{{s}}_\psi }{\mathrm{{c}}_\theta }}&{}{{I_{xx}} - \mathrm{{c}}_\psi ^2({I_{xx}} - {I_{yy}})}&{}0\\ {{I_{zz}}{\mathrm{{s}}_\theta }}&{}0&{}{{I_{zz}}} \end{array}} \right] \end{aligned}$$
(115)

and

$$\begin{aligned} {{\mathbf{Q}}_{b,1}}= & {} m{\mathbf{g}} = {\left[ {\begin{array}{*{20}{c}} 0&0&{ - mg} \end{array}} \right] ^\mathrm{T}} \end{aligned}$$
(116)
$$\begin{aligned} {{\mathbf{Q}}_{b,2}}= & {} - {{{\bar{\mathbf{G}}}}^\mathrm{T}}{{{\tilde{\bar{\varvec{\omega }} }}}}{{{\bar{\mathbf{I}}}}_G}{\bar{{\varvec{\omega }} }} - {{{\bar{\mathbf{G}}}}^\mathrm{T}}{{{\bar{\mathbf{I}}}}_G}{{{\dot{\bar{\mathbf{G} }}} {\dot{\varvec{\theta } } }}}\nonumber \\= & {} \left[ {\begin{array}{*{20}{c}} \begin{array}{l} \dot{\psi } \dot{\theta } {\mathrm{{c}}_\theta }\left( {{I_{xx}} - {I_{yy}} - {I_{zz}}} \right) + \dot{\phi } \dot{\theta } {s_{2\theta }}\left( {{I_{yy}} - {I_{zz}}} \right) \\ + {{\dot{\theta } }^2}{\mathrm{{c}}_\psi }{\mathrm{{s}}_\psi }{\mathrm{{s}}_\theta }\left( {{I_{xx}} - {I_{yy}}} \right) + 2\dot{\psi } \dot{\theta } {\mathrm{{c}}_\theta }\mathrm{{c}}_\psi ^2\left( {{I_{yy}} - {I_{xx}}} \right) \\ + 2\dot{\phi } \dot{\psi } \mathrm{{c}}_\theta ^2{c_\psi }{s_\psi }\left( {{I_{xx}} - {I_{yy}}} \right) + 2\dot{\phi } \dot{\theta } \mathrm{{c}}_\psi ^2{c_\theta }{s_\theta }\left( {{I_{xx}} - {I_{yy}}} \right) \end{array}\\ {}\\ \begin{array}{l} \frac{1}{2}{{\dot{\phi } }^2}{s_{2\theta }}\left( {{I_{zz}} - {I_{yy}}} \right) + \dot{\phi } \dot{\psi } {c_\theta }\left( {{I_{xx}} - {I_{yy}} + {I_{zz}}} \right) \\ + \dot{\psi } \dot{\theta } {s_{2\psi }}\left( {{I_{yy}} - {I_{xx}}} \right) + {{\dot{\phi } }^2}\mathrm{{c}}_\psi ^2{c_\theta }{s_\theta }\left( {{I_{yy}} - {I_{xx}}} \right) \\ + 2\dot{\phi } \dot{\psi }\mathrm{{c}}_\psi ^2{c_\theta }\left( {{I_{yy}} - {I_{xx}}} \right) \end{array}\\ \\ \begin{array}{l} \left( {{I_{yy}} - {I_{xx}}} \right) \left( {\dot{\phi } \dot{\theta } {c_\theta } - {{\dot{\theta } }^2}{c_\psi }{s_\psi } + {{\dot{\phi } }^2}{c_\psi }\mathrm{{c}}_\theta ^2{s_\psi } - 2\dot{\phi } \dot{\theta } \mathrm{{c}}_\psi ^2{c_\theta }} \right) \\ - {I_{zz}}\dot{\phi } \dot{\theta } {c_\theta } \end{array} \end{array}} \right] \end{aligned}$$
(117)

where \({c_\alpha }\) is the abbreviation of \(\cos (\alpha )\), \({s_\alpha }\) is the abbreviation of \(\sin (\alpha )\), \({\mathbf{g}}\) is the gravitational acceleration vector oriented towards the negative versus of the Z axis, and \({{\varvec{\tilde{\bar{\omega }} }}}\) is the skew-symmetric matrix associated with the cross product with the axial vector \({{\varvec{\bar{\omega }}}}\). The holonomic constraint vector \(\mathbf {C}\) of the spinning top system due to the presence of the spherical joint in the point O of Fig. 5 as well as to the imposition of the rotational motion of the spinning top can be readily written as:

$$\begin{aligned} {\mathbf{C}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{r}}_O}}\\ {\psi - \omega t} \end{array}} \right] \end{aligned}$$
(118)

where \({{{\mathbf{r}}_O}}\) is the global position vector of the point O collocated at the bottom of the top and \(\omega \) is the magnitude of the angular velocity imposed to the system yaw angular displacement. The absolute position vector of the point O of Fig. 5 can be expressed as:

$$\begin{aligned} {{\mathbf{r}}_O} = {\mathbf{R}} + {\mathbf{A}}{{\bar{\mathbf{u}}}_O} = \left[ {\begin{array}{*{20}{c}} {x - H\sin (\theta )}\\ {y + H\sin (\phi )\cos (\theta )}\\ {z - H\cos (\phi )\cos (\theta )} \end{array}} \right] \end{aligned}$$
(119)

where \({\mathbf{A}}\) is the top rotation matrix and \({{\bar{\mathbf{u}}}_O}\) is the local position vector of the point O defined with respect to the top body-fixed reference system. These vector and matrix quantities are, respectively, defined as:

$$\begin{aligned} {{\bar{\mathbf{u}}}_O} = \left[ {\begin{array}{*{20}{c}} 0\\ 0\\ { - H} \end{array}} \right] ,\quad {\mathbf{A}} = {{\mathbf{A}}_{{\bar{x}}}}{{\mathbf{A}}_{{\bar{y}}}}{{\mathbf{A}}_{{\bar{z}}}} \end{aligned}$$
(120)

where

$$\begin{aligned} {{\mathbf{A}}_{{\bar{x}}}} = \left[ {\begin{array}{*{20}{c}} 1&{}0&{}0\\ 0&{}{\cos (\phi )}&{}{ - \sin (\phi )}\\ 0&{}{\sin (\phi )}&{}{\cos (\phi )} \end{array}} \right] ,\quad {{\mathbf{A}}_{{\bar{y}}}} = \left[ {\begin{array}{*{20}{c}} {\cos (\theta )}&{}0&{}{\sin (\theta )}\\ 0&{}1&{}0\\ { - \sin (\theta )}&{}0&{}{\cos (\theta )} \end{array}} \right] \end{aligned}$$
(121)

and

$$\begin{aligned} {{\mathbf{A}}_{{\bar{z}}}} = \left[ {\begin{array}{*{20}{c}} {\cos (\psi )}&{}{ - \sin (\psi )}&{}0\\ {\sin (\psi )}&{}{\cos (\psi )}&{}0\\ 0&{}0&{}1 \end{array}} \right] \end{aligned}$$
(122)

The holonomic constraint Jacobian matrix \({{\mathbf{C}}_{\mathbf{q}}}\) of the spinning top system is given by:

$$\begin{aligned} {{\mathbf{C}}_{\mathbf{q}}} = \left[ {\begin{array}{*{20}{c}} 1&{}0&{}0&{}0&{}{ - H\cos \left( \theta \right) }&{}0\\ 0&{}1&{}0&{}{H\cos \left( \phi \right) \cos \left( \theta \right) }&{}{ - H\sin \left( \phi \right) \sin \left( \theta \right) }&{}0\\ 0&{}0&{}1&{}{H\sin \left( \phi \right) \cos \left( \theta \right) }&{}{H\cos \left( \phi \right) \sin \left( \theta \right) }&{}0\\ 0&{}0&{}0&{}0&{}0&{}1 \end{array}} \right] \end{aligned}$$
(123)

The holonomic constraint quadratic velocity vector \({{\mathbf{Q}}_{d,h}}\) of the spinning top system is defined as follows:

$$\begin{aligned} {{\mathbf{Q}}_{d,h}} = \left[ {\begin{array}{*{20}{c}} { - H{{\dot{\theta } }^2}\sin \left( \theta \right) }\\ {H\sin \left( \phi \right) \cos \left( \theta \right) \left( {{{\dot{\phi } }^2} + {{\dot{\theta } }^2}} \right) + 2H\cos \left( \phi \right) \sin \left( \theta \right) \dot{\phi } \dot{\theta } }\\ { - H\cos \left( \phi \right) \cos \left( \theta \right) \left( {{{\dot{\phi } }^2} + {{\dot{\theta } }^2}} \right) + 2H\sin \left( \phi \right) \sin \left( \theta \right) \dot{\phi } \dot{\theta } }\\ 0 \end{array}} \right] \end{aligned}$$
(124)

In the case of the spinning top, one can analytically derive the composite matrices \({\bar{\mathbf{M}}}\), \({\bar{\mathbf{R}}}\), and \({\bar{\mathbf{K}}}\) associated with the general stability analysis of this holonomic multibody system by using the computational approach developed in this paper and starting from the system mass matrix \({\mathbf{M}}\), the system total body generalized force vector \({{\mathbf{Q}}_b}\), the system constraint vector \({\mathbf{C}}\), the system constraint Jacobian matrix \({{\mathbf{C}}_{\mathbf{q}}}\), and the system constraint quadratic velocity vector \({{\mathbf{Q}}_{d,h}}\). However, the composite matrices of the spinning top are too large to be written in a concise form and, therefore, are not reported herein.

In the case of the spinning top, the magnitude of the angular velocity \(\omega \) imposed by employing a driven motion holonomic constraint can be used as a free parameter for studying the stability properties of the system. For this purpose, the linearization point of the configuration space used for the stability analysis of the spinning top is identified by the following generalized vectors:

$$\begin{aligned} {{\mathbf{q}}_0} = \left[ {\begin{array}{*{20}{c}} {{x_0}}\\ {{y_0}}\\ {{z_0}}\\ {{\phi _0}}\\ {{\theta _0}}\\ {{\psi _0}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} 0\\ 0\\ H\\ 0\\ 0\\ 0 \end{array}} \right] ,\quad {{\dot{\mathbf{q}}}_0} = \left[ {\begin{array}{*{20}{c}} {{{\dot{x}}_0}}\\ {{{\dot{y}}_0}}\\ {{{\dot{z}}_0}}\\ {{{\dot{\phi } }_0}}\\ {{{\dot{\theta } }_0}}\\ {{{\dot{\psi } }_0}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} 0\\ 0\\ 0\\ 0\\ 0\\ \omega \end{array}} \right] ,\quad {{\ddot{\mathbf{q}}}_0} = {\mathbf{0}} \end{aligned}$$
(125)

As expected, the eigenvalues of the linearized system depend on the angular velocity \(\omega \) employed as a free parameter of the stability study. In particular, there are two critical angular velocities equal to \({\omega _c} = \pm 5.6\) (rad/s) that delimit the border between an instability region and a marginally stable one, as it is apparent from the stability map represented in Fig. 6, as well as by observing the root locus shown in Fig. 7, both referred to the spinning top system.

Fig. 6
figure 6

Spinning top stability map. The solid line () represents the real part of the eigenvalues, while the dashed line () represents the corresponding imaginary part. The critical angular velocities of the spinning top are, respectively, equal to \({\omega _c} = \pm 5.6\) (rad/s)

Fig. 7
figure 7

Spinning top root locus. The solid line () and the dashed line () represent the eigenvalue pairs of the system. The square symbol \(\left( \square \right) \) indicates the eigenvalue pairs for \(\omega =0\) (rad/s), while the circle symbol \(\left( \circ \right) \) indicates the eigenvalue pairs for \(\omega =10\) (rad/s). The critical angular velocities of the spinning top are, respectively, equal to \({\omega _c} = \pm 5.6\) (rad/s) and are indicated with the diamond symbol \(\left( \diamond \right) \)

In Table 6, the eigenvalues of the spinning top for \(\omega =4\) (rad/s), \(\omega =5.6\) (rad/s), and \(\omega =10\) (rad/s) are reported.

In Table 6, the eigenvalues resulting from the stability study of the spinning top carried out with the proposed method are used as the reference solution, whereas the eigenvalue errors with respect to the reference solution arising from the application of the other fundamental techniques of applied mechanics are listed immediately after. The numerical results presented in Table 6 demonstrate that there are only negligible errors due to the numerical procedure and the different algorithms used to compute the solution. Furthermore, for a value of the angular velocity equal to \(\omega =6\) (rad/s), which is above the critical value, the system is perturbed from the initial equilibrium state to verify its dynamic behavior. To this end, the following set of initial conditions is considered:

$$\begin{aligned} \left\{ \begin{array}{l} {x_s} = H\sin ({\theta _s})\\ {y_s} = - H\sin ({\phi _s})\cos ({\theta _s})\\ {z_s} = H\cos ({\phi _s})\cos ({\theta _s})\\ {\phi _s} = 0\\ {\theta _s} = {\theta _0} + \varepsilon \\ {\psi _s} = 0 \end{array} \right. ,\quad \left\{ \begin{array}{l} {{\dot{x}}_s} = 0\\ {{\dot{y}}_s} = 0\\ {{\dot{z}}_s} = 0\\ {{\dot{\phi } }_s} = 0\\ {{\dot{\theta } }_s} = 0\\ {{\dot{\psi } }_s} = \omega \end{array} \right. ,\quad \varepsilon = \frac{\pi }{{36}} \end{aligned}$$
(126)

where \({x_s}\) is the initial horizontal displacement of the top center of mass, \({y_s}\) is the initial lateral displacement of the top center of mass, \({z_s}\) is the initial vertical displacement of the top center of mass, \({\phi _s}\) is the initial roll angular displacement of the top, \({\theta _s}\) is the initial pitch angular displacement of the top, \({\psi _s}\) is the initial yaw angular displacement of the top, \({{\dot{x}}_s}\) is the initial horizontal velocity of the top center of mass, \({{\dot{y}}_s}\) is the initial lateral velocity of the top center of mass, \({{\dot{z}}_s}\) is the initial vertical velocity of the top center of mass, \({{\dot{\phi } }_s}\) is the initial roll angular velocity of the top, \({{\dot{\theta }}_s}\) is the initial pitch angular velocity of the top, \({{\dot{\psi } }_s}\) is the initial yaw angular velocity of the top, and \(\varepsilon \) represents the perturbation. The time step employed for carrying out the numerical simulation is \(\varDelta t = {10^{ - 3}}\;(s)\), whereas the time interval used for studying the dynamic behavior of the spinning top system is \({T_s} = 60\;(s)\). The numerical results of the dynamical simulation are shown in Figs. 8 and 9.

Table 6 Spinning top eigenvalues
Fig. 8
figure 8

Roll angular displacement \(\phi \) and roll angular velocity \(\dot{\phi }\) of the spinning top in the stable region for \(\omega =6.0\) (rad/s)

Fig. 9
figure 9

Pitch angular displacement \(\theta \) and pitch angular velocity \(\dot{\theta }\) of the spinning top in the stable region for \(\omega =6.0\) (rad/s)

In particular, Figs. 8a and 9a, respectively, represent the roll angular displacement and the pitch angular displacement of the spinning top, while the corresponding angular velocities are, respectively, shown in Figs. 8b and 9b. The numerical results arising from the nonlinear dynamic analysis of the spinning top confirm the stability properties found by means of the linear stability analysis.

5.4 Rolling disk

The fourth numerical example is a three-dimensional rolling disk modeled as a nonholonomic multibody system. This nonholonomic mechanical system is shown in Fig. 10.

Fig. 10
figure 10

Rolling disk multibody model

The numerical data used for the system parameters are reported in Table 7.

Table 7 Rolling disk physical parameters

The rolling disk is a three-dimensional nonholonomic multibody system composed of one rigid body, one contact constraint between the disk and the ground collocated in the point C of Fig. 10, one driven motion constraint applied to the rotation of the system around its vertical axis, and two pure rolling nonholonomic constraints collocated in the point C of Fig. 10. The radius of the disk is indicated with R, the width of the disk is indicated with W, the mass of the disk is indicated with m, the principal mass moments of inertia of the disk are, respectively, indicated with \({I_{xx}}\), \({I_{yy}}\), and \({I_{zz}}\), while the gravitational acceleration is indicated with g. Although the rolling disk is a mechanical system endowed with \(n_f = 4\) degrees of freedom, when a redundant coordinate formulation approach is used for modeling this multibody system, a vector of \(n_q = 6\) generalized coordinates is necessary. For this purpose, the generalized coordinate vector \({\mathbf{q}}\) of the rolling disk is identical to the generalized coordinate vector of the spinning top given in Equation 108. Consequently, the mass matrix \({\mathbf{M}}\) and the total body generalized force vector \({{\mathbf{Q}}_b}\) of the rolling disk are also identical to those of the spinning top reported in Equation 113. The total vector of holonomic constraints \(\mathbf {C}\) of the rolling disk system due to the presence of the contact between the disk and the ground in the point C of Fig. 10, as well as to the imposition of the rotational motion of the rolling disk, can be readily written as:

$$\begin{aligned} {\mathbf{C}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{k}}^\mathrm{T}}{{\mathbf{r}}_C}}\\ {\psi - \omega t} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {z - R\sin (\phi )}\\ {\psi - \omega t} \end{array}} \right] \end{aligned}$$
(127)

where \({\mathbf{k}}\) is the unit vector associated with the Z axis of the absolute reference frame, \({{{\mathbf{r}}_{C}}}\) is the global position of the contact point C collocated on the disk, and \(\omega \) is the magnitude of the angular velocity imposed to the system pitch angular displacement. The position vector \({{{\mathbf{r}}_{C}}}\) is explicitly defined as follows:

$$\begin{aligned} {{\mathbf{r}}_C} = {\mathbf{R}} + {\mathbf{A}}{{\bar{\mathbf{u}}}_C} = \left[ {\begin{array}{*{20}{c}} x\\ {y - R\cos (\phi )}\\ {z - R\sin (\phi )} \end{array}} \right] \end{aligned}$$
(128)

where \({{\mathbf{R}}}\) is the global position vector of the disk center of mass, \({{\mathbf{A}}}\) is the disk rotation matrix, and \({{\bar{\mathbf{u}}}_{C}}\) is the local position vector of the contact point C defined with respect to the disk body-fixed reference frame given by:

$$\begin{aligned} {{\bar{\mathbf{u}}}_C} = \left[ {\begin{array}{*{20}{c}} { - R\sin (\psi )}\\ { - R\cos (\psi )}\\ 0 \end{array}} \right] \end{aligned}$$
(129)

The holonomic constraint Jacobian matrix \({{\mathbf{C}}_{\mathbf{q}}}\) of the rolling disk system is given by:

$$\begin{aligned} {{\mathbf{C}}_{\mathbf{q}}} = \left[ {\begin{array}{*{20}{c}} 0&{}0&{}1&{}{ - R\cos \left( \phi \right) }&{}0&{}0\\ 0&{}0&{}0&{}0&{}0&{}1 \end{array}} \right] \end{aligned}$$
(130)

The holonomic constraint quadratic velocity vector \({{\mathbf{Q}}_{d,h}}\) of the rolling disk is defined as follows:

$$\begin{aligned} {{\mathbf{Q}}_{d,h}} = \left[ {\begin{array}{*{20}{c}} { - {{\dot{\phi } }^2}R\sin \left( \phi \right) }\\ 0 \end{array}} \right] \end{aligned}$$
(131)

On the other hand, the pure rolling condition is mathematically expressed by two nonholonomic constraint equations. For this purpose, the longitudinal and lateral velocities of the disk contact point C are set equal to zero. Thus, the nonholonomic constraint vector \({\mathbf{D}}\) of the rolling disk can be written as:

$$\begin{aligned} {\mathbf{D}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{i}}^\mathrm{T}}{{\mathbf{v}}_C}}\\ {{{\mathbf{j}}^\mathrm{T}}{{\mathbf{v}}_C}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} {\dot{x} + R\cos (\theta )\dot{\psi } }\\ {\dot{y} + R\sin (\phi )\left( {\dot{\phi } + \sin (\theta )\dot{\psi } } \right) } \end{array}} \right] \end{aligned}$$
(132)

where \({\mathbf{i}}\) is the unit vector associated with the X axis of the absolute reference frame, \({\mathbf{j}}\) is the unit vector associated with the Y axis of the absolute reference frame, and \({{\mathbf{v}}_{C}}\) is the absolute velocity vector of the contact point C that can be explicitly computed as follows:

$$\begin{aligned} {{\mathbf{v}}_C} = {\dot{\mathbf{R}}} + {\dot{\mathbf{A}}}{{\bar{\mathbf{u}}}_C} = \left[ {\begin{array}{*{20}{c}} {\dot{x} + R\cos (\theta )\dot{\psi } }\\ {\dot{y} + R\sin (\phi )\left( {\dot{\phi } + \sin (\theta )\dot{\psi } } \right) }\\ {\dot{z} - R\cos (\phi )\left( {\dot{\phi } + \sin (\theta )\dot{\psi } } \right) } \end{array}} \right] \end{aligned}$$
(133)

The nonholonomic constraint Jacobian matrix \({{\mathbf{D}}_{{\dot{\mathbf{q}}}}}\) of the rolling disk system is given by:

$$\begin{aligned} {{\mathbf{D}}_{{\dot{\mathbf{q}}}}} = \left[ {\begin{array}{*{20}{c}} 1&{}0&{}0&{}0&{}0&{}{R\cos \left( \theta \right) }\\ 0&{}1&{}0&{}{R\sin \left( \phi \right) }&{}0&{}{R\sin \left( \phi \right) \sin \left( \theta \right) } \end{array}} \right] \end{aligned}$$
(134)

The nonholonomic constraint quadratic velocity vector \({{\mathbf{Q}}_{d,nh}}\) of the rolling disk is defined as follows:

$$\begin{aligned} {{\mathbf{Q}}_{d,nh}} = \left[ {\begin{array}{*{20}{c}} {R\dot{\psi } \dot{\theta } \sin \left( \theta \right) }\\ { - R\dot{\phi } \cos \left( \phi \right) \left( {\dot{\phi } + \dot{\psi }\sin \left( \theta \right) } \right) - R\dot{\theta } \dot{\psi } \cos \left( \theta \right) \sin \left( \phi \right) } \end{array}} \right] \end{aligned}$$
(135)

In the case of the rolling disk, one can analytically derive the composite matrices \({\bar{\mathbf{M}}}\), \({\bar{\mathbf{R}}}\), and \({\bar{\mathbf{K}}}\) associated with the general stability analysis of this nonholonomic multibody system by using the computational approach developed in this paper and starting from the system mass matrix \({\mathbf{M}}\), the system total body generalized force vector \({{\mathbf{Q}}_b}\), the total constraint vector \({\mathbf{E}}\), the total constraint Jacobian matrix \({\mathbf{J}}\), and the total constraint quadratic velocity vector \({{\mathbf{Q}}_d}\). However, the composite matrices of the rolling disk are too large to be written in a concise form and, therefore, are not reported herein.

It is important to note that, in the case of the rolling disk, the magnitude of the angular velocity \(\omega \) imposed by employing a driven motion holonomic constraint can be employed as a free parameter for studying the stability properties of the system. To this end, the linearization point of the configuration space used for the stability analysis of the rolling disk is identified by the following generalized vectors:

$$\begin{aligned} {{\mathbf{q}}_0} = \left[ {\begin{array}{*{20}{c}} {{x_0}}\\ {{y_0}}\\ {{z_0}}\\ {{\phi _0}}\\ {{\theta _0}}\\ {{\psi _0}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} 0\\ 0\\ R\\ {\frac{\pi }{2}}\\ 0\\ 0 \end{array}} \right] ,\quad {{\dot{\mathbf{q}}}_0} = \left[ {\begin{array}{*{20}{c}} {{{\dot{x}}_0}}\\ {{{\dot{y}}_0}}\\ {{{\dot{z}}_0}}\\ {{{\dot{\phi } }_0}}\\ {{{\dot{\theta } }_0}}\\ {{{\dot{\psi } }_0}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} { - R\omega }\\ 0\\ 0\\ 0\\ 0\\ \omega \end{array}} \right] ,\quad {{\ddot{\mathbf{q}}}_0} = {\mathbf{0}} \end{aligned}$$
(136)

As expected, the eigenvalues of the linearized system depend on the angular velocity \(\omega \) used as a free parameter of the stability study. In particular, there are two critical angular velocities equal to \({\omega _c} = \pm 3.4\) (rad/s) that delimit the border between an instability region and a marginally stable one, as it is apparent from the stability map represented in Fig. 11, as well as by observing the root locus shown in Fig. 12, both referred to the rolling disk system.

Fig. 11
figure 11

Rolling disk stability map. The solid line () represents the real part of the eigenvalues, while the dashed line () represents the corresponding imaginary part. The critical angular velocities of the rolling disk are, respectively, equal to \({\omega _c} = \pm 3.4\) (rad/s)

Fig. 12
figure 12

Rolling disk root locus. The solid line () and the dashed line () represent the eigenvalue pair of the system. The square symbol \(\left( \square \right) \) indicates the eigenvalue pair for \(\omega =0\) (rad/s), while the circle symbol \(\left( \circ \right) \) indicates the eigenvalue pair for \(\omega =10\) (rad/s). The critical angular velocities of the rolling disk are, respectively, equal to \({\omega _c} = \pm 3.4\) (rad/s) and are indicated with the diamond symbol \(\left( \diamond \right) \)

In Table 8, the eigenvalues of the rolling disk for \(\omega =1\) (rad/s), \(\omega =3.4\) (rad/s), and \(\omega =5\) (rad/s) are reported.

In Table 8, the eigenvalues resulting from the stability study of the rolling disk carried out with the proposed method are used as the reference solution, whereas the eigenvalue errors with respect to the reference solution arising from the application of the other fundamental techniques of applied mechanics are listed immediately after. Moreover, for a value of the angular velocity equal to \(\omega =-3.8\) (rad/s), which is above the critical value, the system is perturbed from the initial equilibrium state to verify its dynamic behavior. To this end, the following set of initial conditions is considered:

$$\begin{aligned} \left\{ \begin{array}{l} {x_s} = 0\\ {y_s} = 0\\ {z_s} = R\\ {\phi _s} = \frac{\pi }{2}\\ {\theta _s} = 0\\ {\psi _s} = 0 \end{array} \right. ,\quad \left\{ \begin{array}{l} {{\dot{x}}_s} = - R\omega \\ {{\dot{y}}_s} = 0\\ {{\dot{z}}_s} = 0\\ {{\dot{\phi } }_s} = {{\dot{\phi } }_0} + \varepsilon \\ {{\dot{\theta } }_s} = 0\\ {{\dot{\psi } }_s} = \omega \end{array} \right. ,\quad \varepsilon = 0.1 \end{aligned}$$
(137)

where \({x_s}\) is the initial horizontal displacement of the disk center of mass, \({y_s}\) is the initial lateral displacement of the disk center of mass, \({z_s}\) is the initial vertical displacement of the disk center of mass, \({\phi _s}\) is the initial roll angular displacement of the disk, \({\theta _s}\) is the initial yaw angular displacement of the disk, \({\psi _s}\) is the initial pitch angular displacement of the disk, \({{\dot{x}}_s}\) is the initial horizontal velocity of the disk center of mass, \({{\dot{y}}_s}\) is the initial lateral velocity of the disk center of mass, \({{\dot{z}}_s}\) is the initial vertical velocity of the disk center of mass, \({{\dot{\phi } }_s}\) is the initial roll angular velocity of the disk, \({{\dot{\theta }}_s}\) is the initial yaw angular velocity of the disk, \({{\dot{\psi } }_s}\) is the initial pitch angular velocity of the disk, and \(\varepsilon \) represents the perturbation. The time step employed for carrying out the numerical simulation is \(\varDelta t = {10^{ - 3}}\;(s)\), whereas the time interval used for studying the dynamic behavior of the rolling disk system is \({T_s} = 60\;(s)\). The numerical results of the dynamical simulation are shown in Figs. 13 and 14.

Table 8 Rolling disk eigenvalues
Fig. 13
figure 13

Roll angular displacement \(\phi \) and roll angular velocity \(\dot{\phi }\) of the rolling disk in the stable region for \(\omega =-3.8\) (rad/s)

Fig. 14
figure 14

Yaw angular displacement \(\theta \) and yaw angular velocity \(\dot{\theta }\) of the rolling disk in the stable region for \(\omega =-3.8\) (rad/s)

In particular, Figs. 13a and 14a, respectively, represent the roll angular displacement and the yaw angular displacement of the rolling disk, while the corresponding angular velocities are, respectively, shown in Figs. 13b and 14b. The numerical results arising from the nonlinear dynamic analysis of the rolling disk confirm the stability properties found by means of the linear stability analysis.

5.5 Watt centrifugal governor

The fifth and last example is a three-dimensional multibody model of a Watt regulator. In Fig. 15, a simplified scheme of the mechanical system of interest is shown. In Fig. 15a, all the essential geometric information of the mechanical model is reported. For the sake of clarity, the orientations and the origins of all the body-fixed reference frames are shown in Fig. 15b. In Table 9, the numerical values used for all the physical parameters necessary for the computer implementation of the multibody model are listed.

The mechanical model of the Watt regulator is composed of six rigid bodies and eight kinematic joints. The bodies that form the multibody system are the regulator shaft, the right crank, the right connecting rod, the slider, the left connecting rod, and the left crank. These rigid bodies are identified with the label i and are, respectively, numbered from \(i=1\) to \(i=6\). For simplicity, the six rigid bodies forming the system are all modeled as cylinders. Moreover, an additional disk attached to the shaft is considered and two concentrated masses, respectively, attached to the extremal points of the right and left connecting rods are also included in the mechanical model to stress the centrifugal effects that influence the dynamical behavior of the Watt regulator. The characteristic parameters that define the multibody system are three reference lengths, respectively, identified with L, H, and R, as well as four reference masses, respectively, indicated with \(m_s\), \(m_b\), \(m_p\), and \(m_c\). The gravity acceleration is assumed to be acting along the vertical axis of the global reference frame and is denoted as g. The mechanical model of the centrifugal governor is completed including an elastic spring having a stiffness coefficient k and a viscous dashpot having a damping coefficient \(\sigma \) that act in parallel between the additional disk attached to the shaft and the slider. Furthermore, another physical quantity of interest that can significantly influence the system dynamical behavior is the unstretched length of the spring that is denoted with \(l_0\). For simplicity, this parameter can be defined as a function of the reference length L as \(l_0=\eta L\), where \(\eta \) is a positive real number. In Table 10, the geometric dimensions of the bodies that form the multibody model of the centrifugal regulator and their inertial parameters are reported.

Fig. 15
figure 15

Watt centrifugal governor multibody model

Table 9 Watt centrifugal governor physical parameters
Table 10 Watt centrifugal governor reference parameters

Considering a three-dimensional space, the geometric configuration of each body is described using three displacement coordinates, namely the Cartesian coordinates of the body reference point, respectively, denoted as \({x_i} \equiv {x_i}(t)\), \({y_i} \equiv {y_i}(t)\), and \({z_i} \equiv {z_i}(t)\), and three rotational coordinates, being the set of Euler angles, respectively, denoted with \({\phi _i} \equiv {\phi _i}(t)\), \({\theta _i} \equiv {\theta _i}(t)\), and \({\psi _i} \equiv {\psi _i}(t)\). Consequently, the generalized coordinate vector denoted with \({{\mathbf{q}}_i} \equiv {{\mathbf{q}}_i}(t)\) for each generic body i assumes the following simple form:

$$\begin{aligned} {{\mathbf{q}}_i} = {\left[ {\begin{array}{*{20}{c}} {{x_i}}&{{y_i}}&{{z_i}}&{{\phi _i}}&{{\theta _i}}&{{\psi _i}} \end{array}} \right] ^\mathrm{T}} \end{aligned}$$
(138)

where \(i = 1,2,\ldots ,6\) indicates the number of the single rigid body. The vector of the generalized coordinates of the multibody system is denoted with \({\mathbf{q}} \equiv {\mathbf{q}}(t)\) and can be written as:

$$\begin{aligned} {\mathbf{q}} = {\left[ {\begin{array}{*{20}{c}} {{\mathbf{q}}_1^\mathrm{T}}&{{\mathbf{q}}_2^\mathrm{T}}&{{\mathbf{q}}_3^\mathrm{T}}&{{\mathbf{q}}_4^\mathrm{T}}&{{\mathbf{q}}_5^\mathrm{T}}&{{\mathbf{q}}_6^\mathrm{T}} \end{array}} \right] ^\mathrm{T}} \end{aligned}$$
(139)

Thus, the multibody model of the Watt regulator is described using a set of \(n_q=36\) generalized coordinates. Considering as rotational coordinates the set of Euler angles associated with the sequence X-Y-Z, the rotation matrices of each body are defined as follows:

$$\begin{aligned} {{\mathbf{A}}_i} = {{\mathbf{A}}_{{{{\bar{x}}}_i}}}{{\mathbf{A}}_{{{\bar{y}}_i}}}{{\mathbf{A}}_{{{{\bar{z}}}_i}}} \end{aligned}$$
(140)

where \({{\mathbf{A}}_i}\) is the rotation matrix of the generic body i, while \({{\mathbf{A}}_{{{{\bar{x}}}_i}}}\), \({{\mathbf{A}}_{{{\bar{y}}_i}}}\), and \({{\mathbf{A}}_{{{{\bar{z}}}_i}}}\) denote the relative rotation matrices associated with the rotations around the axes of the local reference frames that are, respectively, given by:

$$\begin{aligned} {{\mathbf{A}}_{{{{\bar{x}}}_i}}} = \left[ {\begin{array}{*{20}{c}} 1&{}0&{}0\\ 0&{}{\cos ({\phi _i})}&{}{ - \sin ({\phi _i})}\\ 0&{}{\sin ({\phi _i})}&{}{\cos ({\phi _i})} \end{array}} \right] ,\quad {{\mathbf{A}}_{{{{\bar{y}}}_i}}}= \left[ {\begin{array}{*{20}{c}} {\cos ({\theta _i})}&{}0&{}{\sin ({\theta _i})}\\ 0&{}1&{}0\\ { - \sin ({\theta _i})}&{}0&{}{\cos ({\theta _i})} \end{array}} \right] \end{aligned}$$
(141)

and

$$\begin{aligned} {{\mathbf{A}}_{{{{\bar{z}}}_i}}} = \left[ {\begin{array}{*{20}{c}} {\cos ({\psi _i})}&{}{ - \sin ({\psi _i})}&{}0\\ {\sin ({\psi _i})}&{}{\cos ({\psi _i})}&{}0\\ 0&{}0&{}1 \end{array}} \right] \end{aligned}$$
(142)

The system mass matrix \({\mathbf{M}}\) and the system total body generalized force vector \({{\mathbf{Q}}_b}\) can be, respectively, written as:

$$\begin{aligned} {\mathbf{M}} = \mathrm{{diag}}({{\mathbf{M}}_1},{{\mathbf{M}}_2},{{\mathbf{M}}_3},{{\mathbf{M}}_4},{{\mathbf{M}}_5},{{\mathbf{M}}_6}) \end{aligned}$$
(143)

and

$$\begin{aligned} {{\mathbf{Q}}_b} = {\left[ {\begin{array}{*{20}{c}} {{\mathbf{Q}}_{b,1}^\mathrm{T}}&{{\mathbf{Q}}_{b,2}^\mathrm{T}}&{{\mathbf{Q}}_{b,3}^\mathrm{T}}&{{\mathbf{Q}}_{b,4}^\mathrm{T}}&{{\mathbf{Q}}_{b,5}^\mathrm{T}}&{{\mathbf{Q}}_{b,6}^\mathrm{T}} \end{array}} \right] ^\mathrm{T}} \end{aligned}$$
(144)

where \({{\mathbf{M}}_i}\) and \({{\mathbf{Q}}_{b,i}}\), respectively, denote the mass matrix and the total body generalized force vector associated with the generic body i that are identical to those of the spinning top reported in Equation 113. In particular, the inertial contribution of the additional body is considered in the definition of the shaft mass matrix and its corresponding inertia quadratic velocity vector, while the inertial contributions of the concentrated masses are, respectively, included in the mass matrices of the right and left cranks and their corresponding inertia quadratic velocity vectors. On the other hand, eight different sets of holonomic constraints are considered for describing the kinematic joints of the multibody system employed as a mechanical model of the Watt regulator. The joint types considered in the mechanical model are revolute joints, prismatic joints, universal joints, and spherical joints. The particular set of kinematic joints employed for modeling the centrifugal governor is cleverly selected for avoiding redundancies in the holonomic algebraic constraint equations and, at the same time, to obtain a spatial mechanism having \({n_f} = 2\) degrees of freedom. The information relative to the nature of the mechanical joints considered in the multibody model is reported in Table 11.

Table 11 Watt centrifugal governor kinematic joints

As discussed below, the analytical expressions of a generic holonomic constraint vector that is labeled with the integer number k and is used in the multibody model of the centrifugal governor, is denoted with \({{\mathbf{C}}_k} \equiv {{\mathbf{C}}_k}({{\mathbf{q}}_i},{{\mathbf{q}}_j},t)\), where \({{\mathbf{q}}_i} \equiv {{\mathbf{q}}_i}(t)\) and \({{\mathbf{q}}_j} \equiv {{\mathbf{q}}_j}(t)\) are the generalized coordinate vectors associated with the generic rigid bodies i and j involved in the kinematic pair. In particular, the analytical expression of the constraint equations associated with the revolute joint is given by the following constraint vector:

$$\begin{aligned} {{\mathbf{C}}_{k}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{r}}_i}({P_i}) - {{\mathbf{r}}_j}({P_j})}\\ {{{({\mathbf{v}}_2^i)}^\mathrm{T}}{\mathbf{v}}_1^j}\\ {{{({\mathbf{v}}_3^i)}^\mathrm{T}}{\mathbf{v}}_1^j} \end{array}} \right] \end{aligned}$$
(145)

where \({{P_i}}\) is the first point belonging to the first body involved in the kinematic pair labeled with the integer number i, \({{P_j}}\) is the second point belonging to the second body involved in the kinematic pair labeled with the integer number j, \({{{\mathbf{r}}_i}({P_i})}\) is the global position vector of the point \({{P_i}}\), \({{{\mathbf{r}}_j}({P_j})}\) is the global position vector of the point \({{P_j}}\), \({{\mathbf{v}}_1^i}\) is the global direction vector of the joint axis individuated with respect to the first body of the kinematic pair, \({{\mathbf{v}}_1^j}\) is the global direction vector of the joint axis individuated with respect to the second body of the kinematic pair, \({{\mathbf{v}}_2^i}\) and \({{\mathbf{v}}_3^i}\) are two global vectors that are orthogonal to the joint axis vector defined with respect to the first body of the kinematic pair, while \({{\mathbf{v}}_2^j}\) and \({{\mathbf{v}}_3^j}\) are two global vectors that are orthogonal to the joint axis vector defined with respect to the second body of the kinematic pair. In particular, one can express the global direction vectors associated with the joint axis of each body in terms of the corresponding local direction vectors as follows:

$$\begin{aligned} \left\{ \begin{array}{l} {\mathbf{v}}_1^i = {{\mathbf{A}}_i}{\bar{\mathbf{v}}}_1^i,\;{\mathbf{v}}_2^i = {{\mathbf{A}}_i}{\bar{\mathbf{v}}}_2^i,\;{\mathbf{v}}_3^i = {{\mathbf{A}}_i}{\bar{\mathbf{v}}}_3^i\\ {\mathbf{v}}_1^j = {{\mathbf{A}}_j}{\bar{\mathbf{v}}}_1^j,\;{\mathbf{v}}_2^j = {{\mathbf{A}}_j}{\bar{\mathbf{v}}}_2^j,\;{\mathbf{v}}_3^j = {{\mathbf{A}}_j}{\bar{\mathbf{v}}}_3^j \end{array} \right. \end{aligned}$$
(146)

where the direction vectors \({\bar{\mathbf{v}}}_1^i\), \({\bar{\mathbf{v}}}_2^i\), and \({\bar{\mathbf{v}}}_3^i\) are defined with respect the body i local reference frame, while the direction vectors \({\bar{\mathbf{v}}}_1^j\), \({\bar{\mathbf{v}}}_2^j\), and \({\bar{\mathbf{v}}}_3^j\) are defined with respect the body j local reference frame, as shown in Table 11. The analytical expression of the constraint equations associated with the universal joint is given by the following constraint vector:

$$\begin{aligned} {{\mathbf{C}}_{k}} = \left[ {\begin{array}{*{20}{c}} {{{\mathbf{r}}_i}({P_i}) - {{\mathbf{r}}_j}({P_j})}\\ {{{({\mathbf{v}}_1^i)}^\mathrm{T}}{\mathbf{v}}_1^j} \end{array}} \right] \end{aligned}$$
(147)

The analytical expression of the constraint equations associated with the spherical joint is given by the following constraint vector:

$$\begin{aligned} {{\mathbf{C}}_{k}} = {{\mathbf{r}}_i}({P_i}) - {{\mathbf{r}}_j}({P_j}) \end{aligned}$$
(148)

The analytical expression of the constraint equations associated with the prismatic joint is given by the following constraint vector:

$$\begin{aligned} {{\mathbf{C}}_{k}} = \left[ {\begin{array}{*{20}{c}} {{{({\mathbf{v}}_2^i)}^\mathrm{T}}\left( {{{\mathbf{r}}_i}({P_i}) - {{\mathbf{r}}_j}({P_j})} \right) }\\ {{{({\mathbf{v}}_3^i)}^\mathrm{T}}\left( {{{\mathbf{r}}_i}({P_i}) - {{\mathbf{r}}_j}({P_j})} \right) }\\ {{{({\mathbf{v}}_1^i)}^\mathrm{T}}{\mathbf{v}}_2^j}\\ {{{({\mathbf{v}}_1^i)}^\mathrm{T}}{\mathbf{v}}_3^j}\\ {{{({{\mathbf{w}}^i})}^\mathrm{T}}{{\mathbf{w}}^j} - c_0^{i,j}} \end{array}} \right] \end{aligned}$$
(149)

where \({{\mathbf{w}}^i}\) and \({{\mathbf{w}}^j}\) are two global direction vectors, respectively, associated with the rigid bodies i and j that form the kinematic pair which are, respectively, defined as:

$$\begin{aligned} \left\{ \begin{array}{l} {{\mathbf{w}}^i} = {a^i}{\mathbf{v}}_2^i + {b^i}{\mathbf{v}}_3^i\\ {{\mathbf{w}}^j} = {a^j}{\mathbf{v}}_2^j + {b^j}{\mathbf{v}}_3^j \end{array} \right. \end{aligned}$$
(150)

where \({a^i}\), \({b^i}\), \({a^j}\), and \({b^j}\) are nonzero real numbers, whereas \(c_0^{i,j}\) is the dot product of the global vectors \({{\mathbf{w}}^i}\) and \({{\mathbf{w}}^j}\) evaluated at the initial instant of time. Considering the geometric information reported in Table 11, the algebraic equations associated with the kinematic joints can be particularized for each kinematic pair, where the integer numbers i and j are, respectively, employed for identifying the first and second body of the kinematic pair. By doing so, the total constraint vector \(\mathbf {C}\) relative to the multibody model of the Watt regulator can be written as follows:

$$\begin{aligned} {\mathbf{C}} = {\left[ {\begin{array}{*{20}{c}} {{\mathbf{C}}_1^\mathrm{T}}&{{\mathbf{C}}_2^\mathrm{T}}&{{\mathbf{C}}_3^\mathrm{T}}&{{\mathbf{C}}_4^\mathrm{T}}&{{\mathbf{C}}_5^\mathrm{T}}&{{\mathbf{C}}_6^\mathrm{T}}&{{\mathbf{C}}_7^\mathrm{T}}&{{\mathbf{C}}_8^\mathrm{T}} \end{array}} \right] ^\mathrm{T}} \end{aligned}$$
(151)

where \({{\mathbf{C}}_1}\), \({{\mathbf{C}}_2}\), and \({{\mathbf{C}}_8}\) are constraint vectors modeling revolute joints, \({{\mathbf{C}}_3}\) and \({{\mathbf{C}}_7}\) are constraint vectors modeling universal joints, \({{\mathbf{C}}_4}\) and \({{\mathbf{C}}_6}\) are constraint vectors modeling spherical joints, and \({{\mathbf{C}}_5}\) is a constraint vector modeling a prismatic joint. On the other hand, one nonholonomic constraint equation is employed to impose a prescribed time law for the angular velocity of the shaft that is identified by the generalized velocity coordinate \(\dot{\psi _1}\). For this purpose, one can write:

$$\begin{aligned} {\mathbf{D}} = {\dot{\psi } _1} - {f_\omega } \end{aligned}$$
(152)

where the nonholonomic constraint equation used to define the rotational velocity law of the shaft is based on a piecewise cubic function denoted with \(f_{\omega }\) and given by:

$$\begin{aligned} {f_\omega } = \left\{ {\begin{array}{*{20}{l}} {\left( {3{\tau ^2} - 2{\tau ^3}} \right) \omega ,\quad 0 \le \tau < 1}\\ {\omega ,\qquad \qquad \qquad \qquad \tau \ge 1} \end{array}} \right. ,\quad \tau = \frac{t}{{{T_c}}} \end{aligned}$$
(153)

where t is the time variable, \(\omega \) is the imposed steady-state constant angular velocity, and \({{T_c}}\) is the total duration of the transient of the piecewise cubic function. The total number of holonomic and nonholonomic algebraic constraints involved in the multibody model of the mechanical system is \(n_c=35\). At this stage, as in the case of the other demonstrative examples presented before, by means of simple mathematical manipulations one can readily obtain the holonomic constraint Jacobian matrix \({{\mathbf{C}}_{\mathbf{q}}}\), the nonholonomic constraint Jacobian matrix \({{\mathbf{D}}_{{\dot{\mathbf{q}}}}}\), the holonomic constraint quadratic velocity vector \({{\mathbf{Q}}_{d,h}}\), and the nonholonomic constraint quadratic velocity vector \({{\mathbf{Q}}_{d,nh}}\). Subsequently, by using the proposed approach and considering the analytical expression of the system mass matrix \({\mathbf{M}}\) as well as the mathematical form of the system total body generalized force vector \({{\mathbf{Q}}_b}\), the composite mass, damping, and stiffness matrices \({\bar{\mathbf{M}}}\), \({\bar{\mathbf{R}}}\), and \({\bar{\mathbf{K}}}\) can be analytically derived. However, the analytical expressions of the vector and matrix quantities mentioned before are too long and complex to be written in a concise form and, therefore, are not reported in the paper.

The stability of the multibody model of the Watt centrifugal governor was analyzed in four different reference configurations. The first analysis was carried out in a reference configuration of static equilibrium, namely when \(\omega = 0{} \,(\hbox {rad}/\hbox {s})\) and the mechanical system is at rest. The other three reference configurations were obtained by linearizing the equations of motion around the dynamic equilibrium configurations found for three different angular velocities which are \(\omega = 10{} \, (\hbox {rad}/\hbox {s})\), \(\omega = 20{} \,(\hbox {rad}/\hbox {s})\), and \(\omega = 30{} \,(\hbox {rad}/\hbox {s})\). In particular, the static equilibrium configuration used as the first reference configuration was analytically calculated and numerically verified as follows. First of all, a particular configuration which corresponds to a specific value of the angle \(\alpha \) represented in Fig. 15a was chosen. Then, the numerical value of the spring stiffness k was analytically computed for imposing that the geometric configuration prescribed before is a configuration of static equilibrium for the mechanism that forms the centrifugal regulator. Furthermore, a dynamical simulation was run to verify that the configuration selected as a reference is indeed a static equilibrium configuration. The numerical values used for performing the dynamical simulations are listed in Table 10. In particular, the static equilibrium configuration is set for \({\alpha _{s,e}} = {{5\pi } \big / 3} = 5.236\) (rad). Subsequently, starting from the configuration of static equilibrium, three dynamic simulations were performed for three different values of the angular velocity \(\omega \) imposed to the shaft of the Watt regulator. As expected, after a short transient, the constant velocity imposed by means of the nonholonomic constraint was reached by the mechanism. Once the reference angular velocity is maintained by the centrifugal governor, the reference configurations of dynamic equilibrium are, respectively, identified with the angular displacements of the right crank, namely \({\alpha _{d,e}} = 5.566\) (rad), \({\alpha _{d,e}} = 5.885\) (rad), and \({\alpha _{d,e}} = 6.050\) (rad), which, respectively, correspond to the three values used for the angular velocity imposed on the shaft, that is, \(\omega = 10{} \,(\hbox {rad}/\hbox {s})\), \(\omega = 20{} \,(\hbox {rad}/\hbox {s})\), and \(\omega = 30{} \,(\hbox {rad}/\hbox {s})\). In order to demonstrate this fact, the numerical results of the dynamical simulations are represented in Figs. 16 and 17.

Fig. 16
figure 16

Angular displacement \(\alpha \) and angular velocity \(\dot{\alpha }\) of the right crank. The solid line () corresponds to \(\omega =10\) (rad/s), the dashed line () corresponds to \(\omega =20\) (rad/s), and the dotted line () corresponds to \(\omega =30\) (rad/s)

Fig. 17
figure 17

Vertical displacement \(z_4\) and vertical velocity \({\dot{z}_4}\) of the slider. The solid line () corresponds to \(\omega =10\) (rad/s), the dashed line () corresponds to \(\omega =20\) (rad/s), and the dotted line () corresponds to \(\omega =30\) (rad/s)

In Fig. 16a, b, the angular displacement \({\psi _2}\) and the angular velocity \({\dot{\psi } _2}\) of the right crank, which, respectively, coincides with the angle \(\alpha \) and its time derivative \(\dot{\alpha } \), are, respectively, shown in correspondence of the set of three angular velocities imposed on the shaft of the centrifugal governor. Figure 17a, b, respectively, represents the vertical displacement and the vertical velocity of the slider obtained from the dynamical simulations carried out in the same conditions. The time step used for all the dynamical simulations is \(\varDelta t = {10^{ - 3}}\;(s)\), while the time span used for analyzing the dynamics of the centrifugal regulator system is \({T_s} = 30\;(s)\). Finally, the stability analysis of the Watt regulator was performed using the proposed method considering as reference configurations the generalized position of static equilibrium and the three generalized positions of dynamic equilibrium found through the use of numerical simulations based on the nonlinear dynamical model. As expected, the centrifugal governor results to be qualitatively stable in all the four generalized positions taken into account. This fact is quantitatively confirmed by the eigenvalue analysis, as shown from the list of significant system eigenvalues reported in Table 12.

Table 12 Watt centrifugal governor eigenvalues

Therefore, for all the angular velocities considered, all the generalized positions of dynamic equilibrium found are asymptotically stable since they correspond to complex conjugate eigenvalues having negative real parts. In fact, for the set of physical parameters considered, the multibody model of the Watt governor is always stable in the case of both static and dynamic equilibrium configurations. Qualitatively, this mechanical system becomes more stable with the growth of the angular velocity. At the same time, as one could expect from practical experience, an increase in the frequency of oscillation can be noted since the imaginary part of the system eigenvalues become larger when the angular velocity of the shaft is increased. In particular, both the modules of the real and imaginary parts of the system eigenvalues increase when the module of the angular velocity grows. It is also important to note that this last numerical example clearly shows the advantages of the method proposed in this paper considering a multibody model that is relatively more complex than the other systems presented in the section of numerical results. More importantly, the proposed method allows for performing the indirect stability analysis of a multibody system in a simple and effective manner even in a case in which the other well-established methods of applied mechanics turn out to be unsuitable for the analysis since they involve excessively complex symbolic-numeric computations. For this reason, only the numerical results arising from the eigenvalue analysis carried out by using the technique devised in this paper are reported in Table 12.

5.6 Discussion

In this section, five simple examples were presented for demonstrating the effectiveness of the proposed method and compare it with other analytical techniques available in the literature. As expected, despite the presence of fundamental differences in the analytical approaches used for studying the stability starting from the same sets of equations of motion, the results of the stability analysis of the benchmark systems considered as numerical examples are the identical, thereby validating the efficacy of the analytical technique developed in this work. In particular, the five numerical examples considered in this section showed that the method presented in this paper leads to a simple analytical formulation of the stability problem, as well as a straightforward computer implementation of the vector and matrix quantities involved in the definition of the subroutines necessary for performing dynamical simulations. Furthermore, the method developed in this work proved to be effective for describing both holonomic and nonholonomic systems in the same computational framework. In fact, the numerical results obtained from the use of the proposed approach coincide with those arising from the implementation of the fundamental analytical techniques of applied mechanics.

For the first four demonstrative examples presented in this section, two types of dynamic analysis are consecutively performed, that is, a linear stability analysis and a nonlinear transient analysis. The first type of dynamic analysis allows for obtaining useful information about the nonlinear system stability (or instability) by observing the values of the eigenvalues of the linearized system state matrix. After that, the nonlinear transient analysis can be used to validate and verify the stability information obtained from the analysis of the linearized system. In the fifth numerical example, on the other hand, the sequence of the two analysis was reversed; that is, first a set of configurations of dynamic equilibrium was found by means of nonlinear dynamical simulations that used the static equilibrium configuration as initial condition and, subsequently, a set of linear stability problems was solved for assessing the stability of the system in the neighborhood of the steady-state configuration found at the end of the transient analysis.

For all the systems considered as numerical examples, both the linear and nonlinear analyses were performed by using a general-purpose computer program developed by the authors in the multiparadigm numerical computing environment referred to as MATLAB. To this end, the six analytical methods of interest for this investigation (the proposed approach together with the augmented formulation, the embedding technique, the amalgamated formulation, the projection method, and the Udwadia–Kalaba equations) were implemented following a mixed methodology, namely by using a hybrid symbolic-numeric approach to analyze the nonlinear equations of motion and the linearized state-space model. In particular, the MATLAB built-in function called EIG that is based on the Schur decomposition algorithm was employed for determining the eigenvalues of the generalized state matrices, whereas the MATLAB built-in function called ODE113 based on the variable-order Adams–Bashforth–Moulton predictor–corrector scheme was used for the numerical solutions of the equations of motion since these subroutines turned out to be the most reliable built-in functions of MATLAB suitable for the present work [85, 86].

As can be seen from the numerical experiments described in this section, the proposed analytical method is well suited to study both holonomic and nonholonomic multibody mechanical systems and gives the same numerical results of the other well-known analytical approaches. In particular, the most interesting results are those relative to the stability maps of the spinning top and of the rolling disk models. Even though the first is a holonomic system while the second is a nonholonomic one, the stability results of these mechanical systems have some aspect in common, as one could intuitively expect in advance. First of all, as can be seen in Figs. 6, 7, 8 and 12, both systems show a symmetric behavior as far as the stability with respect to the variation of the angular velocity parameter is concerned. In fact, regardless of the direction of the motion, there is a critical angular velocity denoted with \(\omega _{c}\) that marks the transition between the unstable and the marginally stable regions. The same behavior is observed if the motion of the system is reversed. Thus, if the angular velocity of the system is above the critical value denoted with \(\omega _{c}\) and the system is slightly perturbed from its equilibrium configuration, it will stably oscillate around that position. As shown in Figs. 8, 9, 13 and 14, both the spinning top and the rolling disk have a periodic dynamic response as a result of a small perturbation when they are rotating faster than the critical angular velocity, while the systems are unstable for the same perturbation when their angular velocity is below the critical value \(\omega _{c}\).

In summary, except in the case of the last demonstrative example, for all the dynamical models of simple mechanical systems considered in the paper, the numerical results of the stability analysis arising from the proposed approach are substantially the same as those obtained by using other well-established methods implemented in the case of both holonomic and nonholonomic multibody systems. The proposed method, therefore, can be used with high confidence and represents a viable analytical approach for modeling and studying complex multibody mechanical systems. Furthermore, by observing the performance of the proposed method in comparison with the conventional approaches used in the dynamics of multibody systems, the following simple conclusions can be drawn. In the case of the stability problem relative to an open-chain multibody system modeled by a relatively small number of generalized coordinates and algebraic constraints, as the first four numerical examples presented in the paper, both the proposed method and the conventional techniques found in the literature can be indifferently used leading to the same set of numerical results. Conversely, when one deals with a closed-chain multibody system characterized by a relatively large number of generalized coordinates and algebraic constraints, as in the case of the fifth and last numerical example considered in this work, the conventional techniques aimed at performing the stability analysis fail. This is because these techniques involve a very large computational burden associated with the symbolic manipulations necessary for calculating the generalized acceleration vector and the vector of Lagrange multipliers involved in the linearization process. In this last case, which is very common in multibody applications of engineering interest, the challenging issues encountered during the analysis of complex systems can be effectively and efficiently solved by using the stability method devised in this paper.

6 Summary, conclusions, and future directions of research

This paper is part of a broad research plan devised by the authors considering three important fields of research, namely the kinematics and dynamics of multibody mechanical systems [87,88,89], the analytical methods for constructing effective control policies suitable for guiding the dynamic behavior of nonlinear systems [90,91,92], and the computational techniques for estimating and/or identifying the output response of a mechanical system in relation to prescribed inputs by means of an in-depth analysis of past input-output data sets [93,94,95]. Thus, this investigation is focused on the study of the stability properties of multibody mechanical systems and is aimed at subsequent developments of control laws and identification patterns. In this paper, a new method for analyzing the stability characteristics of multibody mechanical systems is proposed. Multibody systems are mechanical systems whose motion is limited by the action of position-level kinematic joints (holonomic constraints) as well as by the presence of special dynamic behaviors prescribed by velocity-level and/or acceleration-level algebraic equations (nonholonomic constraints). Therefore, the stability analysis of this family of mechanical systems is particularly challenging.

The methodology developed in this paper considers the general case in which the multibody system of interest is described by a nonlinear set of differential-algebraic equations resulting from the application of the basic principle of classical mechanics, such as the D’Alembert–Lagrange principle of virtual work combined with the Lagrange multipliers technique. The differential-algebraic equations of motion are subsequently linearized around the configuration point of interest in the state space to carry out a stability analysis employing a special spectral decomposition. While the solution of the eigenproblem obtained following the traditional approaches described herein is straightforward, the main difficulty resides in the analytical determination of the generalized acceleration vector of the multibody system under consideration. To this end, several formulation approaches can be used leading to various degrees of complexity. On the other hand, unlike the standard approaches commonly used in the literature, the proposed method allows for operating directly on the original set of nonlinear equations of motion, without resorting to transformation techniques for eliminating the presence of the constraint generalized force vector that lead to equivalent sets of nonlinear ordinary differential equations describing the motion of the multibody system of interest. For this purpose, an appropriate generalized eigenvalue problem is defined considering the linearization of the differential-algebraic equations of motion in order to evaluate the stability of a general multibody mechanical system around a given set point, without altering the original index-three structure of the dynamic equations. The generality of the method developed in this work allows for performing a straightforward implementation in general-purpose multibody computer codes and can significantly extend their capabilities of analysis also in the case of more complex mechanical systems.

The analytical approach proposed in this investigation is compared with other viable methods used in the field of applied dynamics by means of simple numerical experiments based on benchmark multibody systems subjected to holonomic and/or nonholonomic constraints. For this purpose, five demonstrative examples are considered to provide a step-by-step illustration of the mathematical formulation and the computer implementation of the stability technique introduced in the paper. The first illustrative example is focused on the study of the stable equilibrium configuration of a physical pendulum modeled as a two-dimensional multibody system constrained by kinematic joints of holonomic nature. The second numerical example is concerned with the determination of the unstable configuration of a two-dimensional wheeled inverted pendulum in which position-level constraints are present in addition to velocity-level algebraic equations. The third numerical example is a three-dimensional spinning top subjected only to holonomic constraints of which the critical angular velocity associated with the motion of precession is found. The fourth numerical example deals with the construction of the stability map of a disk rolling without slipping on a horizontal plane and, therefore, it can be readily used for demonstrating the effectiveness of the proposed approach in the case of a three-dimensional multibody system subjected to both holonomic and nonholonomic constraints. The fifth multibody system considered as an illustrative example is a simple three-dimensional model of a Watt centrifugal governor that is modeled using holonomic and nonholonomic constraints, of which the stability is studied and the configuration of dynamic equilibrium is identified by using a nonlinear transient analysis starting from the static equilibrium configuration. In order to perform a comprehensive comparative analysis, five well-established analytical approaches are considered for obtaining reference solutions, namely the augmented formulation, the embedding technique, the amalgamated formulation, the projection method, and the fundamental equations of constrained motion. All the numerical results found by using the computational methods mentioned before and the proposed analytical technique showed a very good agreement. However, in the case of the stability analysis of the Watt centrifugal governor, which represents a slightly more complicated problem compared with the other illustrative examples considered in the paper, the conventional methods for the stability analysis turned out to be inapplicable because of the complex symbolic manipulations required. In this last case, on the other hand, the method proposed in this paper represents a viable solution that provides consistent numerical results.

Several interesting directions can be followed in future research works. First, the stability method devised in this investigation could be further extended to the general case in which rigid body contacts take place and, at the same time, the motion of the multibody system of interest is limited by holonomic as well as nonholonomic algebraic constraints. To this end, one could consider first the nonlinear equations of motion involving nongeneralized coordinates necessary for identifying the collocation of the contact point on the surfaces of the rigid body pair in contact. Subsequently, the stability method developed in this paper, which is based on the definition of a general eigenvalue problem, could be reformulated by considering a composite coordinate vector in which the vector of generalized coordinates, the vector of nongeneralized coordinates, and the vector of Lagrange multipliers are simultaneously present. By doing so, the analysis of more complex multibody mechanical systems could become feasible. For example, one could study the stability properties of vehicle systems modeled as constrained multibody systems that are interesting for engineering applications such as bicycles, motorcycles, ground vehicles, bogies, railroad cars, and mobile robotic systems. More importantly, one could devise nonlinear control strategies for stabilizing unstable configurations of such multibody mechanical systems identified by using an extension of the computational approach introduced in this work. Another important aspect that could be explored in future research studies is the use of the proposed method for the stability study of multibody systems constituted of rigid and flexible components whose deformation introduces additional degrees of freedom due to the material flexibility. These challenging issues will be addressed in future investigations.