Feedforward power limiting - #1992
Draft
efabiyi wants to merge 4 commits into
Draft
Conversation
Lucien950
reviewed
May 4, 2026
Contributor
There was a problem hiding this comment.
maybe put the humungous table into cpp file so that every single hpp which includes this is not immediately ddosd
Contributor
There was a problem hiding this comment.
also do double check that we do have the flash memory to be able to do this
Contributor
Author
There was a problem hiding this comment.
this is very true will do
Aditya-Dhiman4
requested changes
May 5, 2026
| static constexpr float SPEED_MAX_RPM = 20000.0f; | ||
| static constexpr float CURRENT_MAX_A = 105.0f; | ||
|
|
||
| static constexpr float RPM_TO_RAD_PER_SEC = (2.0f * 3.14159265358979323846f) / 60.0f; |
Contributor
There was a problem hiding this comment.
we have a M_PI_F macro somewhere
efabiyi
force-pushed
the
vc_power_limiting
branch
from
May 12, 2026 23:08
6b5d61b to
179968d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change List
init()once at startup,update()every control cycle. Takes per-wheel (speed, torque, temperature, measured current) and outputs per-wheel (speed command, positive torque limit, negative torque limit). Assumes arrays are monotonically increasing. The feedback term trims the scaling factor and accounts for steady state drift and bias.Known Limitations