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

Hybrid P1: added check in search for BrakeAction if Combustion Engine was off

parent a7b47e24
No related branches found
No related tags found
No related merge requests found
......@@ -248,6 +248,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// 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>();
emOff = true;
}
if (ElectricPower == null || emTorqueDt == null) {
......
......@@ -30,8 +30,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public override bool CombustionEngineOn { get; set; }
public override bool EngineOn => CombustionEngineOn;
#region Overrides of CombustionEngine
public override IResponse Request(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, bool dryRun)
......
......@@ -1191,9 +1191,21 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
return;
}
// full recuperation is not possible - ICE would need to propel - search max possible EM torque
// 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;
else
return;
}
// full recuperation is not possible - ICE would need to propel - search max possible EM torque
var emRecuperationTq = SearchAlgorithm.Search(
maxRecuperationResponse.ElectricMotor.ElectricMotorPowerMech /
maxRecuperationResponse.ElectricMotor.AngularVelocity,
......@@ -1210,7 +1222,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
},
evaluateFunction: emTq => {
var cfg = new HybridStrategyResponse {
CombustionEngineOn = DataBus.EngineInfo.EngineOn,
CombustionEngineOn = DataBus.EngineCtl.CombustionEngineOn,
GearboxInNeutral = false,
NextGear = nextGear,
MechanicalAssistPower = new Dictionary<PowertrainPosition, Tuple<PerSecond, NewtonMeter>> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment