Direct multiple shooting and direct collocation perform similarly in biomechanical predictive simulations (2302.07645v2)
Abstract: Direct multiple shooting (DMS) and direct collocation (DC) are two common transcription methods for solving optimal control problems (OCP) in biomechanics and robotics. They have rarely been compared in terms of solution and speed. Through five examples of predictive simulations solved using five transcription methods and 100 initial guesses in the Bioptim software, we showed that not a single method outperformed systematically better. All methods converged to almost the same solution (cost, states, and controls) in all but one OCP, with several local minima being found in the latter. Nevertheless, DC based on fourth-order Legendre polynomials provided overall better results, especially in terms of dynamic consistency compared to DMS based on a fourth-order Runge-Kutta method. Furthermore, expressing the rigid-body constraints using inverse dynamics was usually faster than forward dynamics. DC with dynamics constraints based on inverse dynamics converged to better and less variable solutions. Consequently, we recommend starting with this transcription to solve OCPs but keep testing other methods.
- Fast direct multiple shooting algorithms for optimal robot control. In Lecture Notes in Control and Information Sciences, volume 340, pages 65–93, 2006. ISBN 3540361189. doi:10.1007/978-3-540-36119-0_4.
- Predictive multibody dynamic simulation of human neuromusculoskeletal systems: a review. Multibody System Dynamics 2022, pages 1–41, 11 2022. ISSN 1573-272X. doi:10.1007/S11044-022-09852-X.
- Matthew Kelly. An introduction to trajectory optimization: How to do your own direct collocation. SIAM Review, 59(4):849–904, 2017. ISSN 00361445. doi:10.1137/16M1062569.
- John T. Betts. Practical Methods for Optimal Control and Estimation Using Nonlinear Programming. Society for Industrial and Applied Mathematics, 1 2010. doi:10.1137/1.9780898718577.
- A Family of Iterative Gauss-Newton Shooting Methods for Nonlinear Optimal Control. IEEE International Conference on Intelligent Robots and Systems, pages 6903–6910, 12 2018. ISSN 21530866. doi:10.1109/IROS.2018.8593840.
- Contact-Implicit Trajectory Optimization for Dynamic Object Manipulation. IEEE International Conference on Intelligent Robots and Systems, pages 6814–6821, 11 2019. ISSN 21530866. doi:10.1109/IROS40897.2019.8968194.
- A review of simulation methods for human movement dynamics with emphasis on gait. Multibody System Dynamics, 47(3):265–292, 2019. ISSN 1573272X. doi:10.1007/s11044-019-09685-1.
- Comparison of different optimal control formulations for generating dynamically consistent crutch walking simulations using a torque-driven model. Mechanism and Machine Theory, 154, 2020. ISSN 0094114X. doi:10.1016/j.mechmachtheory.2020.104031.
- Generating optimal control simulations of musculoskeletal movement using OpenSim and MATLAB. PeerJ, 2016(1):e1638, 1 2016. ISSN 21678359. doi:10.7717/PEERJ.1638/FIG-6.
- Thomas Geijtenbeek. SCONE: Open Source Software for Predictive Simulation of Biological Motion. Journal of Open Source Software, 4(38):1421, 6 2019. ISSN 2475-9066. doi:10.21105/joss.01421.
- A Multiple Shooting Algorithm for Direct Solution of Optimal Control Problems. IFAC Proceedings Volumes, 17(2):1603–1608, 7 1984. doi:10.1016/S1474-6670(17)61205-9.
- Optimal estimation of complex aerial movements using dynamic optimisation. Sport Biomechanics, pages 1–16, 6 2022. doi:10.1080/14763141.2022.2066015.
- Modeling and optimal control of human platform diving with somersaults and twists. Optimization and Engineering, 13(1):29–56, 10 2012. doi:10.1007/s11081-011-9169-8.
- Optimal control as a tool for innovation in aerial twisting on a trampoline. Applied Sciences (Switzerland), 10(23):1–17, 11 2020. doi:10.3390/app10238363.
- Synthesis of full-body 3-D human gait using optimal control methods. In Proceedings - IEEE International Conference on Robotics and Automation, volume 2016-June, pages 1560–1566. Institute of Electrical and Electronics Engineers Inc., 6 2016. doi:10.1109/ICRA.2016.7487294.
- Optimal control based stiffness identification of an ankle-foot orthosis using a predictive walking model. Frontiers in Computational Neuroscience, 11(April), 2017. doi:10.3389/fncom.2017.00023.
- Parameter optimization for passive spinal exoskeletons based on experimental data and optimal control. IEEE-RAS International Conference on Humanoid Robots, pages 535–540, 12 2017. doi:10.1109/HUMANOIDS.2017.8246924.
- Predicting the influence of hip and lumbar flexibility on lifting motions using optimal control. Journal of Biomechanics, 78:118–125, 9 2018. doi:10.1016/J.JBIOMECH.2018.07.028.
- Lorenz T. Biegler. Solution of dynamic optimization problems by successive quadratic programming and orthogonal collocation. Computers & Chemical Engineering, 8(3-4):243–247, 1 1984. doi:10.1016/0098-1354(84)87012-X.
- Three-dimensional data-tracking dynamic optimization simulations of human locomotion generated by direct collocation. Journal of Biomechanics, 59:1–8, 7 2017. doi:10.1016/J.JBIOMECH.2017.04.038.
- Marko Ackermann and Antonie J. van den Bogert. Optimality principles for model-based prediction of human gait. Journal of Biomechanics, 43(6):1055–1060, 4 2010. doi:10.1016/J.JBIOMECH.2009.12.012.
- Optimal footfall patterns for cost minimization in running. Journal of Biomechanics, 48(11):2858–2864, 8 2015. doi:10.1016/J.JBIOMECH.2015.04.019.
- Modeling toes contributes to realistic stance knee mechanics in three-dimensional predictive simulations of walking. Plos One, 17(1):e0256311, 2022. doi:10.1371/journal.pone.0256311.
- Inverse Dynamics vs. Forward Dynamics in Direct Transcription Formulations for Trajectory Optimization. Proceedings - IEEE International Conference on Robotics and Automation, 2021-May:12752–12758, 2021. doi:10.1109/ICRA48506.2021.9561306.
- Implicit methods for efficient musculoskeletal simulation and optimal control. Procedia IUTAM, 2:297–316, 2011. doi:10.1016/j.piutam.2011.04.027.
- Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem. Annals of Biomedical Engineering, 44(10):2922–2936, 2016. doi:10.1007/s10439-016-1591-9.
- Optimality equivalence and computational advantages of free-floating base dynamics compared to full-body dynamics. Mechanism and Machine Theory, 181:105164, 3 2023. doi:10.1016/J.MECHMACHTHEORY.2022.105164.
- Comparison and analysis of multibody dynamics formalisms for solving optimal control problem. In IUTAM Bookseries, volume 33, pages 55–77. Springer, Cham, 2019. doi:10.1007/978-3-030-00527-6_3.
- Rapid predictive simulations with complex musculoskeletal models suggest that diverse healthy and pathological human gaits can emerge from similar control strategies. Journal of the Royal Society Interface, 16(157), 8 2019. doi:10.1098/RSIF.2019.0402.
- Optimal forward twisting pike somersault without self-collision. Sports Biomechanics, 22(special issue Biomechanics of Acrobatic Sports):1–18, 3 2022. doi:10.1080/14763141.2022.2052348.
- CasADi: a software framework for nonlinear optimization and optimal control. Mathematical Programming Computation, 11(1):1–36, 3 2019. doi:10.1007/S12532-018-0139-4/TABLES/3.
- CVODES: The Sensitivity-Enabled ODE Solver in SUNDIALS. Proceedings of the ASME International Design Engineering Technical Conferences and Computers and Information in Engineering Conference - DETC2005, 6 A:257–269, 6 2008. doi:10.1115/DETC2005-85597.
- GPOPS-II. ACM Transactions on Mathematical Software (TOMS), 41(1), 10 2014. doi:10.1145/2558904.
- Bioptim, a Python framework for Musculoskeletal Optimal Control in Biomechanics. IEEE Transactions on Systems, Man, and Cybernetics: Systems, pages 1 – 12, 2022. doi:10.1109/TSMC.2022.3183831.
- K. Wright. Some relationships between implicit Runge-Kutta, collocation and Lanczosτ𝜏\tauitalic_τ methods, and their stability properties. BIT Numerical Mathematics 1970 10:2, 10(2):217–227, 6 1970. doi:10.1007/BF01936868.
- La résolution numérique des problèmes différentiels aux conditions initiales par des méthodes de collocation. Revue française d’informatique et de recherche opérationnelle. Série rouge, 3(R3):17–44, 1969.
- Numerical Integrators. Geometric Numerical Integration, pages 27–50, 5 2006. doi:10.1007/3-540-30666-8_2.
- Roy Featherstone. Divide-and-conquer articulated-body algorithm for parallel O(log(n)) calculation of rigid-body dynamics. Part 1: Basic algorithm. International Journal of Robotics Research, 18(9):867–875, 1999. doi:10.1177/02783649922066619.
- Roy Featherstone. Robot Dynamics Algorithms. Springer New York, NY, 1987. doi:10.1007/978-0-387-74315-8.
- Real-Time and Dynamically Consistent Estimation of Muscle Forces Using a Moving Horizon EMG-Marker Tracking Algorithm—Application to Upper Limb Biomechanics. Frontiers in Bioengineering and Biotechnology, 9:112, 2 2021a. doi:10.3389/fbioe.2021.642742.
- Resilient hexapod robot. ICAT 2017 - 26th International Conference on Information, Communication and Automation Technologies, Proceedings, 2017-December:1–6, 12 2017. doi:10.1109/ICAT.2017.8171613.
- Subject-specific musculoskeletal modeling in the evaluation of shoulder muscle and joint function. Journal of Biomechanics, 49(15):3626–3634, 11 2016. doi:10.1016/j.jbiomech.2016.09.025.
- Analysis of the influence of coordinate and dynamic formulations on solving biomechanical optimal control problems. Mechanism and Machine Theory, 142:103578, 12 2019. doi:10.1016/j.mechmachtheory.2019.103578.
- M. R. Yeadon. The simulation of aerial movement—II. A mathematical inertia model of the human body. Journal of Biomechanics, 23(1):67–74, 1 1990. doi:10.1016/0021-9290(90)90370-I.
- Pierre Puchaud. github.com/Ipuch/dms-vs-dc: 0.2.0, 1 2023.
- On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Mathematical Programming, 106(1):25–57, 2006. doi:10.1007/s10107-004-0559-y.
- Iain S. Duff. MA57 - A code for the solution of sparse symmetric definite and indefinite systems. ACM Transactions on Mathematical Software, 30(2):118–144, 2004. doi:10.1145/992200.992202.
- Solving Ordinary Differential Equations II, volume 14 of Springer Series in Computational Mathematics. Springer Berlin Heidelberg, Berlin, Heidelberg, 1996. doi:10.1007/978-3-642-05221-7.
- acados—a modular open-source framework for fast embedded optimal control. Mathematical Programming Computation, 14(1):147–183, 3 2022. doi:10.1007/S12532-021-00208-8/TABLES/8.
- OpenSim Moco: Musculoskeletal optimal control. PLoS Computational Biology, 16(12 December):839381, 11 2020. doi:10.1371/journal.pcbi.1008493.
- Optimal 3D arm strategies for maximizing twist rotation during somersault of a rigid-body model. Multibody System Dynamics, 52(2):193–209, 6 2021b. doi:10.1007/S11044-020-09759-5/FIGURES/11.
- Anne D. Koelewijn and Antonie J. van den Bogert. A solution method for predictive simulations in a stochastic environment. Journal of Biomechanics, 104, 5 2020. doi:10.1016/J.JBIOMECH.2020.109759.
- Prediction of three-dimensional crutch walking patterns using a torque-driven model. Multibody System Dynamics, 51(1):1–19, 2021. doi:10.1007/s11044-020-09751-z.
- Similarities and differences between musculoskeletal simulations of OpenSim and AnyBody modeling system. Journal of Mechanical Science and Technology, 32(12):6037–6044, 12 2018. doi:10.1007/s12206-018-1154-0.
- An efficient multiple shooting based reduced SQP strategy for large-scale dynamic process optimization: Part II: Software aspects and applications. Computers & Chemical Engineering, 27(2):167–174, 2 2003. doi:10.1016/S0098-1354(02)00195-3.
- Horizon: A Trajectory Optimization Framework for Robotic Systems. Frontiers in Robotics and AI, 9:148, 7 2022. doi:10.3389/FROBT.2022.899025/BIBTEX.
- Fast integrators with sensitivity propagation for use in CasADi. arXiv, 11 2022. doi:10.48550/arxiv.2211.01982.
- Direct Methods for Predicting Movement Biomechanics Based Upon Optimal Control Theory with Implementation in OpenSim. Annals of biomedical engineering, 44(8):2542–2557, 8 2016. doi:10.1007/S10439-015-1538-6.
- Performance criteria for generating predictive optimal control simulations of bicycle pedaling. Computer Methods in Biomechanics and Biomedical Engineering, 22(1):11–20, 1 2018. doi:10.1080/10255842.2018.1522535.
- Predictive forward dynamic simulation of manual wheelchair propulsion on a rolling dynamometer. Journal of Biomechanical Engineering, 142(7), 2020. doi:10.1115/1.4046298.
- Lifted implicit integrators for direct optimal control. In 54th IEEE Conference on Decision and Control (CDC), pages 3212–3217, Osaka, Japan, 12 2015. IEEE.
- Scalable variational integrators for constrained mechanical systems in generalized coordinates. IEEE Transactions on Robotics, 25(6):1249–1261, 12 2009. doi:10.1109/TRO.2009.2032955.
- Heel and toe clearance estimation for gait analysis using wireless inertial sensors. IEEE Transactions on Biomedical Engineering, 59(12 PART2):3162–3168, 2012. doi:10.1109/TBME.2012.2216263.
- Predictive Simulation Generates Human Adaptations during Loaded and Inclined Walking. PLOS ONE, 10(4):e0121407, 4 2015. doi:10.1371/JOURNAL.PONE.0121407.
- Predicting gait adaptations due to ankle plantarflexor muscle weakness and contracture using physics-based musculoskeletal simulations. PLOS Computational Biology, 15(10):e1006993, 10 2019. doi:10.1371/JOURNAL.PCBI.1006993.
- Bilevel Optimization for Cost Function Determination in Dynamic Simulation of Human Gait. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 27(7):1426–1435, 7 2019. doi:10.1109/TNSRE.2019.2922942.
- Evaluating cost function criteria in predicting healthy gait. Journal of Biomechanics, 123:110530, 6 2021. doi:10.1016/J.JBIOMECH.2021.110530.