1 Introduction

This paper focuses on arguably the three most common classical methods (Laulusa and Bauchau, [1]) to apply kinematic constraint equations: the Lagrange equations of the first kind, the null space method and the Maggi equations. In this paper we only consider ideal joints, without friction. We will start by considering the Lagrange equations of the first kind completed with the acceleration constraint equations to give the following index-1 DAE system:

$$ \left [ \begin{array}{c@{\quad}c} \mathbf{M} & \boldsymbol{\varPhi}_{\mathbf{q}}^{T} \\ \boldsymbol{\varPhi} _{\mathbf{q}} & \mathbf{0} \end{array} \right ] \left \{ \begin{array}{c} \ddot{\mathbf{q}} \\ \boldsymbol{\lambda} \end{array} \right \} = \left \{\begin{array}{c} \mathbf{F} ( \mathbf{q},\dot{\mathbf{q}} ) \\ \mathbf{c} \end{array} \right \}, \quad \mathbf{c} \equiv - \dot{\boldsymbol{\varPhi}} _{\mathbf{q}}\dot{\mathbf{q}} - \dot{\boldsymbol{\varPhi}} _{t},\ \mathbf{M} \in \mathbb{R}^{n \times n},\ \boldsymbol{\varPhi} _{\mathbf{q}} \in \mathbb{R}^{m \times n} $$
(1)

where \(\mathbf{F} ( \mathbf{q},\dot{\mathbf{q}} ) \in \mathbb{R}^{n}\) is the vector that contains the external and velocity dependent inertia forces. The precise conditions for the existence and uniqueness of solutions for vectors \(\ddot{\mathbf{q}}\) and λ in (1) are not evident when the inertia matrix M is singular (positive-semidefinite) and the Jacobian matrix Φ q does not have full rank (\(\operatorname{rank} \boldsymbol{\varPhi} _{\mathbf{q}} = r < m\)). This problem will be addressed in this paper after the Introduction section. First of all, we wish to emphasize the importance of this problem by describing some typical situations where these difficulties arise.

1.1 Why and when redundant constraints arise

It is very common to find papers in the literature where, after setting the dynamic equations, it is assumed that the constraint equations are independent and therefore the Jacobian matrix has full rank. However, in many situations it is possible to get dynamic equations with redundant constraints. In practice it is not very difficult to deal with such cases, as we will try to show in this paper. Some examples leading to dynamic equations with redundant constraints are:

  1. 1.

    As a way to carry out quick, easy, and simple implementations. For instance, it is well known that the constraint of two vectors remaining aligned (null angle among them) can be imposed by the cross product of vectors, but this product produces three equations from which only two are independent. In a quick implementation it is always possible to set the three equations and let the solver choose the appropriate independent ones.

    Another common example, when using natural coordinates, is the condition of two unit vectors being equal. This condition can be set by equaling the three components, but again only two of these equations are independent. In these cases a careful implementation can avoid redundant constraints, but when the quickest and simplest implementation is required, the use of redundant constraints is always a valid option.

  2. 2.

    A more important use of redundant constraints is the case of overdetermined multibody systems, such as the numerous exceptions to the Grübler–Kutzbach criterion. A simple case is the four element quadrilateral (one fixed element) with four revolute joints. The Grübler–Kutzbach criterion predicts N=6(4−1)−5⋅4=−2 degrees of freedom. However, when the four revolute axes are parallel, the system has 1 degree of freedom. This system leads to redundant constraints regardless of the type of coordinates used: relative, Cartesian or natural. A common practice has been to replace two of the revolute joints by a spherical and a Cardan joint. This solves the problem of the redundant constraints, but at the expense of solving a different physical problem. The transformed system may be equivalent for the kinematics, but it is clearly different for the calculation of constraint forces. We assume that the user wants to maintain the physics of the problem and so we will consider this source of redundant constraints as inevitable.

  3. 3.

    Finally, singular positions in determined multibody systems lead to redundant constraints at those positions, because the Jacobian matrix loses its rank without reducing its size, and consequently redundant constraints appear. This is a very particular case of redundant constraints that will not be further considered in this paper.

1.2 Why singular inertia matrices appear

Singular inertia matrices may appear when more than six coordinates are used to define the position of a rigid body in \(\mathbb{R}^{3}\). When Euler parameters or natural coordinates are used this is always the case.

With natural coordinates [2] the constant inertia matrix of a rigid body requires that the body be defined with two points and two unit vectors (or a similar configuration, for instance with four non-coplanar points). If this body has additional points and unit vectors, the corresponding rows and columns of the inertia matrix have null values, making this matrix positive-semidefinite.

In other occasions it is possible to assign null mass and inertia tensor to a body simply because its inertia is very small. This assumption may or may not produce difficulties in the existence and uniqueness of solutions. This is a point that will be clarified later on.

1.3 Constrained differential equations of motion

Using Cartesian dependent coordinates, the Lagrange equations of the first kind take the form

$$ \mathbf{M} ( \mathbf{q} )\ddot{\mathbf{q}} + \boldsymbol{\varPhi} _{\mathbf{q}}^{T} \boldsymbol{\lambda} = \mathbf{F} ( \mathbf{q},\dot{\mathbf{q}} ) $$
(2)

where q is the vector of Cartesian coordinates that defines the system position, \(\dot{\mathbf{q}}\) and \(\ddot{\mathbf{q}}\) are its first and second order time derivatives, M is the inertia or mass matrix, F is a vector that includes the external and velocity dependent inertia forces, Φ q is the Jacobian matrix of the kinematic constraint equations and λ the vector of Lagrange multipliers. The position, velocity, and acceleration vectors in Eq. (2) must satisfy the corresponding constraint equations,

$$ \boldsymbol{\varPhi} ( \mathbf{q} ) = \mathbf{0} $$
(3)
$$ \boldsymbol{\varPhi} _{\mathbf{q}}\dot{\mathbf{q}} = \mathbf{b}, \quad \mathbf{b} \equiv - \boldsymbol{\varPhi}_{t}, \ \boldsymbol{\varPhi} _{\mathbf{q}} \in \mathbb{R}^{m \times n}\ (\operatorname{rank} \boldsymbol{\varPhi} _{\mathbf{q}} = r \le m ) $$
(4)
$$ \boldsymbol{\varPhi} _{\mathbf{q}}\ddot{\mathbf{q}} = \mathbf{c}, \quad \mathbf{c} \equiv - \dot{\boldsymbol{\varPhi}} _{\mathbf{q}}\dot{\mathbf{q}} - \dot{\boldsymbol{\varPhi}} _{t} $$
(5)

Equations (2)–(5) constitute a system of index-3 DAEs. If only Eqs. (2) and (5) are considered, the following index-1 DAE system—equivalent to an ODE system—is obtained:

$$ \left [ \begin{array}{c@{\quad}c} \mathbf{M} & \boldsymbol{\varPhi} _{\mathbf{q}}^{T} \\ \boldsymbol{\varPhi} _{\mathbf{q}} & \mathbf{0} \end{array} \right ] \left \{ \begin{array}{c} \ddot{\mathbf{q}} \\ \boldsymbol{\lambda} \end{array} \right \} = \left \{\begin{array}{c} \mathbf{F} \\ \mathbf{c} \end{array} \right \}, \qquad \mathbf{A}_{1} \equiv \left [ \begin{array}{c@{\quad}c} \mathbf{M} & \boldsymbol{\varPhi} _{\mathbf{q}}^{T} \\ \boldsymbol{\varPhi} _{\mathbf{q}} & \mathbf{0} \end{array} \right ] \in \mathbb{R}^{ ( n + m ) \times ( n + m )} $$
(6)

The matrix in these equations is known as the augmented matrix (Negrut, Serban and Potra [3]), as a matrix with optimization structure (Serban, Negrut et al. [4], von Schwerin [5]) or as a saddle point system (Benzi, Golub and Liesen [6]). The system of differential equation (6) suffers from a constraint stabilization problem. As only the acceleration constraint equations have been imposed, the positions and velocities provided by the integrator suffer from the “drift” phenomenon. Two popular solutions to this problem are the Baumgarte stabilization method (Baumgarte [7], Ascher, Chin et al. [8], Flores, Machado et al. [9]) and the mass-orthogonal projections of position and velocity vectors (Lubich [10], Bayo and Ledesma [11]).

If the mass matrix is invertible and the constraint Jacobian matrix has full rank, it is possible to find a closed form solution of Eq. (6):

$$ \boldsymbol{\lambda} = \bigl( \boldsymbol{\varPhi} _{\mathbf{q}}\mathbf{M}^{ - 1} \boldsymbol{\varPhi}_{\mathbf{q}}^{T} \bigr)^{ - 1} \bigl( \boldsymbol{\varPhi} _{\mathbf{q}} \mathbf{M}^{ - 1}\mathbf{F} - \mathbf{c} \bigr) $$
(7)
$$ \ddot{\mathbf{q}} = \mathbf{M}^{ - 1} \bigl( \mathbf{F} - \boldsymbol{\varPhi} _{\mathbf{q}}^{T}\boldsymbol{\lambda} \bigr) $$
(8)

Sometimes, the aforementioned conditions for the existence of this closed-form solution (7)–(8) are mistakenly taken as the conditions for the existence of solutions of Eq. (6). In this paper we will try to deal more precisely with this problem, but first we will present alternative or equivalent forms for the constrained differential equations of motion (6): the null space method and the Maggi equations.

Another way to solve the constraint stabilization problem is to use velocity transformations, which map the dependent Cartesian velocities \(\dot{\mathbf{q}}\) on a minimal set \(\dot{\mathbf{q}}^{i}\) of f=nr truly independent velocities. Let matrix \(\mathbf{R} \in \mathbb{R}^{n \times f}\) be the orthogonal complement of the Jacobian matrix Φ q , that is, an n×f matrix whose columns are a basis of the null space of Φ q ,

$$ \boldsymbol{\varPhi} _{\mathbf{q}}\mathbf{R} = \mathbf{0} $$
(9)

Lagrange multipliers can be eliminated from Eqs. (6) by multiplying the first part of that equation by R T,

$$ \left [ \begin{array}{c} \mathbf{R}^{T}\mathbf{M} \\ \boldsymbol{\varPhi} _{\mathbf{q}} \end{array} \right ]\ddot{\mathbf{q}} = \left \{ \begin{array}{c} \mathbf{R}^{T}\mathbf{F} \\ \mathbf{c} \end{array} \right \}, \qquad \mathbf{A}_{2} \equiv \left [ \begin{array}{c} \mathbf{R}^{T}\mathbf{M} \\ \boldsymbol{\varPhi}_{\mathbf{q}} \end{array} \right ] \in \mathbb{R}^{ ( f + m ) \times n} $$
(10)

