diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs index a2e6825cb203ed9bdb3dd75ea0fcf30a7350c131..6a34b07168860f09fc623e3cab34c1808fb34ed5 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ElectricMotor.cs @@ -198,6 +198,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl emTorque = 0.SI<NewtonMeter>(); } + if (Position == PowertrainPosition.HybridP1 && !DataBus.EngineCtl.CombustionEngineOn) { + // electric motor is directly connected to the ICE, ICE is off and EM is off - do not apply drag loss + emTorqueDt = 0.SI<NewtonMeter>(); + emTorque = 0.SI<NewtonMeter>(); + } + if (ElectricPower == null || emTorqueDt == null) { // no electric system or EM shall be off - apply drag only // if EM is off, calculate EM drag torque 'forward' to be applied on drivetrain @@ -299,11 +305,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl CurrentState.DriveMax = maxDriveTorqueEmMap; CurrentState.InertiaTorqueLoss = inertiaTorqueEm; - if (Position == PowertrainPosition.HybridP1 && !DataBus.EngineCtl.CombustionEngineOn) { - // electric motor is directly connected to the ICE, ICE is off and EM is off - do not apply drag loss - inTorque = outTorque; - } - CurrentState.DrivetrainSpeed = outAngularVelocity; CurrentState.DrivetrainInTorque = inTorqueDt; CurrentState.DrivetrainOutTorque = outTorque; diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs index 45624e75dbbe28212c70baf7961c0fc2609549db..f4a0c0efa60474cf27096b9b84d0d01f0f0f28e9 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs @@ -124,11 +124,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies (DataBus.ElectricMotorInfo(pos) as ElectricMotor).DeRatingActive; if (/*nextGear != DataBus.GearboxInfo.Gear && */TestPowertrain.ElectricMotorP2 != null) { - TestPowertrain.ElectricMotorP2.PreviousState.OutAngularVelocity = + TestPowertrain.ElectricMotorP2.PreviousState.EMSpeed = DataBus.ElectricMotorInfo(PowertrainPosition.HybridP2).ElectricMotorSpeed; } if (/*nextGear != DataBus.GearboxInfo.Gear && */TestPowertrain.ElectricMotorP3 != null) { - TestPowertrain.ElectricMotorP3.PreviousState.OutAngularVelocity = + TestPowertrain.ElectricMotorP3.PreviousState.EMSpeed = DataBus.ElectricMotorInfo(PowertrainPosition.HybridP3).ElectricMotorSpeed; } @@ -233,11 +233,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies (DataBus.ElectricMotorInfo(pos) as ElectricMotor).DeRatingActive; if (/*nextGear != DataBus.GearboxInfo.Gear && */TestPowertrain.ElectricMotorP2 != null) { - TestPowertrain.ElectricMotorP2.PreviousState.OutAngularVelocity = + TestPowertrain.ElectricMotorP2.PreviousState.EMSpeed = DataBus.ElectricMotorInfo(PowertrainPosition.HybridP2).ElectricMotorSpeed; } if (/*nextGear != DataBus.GearboxInfo.Gear && */TestPowertrain.ElectricMotorP3 != null) { - TestPowertrain.ElectricMotorP3.PreviousState.OutAngularVelocity = + TestPowertrain.ElectricMotorP3.PreviousState.EMSpeed = DataBus.ElectricMotorInfo(PowertrainPosition.HybridP3).ElectricMotorSpeed; }