-
Notifications
You must be signed in to change notification settings - Fork 4
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
Updated power limiting to filter on wheel speed #37
base: power-limiting
Are you sure you want to change the base?
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MAX_TORQUE
is available to you, you should use that instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.