These equations constitute the so called null space method [1] for the dynamics of multibody systems. Matrix A 2 is square if there are no redundant constraints. The rank of this matrix must be n for that system to be determined and to have a unique solution.

The matrix R can be computed very easily on the basis of a coordinate partition of vector \(\dot{\mathbf{q}}\) on dependent and independent velocities. The dependent velocities are those velocities related to the columns of the pivots in the Gauss factorization of matrix Φ q . It is assumed that the independent velocities \(\dot{\mathbf{q}}^{i}\) can be expressed as the projections of the full velocity vector on the rows of a full rank (f×n) constant matrix B in the form (see Liang and Lance [12]),

$$ \dot{\mathbf{q}}^{i} = \mathbf{B}\dot{\mathbf{q}} $$
(11)

Matrix B is chosen in such a way that its rows are linearly independent of the rows of the Jacobian matrix Φ q . Equations (4) and (11) can be expressed together in the form

$$ \left [ \begin{array}{c} \boldsymbol{\varPhi} _{\mathbf{q}} \\ \mathbf{B} \end{array} \right ]\dot{\mathbf{q}} = \left \{ \begin{array}{c} \mathbf{b} \\ \dot{\mathbf{q}}^{i} \end{array} \right \}, \quad \mathbf{b} \equiv - \boldsymbol{\varPhi} _{t} $$
(12)

The condition for \(\dot{\mathbf{q}}\) being uniquely determined by Eq. (12) is that matrix has full column rank, because then the left inverse exists. So, if the columns of this matrix are linearly independent there is only one way to express the r.h.s. vector as a linear combination of those columns.

There are several methods to compute matrix B, which must remain constant until its rows lose the condition of being linearly independent of those of Φ q . Two possible methods are the Singular Value Decomposition (Mani, Haug et al. [13]) and the QR factorization (Kim and Vanderploeg [14]) of Φ q . In this paper the simpler coordinate partitioning method based on the Gaussian elimination with full pivoting will be considered. This is probably the simplest and cheapest procedure, which is stable enough for most applications. This method was introduced in 1982 by Wehage and Haug [15], and used also in 1982 by Serna, Avilés et al. [16] in the context of velocity transformation methods. In these methods matrix B is chosen as a Boolean matrix that defines the independent velocities \(\dot{\mathbf{q}}^{i}\) as a subset of velocities \(\dot{\mathbf{q}}\). In partitioned form Eq. (12) may be written as

$$ \left [ \begin{array}{c} \boldsymbol{\varPhi} _{\mathbf{q}} \\ \mathbf{B} \end{array} \right ]\dot{\mathbf{q}} = \left [ \begin{array}{c@{\quad}c} \boldsymbol{\varPhi} _{\mathbf{q}}^{d} & \boldsymbol{\varPhi} _{\mathbf{q}}^{i} \\ \mathbf{0}_{f \times m} & \mathbf{I}_{f} \end{array} \right ] \left \{ \begin{array}{c} \dot{\mathbf{q}}^{d} \\ \dot{\mathbf{q}}^{i} \end{array} \right \} = \left \{ \begin{array}{c} \mathbf{b} \\ \dot{\mathbf{q}}^{i} \end{array} \right \} $$
(13)

Matrix \(\boldsymbol{\varPhi} _{\mathbf{q}}^{d}\) is non-singular because its columns contain the pivots of Φ q . So, the full matrix in Eq. (13) is invertible. Consider its inverse in partitioned form [S R],

(14)

By identification of terms on the left and on the right-hand sides, it is concluded that matrices S and R and its sub-matrices are given by

$$ \mathbf{S} = \left [ \begin{array}{c} \mathbf{S}^{d} \\ \mathbf{S}^{i} \end{array} \right ] = \left [ \begin{array}{c} ( \boldsymbol{\varPhi} _{\mathbf{q}}^{d} )^{ - 1} \\ \mathbf{0}_{f \times m} \end{array} \right ], \qquad \mathbf{R} = \left [ \begin{array}{c} \mathbf{R}^{d} \\ \mathbf{R}^{i} \end{array} \right ] = \left [ \begin{array}{c} - ( \boldsymbol{\varPhi} _{\mathbf{q}}^{d} )^{ - 1}\boldsymbol{\varPhi}_{\mathbf{q}}^{i} \\ \mathbf{I}_{f} \end{array} \right ] $$
(15)

If there are redundant constraints the number of independent coordinates is still (nr). Matrix \(\boldsymbol{\varPhi} _{\mathbf{q}}^{d}\) is of size (m×r), with m>r. It is neither square nor invertible, but it has a left-inverse and the previous expressions keep their meaning.

Consider again Eq. (14) when Φ q has full row rank. This equation leads to the following matrix relations:

$$ \boldsymbol{\varPhi} _{\mathbf{q}}\mathbf{R} = \mathbf{0}_{m \times f} $$
(16)
$$ \boldsymbol{\varPhi} _{\mathbf{q}}\mathbf{S} = \mathbf{I}_{m} $$
(17)
$$ \mathbf{BS} = \mathbf{0}_{f \times m} $$
(18)
$$ \mathbf{BR} = \mathbf{I}_{f} $$
(19)

It can be concluded that the columns of matrices R and S are, respectively, bases of the null spaces of Φ q and B. Similarly, matrices R and S are right-inverses of B and Φ q , respectively.

The expressions (14) and (15) are used to define matrices S and R. By introducing the result of Eq. (14) in Eq. (12), the following result is obtained for the velocity transformation:

$$ \dot{\mathbf{q}} = \left [ \begin{array}{c} \boldsymbol{\varPhi} _{\mathbf{q}} \\ \mathbf{B} \end{array} \right ]^{ - 1} \left \{\begin{array}{c} \mathbf{b} \\ \dot{\mathbf{q}}^{i} \end{array} \right \} = \left [ \begin{array}{c@{\quad}c} \mathbf{S} & \mathbf{R} \end{array} \right ] \left \{ \begin{array}{c} \mathbf{b} \\ \dot{\mathbf{q}}^{i} \end{array} \right \} = \mathbf{Sb} + \mathbf{R}\dot{\mathbf{q}}^{i} \quad ( \mathbf{b} \equiv - \boldsymbol{\varPhi} _{t} ) $$
(20)

Normally matrix S in Eqs. (14) and (20) does not need to be computed as such, only the product (Sb) needs to be known. According to Eq. (20), this product is given by the dependent velocities \(\dot{\mathbf{q}}\) computed with null independent velocities (\(\dot{\mathbf{q}}^{i} = \mathbf{0}\)). It can be computed from Eq. (13).

For accelerations it is possible to express together the acceleration Eq. (5) and the time derivative of Eq. (11). The following equation is obtained:

$$ \left [ \begin{array}{c} \boldsymbol{\varPhi} _{\mathbf{q}} \\ \mathbf{B} \end{array} \right ] \ddot{\mathbf{q}} = \left \{ \begin{array}{c} \mathbf{c} \\ \ddot{\mathbf{q}}^{i} \end{array} \right \} \quad ( \mathbf{c} \equiv - \dot{\boldsymbol{\varPhi}} _{\mathbf{q}}\dot{\mathbf{q}} - \dot{\boldsymbol{\varPhi}}_{t} ) $$
(21)

From Eqs. (14) and (21),

$$ \ddot{\mathbf{q}} = \left [ \begin{array}{c} \boldsymbol{\varPhi} _{\mathbf{q}} \\ \mathbf{B} \end{array} \right ]^{ - 1}\left \{\begin{array}{c} \mathbf{c} \\ \ddot{\mathbf{q}}^{i} \end{array} \right \} = \left [ \begin{array}{c@{\quad}c} \mathbf{S} & \mathbf{R} \end{array} \right ]\left \{ \begin{array}{c} \mathbf{c} \\ \ddot{\mathbf{q}}^{i} \end{array} \right \} = \mathbf{Sc} + \mathbf{R}\ddot{\mathbf{q}}^{i} $$
(22)

The product (Sc) can be computed from Eqs. (22) and (21) as the dependent accelerations \(\ddot{\mathbf{q}}\) computed with the true velocities \(\dot{\mathbf{q}}\) and null independent accelerations (\(\ddot{\mathbf{q}}^{i} = \mathbf{0}\)).

Substituting expression (22) in the equations of motion (2), pre-multiplying by matrix R T and taking into account that Φ q R=0, the following expression is obtained for the dynamic equations in independent coordinates:

$$ \mathbf{R}^{T}\mathbf{MR}\ddot{\mathbf{q}}^{i} = \mathbf{R}^{T} ( \mathbf{F} - \mathbf{MSc} ), \qquad \mathbf{A}_{3}\equiv \mathbf{R}^{T}\mathbf{MR} \in \mathbb{R}^{f \times f} $$
(23)

These equations form part of the group of Maggi equations or the embedding technique. They constitute an ODE system that does not suffer from the difficulties of the DAEs in Eq. (6) or (10). Equations (2) to (23) are classical in MBS formulations.

Observe that the Lagrange multipliers no longer appear in the null space (10) or Maggi (23) formulations. However, when Φ q has full rank the value of Lagrange multipliers can be easily computed from Eq. (6) taking into account that, according to Eq. (17), matrix S is a right inverse of Φ q and so S T is a left inverse of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\). So,

$$ \boldsymbol{\lambda} = \mathbf{S}^{T}\mathbf{F} ( \mathbf{q},\dot{\mathbf{q}} ) - \mathbf{S}^{T}\mathbf{M} ( \mathbf{q} )\ddot{\mathbf{q}} $$
(24)

The main aim of this paper is to establish the conditions for the existence and uniqueness of solutions in Eqs. (6), (10) and (23), according to the properties of matrices A 1, A 2 and A 3. These equations are equivalent formulations for the dynamics of a multibody system, and consequently also equivalent conditions are expected to be found for all of them. We will start with a deeper analysis of the Lagrange equations of the first kind (6), which are the base formulation.

1.4 The rank of the Jacobian matrix made visible

The lack of maximum rank in matrices M and Φ q has a different effect on the solvability of the system of linear equation (6). Matrix A 1 can be invertible even if M is not, but never if Φ q has a rank lower than m (if it does not have full rank), because then the last m rows and columns of matrix A 1 in (6) are not independent. In the sequel the rank r of Φ q will be made visible, firstly by a simple LU factorization with column pivoting and row interchange, so as to avoid divisions by zero. We can set

$$ \mathbf{P}_{LU}\boldsymbol{\varPhi} _{\mathbf{q}} = \mathbf{L}_{m \times m}\left [ \begin{array}{c} \mathbf{U}_{r \times n} \\ \mathbf{0}_{ ( m - r ) \times n} \end{array} \right ] $$
(25)

where P LU is a permutation matrix, L m×m is a square, invertible, lower triangular matrix with ones on the diagonal, and U r×n is a rank r matrix with zeroes below the main diagonal. There are mr null rows below U r×n . These null rows have been made visible explicitly in Eq. (25).

As the permutation matrix P LU is orthogonal, Eq. (6) can be written in the following equivalent form:

$$ \left [ \begin{array}{c@{\quad}c} \mathbf{M} & \boldsymbol{\varPhi} _{\mathbf{q}}^{T}\mathbf{P}_{LU}^{T} \\ \mathbf{P}_{LU}\boldsymbol{\varPhi} _{\mathbf{q}} & \mathbf{0} \end{array} \right ]\left \{ \begin{array}{c} \ddot{\mathbf{q}} \\ \mathbf{P}_{LU}\boldsymbol{\lambda} \end{array} \right \} = \left \{ \begin{array}{c} \mathbf{F} \\ \mathbf{P}_{LU}\mathbf{c} \end{array} \right \} $$
(26)

The factorization (25) is now introduced in Eq. (26) so as to get

$$ \left [ \begin{array}{c@{\quad}c} \mathbf{M} & \left [ \begin{array}{c@{\quad}c} \mathbf{U}_{r \times n}^{T} & \mathbf{0}_{ ( m - r ) \times n}^{T} \end{array} \right ]\mathbf{L}_{m \times m}^{T}\\ \mathbf{L}_{m \times m}\left [ \begin{array}{c} \mathbf{U}_{r \times n} \\ \mathbf{0}_{ ( m - r ) \times n} \end{array} \right ] & \mathbf{0}_{m \times m} \end{array} \right ] \left \{ \begin{array}{c} \ddot{\mathbf{q}} \\ \mathbf{P}_{LU}\boldsymbol{\lambda} \end{array} \right \} = \left \{ \begin{array}{c} \mathbf{F} \\ \mathbf{P}_{LU}\mathbf{c} \end{array} \right \} $$
(27)

As the square matrix L m×m is invertible, we finally obtain the following system of equations, fully equivalent to system (6) but with more information displayed:

(28)

Regardless of the characteristics of matrix M, two observations directly follow from this equation:

  1. 1.

    As the acceleration constraint equations are assumed to be compatible, from the last mr equations in (28) it follows that

    $$ \bar{c}_{r + 1} =\cdots = \bar{c}_{m} = 0 $$
    (29)
  2. 2.

    As the last mr transformed Lagrange multipliers \(\bar{\lambda}_{r+1},\bar{\lambda}_{r+2},\ldots,\bar{\lambda}_{r+m}\) are multiplied by null columns they can take arbitrary values, carrying on them the indetermination of vector \(\bar{\boldsymbol{\lambda}}\). The original Lagrange multipliers λ can be recovered from the following expression, which directly follows from (28):

    $$ \boldsymbol{\lambda} = \mathbf{P}_{LU}^{T} \mathbf{L}_{m \times m}^{ - T}\bar{\boldsymbol{\lambda}} $$
    (30)

    The total constraint forces are given by the product \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\boldsymbol{\lambda}\) that can be expressed as

    $$ \boldsymbol{\varPhi} _{\mathbf{q}}^{T}\boldsymbol{\lambda} = \boldsymbol{\varPhi} _{\mathbf{q}}^{T}\mathbf{P}_{LU}^{T} \mathbf{L}_{m \times m}^{ - T}\bar{\boldsymbol{\lambda}} = \left [\begin{array}{c@{\quad}c} \mathbf{U}_{r \times n}^{T} & \mathbf{0}_{ ( m - r ) \times n}^{T} \end{array} \right ]\mathbf{L}_{m \times m}^{T}\mathbf{L}_{m \times m}^{ - T} \bar{\boldsymbol{\lambda}} = \mathbf{U}_{r \times n}^{T}\bar{\boldsymbol{\lambda}} _{1:r} $$
    (31)

    This result shows that, even if the Lagrange multipliers λ are undetermined, the constraint forces \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\boldsymbol{\lambda}\) are not, if the system of Eqs. (28) has a unique solution for vectors \(\ddot{\mathbf{q}}\) and \(\bar{\boldsymbol{\lambda}} _{1:r}\).

It is also possible to use the QR factorization of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\) and the Singular Value Decomposition of Φ q to arrive at similar results.

The transformed Lagrange equations of motion (28) are fully equivalent to the original Eq. (6), but they show more clearly the effects of redundant constraints.

2 Existence and uniqueness of solutions

2.1 Index 1 Lagrange equations

Let us consider again the system of Eqs. (6)

$$ \left [ \begin{array}{c@{\quad}c} \mathbf{M} & \boldsymbol{\varPhi} _{\mathbf{q}}^{T} \\ \boldsymbol{\varPhi} _{\mathbf{q}} & \mathbf{0} \end{array} \right ]\left \{ \begin{array}{c} \ddot{\mathbf{q}} \\ \boldsymbol{\lambda} \end{array} \right \} = \left \{ \begin{array}{c} \mathbf{F} \\ \mathbf{c} \end{array} \right \} $$
(32)

We want to consider the conditions for the existence and uniqueness of solutions. The starting hypotheses are as follows:

  1. 1.

    The inertia matrix M is positive semidefinite.

  2. 2.

    The acceleration constraint equations \(\boldsymbol{\varPhi} _{\mathbf{q}}\ddot{\mathbf{q}} = \mathbf{c}\), given by Eq. (5), are compatible, although they may include redundant constraints. So, we shall assume that matrix Φ q does not have full rank.

This problem is rarely addressed in the literature concerning multibody systems. Haug’s book [17] is perhaps the only example of the classical books that deal with the existence and uniqueness of a solution of the system (32). Haug demonstrated that this system has a unique solution if the matrix Φ q has maximum rank and matrix M is positive definite. These conditions are sufficient but not necessary. Sometimes, the applicability conditions of the closed-form solution given by Eqs. (7)–(8) are used instead. However, these conditions (positive definite M and full rank Φ q ) are too restrictive. One of the few examples of work dealing with these conditions is that of Udwadia and Phohomsiri [18]. It shows that a unique solution for vector \(\ddot{\mathbf{q}}\) exists if and only if \(\operatorname{rank} ( [ \mathbf{M} \ \boldsymbol{\varPhi} _{\mathbf{q}}^{T} ] ) = n\), but the proof, based on the Moore–Penrose generalized inverse, is unnecessarily long and complex.

A large family of mathematical problems that includes Eq. (32) has been addressed from outside the multibody systems community. A very interesting review comes from Benzi, Golub et al. [6], but these authors, coming from the general Linear Algebra field, do not appropriately tackle the redundant constraint problem. They suggest simply dropping redundant equations, but in multibody dynamics this means changing the physics of the problem, as correctly pointed out by Wojtyra and Frączek [26].

Considering that in Eq. (32) the force vector \(\mathbf{F} \in \mathbb{R}^{n}\) (external plus velocity dependent inertia forces) may contain arbitrary values, the condition for the system of equations,

$$ \left [ \begin{array}{c@{\quad}c} \mathbf{M} & \boldsymbol{\varPhi} _{\mathbf{q}}^{T} \end{array} \right ]\left \{ \begin{array}{c} \ddot{\mathbf{q}} \\ \boldsymbol{\lambda} \end{array} \right \} = \mathbf{F} $$
(33)

has at least one solution, which, in accordance with the Rouché–Capelli theorem, is the following one:

$$ \operatorname{rank} \left ( \left [ \begin{array}{c@{\quad}c} \mathbf{M} & \boldsymbol{\varPhi} _{\mathbf{q}}^{T} \end{array} \right ] \right ) = n $$
(34)

This is the quoted condition of Udwadia and Phohomsiri [18]. This condition also guarantees a unique solution for the accelerations, given the independent term, in the following system of equations:

$$ \left [ \begin{array}{c} \mathbf{M} \\ \boldsymbol{\varPhi} _{\mathbf{q}} \end{array} \right ]\ddot{\mathbf{q}} = \left \{ \begin{array}{c} \mathbf{F} - \boldsymbol{\varPhi} _{\mathbf{q}}^{T}\boldsymbol{\lambda} \\ \mathbf{c} \end{array} \right \} $$
(35)

It still needs to be demonstrated that the term \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\boldsymbol{\lambda}\) in the r.h.s. of Eq. (35) is unequivocally determined even if matrix Φ q does not have maximum rank and so the Lagrange multipliers λ are not determined. This condition will be considered later on. Now a new condition, fully equivalent to condition (34), will be found.

If the matrix in the system of Eqs. (35) has full rank n, the following homogeneous system has the null vector as its only solution:

$$ \left [ \begin{array}{c} \mathbf{M} \\ \boldsymbol{\varPhi} _{\mathbf{q}} \end{array} \right ]\ddot{\mathbf{q}} = \left \{ \begin{array}{c} \mathbf{0} \\ \mathbf{0} \end{array} \right \} \quad {\Rightarrow}\quad \ddot{\mathbf{q}} = \mathbf{0} $$
(36)

and this means that the only vector that belongs simultaneously to the null spaces of M and Φ q is the null vector, that is,

$$ \ker \mathbf{M} \cap \ker \boldsymbol{\varPhi} _{\mathbf{q}} = \mathbf{0} $$
(37)

This condition, fully equivalent to condition (34), is very important because it has a simpler physical interpretation that will be presented later on.

2.2 Null space method

Let us consider the matrix \(\mathbf{R} \in \mathbb{R}^{n \times f}\) obtained in Eq. (15) as a matrix whose columns are a basis of the null space of Φ q and the null space method defined by the system of differential equations (10),

$$ \left [ \begin{array}{c} \mathbf{R}^{T}\mathbf{M} \\ \boldsymbol{\varPhi} _{\mathbf{q}} \end{array} \right ]\ddot{\mathbf{q}} = \left \{ \begin{array}{c} \mathbf{R}^{T}\mathbf{F} \\ \mathbf{c} \end{array} \right \} $$
(38)

For this system to have a unique solution, taking into account that the acceleration constraints are compatible, it is necessary that

$$ \operatorname{rank} \left ( \left [ \begin{array}{c} \mathbf{R}^{T}\mathbf{M} \\ \boldsymbol{\varPhi} _{\mathbf{q}} \end{array} \right ] \right ) = n $$
(39)

A condition equivalent to this is that the corresponding homogeneous system of equations has the null vector as the only solution:

$$ \left [ \begin{array}{c} \mathbf{R}^{T}\mathbf{M} \\ \boldsymbol{\varPhi} _{\mathbf{q}} \end{array} \right ]\mathbf{x} = \left \{ \begin{array}{c} \mathbf{0} \\ \mathbf{0} \end{array} \right \} \quad {\Rightarrow}\quad \mathbf{x} = \mathbf{0} $$
(40)

From the lower part of Eq. (40) it can be concluded that x∈kerΦ q , and so this vector can be expressed as a linear combination of the columns of matrix R of Eq. (15) in the form

