Skip to content

Preserve motor power sign in reverse operation - #12

Merged
rhorvath02 merged 3 commits into
mainfrom
fix/motor-reverse-power
Aug 6, 2026
Merged

Preserve motor power sign in reverse operation#12
rhorvath02 merged 3 commits into
mainfrom
fix/motor-reverse-power

Conversation

@rhorvath02

Copy link
Copy Markdown
Member

Finding

The power-limited motor used a nonnegative shaft-speed magnitude to convert requested power into torque. In reverse rotation this made positive motoring power produce the wrong torque sign, and similarly inverted reverse regenerative operation.

Fix

Preserve shaft-speed sign when converting limited mechanical power to torque, expose a configurable low-speed regularization power, and give the torque actuator an explicit fixed zero start value.

Validation

  • Focused regression passed for forward/reverse motoring, forward/reverse regeneration, and both launch directions.
  • At 0.01 s, reverse motoring is +9345.616 W / -94.090 Nm; reverse regeneration is -10645.089 W / +107.173 Nm.
  • Full VehicleSim reached QSS at the baseline 6.049508 s with the same solver counts; the previous under-specified tau_act initialization warning is gone.

@rhorvath02
rhorvath02 force-pushed the fix/motor-reverse-power branch from de02f6c to a2a6814 Compare August 6, 2026 01:08
@rhorvath02
rhorvath02 merged commit 43aee90 into main Aug 6, 2026
2 checks passed
@rhorvath02
rhorvath02 deleted the fix/motor-reverse-power branch August 7, 2026 04:18
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.

1 participant