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

Updated power limiting to filter on wheel speed #37

Open
wants to merge 76 commits into
base: power-limiting
Choose a base branch
from

Conversation

ajmel
Copy link

@ajmel ajmel commented Jan 15, 2019

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.

nistath and others added 3 commits October 26, 2018 21:38
Updated power limiting by only allowing smaller torques than the largest requested before to be commanded. Resets once wheel speed goes back to zero
Copy link
Collaborator

@daniwhite daniwhite left a 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

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
Copy link
Collaborator

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.

Copy link
Author

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.

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants