Skip to main content
Log in

Exponential integration for efficient and accurate multibody simulation with stiff viscoelastic contacts

  • Published:
Multibody System Dynamics Aims and scope Submit manuscript

Abstract

The simulation of multibody systems with frictional contacts is a fundamental tool for many fields, such as robotics, computer graphics, and mechanics. Hard frictional contacts are particularly troublesome to simulate because they make differential equations stiff, calling for computationally demanding implicit integration schemes. We suggest to tackle this issue by using exponential integrators, a long-standing class of integration schemes (first introduced in the 1960s) that in recent years has enjoyed a resurgence of interest. This scheme can be applied to multibody systems subject to stiff viscoelastic contacts, leading to integration errors similar to implicit Euler, but at much lower computational costs (between 2 to 100 times faster). In our tests with quadruped and biped robots, our method demonstrated a stable behavior with large time steps (10 ms) and stiff contacts (\(10^{5}\) N/m). Its excellent properties, especially for fast and coarse simulations, make it a valuable candidate for many applications in robotics, such as simulation, model predictive control, reinforcement learning, and controller design.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Notes

  1. We assume that static and dynamic coefficients of friction are equal.

  2. https://github.com/andreadelprete/consim.

  3. We say that a simulation is “stable” if the robot state remains bounded.

  4. Percentages do not add up to 100% because of rounding errors.

