wpilibsuite/allwpilib
View on GitHubImplement Tsitouras 5th order numerical integrator
Open
#7,123 opened on Sep 23, 2024
component: wpimatheffort: 2good first issuetype: feature
Repository metrics
- Stars
- (1,281 stars)
- PR merge metrics
- (PR metrics pending)
Description
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:
- Copy-paste the RKDP function(s) to make a new function Tsit5
- 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̂)
- Update the source location comment in the function
- Copy-paste and modify the tests
- Replace usages of RKDP with Tsit5