$$ \mathbf{x} = \mathbf{Rz}, \quad \mathbf{z} \in \mathbb{R}^{f \times 1} $$
(41)

By substituting this result in the upper part of Eq. (40) we arrive at,

$$ \mathbf{R}^{T}\mathbf{MRz} = \mathbf{0} $$
(42)

It must be remembered that, by hypothesis, matrix M is positive semidefinite. The linear algebra theory for positive semidefinite matrices (see for instance Strang [19]) establishes that there is a (non-unique) matrix P of the same rank as M such that

$$ \mathbf{M} = \mathbf{P}^{T}\mathbf{P} $$
(43)

being,

$$ \operatorname{rank} ( \mathbf{P} ) = \operatorname{rank} ( \mathbf{M} ), \qquad \ker\mathbf{P} = \ker \mathbf{M} $$
(44)

Equation (42) can be written as

$$ \mathbf{R}^{T}\mathbf{MRz} = \mathbf{R}^{T} \mathbf{P}^{T}\mathbf{PRz} = ( \mathbf{PR} )^{T}\mathbf{PRz} = \mathbf{0} $$
(45)

From this it follows that

$$ \mathbf{PRz} = \mathbf{0} \quad {\Rightarrow}\quad \mathbf{Rz} \in \ker \mathbf{P} \quad {\Leftrightarrow}\quad \mathbf{x} \in \ker \mathbf{M} $$
(46)

So Eq. (40) implies that x=0 if and only if,

$$ \ker \mathbf{M} \cap \ker \boldsymbol{\varPhi} _{\mathbf{q}} = \mathbf{0} $$
(47)

which is again condition (37). Indirectly we have also shown that

$$ \operatorname{rank} \left ( \left [ \begin{array}{c} \mathbf{R}^{T} \\ \boldsymbol{\varPhi}_{\mathbf{q}} \end{array} \right ] \right ) = \operatorname{rank} \left ( \left [ \begin{array}{c} \mathbf{R}^{T}\mathbf{M} \\ \boldsymbol{\varPhi} _{\mathbf{q}} \end{array} \right ] \right ) = \operatorname{rank} \left ( \left [ \begin{array}{c} \mathbf{M} \\ \boldsymbol{\varPhi} _{\mathbf{q}} \end{array} \right ] \right ) = n $$
(48)

Now we can conclude the reasoning about the uniqueness of the solution of Eq. (35) for the vector of accelerations \(\ddot{\mathbf{q}}\). Any vector \(\ddot{\mathbf{q}}\) that is solution of (35) also satisfies equation (38). Since the solution of (38) is unique if condition (47) or (37) are fulfilled, also the solution of (35) must be unique, implying that the product \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\boldsymbol{\lambda}\) is determined:

$$ \boldsymbol{\varPhi} _{\mathbf{q}}^{T}\boldsymbol{\lambda} = \mathbf{F} - \mathbf{M}\ddot{\mathbf{q}} $$
(49)

However, the vector of Lagrange multipliers λ is not determined if matrix Φ q does not have maximum rank, that is, when there are redundant constraint equations.

2.3 Maggi formulation

Let us consider finally Eqs. (23) corresponding to the Maggi formulation:

$$ \mathbf{R}^{T}\mathbf{MR}\ddot{\mathbf{q}}^{i} = \mathbf{R}^{T}\mathbf{F} - \mathbf{R}^{T}\mathbf{MSc} $$
(50)

For this system of equations to have a unique solution, it is necessary that the symmetric matrix R T MR be invertible, and for this, given that M is positive semidefinite, matrix R T MR must be positive definite. It is possible to write

$$ \mathbf{z}^{T}\mathbf{R}^{T}\mathbf{MRz} = \mathbf{z}^{T}\mathbf{R}^{T}\mathbf{P}^{T} \mathbf{PRz} = ( \mathbf{PRz} )^{T}\mathbf{PRz} = \Vert \mathbf{PRz} \Vert _{2}^{2} > 0 $$
(51)

and this implies that Rz∉kerP, that is, x∉kerM. We arrive once again at,

$$ \ker \mathbf{M} \cap \ker \boldsymbol{\varPhi} _{\mathbf{q}} = \mathbf{0} $$
(52)

which is the same condition obtained in Eqs. (37) and (47).

In physical terms, condition (52) implies that any physically possible movement (i.e., which satisfies the constraint equations) cannot be associated with zero kinetic energy. Any possible velocity \(\dot{\mathbf{q}} = \mathbf{R}\dot{\mathbf{q}}^{i}\) is associated with a positive kinetic energy,

$$ T = \frac{1}{2}\dot{\mathbf{q}}^{T}\mathbf{M}\dot{\mathbf{q}} = \frac{1}{2}\dot{\mathbf{q}}^{iT}\mathbf{R}^{T}\mathbf{MR}\dot{\mathbf{q}}^{i} > 0 \quad \forall \dot{\mathbf{q}}^{i} \ne \mathbf{0} $$
(53)

In other words, the dynamic equations of motion (50) have a unique solution for the acceleration vector if and only if all possible velocities lead to a positive kinetic energy.

The differential equations of motion of a multibody system are a well-conditioned mathematical problem and have a solution because the corresponding physical problem is also well-conditioned. It has been shown that a mathematical solution exists if the physical system has only possible motions that involve kinetic energy, which is the only valid option in the real world.

3 Redundant constraints and constraint forces

3.1 A badly conditioned physical problem

The case is completely different for the determination of constraint forces in overconstrained multibody systems. In our opinion this is a badly conditioned physical problem and this fact is reflected in the mathematical models used to determine the constraint forces. In recent years, there has been a renewed interest in this subject in the literature largely due to the work of Frączek and Wojtyra [2026]. These constraint forces are influenced by a large variety of factors difficult to know or to estimate. Probably the most important factors are the following ones:

  1. 1.

    Joint flexibilities

  2. 2.

    Link or body flexibilities

  3. 3.

    Manufacturing errors regarding distances and angles.

As some of these factors are difficult to know exactly, it is probably meaningless to talk about the “real solution”. It is very likely that the constraint forces measured on a series of theoretically identical real overconstrained multibody systems be different in practice. It is also foreseeable that the constraint forces vary throughout the life of the system, due for instance to greater wear in the most loaded joints. As real solutions are very difficult or unattainable, it is necessary to concentrate on “engineering solutions” that are sufficient for the design of real systems. Engineering solutions shall be approximate, cheap and safe. For different applications, these conditions can be translated into different mathematical models. For instance, sometimes the consideration of flexibility or manufacturing errors shall be mandatory, sometimes not.

The purpose of this paper is to present the possibilities and the physical meaning of simple mathematical solutions for overconstrained multibody systems with substantially rigid bodies and joints, and small manufacturing errors.

3.2 Some general considerations

It has previously been shown that if a multibody system is overconstrained, but meets any of conditions (34), (37) or (53), the accelerations and the resultant constraint forces \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\boldsymbol{\lambda}\) are determined, but the vector λ that contains the amplitudes of individual constraint forces, is not. In order to find meaningful solutions for the redundant constraint forces, it is necessary to take into account the following considerations:

  1. 1.

    For overconstrained multibody systems mathematical indetermination is a consequence of physical indetermination. Consider for instance that if a real overconstrained system has manufacturing errors it shall be necessary to deform some of its links and/or joints to carry out the system assembly. As a consequence, the system may have self-equilibrating constraint forces even at rest. Not surprisingly, the mathematical model also has an indetermination which will not be solved until the physical indetermination is clarified.

  2. 2.

    Changing or modifying the physical system so as to remove the redundant constraints cannot be considered as a general solution, because the model actually analyzed does not correspond with the real one. For instance, a common practice to analyze 3-D four bar systems with revolute joints is to replace two revolute joints by a spherical joint and a universal joint, respectively. This leaves the system unaltered for the kinematics and for the forward dynamics, but drastically changes the determination of constraint forces. Another possible way to eliminate redundancy is to introduce flexibility in a subset or in all bodies. Changes in the model introduced only to solve the redundancy problem shall be appropriately justified, and shall always keep, as far as possible, the model features of symmetry and consistency.

  3. 3.

    In mathematics a common solution to the problem of redundant linear equations is simply to detect and remove them [6]. This cannot be considered as a general solution for redundant constraint forces determination, because in practice the elimination of equations coincides with the modification of the mathematical model of the physical system, as has been pointed out by Wojtyra and Frączek [26]. Thus, a correct way to proceed in many other applications (for instance, in the determination of the Jacobian null space basis according to Eqs. (15)) ceases to be so for the application which is being considered in this section.

  4. 4.

    In an ideal system (with no friction) with redundant constraints, under some very easy to fulfill assumptions, the resultant constraint forces are:

    $$ \boldsymbol{\varPhi} _{\mathbf{q}}^{T}\boldsymbol{\lambda} = \mathbf{F} ( \mathbf{q},\dot{\mathbf{q}} ) - \mathbf{M}\ddot{\mathbf{q}} $$
    (54)

    These constraint forces are determined, although the individual Lagrange multipliers λ are not, because the rank of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\) is lower than its number of columns. Mathematically, system (54) has infinite solutions, but in Linear Algebra there is a solution that is considered as a preferred one: the minimum Euclidean norm solution. This is the solution provided by the pseudo-inverse, although in this case (Eqs. (54) are compatible) there are simpler and more efficient ways to compute this minimum norm solution. This minimum norm solution also has an interesting physical meaning.

  5. 5.

    The penalty method and the augmented Lagrangian formulation have been used to compute constraint forces in redundantly constrained systems (see references [2729]), but they do not solve the indetermination of the Lagrange multipliers. For instance, two general and typical expressions of the augmented Lagrangian used to iterate in each integration step are given below,

    $$ \mathbf{M}\ddot{\mathbf{q}} + \boldsymbol{\varPhi} _{\mathbf{q}}^{T} \alpha \bigl( \ddot{\boldsymbol{\varPhi}} + 2\varOmega \mu \dot{\boldsymbol{\varPhi}} + \varOmega ^{2}\boldsymbol{\varPhi} \bigr) + \boldsymbol{\varPhi}_{\mathbf{q}}^{T}\boldsymbol{\lambda} ^{ *} = \mathbf{Q} $$
    (55)
    $$ \boldsymbol{\lambda} _{i + 1}^{ *} = \boldsymbol{\lambda}_{i}^{ *} + \alpha \bigl( \ddot{\boldsymbol{\varPhi}} + 2\varOmega \mu \dot{\boldsymbol{\varPhi}} + \varOmega ^{2}\boldsymbol{\varPhi}\bigr)_{i} $$
    (56)

    These equations show that the Lagrange multipliers and the penalty terms always appear multiplied by \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\). As \(\dim \ker \boldsymbol{\varPhi} _{\mathbf{q}}^{T} \ge 1\), the Lagrange multipliers λ are undetermined with respect to their component in \(\ker \boldsymbol{\varPhi} _{\mathbf{q}}^{T}\), which depends on its value in the initial approximation or even on the accumulated numerical errors.

  6. 6.

    The flexibility of the solids cannot be considered the only correct and general solution. Sometimes this solution has been called “exact solution”, but it is still a limited assumption, albeit more sophisticated. Nor can one ignore the flexibility of the joints, which is often much more important than the flexibility of the links. Finally it must be noted that we should not forget the poorly known and potential manufacturing errors in the lengths of the elements or in the angles between axes of rotation.

