Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Tsitouras 5th order numerical integrator #7123

Open
calcmogul opened this issue Sep 23, 2024 · 2 comments · May be fixed by #7383
Open

Implement Tsitouras 5th order numerical integrator #7123

calcmogul opened this issue Sep 23, 2024 · 2 comments · May be fixed by #7383
Labels
component: wpimath Math library effort: 2 good first issue Good for newcomers. type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Comments

@calcmogul
Copy link
Member

calcmogul commented Sep 23, 2024

This issue is a spin-off of #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
@calcmogul calcmogul added type: feature Brand new functionality, features, pages, workflows, endpoints, etc. good first issue Good for newcomers. component: wpimath Math library effort: 2 labels Sep 23, 2024
@Advay17
Copy link
Contributor

Advay17 commented Nov 12, 2024

If RKDP usages are replaced, should it be deprecated, or are there any other use cases for it?

@calcmogul
Copy link
Member Author

RKDP should be deprecated since Tsit5 is superior in every way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: wpimath Math library effort: 2 good first issue Good for newcomers. type: feature Brand new functionality, features, pages, workflows, endpoints, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants