wpilibsuite/allwpilib

Implement Tsitouras 5th order numerical integrator

開放

#7,123 建立於 2024年9月23日

 (2 則留言) (0 個反應) (0 位負責人)C++ (714 個分叉)auto 404
component: wpimatheffort: 2good first issuetype: feature

倉庫指標

星標
 (1,281 顆星)
PR 合併指標
 (平均合併 8天 11小時) (30 天內合併 153 個 PR)

描述

This issue is a spin-off of https://github.com/wpilibsuite/allwpilib/issues/4373.

The Tsitouras 5th order integration method is 3x more accurate than Dormand-Prince (RKDP). It uses the exact same algorithm with different coefficients.

Section 7.9 of Controls Engineering in FRC has an introduction to the notation of Runge-Kutta methods.

Here's the paper to implement: http://users.uoa.gr/~tsitourasc/RK54_new_v2.pdf

Here's the implementation steps:

  1. Copy-paste the RKDP function(s) to make a new function Tsit5
  2. Update the coefficients of A, b1, and b2 to reflect those in section 3, table 1 of the paper above (A maps to a, b1 maps to b, and b2 maps to b̂)
  3. Update the source location comment in the function
  4. Copy-paste and modify the tests
  5. Replace usages of RKDP with Tsit5

貢獻者指南