3.3 Minimum norm solution of compatible undetermined systems of linear equations

The point here is that it is not necessary to change the model, either by adding flexible degrees of freedom or by reducing constraints in the joints. It is enough to apply well known methods of linear algebra. Figure 1 shows the simplest undetermined linear system of equations:

$$ a_{11}x_{1} + a_{12}x_{2} = b_{1} \quad ( \mathbf{Ax} = \mathbf{b} ) $$
(57)

This equation has infinite solutions. The general solution may be expressed as

$$ \mathbf{x} = \mathbf{x}_{p} + \alpha \mathbf{u} $$
(58)

where x p is a particular solution, u is a vector in the null space of A and α is the real parameter that allows all the solutions to be obtained.

Fig. 1
figure 1

Graphical representation of the simplest undetermined linear system

We introduce two observations, regarding this undetermined system of linear equations:

  1. 1.

    Two solutions, as x p and x, always differ by a vector in the null space of A (ker(A)).

  2. 2.

    The minimum norm solution x 0 belongs to the orthogonal complement of the null space of A, which is the row space of A, that is, \(\operatorname{Im} ( \mathbf{A}^{T} )\).

3.4 Self-equilibrating constraint forces

The previous results can be easily applied to the compatible and undetermined system (54). Assuming that the rank on Φ q is r<m and that the columns of matrix \(\mathbf{N} \in \mathbb{R}^{m \times ( m - r )}\) are a basis of the null space of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\), the whole set of solutions of Eq. (54) may be expressed in the form

$$ \boldsymbol{\lambda} = \boldsymbol{\lambda} _{0} + \mathbf{N} \boldsymbol{\alpha}, \quad \boldsymbol{\alpha} \in \mathbb{R}^{m - r} $$
(59)

where λ 0 is the minimum norm solution and N α is a vector in the null space of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\):

$$ \boldsymbol{\varPhi} _{\mathbf{q}}^{T}\mathbf{N}\boldsymbol{\alpha} = \mathbf{0} $$
(60)

The important point of Eq. (60) is that \(\boldsymbol{\varPhi}_{\mathbf{q}}^{T}\mathbf{N}\boldsymbol{\alpha}\) is a set of self-equilibrating constraint forces. They do not appear in the dynamic equations (1) nor produce virtual work or virtual power, but they are not individually null. All the solutions for constraint forces in Eq. (54) differ on a set of self-equilibrating forces. It is very important to understand the physical meaning of these forces, rarely emphasized in the literature. Some examples will clarify this point.

Equation (60) also provides a physical way to find the subset of constraint forces that are determined, a question that has been outlined by Wojtyra [22] and Frączek and Wojtyra [23]. Here an alternative view is presented. Effectively, in the linear combination of vectors \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\mathbf{N}\) given by Eq. (60), the columns of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\) that are multiplied by null rows of N represent constraint forces that are not affected by the self-equilibrating constraint forces. A possible MATLAB® instruction to determine these constraint forces may be the following:

$$ \texttt{in = find(sum(abs(N),2)<=1e-10);} $$
(61)

In other words, a constraint force is determined if it does not appear in any possible set of self-equilibrating forces. The examples that follow will clarify this point.

3.4.1 Example 1: 3-D four bar with parallel axes

Figure 2 shows a four bar, four revolute joint, mechanism contained in the plane YZ, with the revolute joint axes perpendicular to this plane. It is known that this system has 1 degree of freedom, but the Grübler–Kutzbach criterion predicts 6×3−4×5=−2 degrees of freedom. Only because the four revolute joints axes are parallel, this system can move. It is a system with three redundant constraints. It is obvious that if there are manufacturing errors in the direction of the joint axes the system cannot be assembled unless the bodies are deformed by some external forces. If after the assembly process these external forces are removed, the system will reach an equilibrium state with non-null, self-equilibrating constraint forces that belongs to the null space of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\), which in this case has dimension 3.

Fig. 2
figure 2

3-D four bar with parallel axes

Figures 3, 4 and 5 show three independent sets of self-equilibrating forces. This system has been modeled with reference point or Cartesian coordinates (using Euler parameters for positions). So, joint constraint equations have been used. The product \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\boldsymbol{\lambda}\) provides the constraint forces translated to the reference point (the center of gravity). In order to display them, these constraint forces have been moved back to the corresponding joint.

Fig. 3
figure 3

Set 1 of self-equilibrating forces

Fig. 4
figure 4

Set 2 of self-equilibrating forces

Fig. 5
figure 5

Set 3 of self-equilibrating forces

By executing the MATLAB code (61) (in = find(sum(abs(N),2)<=1e-10);) it is obtained the result that the constraint forces that can be determined unequivocally are the following ones: 2, 3, 7, 8, 12, 13, 17, and 18. These constraints correspond with the Y and Z forces in the four joints, that is, the joint reaction forces in the plane that contains the system. It can be observed that these forces do not appear in the sets of self-equilibrating forces shown in the following Figs. 35.

3.5 Minimum norm solution independent of the units used

It has been emphasized by Wojtyra and Frączek [26] that the minimum norm solution of the linear system of Eqs. (54) does not remain invariant under a change in units. This issue can be addressed if the constraint equations Φ and the Jacobian matrix Φ q meet some conditions.

A change in units in the vector of constraint equations would require multiplying by a diagonal matrix H 1,

$$ \tilde{\boldsymbol{\varPhi}} = \mathbf{H}_{1}\boldsymbol{\varPhi} = \mathbf{0} $$
(62)

where \(\tilde{\boldsymbol{\varPhi}}\) is the vector of constraint equations in the new units.

The values of the diagonal of matrix H 1 depend on the type of constraint equations. Let f be a factor representing the required change of length units. Then if the coordinates are expressed in meters, a change to centimeters will imply that f has a value of 100. Similarly, a change to millimeters means that f has a value of 1000.

In the case where natural coordinates are used, element i of the diagonal of matrix H 1 is equal to f 2 if equation i is a constant distance equation, it is equal to f when equation i is a constant angle equation between a unit vector and a distance vector between two points, and it is equal to 1 if equation i is a constant angle equation between two unit vectors or a constant norm equation of a unit vector.

Similarly, the change in length units in the vector of generalized positions, velocities and accelerations is represented by a diagonal matrix G 1,

$$ \tilde{\mathbf{q}} = \mathbf{G}_{1}\mathbf{q},\qquad \tilde{\dot{\mathbf{q}}} = \mathbf{G}_{1}\dot{\mathbf{q}},\qquad \tilde{\ddot{\mathbf{q}}} = \mathbf{G}_{1}\ddot{\mathbf{q}} $$
(63)

For instance, when natural coordinates are used, the elements of the diagonal of G 1 are equal to f for the coordinates of points and equal to 1 for the components of unit vectors. According to this, a change in units modifies the Jacobian matrix as follows:

$$ \tilde{\boldsymbol{\varPhi}} _{\mathbf{q}} = \mathbf{H}_{1}\boldsymbol{\varPhi} _{\mathbf{q}}\mathbf{G}_{1}^{ - 1} $$
(64)

On the other hand, changing the units of length involves that the vector of external and inertia forces needs to be multiplied by a diagonal matrix G 2. Element i of the diagonal of matrix G 2 is equal to f when it corresponds to a force and equal to f 2 when it corresponds to a torque.

A relationship between matrices G 1 and G 2 can be easily established because the product between forces and velocities has units of power, so the product of G 1and G 2 may be expressed as

$$ \mathbf{G}_{1}\mathbf{G}_{2} = f^{2}\mathbf{I} $$
(65)
$$ \mathbf{G}_{2} = \mathbf{G}_{1}^{ - 1}f^{2} $$
(66)

Therefore when units are changed, Eq. (54) can be written as follows:

$$ \bigl( \mathbf{G}_{1}^{ - 1}\boldsymbol{\varPhi}_{\mathbf{q}}^{T}\mathbf{H}_{1} \bigr)\tilde{\boldsymbol{\lambda}} = \mathbf{G}_{2} \bigl( \mathbf{F} ( \mathbf{q},\dot{\mathbf{q}} ) - \mathbf{M}\ddot{\mathbf{q}} \bigr) $$
(67)

where \(\tilde{\boldsymbol{\lambda}}\) represents the new value of Lagrange multipliers after the change of units. By considering Eq. (66) and eliminating \(\mathbf{G}_{1}^{ - 1}f^{2}\) in both sides, Eq. (67) can be modified as follows:

$$ \boldsymbol{\varPhi} _{\mathbf{q}}^{T}f^{ - 2} \mathbf{H}_{1}\tilde{\boldsymbol{\lambda}} = \mathbf{F} ( \mathbf{q},\dot{\mathbf{q}} ) - \mathbf{M}\ddot{\mathbf{q}} $$
(68)

By comparing this equation with Eq. (54) we conclude that

$$ \boldsymbol{\lambda} = f^{ - 2}\mathbf{H}_{1}\tilde{\boldsymbol{\lambda}} $$
(69)

Next let us consider the conditions for invariance in the minimum norm solution. The minimum norm solution of Eq. (54) can be obtained by taking into account the additional condition of λ belonging to the orthogonal complement of \(\ker \boldsymbol{\varPhi}_{\mathbf{q}}^{T}\):

$$ \left [ \begin{array}{c} \boldsymbol{\varPhi} _{\mathbf{q}}^{T} \\\noalign{\vspace{2pt}} \mathbf{N}^{T}\end{array} \right ] \boldsymbol{\lambda} = \left \{ \begin{array}{c} \mathbf{F} (\mathbf{q},\dot{\mathbf{q}} ) - \mathbf{M}\ddot{\mathbf{q}} \\ \mathbf{0} \end{array} \right \} $$
(70)

where the columns of matrix \(\mathbf{N} \in \mathbb{R}^{m \times ( m - r )}\) are a basis of the null space of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\). By introducing expression (69) in (70) we obtain the original minimum norm equation in terms of \(\tilde{\boldsymbol{\lambda}}\),

$$ \left [ \begin{array}{c} \boldsymbol{\varPhi} _{\mathbf{q}}^{T}\mathbf{H}_{1} \\\noalign{\vspace{4pt}} \mathbf{N}^{T}\mathbf{H}_{1} \end{array} \right ]f^{ - 2}\tilde{\boldsymbol{\lambda}} = \left \{\begin{array}{c} \mathbf{F} ( \mathbf{q},\dot{\mathbf{q}} ) - \mathbf{M}\ddot{\mathbf{q}} \\ \mathbf{0} \end{array} \right \} $$
(71)

