wpilibsuite/allwpilib

Implement Tsitouras 5th order numerical integrator

Aberta

#7.123 aberto em 23 de set. de 2024

 (2 comentários) (0 reação) (0 responsável)C++ (714 forks)auto 404
component: wpimatheffort: 2good first issuetype: feature

Métricas do repositório

Stars
 (1.281 estrelas)
Métricas de merge de PR
 (Mesclagem média 8d 11h) (153 fundiu PRs em 30d)

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:

  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

Guia do colaborador