Updated power limiting to filter on wheel speed#37
Open
ajmel wants to merge 76 commits intopower-limitingfrom
Open
Updated power limiting to filter on wheel speed#37ajmel wants to merge 76 commits intopower-limitingfrom
ajmel wants to merge 76 commits intopower-limitingfrom
Conversation
Updated power limiting by only allowing smaller torques than the largest requested before to be commanded. Resets once wheel speed goes back to zero
daniwhite
requested changes
Jan 15, 2019
Collaborator
daniwhite
left a comment
There was a problem hiding this comment.
Just some small things to fix. Also I don't wanna approve this until it's tested
src/vcu/src/controls.c
Outdated
| power_lim_settings.tMAX = tMAX; | ||
| int32_t tMAX = power_limit/(abs(mc_readings.speed)*628/6000)*10; //Convert RPM to rad/s with 2pi/60, *10 to dNm | ||
|
|
||
| if (tMAX > 2400) tMAX = 2400; //Cap the maximum tMAX |
Collaborator
There was a problem hiding this comment.
MAX_TORQUE is available to you, you should use that instead.
Author
There was a problem hiding this comment.
I forgot about that, thanks for letting me know.
src/vcu/src/controls.c
Outdated
| if (tMAX > 2400) tMAX = 2400; | ||
| if(pedal_torque > tMAX) { | ||
| power_lim_settings.tMAX = tMAX; | ||
| int32_t tMAX = power_limit/(abs(mc_readings.speed)*628/6000)*10; //Convert RPM to rad/s with 2pi/60, *10 to dNm |
Collaborator
There was a problem hiding this comment.
Eventually, you should introduce a sign because we don't want to power limit on regen. But don't worry about that now
Fixed capping max torque
Adds kistler to the can spec
Power limit electrical
Resolved just enough conflicts to compile but code is not correct
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.
Updated power limiting by only allowing smaller torques than the largest requested before to be commanded. Resets once wheel speed goes back to zero. Currently did not implement timeout to allow for higher torque commands after a certain amount of time -- will do once we confirm that this smoothes out the peaks caused by wheel slip.