On the other hand, after the change in units, the minimum norm solution of Eq. (68) is given by the following equation:

$$ \left [ \begin{array}{c} \boldsymbol{\varPhi} _{\mathbf{q}}^{T}\mathbf{H}_{1} \\\noalign{\vspace{4pt}} \mathbf{N}^{T}\mathbf{H}_{1}^{ - 1} \end{array} \right ]f^{ - 2}\tilde{\boldsymbol{\lambda}} = \left \{ \begin{array}{c} \mathbf{F} ( \mathbf{q},\dot{\mathbf{q}} ) - \mathbf{M}\ddot{\mathbf{q}} \\ \mathbf{0} \end{array} \right \} $$
(72)

where the columns of matrix \(\mathbf{N}^{T}\mathbf{H}_{1}^{ - 1} \in \mathbb{R}^{m \times ( m - r )}\) are a basis of the null space of \(\mathbf{G}_{1}^{ - 1}\boldsymbol{\varPhi}_{\mathbf{q}}^{T}\mathbf{H}_{1}\).

In order to obtain the same minimum norm solution with both Eqs. (71) and (72), the following condition shall be met:

$$ \operatorname{Im} \bigl( \mathbf{H}_{1}^{ - 1}\mathbf{N} \bigr) = \operatorname{Im} ( \mathbf{H}_{1}\mathbf{N} ) $$
(73)

Left multiplication by a diagonal matrix destroys the column space of matrix N unless the diagonal matrix is the identity matrix times a scalar value, that is,

$$ \mathbf{H}_{1} = \beta \mathbf{I}, \quad \beta \in \mathbb{R},\ \beta \ne 0 $$
(74)

Therefore, it is possible to obtain a minimum norm solution independent of units if the constraint equations are modified such that the matrix H 1 needed to introduce the change in units in the constraint equations meets Eq. (74), that is, all the constraint equations have the same length dimension (or are non-dimensional).

In order to meet condition (74), the constraint equations can be modified by pre-multiplying them by a weighting matrix W. However, there are many possible weighting matrices that satisfy condition (74) and each one may lead to a different set of constraint equations, and consequently to a different minimum norm solution that is independent of units. Nevertheless, as will be shown in the following section with a couple of examples, this freedom to choose the weighting matrix W may be used to obtain a solution that takes into account the elements’ flexibility. At the end, by using that appropriate weighting matrix W, we can obtain a unit-independent minimum norm solution that coincides with the solution of the model with flexible bodies. The following section discusses further possibilities of this mathematical minimum norm solution.

3.6 Weighted minimum norm solution

The use of the weighted minimum norm solution can sometimes provide an easy alternative to the use of flexible bodies for the determination of redundant constraint forces. This purely numerical technique is similar to the relationship introduced by González and Kövecses [29] between penalty factors and physical stiffness. The stiffness of some bodies can be accounted for by multiplying the constraint equations by a set of weighting factors which depend on the stiffness properties. Let us introduce a diagonal weight matrix W(q) whose elements are related to the stiffness distribution of the system. The weighted constraints are W(q)Φ(q)=0. The constraint forces are obtained from the equations

$$ \bigl( \boldsymbol{\varPhi} _{\mathbf{q}}^{T}\mathbf{W} \bigr) \boldsymbol{\lambda} = \mathbf{F} ( \mathbf{q},\dot{\mathbf{q}} ) - \mathbf{M} \ddot{\mathbf{q}} $$
(75)

The minimum norm solution of system (75) should coincide with the solution with flexible behavior. The values of the diagonal matrix W(q) depend on the Jacobian matrix of constraint equations \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\) and on the stiffness properties of the system. The following examples will help to clarify this point.

3.6.1 Example 2: Planar five-link mechanism

Let us consider as the second example the redundant 2-D mechanism in Fig. 6, taken from Blajer [27]. It is a five bar system with two parallel couplers 3–4 and 5–6.

Fig. 6
figure 6

Self-equilibrating internal forces coming from an assembly problem

The constraint equations for this system are particularly simple when 2-D natural coordinates are used. Only constant distance conditions and vector proportionality constraints are needed. There are eight Cartesian coordinates related by the following eight constraint equations:

$$ ( x_{3} - x_{1} )^{2} + ( y_{3} - y_{1} )^{2} - L_{1}^{2} = 0 $$
(76)
$$ ( x_{4} - x_{2} )^{2} + ( y_{4} - y_{2} )^{2} - L_{1}^{2} = 0 $$
(77)
$$ ( x_{5} - x_{1} ) - k ( x_{3} - x_{1} ) = 0 $$
(78)
$$ ( y_{5} - y_{1} ) - k ( y_{3} - y_{1}) = 0 $$
(79)
$$ ( x_{6} - x_{2} ) - k ( x_{4} - x_{2} ) = 0 $$
(80)
$$ ( y_{6} - y_{2} ) - k ( y_{4} - y_{2} ) = 0 $$
(81)
$$ ( x_{4} - x_{3} )^{2} + ( y_{4} - y_{3} )^{2} - L_{2}^{2} = 0 $$
(82)
$$ ( x_{6} - x_{5} )^{2} + ( y_{6} - y_{5} )^{2} - L_{2}^{2} = 0 $$
(83)

where k, L 1 and L 2 are constants. The vector of dependent coordinates is (points 1 and 2 are fixed):

$$ \mathbf{q}^{T} \equiv \left \{ \begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c} x_{3} & y_{3} & x_{4} & y_{4} & x_{5} & y_{5} & x_{6} & y_{6} \end{array} \right \} $$
(84)

The constraint equations’ Jacobian is particularly simple:

$$ \begin{aligned}[b] \boldsymbol{\varPhi} _{\mathbf{q}} \equiv & \left [ \begin{array}{c@{\quad}c@{\quad}c@{\quad}c} 2 ( x_{3} - x_{1} ) & 2 ( y_{3} - y_{1} ) & 0 & 0 \\ 0 & 0 & 2 ( x_{4} - x_{2} ) & 2 ( y_{4} - y_{2} ) \\ - 2 & 0 & 0 & 0 \\ 0 & - 2 & 0 & 0 \\ 0 & 0 & - 2 & 0 \\ 0 & 0 & 0 & - 2 \\ 2 ( x_{3} - x_{4} ) & 2 ( y_{3} - y_{4} ) & 2 ( x_{4} - x_{3} ) & 2 (y_{4} - y_{3} ) \\ 0 & 0 & 0 & 0 \\ \end{array} \right. \\\noalign{\vspace{4pt}} &\phantom{\Biggl[} \left . \begin{array}{c@{\quad}c@{\quad}c@{\quad}c} 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 2 ( x_{5} - x_{6} ) & 2 (y_{5} - y_{6} ) & 2 ( x_{6} - x_{5} ) & 2 ( y_{6} - y_{5} ) \end{array} \right ] \end{aligned} $$
(85)

The null space of the transpose of this matrix is given by

(86)

The constraint forces represented by the columns of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\) multiplied by the values of vector N are the self-equilibrating forces represented in the right part of Fig. 6. Each constraint force is represented in the same color of the body that receives it. How may these self-equilibrating forces arise?

If the dimensions of the elements are not exactly the correct ones, element distortion and the appearance of internal reactions are unavoidable during the assembly process. For example, if the bar 5–6 is shorter than it should, in order to attach it to the other bars, it would be necessary to stretch it as shown in the left of Fig. 6. When the bar has the appropriate length it is assembled and the external forces disappear. The system will reach an equilibrium configuration with some internal reactions, as shown in the right of Fig. 6 (each force is shown with the same color as the element to which it is applied). The forces that appear in this figure are a system of self-equilibrating internal forces, which can exist even in the absence of external and inertia forces. The point is that these internal self-equilibrating forces cannot be determined unless the exact dimensions of all bodies are known, with manufacturing and assembly errors. This is a simple example of a physical indetermination that leads to a mathematical indetermination.

What can be done in this case, without precise information on manufacturing errors? In practice the only reasonable thing that can be done is to assume that the mechanism is built without errors and that these self-equilibrating forces are zero. But this hypothesis about the physical system can also be transferred to the mathematical model, by choosing one of the infinite solutions that exist. The most reasonable choice of mathematical solution for the constraint forces is one in which the self-equilibrating component is zero, which is to say that there are no manufacturing errors, and that assembly can be done without “distorting” the system.

It should be noted that the self-equilibrating forces of Fig. 6 keep in equilibrium each body and each joint. They do not produce virtual work nor appear in the dynamic equations. The Lagrange multipliers corresponding to these forces belong to the null space of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\) and they do not contribute to the term \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\boldsymbol{\lambda}\), which is determined, though vector λ is not.

According to Eq. (86), the Lagrange multipliers λ 1, λ 2, λ 4 and λ 6 are determined, since they correlate with null values in the basis vector of the null space of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\). In order to obtain the remaining undetermined Lagrange multipliers, a displacement compatibility equation can be added to system (54). This compatibility equation can be expressed as follows:

$$ \varphi _{1}L_{1} - \varphi _{2}L_{1} - 2\Delta L_{3 - 4} + \Delta L_{5 - 6} = 0 $$
(87)

where φ 1 is the angular displacement between bars 1–3 and 3–5, φ 2 is the angular displacement between bars 2–4 and 4–6, ΔL 3−4 is the elongation of bar 3–4 and ΔL 5−6 is the elongation of bar 5–6.

Assuming linear stiffness relating forces and spring elongations, Eq. (87) can be expressed in terms of the Lagrange multipliers as follows:

$$ \biggl( \frac{1}{k_{\mathrm{rot}1}}L_{1}\lambda _{3} \biggr)L_{1} - \biggl( \frac{1}{k_{\mathrm{rot}2}}L_{1}\lambda _{5} \biggr)L_{1} - 2 \biggl( \frac{2 ( x_{4} - x_{3} )}{k_{1}}\lambda _{7} \biggr) + \biggl( \frac{2 ( x_{6} - x_{5} )}{k_{2}}\lambda _{8} \biggr) = 0 $$
(88)

where k rot1 and k rot2 are the stiffness of the torsion springs that represent the bending stiffness of bodies 1–3–5 and 2–4–6, respectively, and k 1 and k 2 represent the axial stiffness of bars 3–4 and 5–6, respectively.

However, from a mathematical point of view, the minimum norm solution is obtained by adding a new equation to the system of Eqs. (54) to impose that λ belongs to the orthogonal complement of the null space of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\):

$$ \lambda _{3} - \lambda _{5} - \frac{1}{ ( x_{4} - x_{3} )}\lambda _{7} + \frac{1}{2 ( x_{6} - x_{5} )}\lambda _{8} = 0 $$
(89)

