Summary
Gauss's Principle of Least Constraint allows to interpret the equations of motion of a constrained mechanical system as the ones arising from the minimization of a well defined deviation function which, mathematically, is a least-squares problem. Following previous approaches in which a recursive least-squares (RLS) formulation for this problem was discussed, this work introduces a new strategy in which, through a loop involving three minimization problems, a fixed time-step numerical integration algorithm for multibody systems is obtained. This strategy simultaneously enforces the necessary conditions for the accelerations to be consistent with the system constraints and suppresses constraint drifts in configuration and velocity levels. The proposed algorithm is tested on a benchmark problem involving a rectangular Bricard mechanism. Results demonstrate the prevention of constraint violations and mechanical energy drifts, indicating the potential of this strategy for the computational treatment of multibody system problems.