References

  1. Anitescu, M., Hart, G.D.: A constraint-stabilized time-stepping approach for rigid multibody dynamics with joints, contact and friction. Int. J. Numer. Methods Eng. 60(Jan 2003), 2335–2371 (2004)

    Article  MathSciNet  Google Scholar 

  2. Todorov, E.: Implicit nonlinear complementarity: a new approach to contact dynamics. In: 2010 IEEE International Conference on Robotics and Automation, pp. 2322–2329 (2010). IEEE

    Chapter  Google Scholar 

  3. Todorov, E.: Convex and analytically-invertible dynamics with contacts and constraints: theory and implementation in MuJoCo. In: Proceedings of IEEE International Conference on Robotics and Automation, pp. 6054–6061 (2014)

    Google Scholar 

  4. Hwangbo, J., Lee, J., Hutter, M.: Per-contact iteration method for solving contact dynamics. IEEE Robot. Autom. Lett. 3(2), 895–902 (2018)

    Article  Google Scholar 

  5. Drumwright, E.: An unconditionally stable first-order constraint solver for multibody systems. ArXiv preprint (2019). arXiv:1905.10828

  6. Tassa, Y., Erez, T., Todorov, E.: Synthesis and stabilization of complex behaviors through online trajectory optimization. In: IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 4906–4913 (2012)

    Google Scholar 

  7. Von Stryk, D.M.O.: Numerical solution of optimal control problems by direct collocation. In: Optimal Control. International Series in Numerical Mathematics, vol. 111, pp. 129–143, Birkhäuser, Basel (1993)

    Chapter  Google Scholar 

  8. Mansard, N., Del Prete, A., Geisert, M., Tonneau, S., Stasse, O.: Using a memory of motion to efficiently warm-start a nonlinear predictive controller. In: IEEE International Conference on Robotics and Automation, pp. 2986–2993 (2018)

    Google Scholar 

  9. Viereck, J., Kozolinsky, J., Herzog, A., Righetti, L., Aug, R.O.: Learning a structured neural network policy for a hopping task. IEEE Robot. Autom. Lett. 3(4), 4092–4099 (2018). arXiv:1710.00022v2

    Article  Google Scholar 

  10. Featherstone, R.: Rigid Body Dynamics Algorithms. Springer, New York (2014)

    MATH  Google Scholar 

  11. Yamane, K., Nakamura, Y.: Stable penalty-based model of frictional contacts. Proc. - IEEE Int. Conf. Robot. Autom. 2006 (January), 1904–1909 (2006)

    Google Scholar 

  12. Ascher, U.M., Petzold, L.R.: Computer Methods for Ordinary Differential Equations and Differential-Algebraic Equations. SIAM, Philadelphia (1998)

    Book  Google Scholar 

  13. Anitescu, M.: A fixed time-step approach for multibody dynamics with contact and friction. In: IEEE International Conference on Intelligent Robots and Systems, vol. 4, pp. 3725–3731 (2003)

    Google Scholar 

  14. Peiret, A., Andrews, S., Kövecses, J., Kry, P.G., Teichmann, M.: Schur complement-based substructuring of stiff multibody systems with contact. ACM Trans. Graph. 38(5), 150 (2019). https://doi.org/10.1145/3355621

    Article  Google Scholar 

  15. Erez, T., Tassa, Y., Todorov, E.: Simulation tools for model-based robotics: comparison of Bullet, Havok, MuJoCo, ODE and PhysX. In: International Conference on Robotics and Automation (2015)

    Google Scholar 

  16. Drumwright, E., Shell, D.A.: Modeling contact friction and joint friction in dynamic robotic simulation using the principle of maximum dissipation. In: Springer Tracts in Advanced Robotics, vol. 68, pp. 249–266 (2010)

    MATH  Google Scholar 

  17. Loffeld, J., Tokman, M.: Comparative performance of exponential, implicit, and explicit integrators for stiff systems of ODEs. J. Comput. Appl. Math. 241(15), 45–67 (2013)

    Article  MathSciNet  Google Scholar 

  18. Chen, Y.J.E., Sheen, S.H., Ascher, U.M., Pai, D.K.: Siere: a hybrid semi-implicit exponential integrator for efficiently simulating stiff deformable objects. ACM Trans. Graph. 40(1), 3 (2020). https://doi.org/10.1145/3410527

    Article  Google Scholar 

  19. Certaine, J.: The solution of ordinary differential equations with large time constants. Math. Methods Digit. Comput. 1, 128–132 (1960)

    MathSciNet  Google Scholar 

  20. Moler, C., Van Loan, C.: Nineteen dubious ways to compute the exponential of a matrix, twenty-five years later. SIAM Rev. 45(1), 3–49 (2003). arXiv:1011.1669v3

    Article  MathSciNet  Google Scholar 

  21. Higham, N.J.: The scaling and squaring method for the matrix exponential revisited. SIAM J. Matrix Anal. Appl. 26(4), 1179–1193 (2005)

    Article  MathSciNet  Google Scholar 

  22. Al-Mohy, A.H., Higham, N.J.: Computing the action of the matrix exponential, with an application to exponential integrators. SIAM J. Sci. Comput. 33(2), 488–511 (2011)

    Article  MathSciNet  Google Scholar 

  23. Sastre, J., Ibáñez, J., Defez, E.: Boosting the computation of the matrix exponential. Appl. Math. Comput. 340(August), 206–220 (2019)

    MathSciNet  MATH  Google Scholar 

  24. Michels, D.L., Sobottka, G.A., Weber, A.G.: Exponential integrators for stiff elastodynamic problems. ACM Trans. Graph. 33(1), 7 (2014)

    Article  Google Scholar 

  25. Chen, Y.J., Ascher, U.M., Pai, D.K.: Exponential Rosenbrock–Euler integrators for elastodynamic simulation. IEEE Trans. Vis. Comput. Graph. 24(10), 2702–2713 (2018)

    Article  Google Scholar 

  26. Luan, V.T., Michels, D.L.: Explicit exponential Rosenbrock methods and their application in visual computing. 1–18 (2018). Arxiv preprint arXiv:1805.08337

  27. Todorov, E., Erez, T., Tassa, Y.: MuJoCo: physics engine for model-based control. In: IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) (2012)

    Google Scholar 

  28. Van Loan, C.F.: Computing integrals involving the matrix exponential. IEEE Trans. Autom. Control 23(3), 395–404 (1978)

    Article  MathSciNet  Google Scholar 

  29. Carbonell, F., Jímenez, J.C., Pedroso, L.M.: Computing multiple integrals involving matrix exponentials. J. Comput. Appl. Math. 213(1), 300–305 (2008)

    Article  MathSciNet  Google Scholar 

  30. Al-Mohy, A.H., Higham, N.J.: A new scaling and squaring algorithm for the matrix exponential. SIAM J. Matrix Anal. Appl. 31(3) 970–989 (2010)

    Article  MathSciNet  Google Scholar 

  31. Grimminger, F., Meduri, A., Khadiv, M., Viereck, J., Wuthrich, M., Naveau, M., Berenz, V., Heim, S., Widmaier, F., Flayols, T., Fiene, J., Badri-Sprowitz, A., Righetti, L.: An open torque-controlled modular robot architecture for legged locomotion research. IEEE Robot. Autom. Lett. 5(2), 3650–3657 (2020). arXiv:1910.00093

    Article  Google Scholar 

  32. Project Romeo http://projetromeo.com

  33. Carpentier, J., Saurel, G., Buondonno, G., Mirabel, J., Lamiraux, F., Stasse, O., Mansard, N.: The Pinocchio C++ library: a fast and flexible implementation of rigid body dynamics algorithms and their analytical derivatives. In: Proceedings of the 2019 IEEE/SICE International Symposium on System Integration, SII 2019, 614–619 (2019)

    Google Scholar 

  34. Featherstone, R.: Exploiting sparsity in operational-space dynamics. Int. J. Robot. Res. 29(10), 1–21 (2010)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Bilal Hammoud.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix:  Implicit Euler