The compatibility equation (88) and the equation imposed to obtain the minimum norm solution (89) are not equivalent. In order to make both equations coincide, constraint equations can be multiplied by a weight matrix W which reflects the stiffness distribution of the system. After multiplying the constraint equations by matrix W, Eqs. (88) and (89) become

$$ \frac{w_{3}}{k_{\mathrm{rot}1}}L_{1}^{2}\lambda _{3} - \frac{w_{5}}{k_{\mathrm{rot}2}}L_{1}^{2}\lambda _{5} - \frac{4 ( x_{4} - x_{3} )w_{7}}{k_{1}}\lambda _{7} + \frac{2 ( x_{6} - x_{5} )w_{8}}{k_{2}}\lambda _{8} = 0 $$
(90)
$$ \frac{\lambda _{3}}{w_{3}} - \frac{\lambda _{5}}{w_{5}} - \frac{1}{ ( x_{4} - x_{3} )w_{7}}\lambda _{7} + \frac{1}{2 ( x_{6} - x_{5} )w_{8}}\lambda _{8} = 0 $$
(91)

where,

$$ \mathbf{W} = \left [ \begin{array}{c@{\quad}c@{\quad}c@{\quad}c} w_{1} & 0 & \cdots & 0 \\ 0 & w_{2} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & w_{8} \end{array} \right ] $$
(92)

Comparing Eqs. (90) and (91), the following relationships between the stiffness of the physical solution and the weights of the mathematical solution are obtained:

(93)

The values in the diagonal of the weight matrix can be obtained from Eqs. (93):

(94)

Therefore, Eqs. (78), (80), (82), and (83) must be multiplied by the factors of Eq. (94) so that the minimum norm solution reflects the structural properties of the system. That is to say, if constraint equations are weighted with the factors in Eq. (94), the compatibility equation of the system and the equation that imposes that the Lagrange multipliers belong to the orthogonal complement of the null space of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\) are equivalent. The remaining constraint equations do not need to be multiplied by any factor, since the associated Lagrange multipliers are perfectly determined. For this reason, in this example, elements w 1, w 2, w 4 and w 6 of matrix W can be equal to one.

The dynamics of the five-bar, double quadrilateral mechanism in Fig. 6 has been studied using several techniques. Distances 1–3, 3–4, 1–2, 3–5, 5–6, 2–4 and 4–6 are 1 m each. Bodies 1–3–5 and 2–4–6 have a uniformly distributed mass of 16 kg each, while elements 3–4 and 5–6 are considered to be zero-mass elements. The dynamic simulation starts at the position shown in Fig. 7 with an initial angular velocity of 2 rad/s. A constant clockwise torque of 200 N m is applied from the start. From the initial position, angle φ increases from 90° to 96.7° and then, it decreases to −330.97° going through two singular positions at φ=0 and φ=−180. The simulation time is 1.8 s and all the simulations have been performed with the numerical ODE integrators of MATLAB. In the rigid bodies case the best results have been obtained with the ode113 function (Adams–Bashforth–Moulton). When springs are introduced the equations become stiff and the ode23t function (trapezoidal rule) is far more efficient.

Fig. 7
figure 7

Initial position, velocity and torque

First, the minimum norm solution has been computed and the constraint forces for bars 3–4 and 5–6 are shown in Fig. 8. An invariant minimum norm solution has also been found and is shown in Fig. 9. This solution has been obtained by making each constraint equation non-dimensional, that is, the constant distance equations (76) and (77) have been divided by \(L_{1}^{2}\), Eqs. (78)–(81) have been divided by kL 1 and Eqs. (82) and (83) by \(L_{2}^{2}\). This may be considered as a “reference” solution in the absence of stiffness data.

Fig. 8
figure 8

Minimum norm solution

Fig. 9
figure 9

Normalized minimum norm solution

Then the simple flexible model shown in Fig. 10 has been considered. This model takes into account the axial flexibility and damping of rods 3–4 and 5–6, but it includes also two torsion springs that represent the bending flexibility of bodies 1–3–5 and 2–4–6. Before looking more closely at the results, an in-depth study of the physics of the problem is required.

Fig. 10
figure 10

Simple flexible model

Special care should be taken in dynamic simulations which study the constraint forces in the zero-mass bars 3–4 and 5–6. It is of interest to gain an insight into the physics of this dynamic simulation. The mechanism in Fig. 7 consists of two identical bodies 1–3–5 and 2–4–6 that are kept parallel by the zero-mass bars 3–4 and 5–6. Both bodies have the same mass and the same velocities, so they have the same kinetic energy. However, the external torque is only applied on body 1–3–5. The effect of this torque is transmitted to body 2–4–6 by the horizontal bars 3–4 and 5–6, which transmit only horizontal forces. At the beginning, φ>0, bars 3–4 and 5–6 push body 2–4–6, so they are subjected to compression constraint forces. As angle φ is approaching zero, the forces in bars 3–4 and 5–6 have to increase so that the torque about point 2 is maintained. When the system is very close to the singular position φ=0, these forces approach an infinite negative value, as shown in Fig. 8. After the singular position, bars 3–4 and 5–6 are pulling body 2–4–6 in order to maintain its clockwise (negative) angular acceleration. Immediately after the singular position the constraint forces on the bars have an infinite positive value, as may be seen on Fig. 8. These results are repeated, with reversed sign, at the singularity at φ=−180.

Summing up, when going through singular positions, the constraint forces in bars 3–4 and 5–6 change suddenly from huge negative values to huge positive values, or vice versa. In real physical problems, this is shown by elastic longitudinal waves in both bars.

A simulation with the flexible model shown in Fig. 10 has been performed. For the longitudinal springs it has been considered a stiffness value of k=fac RL⋅2×105 N/m and a damping of c=fac RL⋅1×103 N s/m. For the torsion springs, the values are k rot=fac RT⋅5×104 N m/rad and c rot=fac RT⋅1×103 N m s/rad. fac RL and fac RT are constant values that allow to weight differently the longitudinal and torsion springs, so as to make more or less relatively stiff the bodies 1–3–5 and 2–4–6, or the rods 3–4 and 5–6. Figure 11 shows the simulation results with the flexible model when bodies 1–3–5 and 2–4–6 are much stiffer than the rods. Figure 12 corresponds to the opposite case scenario. This simple flexible model is unable to reflect accurately the complex process of going over the singularity, but it represents an improvement with respect to the rigid body case.

Fig. 11
figure 11

Flexible solution (KL=1, KT=1000)

Fig. 12
figure 12

Flexible solution (KL=1000, KT=1)

The same problem has been studied with the weighted constraints, by using the weighting factors related to the stiffness coefficients considered in Eqs. (92) and (94). Results shown in Fig. 13 correspond to the flexible ones in Fig. 11, and those in Fig. 14 with the flexible ones in Fig. 12. In conclusion, the minimum norm weighted constraint method does its best because it accurately represents the redundant constraint forces out of the singular positions.

Fig. 13
figure 13

Weighted solution (KL=1, KT=1000)

Fig. 14
figure 14

Weighted solution (KL=1000, KT=1)

3.6.2 Example 3: 3-D parallelogram mechanism

This example, shown in Fig. 15, is taken from Frączek and Wojtyra [25]. By using natural coordinates the constraint equations are very simple and can be written as

$$ ( \mathbf{r}_{1} - \mathbf{r}_{A} )^{T} (\mathbf{r}_{1} - \mathbf{r}_{A} ) - L_{1}^{2}= 0 $$
(95)
$$ ( \mathbf{r}_{2} - \mathbf{r}_{C} )^{T} (\mathbf{r}_{2} - \mathbf{r}_{C} ) - L_{1}^{2}= 0 $$
(96)
$$ ( \mathbf{r}_{3} - \mathbf{r}_{E} )^{T} (\mathbf{r}_{3} - \mathbf{r}_{E} ) - L_{1}^{2}= 0 $$
(97)
$$ ( \mathbf{r}_{4} - \mathbf{r}_{G} )^{T} (\mathbf{r}_{4} - \mathbf{r}_{G} ) - L_{1}^{2}= 0 $$
(98)
$$ ( \mathbf{r}_{5} - \mathbf{r}_{K} )^{T} (\mathbf{r}_{5} - \mathbf{r}_{K} ) - L_{1}^{2}= 0 $$
(99)
$$ ( \mathbf{r}_{6} - \mathbf{r}_{M} )^{T} (\mathbf{r}_{6} - \mathbf{r}_{M} ) - L_{1}^{2}= 0 $$
(100)
$$ ( \mathbf{r}_{1} - \mathbf{r}_{2} )^{T} (\mathbf{r}_{1} - \mathbf{r}_{2} ) - L_{2}^{2}= 0 $$
(101)
$$ ( \mathbf{r}_{3} - \mathbf{r}_{2} )^{T} (\mathbf{r}_{3} - \mathbf{r}_{2} ) - L_{2}^{2}= 0 $$
(102)
$$ ( \mathbf{r}_{3} - \mathbf{r}_{1} )^{T} (\mathbf{r}_{3} - \mathbf{r}_{1} ) - L_{2}^{2}= 0 $$
(103)
$$ \mathbf{r}_{2} + \mathbf{r}_{3} - 2\mathbf{r}_{6}= \mathbf{0} $$
(104)
$$ \mathbf{r}_{1} - \mathbf{r}_{2} + \mathbf{r}_{3}- \mathbf{r}_{4} = \mathbf{0} $$
(105)
$$ 2\mathbf{r}_{1} - \mathbf{r}_{2} + \mathbf{r}_{3}- 2\mathbf{r}_{5} = \mathbf{0} $$
(106)

The Jacobian matrix is

