Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit a2c854ef authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

electric motor: handle the case that inertia torque eats up the recuperation torque

parent 6f186861
No related branches found
No related tags found
No related merge requests found
......@@ -146,6 +146,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var maxDriveTorqueEm = maxDriveTorqueEmMap == null ? null : maxDriveTorqueEmMap + inertiaTorqueEm;
// inertia has to be added here. recuperation torque is positive, when accelerating inertia is positive and adds more drag to the drivetrain,
var maxRecuperationTorqueEm = maxRecuperationTorqueEmMap == null ? null : maxRecuperationTorqueEmMap + inertiaTorqueEm;
if (maxRecuperationTorqueEm != null && maxRecuperationTorqueEm.IsSmallerOrEqual(0)) {
// max recuperation torque may get negative due to torque losses
maxRecuperationTorqueEm = null;
}
var maxDriveTorqueDt = maxDriveTorqueEm == null ? null : ConvertEmTorqueToDrivetrain(maxDriveTorqueEm);
var maxRecuperationTorqueDt = maxRecuperationTorqueEm == null ? null : ConvertEmTorqueToDrivetrain(maxRecuperationTorqueEm);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment