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 aeb6d82b authored by Michael KRISPER's avatar Michael KRISPER
Browse files

HybridStrategy: FindBestGearForBraking: added check if targetSpeed is actually...

HybridStrategy: FindBestGearForBraking: added check if targetSpeed is actually 0 when checking for DisengageWhenHaltingSpeed. Otherwise braking below 10 km/h caused problems, because gearbox disengaged.
parent 62f55e92
Branches
Tags
No related merge requests found
...@@ -1051,7 +1051,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies ...@@ -1051,7 +1051,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
if (ElectricMotorCanPropellDuringTractionInterruption || DataBus.GearboxInfo.GearEngaged(absTime)) { if (ElectricMotorCanPropellDuringTractionInterruption || DataBus.GearboxInfo.GearEngaged(absTime)) {
if (vehiclespeedBelowThreshold && (emPos == PowertrainPosition.HybridP2 || emPos == PowertrainPosition.HybridP1)) { if (vehiclespeedBelowThreshold && emPos.IsOneOf(PowertrainPosition.HybridP2, PowertrainPosition.HybridP1)) {
if (DataBus.GearboxInfo.GearboxType.AutomaticTransmission()) { if (DataBus.GearboxInfo.GearboxType.AutomaticTransmission()) {
var firstgear = ResponseEmOff; var firstgear = ResponseEmOff;
firstgear.Gear = GearList.First(); firstgear.Gear = GearList.First();
...@@ -1152,7 +1152,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies ...@@ -1152,7 +1152,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
firstEntry.IgnoreReason.EngineSpeedTooLow()) && !reEngaged) { firstEntry.IgnoreReason.EngineSpeedTooLow()) && !reEngaged) {
// ICE torque below FLD is OK as EM may regenerate and shift ICE operating point on drag line // ICE torque below FLD is OK as EM may regenerate and shift ICE operating point on drag line
// for negative torques the shift line is vertical anyway ;-) // for negative torques the shift line is vertical anyway ;-)
var best = FindBestGearForBraking(nextGear, firstResponse); var best = FindBestGearForBraking(nextGear, firstResponse, DataBus.DrivingCycleInfo.TargetSpeed);
if (!best.Equals(currentGear)) { if (!best.Equals(currentGear)) {
// downshift required! // downshift required!
var downshift = ResponseEmOff; var downshift = ResponseEmOff;
...@@ -1360,11 +1360,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies ...@@ -1360,11 +1360,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
return firstResponse.Clutch.OutputSpeed.IsSmaller(ModelData.EngineData.IdleSpeed); // firstResponse.Gearbox.InputSpeed.IsSmaller(ModelData.EngineData.IdleSpeed)); return firstResponse.Clutch.OutputSpeed.IsSmaller(ModelData.EngineData.IdleSpeed); // firstResponse.Gearbox.InputSpeed.IsSmaller(ModelData.EngineData.IdleSpeed));
} }
private GearshiftPosition FindBestGearForBraking(GearshiftPosition nextGear, IResponse firstResponse) private GearshiftPosition FindBestGearForBraking(GearshiftPosition nextGear, IResponse firstResponse, MeterPerSecond targetSpeed)
{ {
var endSpeed = DataBus.VehicleInfo.VehicleSpeed + var endSpeed = DataBus.VehicleInfo.VehicleSpeed +
DataBus.DriverInfo.DriverAcceleration * ModelData.GearboxData.TractionInterruption; DataBus.DriverInfo.DriverAcceleration * ModelData.GearboxData.TractionInterruption;
if (DataBus.GearboxInfo.GearboxType.ManualTransmission() && if (DataBus.GearboxInfo.GearboxType.ManualTransmission() && targetSpeed.IsEqual(0) &&
endSpeed.IsSmallerOrEqual(ModelData.GearboxData.DisengageWhenHaltingSpeed, 0.1.KMPHtoMeterPerSecond())) { endSpeed.IsSmallerOrEqual(ModelData.GearboxData.DisengageWhenHaltingSpeed, 0.1.KMPHtoMeterPerSecond())) {
return new GearshiftPosition(0); return new GearshiftPosition(0);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment