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)的两种常见转录方法。目前鲜有研究对二者的求解质量与计算速度进行系统比较。通过利用Bioptim软件中五种转录方法及100种初始猜测对五个预测仿真算例进行求解,我们发现没有任何一种方法能持续表现更优。所有方法在除一个OCP外的其余算例中均收敛至几乎相同的解(成本、状态变量与控制变量),而后者则发现了多个局部极小值。然而,基于四阶勒让德多项式的DC法在整体上提供了更优结果,尤其是在动力学一致性方面优于基于四阶龙格-库塔法的DMS法。此外,使用逆动力学表达刚体约束通常比正向动力学计算速度更快。基于逆动力学约束的DC法能够收敛至更优且变异更小的解。因此,我们建议在求解OCP时优先采用此类转录方法,但需持续测试其他方法。