Modified Patankar--Runge--Kutta (MPRK) methods are linearly implicit time integration schemes developed to preserve positivity and a linear invariant such as the total mass in chemical reactions. MPRK methods are naturally equipped with embedded schemes yielding a local error estimate similar to Runge--Kutta pairs. To design good time step size controllers using these error estimates, we propose to use Bayesian optimization. In particular, we design a novel objective function that captures important properties such as tolerance convergence and computational stability. We apply our new approach to several MPRK schemes and controllers based on digital signal processing, extending classical PI and PID controllers. We demonstrate that the optimization process yields controllers that are at least as good as the best controllers chosen from a wide range of suggestions available for classical explicit and implicit time integration methods.
翻译:改进Patankar-龙格-库塔(MPRK)方法是一类线性隐式时间积分格式,旨在保持正性和线性不变量(如化学反应中的总质量)。MPRK方法自然具备嵌入式格式,可提供类似于龙格-库塔对的局部误差估计。为了利用这些误差估计设计良好的时间步长控制器,我们提出采用贝叶斯优化。具体而言,我们设计了一个新型目标函数,该函数能够捕捉容差收敛性和计算稳定性等重要特性。我们将新方法应用于多种MPRK格式以及基于数字信号处理的控制器,扩展了经典的比例积分(PI)和比例积分微分(PID)控制器。实验证明,通过优化过程得到的控制器,其性能至少不逊于从经典显式和隐式时间积分方法的广泛建议中挑选出的最佳控制器。