$$ \boldsymbol{\varPhi} _{\mathbf{q}} = \left [ \begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c} \mathbf{r}_{1}^{T} - \mathbf{r}_{A}^{T} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} \\ \mathbf{0}_{1 \times 3} & \mathbf{r}_{2}^{T} - \mathbf{r}_{C}^{T} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} \\ \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{r}_{3}^{T} - \mathbf{r}_{E}^{T} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} \\ \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{r}_{4}^{T} - \mathbf{r}_{G}^{T} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} \\ \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{r}_{5}^{T} - \mathbf{r}_{K}^{T} & \mathbf{0}_{1 \times 3} \\ \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{r}_{6}^{T} - \mathbf{r}_{M}^{T} \\ \mathbf{r}_{1}^{T} - \mathbf{r}_{2}^{T} & \mathbf{r}_{2}^{T} - \mathbf{r}_{1}^{T} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} \\\noalign{\vspace{2pt}} \mathbf{0}_{1 \times 3} & \mathbf{r}_{2}^{T} - \mathbf{r}_{3}^{T} & \mathbf{r}_{3}^{T} - \mathbf{r}_{2}^{T} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} \\\noalign{\vspace{2pt}} \mathbf{r}_{1}^{T} - \mathbf{r}_{3}^{T} & \mathbf{0}_{1 \times 3} & \mathbf{r}_{3}^{T} - \mathbf{r}_{1}^{T} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} & \mathbf{0}_{1 \times 3} \\ \mathbf{0}_{3 \times 3} & \mathbf{I}_{3} & \mathbf{I}_{3} & \mathbf{0}_{3 \times 3} & \mathbf{0}_{3 \times 3} & - 2\mathbf{I}_{3} \\ \mathbf{I}_{3} & - \mathbf{I}_{3} & \mathbf{I}_{3} & - \mathbf{I}_{3} & \mathbf{0}_{3 \times 3} & \mathbf{0}_{3 \times 3} \\ 2\mathbf{I}_{3} & - \mathbf{I}_{3} & \mathbf{I}_{3} & \mathbf{0}_{3 \times 3} & - 2\mathbf{I}_{3} & \mathbf{0}_{3 \times 3} \end{array} \right ] $$
(107)

The null space of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\) is defined by the vector

$$ \begin{aligned}[b] \mathbf{N} &= \left\{ \begin{array}{c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}c@{\quad}|@{\quad}c@{\quad}c@{\quad}c@{\quad}|} \frac{ - 1}{L_{1A}} & \frac{1}{L_{2C}} & \frac{ - 1}{L_{3E}} & \frac{1}{L_{4G}} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{array}\right. \\ &\quad \left.\begin{array}{@{\quad}c@{\quad}c@{\quad}c@{\quad}|@{\quad}c@{\quad}c@{\quad}c} 0 & \frac{ ( y_{1} - y_{A})}{L_{1A}} & \frac{ ( z_{1} - z_{A} )}{L_{1A}} & 0 & 0 & 0 \end{array}\right\}^{T} \end{aligned} $$
(108)

where L 1A is the distance between points 1 and A, and so on. Taking into account that x 1=x A , x 2=x C , x 3=x G and x 4=x E , the system of self-equilibrating constraint forces is defined by

(109)

where vectors 1 to 4 are forces on links A–1, C–2, E–3 and G–4, and vectors 5 and 6 are forces on the plate. It should be noted that each body and each joint is in equilibrium.

Fig. 15
figure 15

Self-equilibrating constraint forces (red) in 3-D parallelogram mechanism

In Fig. 15 this system of self-equilibrating constraint forces acting on the bars is represented in red. The four links A–1, C–2, E–3 and G–4 are in equilibrium, and also the plate 1–2–3–4 is in equilibrium. Note that the blue constraint forces acting on links M–6 and K–5 cannot appear in the vector of self-equilibrating constraint forces. The resultant of the forces in red must be parallel to bar A–1, while the resultant of the forces in blue must be parallel to bar K–5. It is impossible that one of these resultants equilibrates the other, so both systems of constraint forces must have null resultant. This is possible for the four forces in red, but not for the two forces in blue. It is concluded that in the self-equilibrating set of constraint forces, the forces in bars K–5 and M–6 must be zero. In this regard, it agrees with the important finding of Wojtyra [20] and Frączek and Wojtyra [21].

The physical meaning of the minimum norm solution is that it does not contain any self-equilibrating constraint forces, because it is orthogonal to the null space of \(\boldsymbol{\varPhi}_{\mathbf{q}}^{T}\).

When can self-equilibrating constraint forces appear in real systems? These forces can appear even when the multibody system is at rest. A physical reason for their presence in the example of Fig. 15 can be different length in links A–1, C–2, E–3 and G–4, due to manufacturing errors or thermal expansion. If these different lengths can exist but are unknown, the most reasonable choice is to assume the self-equilibrating constraint forces as null.

In this case Lagrange multipliers λ 1, λ 2, λ 3, λ 4, λ 14 and λ 15 are determined. In order to obtain the remaining undetermined Lagrange multipliers, the following compatibility equation for the warping deformation of the plate applies:

(110)

where k 1A , k 2C , k 3E and k 4G are the axial stiffness of links 1–A, 2–C, 3–E and 4–G, respectively, and k P is the warping stiffness of the plate.

On the other hand, the minimum norm solution of system (49) can be obtained by imposing the orthogonality condition to the null space of \(\boldsymbol{\varPhi} _{\mathbf{q}}^{T}\). For this example, the equation that accounts for this condition is

$$ - \frac{\lambda _{1}}{L_{1A}} + \frac{\lambda _{2}}{L_{2C}} - \frac{\lambda_{3}}{L_{3E}} + \frac{\lambda _{4}}{L_{4G}} + \frac{ ( y_{1} - y_{A} )}{L_{1A}}\lambda _{14} + \frac{ ( z_{1} - z_{A} )}{L_{1A}}\lambda _{15} = 0 $$
(111)

In general, Eqs. (110) and (111) are not equivalent. However, if a diagonal weighting matrix W is introduced with its values appropriately chosen, they can coincide. Let us consider a weighted constraint equation W Φ(q)=0, with a diagonal matrix W in the form

$$ \mathbf{W} = \left [ \begin{array}{c@{\quad}c@{\quad}c@{\quad}c} w_{1} & 0 & \cdots & 0 \\ 0 & w_{2} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & w_{18} \end{array} \right ] $$
(112)

Then the geometric compatibility equation for elastic deformations and the null space orthogonality condition for obtaining the minimum norm solution change to,

$$ \begin{aligned}[b] & - \frac{w_{1}L_{1A}}{k_{1A}}\lambda _{1} + \frac{w_{2}L_{2C}}{k_{2C}}\lambda _{2} - \frac{w_{3}L_{3E}}{k_{3E}}\lambda _{3} + \frac{w_{4}L_{4G}}{k_{4G}} \lambda _{4} + \frac{4w_{14} ( y_{1} - y_{A} )}{k_{P}L_{1A}}\lambda _{14} \\\noalign{\vspace{4pt}} &\quad {}+ \frac{4w_{15} ( z_{1} - z_{A} )}{k_{P}L_{1A}}\lambda _{15} = 0 \end{aligned} $$
(113)
$$ - \frac{\lambda _{1}}{w_{1}L_{1A}} + \frac{\lambda _{2}}{w_{2}L_{2C}} - \frac{\lambda _{3}}{w_{3}L_{3E}} + \frac{\lambda _{4}}{w_{4}L_{4G}} + \frac{ ( y_{1} - y_{A} )}{w_{14}L_{1A}}\lambda _{14} + \frac{ ( z_{1} - z_{A} )}{w_{15}L_{1A}}\lambda _{15} = 0 $$
(114)

Comparing Eqs. (113) and (114) we can conclude that the flexible solution and the mathematical minimum norm solution are identical when the weighting matrix elements take the following values:

$$ \begin{aligned}[c] & w_{1} = \frac{1}{L_{1A}}\sqrt{k_{1A}}, \qquad w_{2} = \frac{1}{L_{2C}}\sqrt{k_{2C}}, \qquad w_{3} = \frac{1}{L_{3E}} \sqrt{k_{3E}}, \qquad w_{4} = \frac{1}{L_{4G}} \sqrt{k_{4G}}, \\\noalign{\vspace{3pt}} & w_{14} = \frac{1}{2} \sqrt{k_{P}}, \qquad w_{15} = \frac{1}{2} \sqrt{k_{P}} \end{aligned} $$
(115)

The remaining elements of matrix W do not have any influence, so they are assumed to have a unit value.

This example has been modeled with rigid bodies and also with flexible rods and with flexible joints (bushings). The following figures show the axial constraint forces for rods A–1, C–2, E–3, and G–4. Figure 16 shows the minimum norm solution with rigid bodies. Figure 17 also shows the minimum norm results with rigid bodies, but in this case the constraint equations have been normalized so that the results are invariant with respect to a change in units, for instance from meters to millimeters. Figure 18 shows the minimum norm solution computed from weighted constraints determined in accordance with Eq. (115). In this case, the axial stiffness of all the bars has been considered to be 17e06 N/m, whereas the stiffness of the plate k P has been assumed to be 1e6 times greater. Figure 19 shows the axial constraint forces when the rods are considered flexible in the axial direction (k=17e06 N/m, c=1e05 N s/m). It can be seen that the results are identical to those obtained with rigid bodies and weighted constraints shown in the previous figure. In Fig. 20 the rod G–4 has been considered longer, with a length of 1.0001 times the length of the other rods. It is worth noting that results change considerably. Figure 21 shows the results with rigid bodies and flexible joints or bushings (with k=1e6 N/m, c=1e5 N s/m). In this case the joints are assumed to be 100 times softer than the flexible rods in Fig. 19.

Fig. 16
figure 16

Minimum norm solution

Fig. 17
figure 17

Invariant minimum norm solution

Fig. 18
figure 18

Weighted minimum norm solution

Fig. 19
figure 19

Solution with flexible rods

Fig. 20
figure 20

Flexible rods with a length error

Fig. 21
figure 21

Solution with flexible joints

These figures show the similarities and differences in the constraint forces computed with different hypotheses. It is likely that most of them are reasonable enough to support a proper engineering design. As expected, the cost of the different solutions is rather different, ranging from 2.7 seconds for the rigid bodies with minimum norm solution up to 40 seconds in the case of the flexible rods or the 60 seconds for the system with bushings (all the simulations carried out with MATLAB on an Intel Core i7 920 processor, at 2,67 GHz).

4 Conclusions

In this paper we have first considered the conditions of existence and uniqueness of solutions in three ways to formulate the differential equations of motion: the Lagrange equations of the first kind, the null space method and the Maggi equations using independent coordinates. In all cases the solution exists and is unique if any possible movement involves a positive kinetic energy. This means that there is mathematical solution when the problem is well defined physically.

In the second part of the paper the problem of determining the constraint forces in the case of systems with redundant constraints has been considered. These forces are undetermined and there are several alternatives to estimate meaningful values. Unlike what happened with the differential equations of motion, this problem is under-defined physically, which translates into major difficulties when attempting to develop accurate models and find mathematical solutions. The actual values of the constraint forces depend on several factors which in general, are not accurately known in the real world. Clearly, the flexibilities of the bodies may play a very important role. However, so do the flexibility of joints (which sometimes may be more important and more difficult to model) and other poorly known factors like the manufacturing errors.

This paper presents a physical meaning (the concept of self-equilibrating constraint forces) for indeterminate components of the constraint forces and describes a procedure to remove them and obtain minimum norm solutions independent of the measurement units used. Two simple examples of overdetermined systems have been presented and their constraint forces calculated using different modeling scenarios, including the product of the constraint equations by a diagonal weighting matrix representing the effects of flexibility. The results obtained have been compared and an attempt has been made to draw useful conclusions from the point of view of engineering design.