Appendix:  Implicit Euler

This Appendix reports some details about our implementation of implicit Euler. The state of our robots lies in a Lie group, so we have taken into account the derivatives of the integrate and difference functions, which need to be used in place of the simple + and − operators:

$$\begin{aligned} \text{difference}(x^{+}, \text{integrate}(x, \delta t f(x^{+}, u))) = 0. \end{aligned}$$
(35)

We have computed the dynamics Jacobian using the appropriate functions of the Pinocchio library. In particular, we have used the analytical derivatives of the ABA function (28 μs for the Solo quadruped robot), and we have added to it the derivatives of our contact model (which are fast to compute because they depend on already computed quantities). For the line search, we have used the ABA function (8 μs for the Solo quadruped robot). This resulted in a rather efficient implementation of implicit Euler.

For solving the nonlinear equations, we have implemented Newton’s method with line search and regularization. For solving the linear system of equations, we have used the LU decomposition with partial pivoting provided by the Eigen library. We initialized the search with the solution of an explicit Euler integration (which proved to be better than initializing with the current state).

We have measured where computation time is spent in implicit Euler to make sure that our implementation was efficient and to reason about potential improvements. For the “solo-squat” test, with an integration step \(\delta t =10\) ms, the average computation time was 0.92 ms. Expo was roughly 10 times faster for the same test and gave roughly the same integration error. The Newton method took on average 8 iterations to converge to an error norm below \(10^{-6}\). Computation time was distributed in the following way:Footnote 4

  • Prepare linear system: 51%

    • Dynamics Jacobian: 29%

      1. ABA derivatives: 24%

      2. Contact model derivatives: 4%

    • Lie-group derivatives: 21%

  • Line search: 29%

  • Solve linear system: 12%

  • Other: 8%

Most of the time was spent preparing the linear system (51%) and performing the line search (29%). Given the high efficiency of the Pinocchio library, we believe that there is not much room for improvement in the steps “ABA derivatives” and “line search” (which mainly consists of calls to ABA, integrate, and difference). The only significant room for improvement is in the “Lie-group derivatives” step, which includes two matrix–matrix multiplications of the dynamics Jacobian and the sparse Jacobians of the integrate and difference functions. Since these Jacobians are sparse, these multiplications could be computed more efficiently than what we currently do. However, this could lead to a computational gain of at most 15%. Therefore there seems to be little hope to make implicit Euler 10 times faster (i.e., as efficient as Expo).

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hammoud, B., Olivieri, L., Righetti, L. et al. Exponential integration for efficient and accurate multibody simulation with stiff viscoelastic contacts. Multibody Syst Dyn 54, 443–460 (2022). https://doi.org/10.1007/s11044-022-09818-z

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11044-022-09818-z

Keywords

Navigation