Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 08b175b1 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

bugfix electric motor: consider transmission ratio when checking if operating...

bugfix electric motor: consider transmission ratio when checking if operating point provided by strategy did change
parent 0b66ca64
Branches
Tags
No related merge requests found
...@@ -160,7 +160,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -160,7 +160,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
if (!dryRun && !DataBus.IsTestPowertrain && emTorqueDt != null && ((emTorque).IsSmaller(maxDriveTorqueEm ?? 0.SI<NewtonMeter>(), 1e-3) || if (!dryRun && !DataBus.IsTestPowertrain && emTorqueDt != null && ((emTorque).IsSmaller(maxDriveTorqueEm ?? 0.SI<NewtonMeter>(), 1e-3) ||
(emTorque).IsGreater(maxRecuperationTorqueEm ?? 0.SI<NewtonMeter>(), 1e-3))) { (emTorque).IsGreater(maxRecuperationTorqueEm ?? 0.SI<NewtonMeter>(), 1e-3))) {
// check if provided EM torque (drivetrain) is valid) // check if provided EM torque (drivetrain) is valid)
if ((!avgDtSpeed.IsEqual(DataBus.HybridControllerInfo.ElectricMotorSpeed(Position)) || if ((!avgDtSpeed.IsEqual(DataBus.HybridControllerInfo.ElectricMotorSpeed(Position) / ModelData.Ratio) ||
!dt.IsEqual(DataBus.HybridControllerInfo.SimulationInterval))) { !dt.IsEqual(DataBus.HybridControllerInfo.SimulationInterval))) {
return new ResponseInvalidOperatingPoint(this); return new ResponseInvalidOperatingPoint(this);
} }
...@@ -234,7 +234,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -234,7 +234,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var electricSupplyResponse = var electricSupplyResponse =
ElectricPower.Request(absTime, dt, electricPower, dryRun); ElectricPower.Request(absTime, dt, electricPower, dryRun);
if (!dryRun && !DataBus.IsTestPowertrain && !emOff && !(electricSupplyResponse is ElectricSystemResponseSuccess)) { if (!dryRun && !DataBus.IsTestPowertrain && !emOff && !(electricSupplyResponse is ElectricSystemResponseSuccess)) {
if ( !avgEmSpeed.IsEqual(DataBus.HybridControllerInfo.ElectricMotorSpeed(Position))) { if ( !avgEmSpeed.IsEqual(DataBus.HybridControllerInfo.ElectricMotorSpeed(Position) / ModelData.Ratio)) {
return new ResponseInvalidOperatingPoint(this); return new ResponseInvalidOperatingPoint(this);
} }
throw new VectoException( throw new VectoException(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment