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

Skip to content
Snippets Groups Projects
Commit 59170684 authored by Michael KRISPER's avatar Michael KRISPER Committed by Markus Quaritsch
Browse files

Pull request #137: Feature/VECTO-1493 use enginestartstop in pcc events for hybrid p1

Merge in VECTO/vecto-dev from VECTO/mk_vecto-dev:feature/VECTO-1493-use-enginestartstop-in-pcc-events-for-hybrid-p1 to develop

* commit 'cb3f7a14':
  HybridStrategy: Added special case for HybridP1 with EngineStopStart during PCC Events
  DefaultDriverStrategy: inlined dataBus variable
  code formatting
  formatting
  if EngineStopStart is active the ICE can be turned off also for HybridP1. For all others it can be turned of regardless of EngineStopStart Flag.
  reverted HybridStrategy to original state before changes of EngineStart (changes did not have any effect)
  Hybrid P1 when braking: changed condition from EngineInfo.EngineOn to iceOn variable
  changed check for start engine from Gearbox.Out to Gearbox.In
parents e0a69f0f cb3f7a14
No related branches found
No related tags found
No related merge requests found
......@@ -1098,9 +1098,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
#region Implementation of IEngineControl
public bool CombustionEngineOn
{
get { return false; } set { } }
public bool CombustionEngineOn { get; set; }
#endregion
}
......
......@@ -203,8 +203,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
HandlePCC(absTime, targetVelocity);
}
if (ADAS.EcoRoll != EcoRollType.None &&
(pccState == PCCStates.OutsideSegment || pccState == PCCStates.WithinSegment)
) {
(pccState == PCCStates.OutsideSegment || pccState == PCCStates.WithinSegment)) {
HandleEcoRoll(absTime, targetVelocity);
}
......@@ -287,8 +286,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
private void HandlePCC(Second absTime, MeterPerSecond targetVelocity)
{
var dataBus = DataBus;
var vehicleSpeed = dataBus.VehicleInfo.VehicleSpeed;
var vehicleSpeed = DataBus.VehicleInfo.VehicleSpeed;
UpdatePCCState(targetVelocity);
......@@ -319,12 +317,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
switch (ADAS.EcoRoll) {
case EcoRollType.None: break;
case EcoRollType.WithoutEngineStop:
dataBus.GearboxCtl.DisengageGearbox = true;
DataBus.GearboxCtl.DisengageGearbox = true;
break;
case EcoRollType.WithEngineStop:
dataBus.GearboxCtl.DisengageGearbox = true;
if (dataBus.EngineCtl != null) {
dataBus.EngineCtl.CombustionEngineOn = false;
DataBus.GearboxCtl.DisengageGearbox = true;
if (DataBus.EngineCtl != null) {
DataBus.EngineCtl.CombustionEngineOn = false;
}
break;
default: throw new ArgumentOutOfRangeException();
......@@ -334,12 +332,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
case PCCStates.OutsideSegment:
case PCCStates.WithinSegment:
case PCCStates.PCCinterrupt:
if (dataBus.GearboxCtl != null) {
dataBus.GearboxCtl.DisengageGearbox = false;
if (DataBus.GearboxCtl != null) {
DataBus.GearboxCtl.DisengageGearbox = false;
}
if (dataBus.EngineCtl != null) {
dataBus.EngineCtl.CombustionEngineOn = true;
if (DataBus.EngineCtl != null) {
DataBus.EngineCtl.CombustionEngineOn = true;
}
break;
default: throw new ArgumentOutOfRangeException();
......@@ -962,7 +960,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// unfortunately, this causes issues for P1 hybrid configurations with AT gearbox in torque converter gear. If the EM propells, the torque
// converter cannot find an operating point close to the drag point. therefore, do not announce the different action except for driving off from
// standstill.
var overrideAction = DataBus.GearboxInfo.GearboxType.AutomaticTransmission()
var overrideAction = DataBus.GearboxInfo.GearboxType.AutomaticTransmission()
&& (DataBus.GearboxInfo.Gear.TorqueConverterLocked.HasValue && !DataBus.GearboxInfo.Gear.TorqueConverterLocked.Value)
&& (DataBus.ElectricMotorInfo(PowertrainPosition.HybridP1) == null || DataBus.VehicleInfo.VehicleStopped)
? DrivingAction.Accelerate
......
......@@ -227,7 +227,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
}
TestPowertrain.SuperCap?.Initialize(DataBus.BatteryInfo.StateOfCharge);
TestPowertrain.Brakes.BrakePower = DataBus.Brakes.BrakePower;
var currentGear = PreviousState.GearboxEngaged ? DataBus.GearboxInfo.Gear : Controller.ShiftStrategy.NextGear;
......@@ -996,15 +995,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
protected virtual bool AllowICEOff(Second absTime)
{
//if (!ModelData.VehicleData.ADAS.EngineStopStart) {
// return false;
//}
var emPos = ModelData.ElectricMachinesData.First().Item1;
if (/*ModelData.VehicleData.ADAS.EngineStopStart &&*/ emPos == PowertrainPosition.HybridP1) {
return false;
}
return PreviousState.ICEStartTStmp == null ||
(PreviousState.ICEStartTStmp + StrategyParameters.MinICEOnTime).IsSmaller(absTime);
return PreviousState.ICEStartTStmp == null
|| (PreviousState.ICEStartTStmp + StrategyParameters.MinICEOnTime).IsSmaller(absTime);
}
protected virtual void HandleBrakeAction(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, bool dryRun, List<HybridResultEntry> eval)
......@@ -1204,22 +1196,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
return;
}
var iceOn = DataBus.EngineInfo.EngineOn;
// if Hybrid P1 and Engine is off, the search for braking power is not possible:
// Therefore, switch on engine (if reasonable), otherwise simply do NOT search for mechanicalAssistPower.
if (emPos == PowertrainPosition.HybridP1 && !DataBus.EngineCtl.CombustionEngineOn) {
var gearboxOut = firstResponse.Gearbox.OutputSpeed * firstResponse.Gearbox.OutputTorque;
var elMotor = DataBus.ElectricMotorInfo(PowertrainPosition.HybridP1);
var powerToleranceEl = 0.1 * elMotor.MaxPowerDrive(DataBus.BatteryInfo.InternalVoltage, firstResponse.Engine.EngineSpeed);
if (gearboxOut - firstResponse.Engine.DragPower < powerToleranceEl) {
DataBus.EngineCtl.CombustionEngineOn = true;
iceOn = true;
} else {
return;
}
}
// full recuperation is not possible - ICE would need to propel - search max possible EM torque
var emRecuperationTq = SearchAlgorithm.Search(
maxRecuperationResponse.ElectricMotor.ElectricMotorPowerMech /
......@@ -1237,7 +1213,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
},
evaluateFunction: emTq => {
var cfg = new HybridStrategyResponse {
CombustionEngineOn = iceOn,
CombustionEngineOn = DataBus.EngineInfo.EngineOn,
GearboxInNeutral = false,
NextGear = nextGear,
MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> {
......@@ -1375,8 +1351,16 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
}
var result = ResponseEmOff;
if (DataBus.DriverInfo.PCCState == PCCStates.UseCase1 || DataBus.DriverInfo.PCCState == PCCStates.UseCase2)
result.ICEOff = true;
if (DataBus.DriverInfo.PCCState.IsOneOf(PCCStates.UseCase1, PCCStates.UseCase2)) {
result.ICEOff = AllowICEOff(absTime);
result.Setting.CombustionEngineOn = !result.ICEOff;
if (DataBus.PowertrainInfo.ElectricMotorPositions.Contains(PowertrainPosition.HybridP1)) {
// special logic for HybridP1 (VECTO-1493)
result.Setting.GearboxInNeutral = true;
result.ICEOff &= ModelData.VehicleData.ADAS.EngineStopStart;
}
}
eval.Add(result);
}
......@@ -1896,7 +1880,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
},
evaluateFunction: emTq => {
var cfg = new HybridStrategyResponse {
CombustionEngineOn = nextGear.IsLockedGear()? true : false,
CombustionEngineOn = nextGear.IsLockedGear() ? true : false,
GearboxInNeutral = false,
MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> {
{ emPos, Tuple.Create(firstResponse.ElectricMotor.AngularVelocity, emTq) }
......
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