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.
翻译:直接多重打靶(DMS)和直接配点(DC)是生物力学与机器人学中求解最优控制问题(OCP)的两种常用转录方法。目前鲜有研究系统比较二者在求解结果与计算速度上的差异。通过使用五种转录方法和100组初始猜测,对Bioptim软件中五个预测模拟案例进行求解,我们发现没有单一方法在所有情况下均表现更优。除一个OCP因存在多个局部极小值外,其余案例中所有方法均收敛至几乎相同的解(包括代价函数、状态变量和控制变量)。然而,基于四阶勒让德多项式的DC方法在整体上优于基于四阶龙格-库塔法的DMS方法,尤其在动力学一致性方面表现突出。此外,采用逆动力学表达刚体约束通常比正动力学更快。基于逆动力学约束的DC方法能收敛至更优且变异性更小的解。因此,我们建议优先使用该转录方法求解OCP,但仍需对其他方法进行持续测试。