Abstract
The formulation of (possibly redundantly) constrained system dynamics using coordinate projection onto a subspace locally tangent to the constraint manifold is revisited using the QR factorization of the constraint Jacobian matrix, using column pivoting to identify a suitable subspace, possibly detect any singular configurations that may arise, and extract it. The evolution of the QR factorization is integrated along with that of the constraint Jacobian matrix as the solution evolves, generalizing to redundant constraints a recently proposed true continuation algorithm that tracks the evolution of the subspace of independent coordinates. The resulting subspace does not visibly affect the quality of the solution, as it is merely a recombination of that resulting from the blind application of the QR factorization but avoids the artificial algorithmic irregularities or discontinuities in the generalized velocities that could otherwise result from arbitrary reparameterizations of the coordinate set, and identifies and discriminates any further possible motions that arise at singular configurations. The characteristics of the proposed subspace evolution approach are exemplified by solving simple problems with incremental levels of redundancy and singularity orders.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Unconstrained mechanical system dynamics problems are formulated as a set of second-order ordinary differential equations (ODE) that depend on a corresponding set of coordinates and their time derivatives. Interactions between parts of the system are often idealized at a purely kinematic level in terms of algebraic relationships between their coordinates, resulting in a system of differential-algebraic equations (DAE). The coordinates of the originally unconstrained problem are no longer independent; the number of independent coordinates reduces to that of the truly independent degrees of freedom of the system. Compliance with the constraints is enforced by suitable generalized constraint reaction forces, usually formulated as Lagrange multipliers, that represent the required internal actions. Possible approaches for the formulation of constrained system dynamics are reviewed in [1, 16].
The system of DAEs that describe the constrained dynamics problem can be solved directly considering the Lagrange multipliers as additional unknowns, resulting in the so-called redundant coordinate set (RCS) formulation. Alternatively, the problem can be manipulated and transformed into the corresponding underlying ODE problem, reducing the set of coordinates to the truly independent (Lagrangian) ones, according to the so-called minimal coordinate set (MCS) approach. Possible approaches are reviewed in [12]. The reduction of the original coordinates into the MCS may be challenging. The nature of the reduced coordinates is local, i.e., no generally valid choice may exist that works for all system configurations [8]. This paper elaborates on a projection continuation formulation originally proposed in [21] and subsequently formalized in [22], extending and generalizing it to the case of redundant constraints and applying it to the detection of singular configurations.
2 Problem description
In this work, we use the MCS approach to formulate the constrained dynamics of a mechanical system, obtaining the coordinate projection matrix from the QR factorization of the constraint Jacobian matrix. An original continuation algorithm, presented in [22], is used to ensure a regular evolution of the coordinate subspace that is tangent to the constraint manifold.
Three main elements of novelty are presented in this work:
-
N1:
the process of enforcing the orthogonality of the projection matrix resulting from the continuation algorithm with respect to the constraint Jacobian matrix is reformulated as the constrained minimization of a suitable cost function under the orthonormality constraint;
-
N2:
the QR factorization with column pivoting (QRCP) of the constraint Jacobian matrix is used to analyze problems with redundant constraints; the suitability and advantages of the proposed continuation algorithm become apparent in this case;
-
N3:
the QRCP of the constraint Jacobian matrix is also used to identify singular configurations of the problem; in this case, the proposed continuation algorithm guarantees the ability to distinguish the continuation of the original configuration from the new motion(s) allowed by the singular configuration.
The paper is organized as follows:
-
Sect. 2.1 introduces the constraint dynamics problem;
-
Sect. 2.2 briefly presents the MCS approach using coordinate projection;
-
Sect. 2.3 discusses the use of QR factorization for optimal subspace selection;
-
Sect. 2.4 briefly illustrates the projection continuation proposed in [22];
-
Sect. 2.5 handles redundant constraints and discusses singularity detection;
-
Sect. 3 presents several application examples that, although simple, are specifically crafted to illustrate the features of the proposed formulation.
Specific details of the formulation are presented in dedicated appendices.
Issues related to the indetermination of the constraint reactions of redundant constraints, in particular concerning implications when the constraints are not ideal, are not discussed, as the proposed continuation algorithm does not change the nature of the formulation in this respect. The interested reader should consult, for example, [18, 20].
2.1 Constrained dynamics problem formulation
A set of \(n\) ordinary differential equations (ODE) describes the dynamics of an unconstrained system of \(n\) coordinates \(\mathbf {x} \in \mathbb{R}^{n}\),
subjected to a corresponding set of generalized applied forces \(\mathbf {f} \in \mathbb{R}^{n}\), energetically conjugated to a virtual perturbation of the coordinates \(\delta \mathbf {x}\), where \({\mathbf {M}} \in \mathbb{R}^{n \times n}\) is the symmetric, positive-definite mass matrix.
The problem is constrained by adding \(m\) (holonomic, without loss of generality, and ideal for the reasons discussed in the preamble) kinematic constraints in form of a set of algebraic equations
with \(\mathbf {c} \in \mathbb{R}^{m}\).
The ODEs of Eq. (1) are modified by addition of the constraint reactions \(\mathbf {f}_{c} = - {\mathbf {A}}^{T} {\boldsymbol {\lambda}}\) as follows:
where \({\mathbf {A}} = \mathbf {c}_{/\mathbf {x}} \in \mathbb{R}^{m \times n}\) is the partial derivative of the constraint equations \(\mathbf {c}\) with respect to the coordinates \(\mathbf {x}\), namely the constraint Jacobian matrix, and \({\boldsymbol {\lambda}} \in \mathbb{R}^{m}\) is the array of the corresponding Lagrange multipliers.
The constraint Jacobian matrix is expected to be full-rank when the constraints are independent. It may become rank deficient
-
occasionally, when special configurations are reached, or
-
structurally, when constraints are redundant.
In the present work, we consider both cases. Constraints are redundant when the constraint Jacobian matrix is not full rank, namely \(\operatorname{rank}({\mathbf {A}}) < \min (m, n)\), but a solution that satisfies Eq. (2) exists over continuous portions of the domain of the time \(t\).
Specifically, we consider problems with:
-
i)
\(m < n\), with \(\operatorname{rank}({\mathbf {A}}) \equiv m\), i.e., independent constraints, and \(f = n - m\) degrees of freedom (as in [22]; Sects. 2.4 and 3.2);
-
ii)
\(m \le n\), with \(\operatorname{rank}({\mathbf {A}}) < m\), i.e., redundant constraints, and \(f = n - \operatorname{rank}({\mathbf {A}})\) degrees of freedom (Sects. 2.5, 3.1, and 3.3);
-
iii)
\(m > n\), with \(\operatorname{rank}({\mathbf {A}}) < n\), i.e., redundant constraints, and \(f = n - \operatorname{rank}({\mathbf {A}})\) degrees of freedom (Sects. 2.5 and 3.4).
Cases (ii) and (iii) differ essentially because of how the submatrices resulting from the QR factorization are arranged.
2.2 Minimal coordinate set approach
The minimal coordinate set approach consists in defining a suitable subspace \({\mathbf {T}} \in \mathbb{R}^{n \times f}\) of the space spanned by the coordinates \(\mathbf {x}\), which is tangent to the constraint manifold, namely \({\mathbf {T}}^{T} {\mathbf {A}}^{T} \equiv {\mathbf {0}} \in \mathbb{R}^{f \times m}\), such that
where \(\mathbf {q} \in \mathbb{R}^{f}\) are local, truly independent coordinates, with \({\boldsymbol {\beta}}' \in \mathbb{R}^{n}\) and \({\boldsymbol {\beta}}'' \in \mathbb{R}^{n}\) defined accordingly, the former being nonzero only in case of rheonomous constraints, under the assumption that \({\mathbf {T}}^{T} {\boldsymbol {\beta}}' = \mathbf {0}\) and \({\mathbf {T}}^{T} {\boldsymbol {\beta}}'' = \mathbf {0}\), i.e., that the only portion of \(\dot{\mathbf {x}}\) and \(\ddot{\mathbf {x}}\) spanning the admissible subspace is that related to the time derivatives of the minimal coordinates \(\dot{\mathbf {q}}\) and \(\ddot{\mathbf {q}}\) such that
as \({\mathbf {A}} {\mathbf {T}} \equiv {\mathbf {0}}\) holds, and analogously
Suitable expressions of \({\boldsymbol {\beta}}'\) and \({\boldsymbol {\beta}}''\) are determined later.
The constrained dynamics problem, projected in such a subspace, yields
The solution is sought by first integrating Eq. (7) to obtain the generalized velocities \(\dot{\mathbf {q}}\); then, Eq. (4a) is integrated to obtain an estimate of \(\mathbf {x}\), which needs to be subsequently refined by enforcing the constraint at the position level, Eq. (2).
The structural cancellation of the term \({\mathbf {T}}^{T} {\mathbf {A}}^{T}\) in Eq. (7), to eliminate the constraint reactions \({\boldsymbol {\lambda}}\), is at the core of the MCS approach and the essential requirement of the projection matrix \({\mathbf {T}}\).
2.3 QR factorization for optimal minimal coordinate set selection
Among the several approaches proposed in the literature (see, for example, [15]), a robust and general choice for matrix \({\mathbf {T}}\) can be obtained using the QR factorization [3, 7] of the transpose of the constraint Jacobian matrix.
Consider for now the case \(m < n\) and \(\operatorname{rank}({\mathbf {A}}) \equiv m\); then
where matrix \({\mathbf {Q}} \in \mathbb{R}^{n \times n}\) is orthonormal and submatrix \({\mathbf {R}}_{1} \in \mathbb{R}^{m \times m}\) is upper triangular. Submatrix \({\mathbf {Q}}_{2} \in \mathbb{R}^{n \times (n - m)}\), although not uniquely determined, is an optimal choice for \({\mathbf {T}}\).
The velocities can then be expressed as
with \({\mathbf {Q}}_{1} \mathbf {p}' = {\boldsymbol {\beta}}'\), i.e., by construction only spanning the subspace orthogonal to the constraint manifold, and thus \(\mathbf {p}' = - {\mathbf {R}}_{1}^{-T} \mathbf {c}_{/t}\) since, according to Eq. (5) and the orthogonality of submatrix \({\mathbf {Q}}_{1}\), \({\mathbf {A}} {\boldsymbol {\beta}}' = {\mathbf {R}}_{1}^{T} {\mathbf {Q}}_{1}^{T} {\mathbf {Q}}_{1} \mathbf {p}' = {\mathbf {R}}_{1}^{T} \mathbf {p}' = -\mathbf {c}_{/t}\); similarly, the accelerations can be expressed as
with \({\mathbf {Q}}_{1} \mathbf {p}'' = {\boldsymbol {\beta}}''\), and thus \(\mathbf {p}'' = - {\mathbf {R}}_{1}^{-T} \left [ \left ( \dot{\mathbf {c}} \right ) _{/ \mathbf {x}} \dot{\mathbf {x}} + \left ( \dot{\mathbf {c}} \right ) _{/t} \right ] \) as a consequence of Eq. (6).
According to Eqs. (7) and (9), the problem becomes
This form, which resembles the one originally devised in 1903 by Maggi [13, 14] and subsequently independently proposed again in 1965 by Kane [11], today is known as Maggi–Kane equations [2].
The integration of Eqs. (11a)–(11b) from time \(t_{k}\) to \(t_{k+1}\) yields
where the superscript \((\cdot )^{(0)}\) indicates an estimate of the final value, pending verification that it complies with the constraint of Eq. (2). The final value of the unknown \(\mathbf {p}\) results from the iterative solution of
More details can be found in [22].
2.4 Tangent subspace selection and continuation
Submatrices \({\mathbf {Q}}_{1}\) and \({\mathbf {R}}_{1}\) are uniquely determinedFootnote 1 once matrix \({\mathbf {A}}\) is known. Submatrix \({\mathbf {Q}}_{2}\), instead, is only subjected to matrix \({\mathbf {Q}}\)’s general constraint of being orthogonal, namely \({\mathbf {Q}}_{2}^{T} {\mathbf {Q}}_{2} \equiv {\mathbf {I}} \in \mathbb{R}^{(n-m) \times (n-m)}\) and \({\mathbf {Q}}_{2}^{T} {\mathbf {Q}}_{1} \equiv {\mathbf {0}} \in \mathbb{R}^{(n-m) \times m}\), but otherwise undefined.
In fact, the QR factorization produces a “local” representation of the constraint Jacobian matrix; as such, the generalized coordinates associated with the subspace \({\mathbf {T}} = {\mathbf {Q}}_{2}\), which do not have any specific physical meaning, represent a local reparameterization of the subspace of the coordinates that is tangent to the constraint manifold. When the QR factorization is computed at time step \(t_{k+1}\), if \(n - m > 1\), the columns of the resulting \({\mathbf {Q}}_{2_{k+1}}\) are completely unrelated to those of \({\mathbf {Q}}_{2_{k}}\), their resulting value being solely dictated by the internal intricacies of the QR factorization algorithm. Even for \(n - m \equiv 1\), i.e., for single-degree-of-freedom problems, where \({\mathbf {Q}}_{2}\) is a single column, \({\mathbf {Q}}_{2_{k+1}}\) might be directed in a direction that is nearly opposite to that of \({\mathbf {Q}}_{2_{k}}\).
In [21] and [22], a simple and intuitive algorithm was proposed to track the evolution of the subspace spanned by \({\mathbf {Q}}_{2}\). It uses a form of differential “continuation” to preserve the spatial continuity of the generalized coordinates \(\mathbf {q}\) by minimizing the amount of deviation of the subspace that is intrinsically required to maintain \({\mathbf {Q}}_{2}\) tangent to the constraint manifold across time steps without altering the quality of the solution. The algorithm is briefly recalled here.
Consider the time derivative of the transpose of the constraint Jacobian matrix in its QR factorized form
The derivative of the QR factorization has been intensively used in so-called “continuous” algorithms for the estimation of Lyapunov characteristic exponents as a means to overcome under- and overflow issues when integrating the evolution of linear, time-dependent problems. An overview of such methods is presented in [6]. Similar concepts, although involving partial differentiation with respect to a set of parameters, have been recently proposed for adjoint sensitivity analysis of multibody problems formulated using the MCS approach [9]. The derivative of matrix \({\mathbf {Q}}\) may be expressed as \(\dot{{\mathbf {Q}}} = {\mathbf {Q}} {\boldsymbol {\Omega}}\), where the skew-symmetric nature of matrix \({\boldsymbol {\Omega}} \in \mathbb{R}^{n \times n}\), namely \({\boldsymbol {\Omega}}^{T} = - {\boldsymbol {\Omega}}\), descends from the orthogonality of matrix \({\mathbf {Q}}\):
When the problem is integrated numerically, the solution from time step \(t_{k}\) to time step \(t_{k+1}\) is computed. The QR factorization at time \(t_{k}\) yields submatrices \({\mathbf {Q}}_{1_{k}}\) and \({\mathbf {R}}_{1_{k}}\). The generalized velocities at time \(t_{k}\) are computed with reference to the subspace spanned by \({\mathbf {Q}}_{2_{k}}\). After computing the solution at the new time step, the Jacobian matrix at time \(t_{k+1}\), \({\mathbf {A}}_{k+1}\), is known. As such, through the economy QR factorization of its transpose, submatrices \({\mathbf {Q}}_{1_{k+1}}\) and \({\mathbf {R}}_{1_{k+1}}\) are determined. Instead of using submatrix \({\mathbf {Q}}_{2_{k+1}}\) resulting from the full QR factorization, the proposed continuation algorithm obtains it by integrating Eq. (15). Consider
or
where \({\boldsymbol {\Omega}}_{1} = -{\boldsymbol {\Omega}}_{1}^{T} = {\mathbf {Q}}_{1}^{T} \dot{{\mathbf {Q}}}_{1} \in \mathbb{R}^{m \times m}\), \({\boldsymbol {\Omega}}_{21} = {\mathbf {Q}}_{2}^{T} \dot{{\mathbf {Q}}}_{1} \in \mathbb{R}^{(n-m) \times m}\), and the bottom-right block of matrix \({\boldsymbol {\Omega}}\), corresponding to \({\mathbf {Q}}_{2}^{T} \dot{{\mathbf {Q}}}_{2} \in \mathbb{R}^{(n-m) \times (n-m)}\), uninfluential since it is multiplied by a zero-valued submatrix in \({\mathbf {R}}\), is arbitrarily set to zero. This corresponds to requiring that the subspace \({\mathbf {Q}}_{2}\) is modified as little as possible while transitioning from \(t_{k}\) to \(t_{k+1}\).
The first block row of Eq. (17), after post-multiplication by \({\mathbf {R}}_{1}^{-1}\), yields
Matrix \(\dot{{\mathbf {R}}}_{1} {\mathbf {R}}_{1}^{-1}\) is the product of two upper triangular matrices, thus it is itself upper-triangular. Matrix \({\boldsymbol {\Omega}}_{1_{L}} = \operatorname{stril}({\boldsymbol {\Omega}}_{1})\), the strictly lower triangular part of matrix \({\boldsymbol {\Omega}}_{1}\), can thus be obtained as
with \({\boldsymbol {\Omega}}_{1} = {\boldsymbol {\Omega}}_{1_{L}} - {\boldsymbol {\Omega}}_{1_{L}}^{T}\). It is worth recalling that \({\mathbf {R}}_{1}\) being an upper-triangular matrix, its inversion merely requires a back-substitution.
The second block row of Eq. (17), after post-multiplication by \({\mathbf {R}}_{1}^{-1}\), yields
thus completely defining matrix \({\boldsymbol {\Omega}}\).
Submatrix \(\dot{{\mathbf {R}}}_{1}\) is irrelevant as the continuation of matrix \({\mathbf {R}}\) is not needed. However, for completeness it can be obtained from the first block row of Eq. (17) as follows:
The subspace \({\mathbf {Q}}_{2}\) can be integrated starting from an arbitrary value, provided it is orthogonal to the initial value of \({\mathbf {Q}}_{1}\) (the value resulting from Matlab’s implementation of the QR factorization was used in the numerical examples of Sect. 3), taking appropriate measures to guarantee that the resulting matrix \({\mathbf {Q}}\) preserves orthogonality. For example, for \({\boldsymbol {\Omega}}\) constant across a time step of duration \(t_{k+1} - t_{k} = h\),
Submatrix \({\mathbf {Q}}_{1_{k+1}}\) resulting from the proposed integration should then be discarded because the one resulting from the QR factorization of matrix \({\mathbf {A}}_{k+1}^{T}\) is the most accurate. Submatrix \({\mathbf {Q}}_{2_{k+1}}\) resulting from the proposed integration, instead, represents the natural continuation of \({\mathbf {Q}}_{2_{k}}\); however, it may need to be corrected to guarantee orthogonality with respect to submatrix \({\mathbf {Q}}_{1_{k+1}}\) obtained from the economy QR factorization of \({\mathbf {A}}_{k+1}^{T}\). A suitable reorthogonalization algorithm, of general validity, is proposed in Appendix A. It represents the element of novelty N1.
It is worth recalling that, as anticipated in [22], the proposed tangent subspace selection and continuation algorithm does not alter the quality of the solution. It simply provides a cleaner evolution of the minimal coordinates. However, this does not come at no cost:
-
the evolution of matrix \({\mathbf {Q}}\) must be computed according to Eq. (22) at the cost of evaluating an exponential matrix of order \(n \times n\), whose computational complexity (CC) depends on the type of approximation and tolerance;
-
the reorthogonalization of the evolved submatrix \({\mathbf {Q}}_{2}\) (see Appendix A) requires:
-
the product of an \((n-m) \times n\) matrix by an \(n \times (n-m)\) matrix, CC of \(O((n-m)^{2} n)\),
-
the square root of the resulting \((n-m) \times (n-m)\) matrix, whose CC again depends on approximation and tolerance,
-
the product of two \((n-m) \times (n-m)\) matrices, CC of \(O((n-m)^{3})\), and
-
the product of an \(n \times (n-m)\) matrix by an \((n-m) \times (n-m)\) matrix, CC of \(O(n (n-m)^{2})\).
-
No specific CC is added by the QR factorization as it needs to be computed anyway to determine the compliant subspace matrix. The added CC is limited when the number of constraints is comparable to that of the unconstrained coordinates, such that \(n-m \ll n\). In those cases, the CC drops to negligible values that scale linearly with the size of the unconstrained problem \(n\). As discussed in the next section, one needs to weigh this extra cost with the advantages provided by the proposed formulation in terms of its ability to correctly identify possible motions at singular configurations and, in general, to deal effectively with redundant constraints. When \(m \ll n\), as in the case, for example, of problems characterized by flexibility, the MCS approach tends to lose its appeal, as the reduction in problem size tends to become negligible while the CC increases significantly, loosely scaling with \(n^{3}\).
2.5 Redundant constraints and singular configurations
To deal with redundant constraints, the projection scheme needs some modifications. They represent the element of novelty N2. Furthermore, the solution process needs some care when considering singular configurations. This is the element of novelty N3.
Redundant constraints occur when their Jacobian matrix is not full-rank, i.e., its rows are not linearly independent. This condition can be structural, in case of overconstraining, or sporadic; in the latter case, a singular configuration has been reached. Notice that a system can be overconstrained and at the same time show sporadic singular configurations.
Without any ambition of thoroughly discussing the topic, this section highlights the required adaptations of the proposed continuation algorithm and the advantages it may offer in such cases.
Rank-deficient constraint Jacobian matrix
Let us consider first the case of matrix \({\mathbf {A}} \in \mathbb{R}^{m \times n}\) not being full-rank, or rank-deficient, although still with \(m \le n\). In that case, submatrix \({\mathbf {R}}_{1}\) becomes singular; that is, as many of its diagonal coefficients as the order of rank-deficiency \(d\) of matrix \({\mathbf {A}}\) are zero, where the rank-deficiency \(d\) of a matrix is the difference between the lesser of its number of rows or columns and its rank, \(d = \min (m, n) - \operatorname{rank}({\mathbf {A}})\); in the present case, \(d = m - \operatorname{rank}({\mathbf {A}})\).
Consider a QR factorization with column pivoting [4, 10], which yields a transformation
where \({\mathbf {P}} \in \mathbb{R}^{m \times m}\) is a suitable permutation matrix. It produces a submatrix \({\mathbf {R}}_{1}\) whose diagonal coefficients are sorted in a decreasing order of their norm.Footnote 2 As such, one can effectively evaluate the rank of the constraint Jacobian matrix and thus the presence of any redundant constraints corresponding to the number of diagonal coefficients of submatrix \({\mathbf {R}}_{1}\), starting from the bottom-right corner, that vanish (in practice, fall below a given threshold).
In that case, the three matrices resulting from the factorization can be reorganized as follows:
with \({\mathbf {Q}}_{1_{\text{ns}}} \in \mathbb{R}^{n \times (m - d)}\), \({\mathbf {Q}}_{1_{\text{s}}} \in \mathbb{R}^{n \times d}\), \({\mathbf {R}}_{1_{\text{ns}}} \in \mathbb{R}^{(m - d) \times (m - d)}\), and \({\mathbf {R}}_{1_{\text{s}}} \in \mathbb{R}^{(m - d) \times d}\) (irrelevant for our discussion), where subscripts ‘ns’ and ‘s’ respectively stand for ‘nonsingular’ and ‘singular’, and the subspace that is tangent to the constraint manifold is
whose size is now \({\mathbf {T}} \in \mathbb{R}^{n \times (n - m + d)}\).
When \(m \equiv n\) but the Jacobian matrix of the constraints is rank-deficient, i.e., \(\operatorname{rank}({\mathbf {A}}) < n\), submatrix \({\mathbf {Q}}_{2}\) is empty; yet, the rest of the above considerations apply, and the subspace of allowed motion is represented by \({\mathbf {Q}}_{1_{\text{s}}}\) alone. Details on the derivation of the continuation algorithm are reported in Appendix B.
Constraints exceeding the number of coordinates
Similar considerations apply to the case of constraints that exceed the number of coordinates, namely \(m > n\), thus being intrinsically redundant. In this case, the column-pivoting QR factorization of \({\mathbf {A}}^{T}\) yields
with \({\mathbf {Q}}_{1} \in \mathbb{R}^{n \times n}\), \({\mathbf {R}}_{1} \in \mathbb{R}^{n \times n}\), and \({\mathbf {R}}_{2} \in \mathbb{R}^{n \times (m - n)}\). If the so-called differential (or instantaneous) mobility \(d = n - \operatorname{rank}({\mathbf {A}}) > 0\), \(d\) admissible motions remain, and a corresponding number of diagonal elements of submatrix \({\mathbf {R}}_{1}\) are zero, along with the corresponding rows of submatrix \({\mathbf {R}}_{2}\). Thus, the factorization of Eq. (26) can be represented as
with \({\mathbf {Q}}_{1_{\text{ns}}} \in \mathbb{R}^{n \times (n - d)}\), \({\mathbf {Q}}_{1_{\text{s}}} \in \mathbb{R}^{n \times d}\), \({\mathbf {R}}_{1_{\text{ns}}} \in \mathbb{R}^{(n - d) \times (n - d)}\), \({\mathbf {R}}_{1_{\text{s}}} \in \mathbb{R}^{(n - d) \times d}\), and \({\mathbf {R}}_{2_{\text{s}}} \in \mathbb{R}^{(n - d) \times (m-n)}\). The subspace tangent to the constraint manifold is
whose size is now \({\mathbf {T}} \in \mathbb{R}^{n \times d}\). Details on the derivation of the continuation algorithm are reported in Appendix C.
Singular configurations
So far, the discussion presented in this section showed that projection algorithms based on the QR factorization can robustly deal with redundant constraints. Now, we want to discuss how the proposed continuation procedure can help when the number of independent allowed motions changes during the analysis.
A singular configuration occurs when the rank of the constraint Jacobian matrix changes as the system reaches that configuration. When some constraints become redundant, the rank of the constraint Jacobian matrix decreases while the number of allowed independent motions increases, and vice versa.
Let us focus on the case of rank reduction. In this case, the number of allowed motions, and thus potentially of degrees of freedom, suddenly increases. This is highlighted by the fact that some of the bottom-right diagonal elements of submatrix \({\mathbf {R}}_{1}\), resulting from the column-pivoting QR factorization, approach zero. As a consequence, the dimension of the subspace \({\mathbf {T}}\) formed according to Eq. (25) or (28) increases, but the columns that form it, taken from the columns of matrix \({\mathbf {Q}}\), represent an arbitrary combination of the independent directions that characterize that subspace.
However, when the proposed continuation algorithm is used, the portion of the subspace at the singular configuration closest to the original, smaller dimension one that characterized the solution before the topological change of the system can be easily identified as the natural continuation of the original space along with the newly available directions of motion. This can be extremely useful when tracking, for example, the possibility of bifurcations in the solution. The topic is not developed further here, but dedicated examples are presented in Sect. 3.
3 Results
Simple examples are analyzed to illustrate how the proposed method produces a more regular and intuitive choice of the projection subspace during the integration of the solution when constraints are redundant and singular configurations are approached. First, a planar pendulum is analyzed analytically. The subsequent examples are numerically integrated using Matlab’s ode45 explicit Runge–Kutta integration scheme, based on Dormand and Prince’s formula [5].
3.1 Planar pendulum
Single-degree of freedom problems represent a trivial case in the context of the present discussion; in fact, considering the simplest case of redundant constraint single-degree-of-freedom problem, with \(m \equiv n\) but \(d = m - \operatorname{rank}({\mathbf {A}}) = 1\), the corresponding submatrix \({\mathbf {Q}}_{1_{\text{s}}}\) consists of a single column, which is thus uniquely determined, except for its sign.
What is possibly the simplest single-degree of freedom example, the planar pendulum adapted from that originally presented in [22], is here considered to show how the proposed continuation algorithm, trivially transformed into a case of redundant constraints, avoids the occasional reversing of the sign of \({\mathbf {Q}}_{1_{\text{s}}}\) that occurs when the permuted QR factorization of matrix \({\mathbf {A}}^{T}\) is blindly performed. The solution is obtained analytically.
Consider the equations of motion of a simple point mass pendulum of mass \(M\) and length \(\ell \) subjected to a uniform gravity field of intensity \(g\) along the negative \(z\) direction:
where \(x\) and \(z\) are the horizontal and vertical components of the point mass position, the unconstrained coordinates in the present context, and \(\lambda _{1}\) and \(\lambda _{2}\) are the Lagrange multipliers associated with the constraints of Eqs. (29c) and (29d). The two constraint equations are identical and represent a trivial case of redundant constraints. The corresponding constraint Jacobian matrix is
Its rows are identical; thus, its rank is 1. The QR factorization of its transpose can be written as
where matrix \({\mathbf {Q}}\) is orthonormal by construction and defined by the single parameter \(\theta \) with
as a possible determination of the parameters \(\theta \), \(R_{1_{\text{ns}}}\), \(R_{1_{\text{s}}}\) and of matrix \({\mathbf {P}}\). Submatrices \({\mathbf {Q}}_{1_{\text{ns}}}\) and \({\mathbf {Q}}_{1_{\text{s}}}\) can then be written as
The velocity and acceleration vectors of the point mass are thus
The projected equation of motion is
One may observe that redefining \(\dot{q} = \ell \dot{\theta}\) the velocity vector can be written as
which is integrable, yielding
It is worth recalling that when solving for \(\theta \) and \(R_{1}\) from Eq. (31), \({\mathbf {A}}^{T} = {\mathbf {Q}} {\mathbf {R}} {\mathbf {P}}^{T}\) yields
To extract \(R_{1}\), consider the norm of the first column of both sides:
or
where we arbitrarily chose \(R_{1} = + 2 \ell \), but the choice with the negative sign is also legitimate. To extract \(\theta \), consider the ratio of the second and first elements of the first column:
The culprit lies in the fact that in Eq. (31) matrix \({\mathbf {Q}}\) could have been alternatively defined as
i.e., changing the sign of its second column, submatrix \({\mathbf {Q}}_{1_{\text{s}}}\), at the only cost of no longer representing a rotation matrix (since its determinant would now be −1 instead of \(+1\)), but without impacting its ability to represent the transpose of the constraint Jacobian matrix as \({\mathbf {Q}} {\mathbf {R}}\), nor that of \({\mathbf {Q}}_{1_{\text{s}}}\) to represent a suitable subspace tangent to the constraint manifold.
If an intermittent change of sign occurs between consecutive QR factorizations, the sign of the derivative of the generalized coordinate \(\dot{q}\) also changes, resulting in unnecessary discontinuities, although harmless for what concerns the result in terms of physical variables. Consider \(s_{1} = \pm 1\) as the (arbitrary) sign of \(R_{1}\) and \(s_{2} = \pm 1\) as the (arbitrary, independent from \(s_{1}\)) sign of submatrix \({\mathbf {Q}}_{1_{\text{s}}}\), such that \(s_{1}^{2} = s_{2}^{2} = 1\). The QR factorization of \({\mathbf {A}}^{T}\) then becomes
(the pivoting matrix \({\mathbf {P}}\) is omitted since it corresponds to the identity).
Consider its time derivative:
i.e., a matrix whose columns are twice the same expression of Eq. (36).
Consider now the proposed continuation algorithm, whose details are reported in Appendix B; consider first
or
where \(\Omega _{21}\) and \(\dot{R}_{1}\) are the two formal unknowns of this \(2 \times 2\) twice-redundant matrix equation. Matrix \({\mathbf {R}}\) in Eq. (45) can no longer be inverted as in the original projection formulation of Eq. (18) since its last row is now zero. However, the problem can be reworked considering the coordinate derivatives of Eq. (36) multiplied by \(s_{2}\):
which yields
As a consequence, matrix \({\boldsymbol {\Omega}}\) from Eq. (15) by construction becomes
and the continued integration of matrix \({\mathbf {Q}}\) simply consists in choosing the sign of the new column \({\mathbf {Q}}_{1_{\text{s}}}\) such that it forms the smallest possible angle with the previous one without any indetermination nor arbitrariness in the choice of \(s_{2}\) and regardless of the choice of \(s_{1}\).
3.2 Double four-bar mechanism
The double 4-bar mechanism sketched in Fig. 1 is a rigid multibody benchmark proposed by IFToMM’s Technical Committee for Multibody DynamicsFootnote 3 [17] (https://www.iftomm-multibody.org/) and analyzed, for example, in [19].
It consists of five independent slender bodies of 1 m length, all with a uniformly distributed mass of 1 kg, for a total of 15 degrees of freedom (\(n = 15\)), and 7 hinges, corresponding to 14 constraints (\(m = 14 < n\)). The system is subjected to a uniform gravity field of 9.81 m/s2. Each body’s kinematics is described through the position of their center of mass \(\mathbf {r}_{i} = \{r_{i_{x}}; r_{y_{i}}\}\) at mid-span and their rotation \(\theta _{i}\). In the generic configuration, the resulting constraint equations are independent (\(\operatorname{rank}({\mathbf {A}}) = 14\), \(d = \min (m,n) - \operatorname{rank}({\mathbf {A}}) = 0\)), leaving one degree of freedom. When all bodies are aligned horizontally, however, the problem becomes kinematically singular. Figure 2 shows the diagonal elements of matrix \({\mathbf {R}}_{1}\). Two of its diagonal elements vanish at the singular configurations. The rank of the constraint Jacobian matrix reduces to 12, allowing two more motions, illustrated in Fig. 3 for the singular configuration with all bars aligned horizontally on the left. In the figure, \(\delta x\), \(\delta y\), and \(\delta \theta \) respectively indicate the perturbation of each bar’s center of mass position components and rotation as resulting from the columns of matrix \({\mathbf {T}}\). The first motion corresponds to the mechanism’s conventional assembly far from the singular configuration: no horizontal displacement of any bar, identical downward vertical displacement for the bars hinged to the ground, 1, 3, and 5, twice as much vertical displacement for the bars opposed to the ground, 2 and 4, identical and consistent counter-clockwise rotation for bars 1, 3, and 5, and no rotation for bars 2 and 4. The other two allowed motions can be determined from the figure.
3.3 Modified double four-bar mechanism
The double four-bar mechanism of Sect. 3.2 is modified by turning bars 2 and 4 into a single bar of twice the length and mass, as shown in Fig. 4. There are now four independent bodies, for a total of 12 degrees of freedom (\(n = 12\)), and six hinges, corresponding to 12 constraints (\(m = 12 = n\)). However, in the generic configuration, only 11 of the resulting constraint equations are independent (\(\operatorname{rank}({\mathbf {A}}) = 11\), \(d = \min (m,n) - \operatorname{rank}({\mathbf {A}}) = 1\)), leaving one degree of freedom. At any of the singular configurations, the rank of the constraint Jacobian matrix further reduces by one (\(\operatorname{rank}({\mathbf {A}}) = 10\), \(d = \min (m,n) - \operatorname{rank}({\mathbf {A}}) = 2\)), as shown in Fig. 5, introducing a second admissible motion, illustrated in Fig. 6.
3.4 Modified triple four-bar mechanism
The modified double four-bar mechanism of Sect. 3.3 is further modified by adding yet another four-bar mechanism, maintaining the top bars connected to form a single rigid body of three times the length and the mass, as shown in Fig. 7. There are now five independent bodies, for a total of 15 degrees of freedom (\(n = 15\)), and eight hinges, corresponding to 16 constraints (\(m = 16 > n\)). However, in the generic configuration only 14 of the resulting constraint equations are independent (\(\operatorname{rank}({\mathbf {A}}) = 14\), \(d = \min (m,n) - \operatorname{rank}({\mathbf {A}}) = 1\)), leaving one degree of freedom. At any of the singular configurations, the rank of the constraint Jacobian matrix further reduces by one (\(\operatorname{rank}({\mathbf {A}}) = 13\), \(d = \min (m,n) - \operatorname{rank}({\mathbf {A}}) = 2\)), as shown in Fig. 8, introducing a second admissible motion, illustrated in Fig. 9.
Figure 10 shows the three rows of matrix \({\mathbf {T}}\) associated with the motion of bar no. 1 (1–3) as resulting from the traditional QR factorization. As discussed earlier, since the problem has only one degree of freedom, the matrix’s only column is fully determined apart from its sign. The discontinuities that appear in the figure correspond to arbitrary changes of sign dictated by the intricacies of the QR factorization algorithm as it is implemented in Matlab. The zoom on the right also shows that at the first singular point the motion labeled “1st mov” also shows a discontinuity, along with the single points that represent the other admissible motion at the singularity, labeled “2nd mov”. Neither the first nor the second admissible motion vectors when crossing the singularity are in continuity with the motion before and after it.
On the contrary, as shown in Fig. 11, the proposed continuation algorithm first of all eliminates the discontinuities in the components of matrix \({\mathbf {T}}\) throughout the simulation, and furthermore makes one of the admissible motion vectors be in continuity with the motion before and after the singularity. The other admissible motion is clearly identified and structurally orthogonal to the first one. It only exists when the mechanism is in the corresponding singular configuration.
3.5 Modified \(2\times 2\) four-bar mechanism
In this example, two modified double four-bar mechanisms analogous to that of Sect. 3.3 are connected one another, as shown in Fig. 12, to form a modified \(2\times 2\) four-bar mechanism. There are now eight independent bodies, for a total of 24 degrees of freedom (\(n = 24\)), and 12 hinges, corresponding to 24 constraints (\(m = 24 = n\)). However, in the generic configuration, only 22 of the resulting constraint equations are independent (\(\operatorname{rank}({\mathbf {A}}) = 22\), \(d = \min (m,n) - \operatorname{rank}({\mathbf {A}}) = 2\)), leaving two degrees of freedom. It is intended to demonstrate the proposed formulation with more than one degree of freedom. Figure 13 shows the trajectories of bars 1 and 5. At any of the singular configurations, the rank of the constraint Jacobian matrix further reduces by one (\(\operatorname{rank}( {\mathbf {A}}) = 21\), \(d = \min (m,n) - \operatorname{rank}({\mathbf {A}}) = 3\)), as shown in Fig. 14 by the vanishing of the smallest diagonal element of submatrix \({\mathbf {R}}_{1_{\mathrm{ns}}}\), introducing a second admissible motion. At \(t \approx 0.7\text{ s}\) and \(t \approx 1.4\text{ s}\), one diagonal element of submatrix \({\mathbf {R}}_{1_{\mathrm{ns}}}\) vanishes as bar 1 becomes horizontal (\(\theta _{1} = 0\) and \(\theta _{1} = -\pi \), and \(r_{y_{1}} = 0\) in Fig. 13). Similarly, at \(t \approx 0.9\text{ s}\) and \(t \approx 1.55\text{ s}\), one diagonal element of submatrix \({\mathbf {R}}_{1_{\mathrm{ns}}}\) vanishes as bar 5 becomes horizontal (\(\theta _{5} = 0\) and \(\theta _{5} = -\pi \), and \(r_{y_{5}} = 0\) in Fig. 13).
Figure 15 illustrates the time derivatives of the generalized coordinates \(\dot{q}_{1}\) and \(\dot{q}_{2}\) when the traditional and the continuation formulations are used. As discussed earlier, the traditional formulation results in rather erratic and discontinuous patterns, whereas the proposed continuation gives extremely regular results, although both present essentially identical results in terms of physical coordinates.
4 Conclusions
This paper presented a continuation algorithm for the redefinition of the subspace of minimal coordinates that is tangent to the constraint manifold. It is based on the full QR factorization of the constraint Jacobian matrix to initialize the subspace through the portion of the space defined by the orthogonal matrix Q that is orthogonal to the constraint Jacobian matrix. The economy QR factorization is then used to exactly factor the subspace in which the constraint Jacobian matrix lies, while the evolution of the tangent subspace is tracked by integrating the time derivative of matrix Q, eventually re-orthogonalizing the result to eliminate possible drift from the integrated tangent subspace. Numerical examples show that the analysis results are unchanged, but the generalized velocities no longer show the discontinuities that occasionally characterize them when the tangent subspace is recomputed without considering its value at the previous time step. The approach is extended to the case of redundant constraints, and its potential usefulness in case of topology changes originating from singular configurations is outlined.
Notes
Strictly speaking, this is true if we choose the diagonal elements of \({\mathbf {R}}_{1}\) to be nonnegative, but this has no effect on the result.
Submatrices \({\mathbf {Q}}_{1}\) and \({\mathbf {R}}_{1}\) can be rearranged to make all diagonal elements of \({\mathbf {R}}_{1}\) strictly nonnegative by changing the sign of all rows of submatrix \({\mathbf {R}}_{1}\) whose diagonal coefficient is negative, along with the sign of the corresponding columns of \({\mathbf {Q}}_{1}\).
See https://www.iftomm-multibody.org/benchmark/problem/Double_four_bar_mechanism/ for further details.
In case of redundant constraints, replace submatrices \({\mathbf {Q}}_{2}\) with the corresponding matrices \({\mathbf {T}}\) containing the appropriate combination of submatrices \({\mathbf {Q}}_{1_{\mathrm{s}}}\) and/or \({\mathbf {Q}}_{2}\), as discussed in Sect. 2.5.
The trace of a square matrix is the sum of its diagonal elements, \(\operatorname{tr}({\mathbf {M}}) = \sum _{i} M_{ii}\).
Recall that \(D_{ii} \ge 0\), since matrix \({\mathbf {D}}\) is positive (semi)definite by construction.
References
Bauchau, O.A., Laulusa, A.: Review of contemporary approaches for constraint enforcement in multibody systems. J. Comput. Nonlinear Dyn. 3(1), 011005 (2008). https://doi.org/10.1115/1.2803258
Borri, M., Bottasso, C., Mantegazza, P.: Equivalence of Kane’s and Maggi’s equations. Meccanica 25(4), 272–274 (1990). https://doi.org/10.1007/BF01559692
Businger, P., Golub, G.H.: Linear least squares solutions by Householder transformations. Numer. Math. 7(3), 269–276 (1965). https://doi.org/10.1007/BF01436084
Chan, T.F.: Rank revealing QR factorizations. Linear Algebra Appl. 88–89, 67–82 (1987). https://doi.org/10.1016/0024-3795(87)90103-0
Dormand, J.R., Prince, P.J.: A family of embedded Runge-Kutta formulae. J. Comput. Appl. Math. 6(1), 19–26 (1980). https://doi.org/10.1016/0771-050X(80)90013-3
Geist, K., Parlitz, U., Lauterborn, W.: Comparison of different methods for computing Lyapunov exponents. Prog. Theor. Phys. 83(5), 875–893 (1990). https://doi.org/10.1143/PTP.83.875
Golub, G.H., Van Loan, C.F.: Matrix Computations, 3rd edn. Johns Hopkins University Press, Baltimore (1996)
Haug, E.J.: Multibody dynamics on differentiable manifolds. J. Comput. Nonlinear Dyn. 16(4), 041003 (2021). https://doi.org/10.1115/1.4049995
Held, A., Seifried, R.: Adjoint sensitivity analysis of multibody system equations in state-space representation obtained by QR decomposition. In: Multibody 2023, Lisbon, Portugal (2023)
Hong, Y.P., Pan, C.T.: Rank-revealing QR factorizations and the singular value decomposition. Math. Comput. (1992). https://doi.org/10.1090/s0025-5718-1992-1106970-4
Kane, T.R., Wang, C.F.: On the derivation of equations of motion. J. Soc. Ind. Appl. Math. 13(2), 487–492 (1965)
Laulusa, A., Bauchau, O.A.: Review of classical approaches for constraint enforcement in multibody systems. J. Comput. Nonlinear Dyn. 3(1), 011004 (2008). https://doi.org/10.1115/1.2803257
Maggi, G.A.: Principii della Teoria Matematica del Movimento dei Corpi. Ulrico Hoepli, Milano (1896)
Maggi, G.A.: Principii di Stereodinamica: Corso Sulla Formazione, L’interpretazione e L’integrazione delle Equazioni del Movimento dei Solidi. Hoepli, Milano (1903) (in Italian)
Mariti, L., Belfiore, N.P., Pennestrì, E., Valentini, P.P.: Comparison of solution strategies for multibody dynamics equations. Int. J. Numer. Methods Eng. (2011). https://doi.org/10.1002/nme.3190
Marques, F., Souto, A.P., Flores, P.: On the constraints violation in forward dynamics of multibody systems. Multibody Syst. Dyn. 39(4), 385–419 (2017). https://doi.org/10.1007/s11044-016-9530-y
Masoudi, R., Uchida, T., Vilela, D., Luaces, A., Cuadrado, J., McPhee, J.: A library of computational benchmark problems for the multibody dynamics community. In: Multibody 2013, Zagreb, Croatia (2013)
Pękal, M., Wojtyra, M., Frązek, J.: Free-body-diagram method for the uniqueness analysis of reactions and driving forces in redundantly constrained multibody systems with nonholonomic constraints. Mech. Mach. Theory 133, 329–346 (2019). https://doi.org/10.1016/j.mechmachtheory.2018.11.021
Roupa, I., Gonçalves, S.B., da Silva, M.T.: Kinematics and dynamics of planar multibody systems with fully Cartesian coordinates and a generic rigid body. Mech. Mach. Theory 180(2), 105134 (2023). https://doi.org/10.1016/j.mechmachtheory.2022.105134
Wojtyra, M.: Joint reactions in rigid body mechanisms with dependent constraints. Mech. Mach. Theory 44, 2265–2278 (2009). https://doi.org/10.1016/j.mechmachtheory.2009.07.008
Zhou, P., Zanoni, A., Masarati, P.: Projection continuation for minimal coordinate set dynamics of constrained systems. In: ECCOMAS Thematic Conference on Multibody Dynamics, Budapest, Hungary (2021) (online)
Zhou, P., Zanoni, A., Masarati, P.: A projection continuation approach for minimal coordinate set constrained dynamics. Multibody Syst. Dyn. (2023). https://doi.org/10.1007/s11044-023-09882-z
Funding
Open access funding provided by Politecnico di Milano within the CRUI-CARE Agreement. The research described in this article received no funding.
Author information
Authors and Affiliations
Contributions
P.M. conceived the idea and wrote most of the text; M.Q. implemented the code, performed all the numerical analyses, and generated the graphs; A.Z. contributed to the formulation of the original theory and to the text. All authors reviewed the manuscript.
Corresponding author
Ethics declarations
Competing interests
Pierangelo Masarati is an Associate Editor of Multibody System Dynamics. The authors have no other competing interests to declare that are relevant to the content of this article.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix A: Reorthogonalization after continuation
Consider submatrix \(\hat{{\mathbf {Q}}}_{2}\) as the one resulting from the complete QR factorization of \({\mathbf {A}}_{k+1}^{T}\) and submatrix \(\tilde{{\mathbf {Q}}}_{2}\) as the one resulting from the continuation algorithm.Footnote 4 The subspaces spanned by the two matrices may differ because of accumulated numerical error during the integration of Eqs. (11a)–(11b) for the former and Eq. (15) for the latter, including for the former the correction of the physical coordinates solution to bring it back onto the constraint manifold according to Eq. (13).
The desired matrix \({\mathbf {Q}}_{2}\) must consist of
-
i)
a recombination of the columns of \(\hat{{\mathbf {Q}}}_{2}\) (the “exact” subspace);
-
ii)
that is as close as possible to \(\tilde{{\mathbf {Q}}}_{2}\) (the “continued” subspace).
Requirement (i) is met by constructing \({\mathbf {Q}}_{2}\) as
with \({\mathbf {P}} \in \mathbb{R}^{(n-m)\times (n-m)}\) orthonormal, i.e., subjected to the constraint
such that
where submatrix \(\hat{{\mathbf {Q}}}_{1}\) also results from the QR factorization of matrix \({\mathbf {A}}_{k+1}^{T}\), and
Requirement (ii) is met by determining matrix \({\mathbf {P}}\) subjected to the condition
where \(\left \| \cdot \right \| \) indicates a suitable matrix norm to be defined.
1.1 A.1 Constrained minimization
The problem can be recast in the minimization of a cost function \(J\) consisting of the traceFootnote 5 of the product of matrix
by its transpose, with
or the square of matrix \({\mathbf {E}}\)’s Frobenius norm, i.e., a quadratic form with respect to matrix \({\mathbf {P}}\) subjected to the constraint of Eq. (52). The latter can be imposed by transforming the constrained minimization into an unconstrained one with the addition of the constraint equation to the cost function using the Lagrange multipliers as
with
where \({\boldsymbol {\Lambda}} \in \mathbb{R}^{(n-m)\times (n-m)}\) is the (symmetric) matrix of the Lagrange multipliers.
A stationary point may be found by setting to zero the partial derivatives of the cost function \(J\) with respect to matrices \({\mathbf {P}}\) and \({\boldsymbol {\Lambda}}\). Setting the partial derivative of \(J\) with respect to \({\boldsymbol {\Lambda}}\) equal to \({\mathbf {0}}\) yields the constraint equation, Eq. (52). Setting the partial derivative of \(J\) with respect to \({\mathbf {P}}\) equal to \({\mathbf {0}}\) yields
i.e.,
where, owing to its orthonormality, \({\mathbf {P}}^{-1} = {\mathbf {P}}^{T}\) is used. Replacing \({\mathbf {P}}\) from Eq. (61) in the orthonormality constraint of Eq. (52) yields
i.e., a continuous algebraic Riccati equation in \({\boldsymbol {\Lambda}}\), whose solution is used in Eq. (61) to obtain
and thus the optimal \({\mathbf {Q}}_{2}\) from Eq. (51).
1.2 A.2 Polar decomposition
Alternatively, according to the polar decomposition theorem, the transpose of matrix \({\mathbf {C}}\) can be decomposed in the product of an orthonormal matrix \({\mathbf {U}} \in \mathbb{R}^{(n-m)\times (n-m)}\) and a symmetric, positive (semi)definite matrix \({\mathbf {D}} \in \mathbb{R}^{(n-m)\times (n-m)}\), namely \({\mathbf {C}}^{T} = {\mathbf {U}} {\mathbf {D}}\). The product
gives the opportunity to compute
where operator \((\cdot )^{1/2}\) indicates the matrix square root operation, and thus
Matrix \({\mathbf {U}}\) corresponds to the optimal matrix of Eq. (63).
Proof
We assume for \({\mathbf {P}}\) matrix \({\mathbf {U}}\) from Eq. (66) with a multiplicative perturbation by an arbitrary orthogonal matrix, and show that when replaced in the cost function of Eq. (59), it gives a value that is minimal when \({\mathbf {P}} \equiv {\mathbf {U}}\).
Assume for matrix \({\mathbf {P}}\) a perturbation of matrix \({\mathbf {U}}\), formulated as
where \({\mathbf {W}} \in \mathbb{R}^{(n-m)\times (n-m)}\) is an arbitrary orthonormal matrix, namely \({\mathbf {W}}^{T} {\mathbf {W}} \equiv {\mathbf {I}}\), such that matrix \({\mathbf {P}}\) satisfies Eq. (52), and thus Eq. (51) satisfies requirement (i). The value of the cost function of Eq. (59), having enforced by assumption the satisfaction of the orthonormality constraint for \({\mathbf {P}}\), is
The variation of the cost function considering the perturbation matrix \({\mathbf {W}}\) is
Consider now, without loss of generality, the simplest possible perturbation matrix \({\mathbf {W}}\) consisting of the equivalent of a 2D rotation of the first two directions in the coordinate space, namely
The product \({\mathbf {D}} {\mathbf {W}}\) yields
where the symmetry of matrix \({\mathbf {D}}\) was exploited. Its trace is
which is smaller than or at most equal toFootnote 6 the trace of \({\mathbf {D}}\) alone for \(\theta \equiv 0\), as \(\cos \theta \le 1\) \(\forall \theta \), yielding
This is a second-order variation with respect to the perturbation: for \(\left | \theta \right | \ll 1\), \(\cos \theta \approx 1 - \theta ^{2}/2\), thus
i.e., \(\theta \equiv 0\) represents a minimum since \(D_{ii} \ge 0\).
Since an arbitrary perturbation can be transformed into the proposed one by an appropriate coordinate transformation, this proves the optimality of the proposed alternative formulation. Since the same cost function of the constrained minimization was used, it also proves their equivalence. □
Appendix B: QR continuation when \(m \le n\)
Consider the QR factorization of the constraint Jacobian matrix in the overconstrained, rank-deficient case, Eq. (26), here reported for clarity:
with \({\mathbf {A}} \in \mathbb{R}^{m \times n}\), \({\mathbf {Q}} = \in \mathbb{R}^{n \times n}\) (\({\mathbf {Q}}^{T} {\mathbf {Q}} \equiv {\mathbf {I}}\)), \({\mathbf {Q}}_{1_{\mathrm{ns}}} \in \mathbb{R}^{n \times (m-d)}\), \({\mathbf {Q}}_{1_{\mathrm{s}}} \in \mathbb{R}^{n \times d}\), \({\mathbf {Q}}_{2} \in \mathbb{R}^{n \times (n-m)}\), \({\mathbf {R}} \in \mathbb{R}^{n \times m}\), \({\mathbf {R}}_{1_{\mathrm{ns}}} \in \mathbb{R}^{(m-d) \times (m-d)}\) (upper triangular), \({\mathbf {R}}_{1_{\mathrm{s}}} \in \mathbb{R}^{(m-d) \times d}\), and \({\mathbf {P}} \in \mathbb{R}^{m \times m}\) (\({\mathbf {P}}^{T} {\mathbf {P}} \equiv {\mathbf {I}}\)). It is assumed that the rank of the constraint Jacobian matrix, \({\mathbf {A}}\), is less than \(n\), corresponding to a rank-deficiency index \(d = n - \operatorname{rank}({\mathbf {A}}) > 0\), thus allowing a corresponding number of degrees of freedom for the constrained problem.
Reorganize it as
with
\({\mathbf {T}} \in \mathbb{R}^{n \times (n - m + d)}\). The time derivative of matrix \({\mathbf {A}}\) is
since \(\dot{{\mathbf {P}}} \equiv {\mathbf {0}}\) by definition of pivoting matrix. After pre-multiplication by \({\mathbf {Q}}^{T}\) and post-multiplication by \({\mathbf {P}}\), one obtains
exploiting the orthogonality of both matrices. Define
with \({\boldsymbol {\Omega}} \in \mathbb{R}^{n \times n}\) because of the orthogonality of matrix \({\mathbf {Q}}_{1}\). Replacing the definitions of \({\mathbf {Q}}\) and \(\dot{{\mathbf {Q}}}\),
with \({\boldsymbol {\Omega}}_{\mathrm{ns}} \in \mathbb{R}^{(m-d) \times (m-d)}\) (\({\boldsymbol {\Omega}}_{\mathrm{ns}}^{T} = -{\boldsymbol {\Omega}}_{\mathrm{ns}}\)) and \({\boldsymbol {\Omega}}_{\mathrm{s}} \in \mathbb{R}^{(n-m+d) \times (m-d)}\). The bottom-right block of matrix \({\boldsymbol {\Omega}}\) is arbitrarily set to zero to minimize the re-orientation of the columns of matrix \({\mathbf {Q}}_{2}\) that correspond to the directions of motion allowed by the rank-deficiency of the constrain Jacobian matrix \({\mathbf {A}}\).
Consider Eq. (79):
Explode everything in nonsingular ‘ns’ and singular ‘s’ blocks:
with \({\mathbf {J}}_{11} \in \mathbb{R}^{(m-d) \times (m-d)}\), \({\mathbf {J}}_{12} \in \mathbb{R}^{(m-d) \times d}\), \({\mathbf {J}}_{21} \in \mathbb{R}^{d \times (m-d)}\), and \({\mathbf {J}}_{22} \in \mathbb{R}^{d \times d}\). This yields the four equations
2.1 B.1 Matrix \({\boldsymbol {\Omega}}\)
From Eq. (84c):
From Eq. (84a):
Consider its strictly lower triangular part
Then
Matrix \({\boldsymbol {\Omega}}\) is then used for the continuation of matrix \({\mathbf {Q}}\), and specifically of the subspace \({\mathbf {T}}\) of Eq. (77), as discussed in Sect. 2.4 with reference to matrix \({\mathbf {Q}}\) and subspace \({\mathbf {Q}}_{2}\).
2.2 B.2 Matrix \(\dot{{\mathbf {R}}}\)
Matrix \(\dot{{\mathbf {R}}}\) is irrelevant as the continuation of matrix \({\mathbf {R}}\) is not needed. However, for completeness, it can be obtained by considering again Eq. (84a):
Then, from Eq. (84b):
Equation (84d) must be intrinsically complied with, owing to the rank-deficiency of the constraint Jacobian matrix. One could use it to verify the consistency of the solution. Otherwise, if \(\dot{{\mathbf {R}}}\) is not needed, then one may ignore Eqs. (84b) and (84d).
Appendix C: QR continuation when \(m > n\)
Consider the QR factorization of the constraint Jacobian matrix in the overconstrained, rank-deficient case, Eq. (26), here reported for clarity:
with \({\mathbf {A}} \in \mathbb{R}^{m \times n}\), \({\mathbf {Q}} = {\mathbf {Q}}_{1} \in \mathbb{R}^{n \times n}\) (\({\mathbf {Q}}^{T} {\mathbf {Q}} \equiv {\mathbf {I}}\)), \({\mathbf {R}} \in \mathbb{R}^{n \times m}\), \({\mathbf {R}}_{1} \in \mathbb{R}^{n \times n}\) (upper triangular), \({\mathbf {R}}_{2} \in \mathbb{R}^{n \times (m - n)}\), and \({\mathbf {P}} \in \mathbb{R}^{m \times m}\) (\({\mathbf {P}}^{T} {\mathbf {P}} \equiv {\mathbf {I}}\)). It is assumed that the rank of the constraint Jacobian matrix \({\mathbf {A}}\) is less than \(n\), corresponding to a rank-deficiency index \(d = n - \operatorname{rank}({\mathbf {A}}) > 0\), thus allowing a corresponding number of degrees of freedom for the constrained problem.
The time derivative of matrix \({\mathbf {A}}\) is
since \(\dot{{\mathbf {P}}} \equiv {\mathbf {0}}\) by the definition of pivoting matrix. After pre-multiplication by \({\mathbf {Q}}_{1}^{T}\) and post-multiplication by \({\mathbf {P}}\), one obtains
exploiting the orthogonality of both matrices. Define
with \({\boldsymbol {\Omega}} \in \mathbb{R}^{n \times n}\) because of the orthogonality of matrix \({\mathbf {Q}}_{1}\) or
with \({\boldsymbol {\Omega}}_{\text{ns}} \in \mathbb{R}^{(n-d) \times (n-d)}\), \({\boldsymbol {\Omega}}_{\text{s}} \in \mathbb{R}^{d \times (n-d)}\) (\({\boldsymbol {\Omega}}_{\text{ns}}^{T} = - {\boldsymbol {\Omega}}_{\text{ns}}\)). The bottom-right block of matrix \({\boldsymbol {\Omega}}\) is arbitrarily set to zero to minimize the re-orientation of the columns of matrix \({\mathbf {Q}}_{2}\) that correspond to the directions of motion allowed by the rank-deficiency of the constrain Jacobian matrix \({\mathbf {A}}\).
Consider the first \(n\) columns of both sides of Eq. (93):
Explode everything in nonsingular ‘ns’ and singular ‘s’ blocks:
with \({\mathbf {J}}_{11} \in \mathbb{R}^{(n-d) \times (n-d)}\), \({\mathbf {J}}_{12} \in \mathbb{R}^{(n-d) \times d}\), \({\mathbf {J}}_{21} \in \mathbb{R}^{d \times (n-d)}\), \({\mathbf {J}}_{22} \in \mathbb{R}^{d \times d}\), \({\mathbf {R}}_{1_{\text{ns}}} \in \mathbb{R}^{(n-d) \times (n-d)}\) (upper triangular, as its time derivative \(\dot{{\mathbf {R}}}_{1_{\text{ns}}}\)), and \({\mathbf {R}}_{1_{\text{s}}} \in \mathbb{R}^{(n-d) \times d}\). This yields the four equations:
3.1 C.1 Matrix \({\boldsymbol {\Omega}}\)
From Eq. (98c):
From Eq. (98a):
Consider its strictly lower triangular part
Then
Matrix \({\boldsymbol {\Omega}}\) is then used for the continuation of matrix \({\mathbf {Q}}_{1}\), and specifically of the subspace \({\mathbf {R}} = {\mathbf {Q}}_{1_{\text{s}}}\), as discussed in Sect. 2.4 with reference to matrix \({\mathbf {Q}}\) and subspace \({\mathbf {Q}}_{2}\).
3.2 C.2 Matrix \(\dot{{\mathbf {R}}}\)
Matrix \(\dot{{\mathbf {R}}}\) is irrelevant because the continuation of matrix \({\mathbf {R}}\) is not needed. However, for completeness, it can be obtained by considering again Eq. (98a):
Then, from Eq. (98b):
Equation (98d) must be intrinsically complied with, owing to the rank-deficiency of the constraint Jacobian matrix. One could use it to verify the consistency of the solution. Consider now columns \((n+1):m\) of Eq. (93):
with \({\mathbf {L}} \in \mathbb{R}^{n \times (m - n)}\), which yields
Otherwise, if \(\dot{{\mathbf {R}}}\) is not needed, then one may ignore Eqs. (98b), (98d), and (105).
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Masarati, P., Quro, M.J.U. & Zanoni, A. Projection continuation for minimal coordinate set formulation and singularity detection of redundantly constrained system dynamics. Multibody Syst Dyn (2023). https://doi.org/10.1007/s11044-023-09930-8
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11044-023-09930-8