From 011d3179fb935898f91aba3ac003c85cb845e043 Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Tue, 25 Aug 2020 07:32:31 +0200 Subject: [PATCH] only evaluate max em power if it does not go below low-soc threshold --- .../SimulationComponent/Strategies/HybridStrategy.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs index 6410088f80..aacd588c98 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs @@ -788,6 +788,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies } // make sure the max drive point is also covered. + var batEnergyAvailable = (DataBus.BatteryInfo.StoredEnergy - BatteryDischargeEnergyThreshold) / dt; + var emDrivePower = -(batEnergyAvailable - ModelData.ElectricAuxDemand); var emTorqueM = emTqReq * maxU; if (!responses.Any(x => x.Gear == nextGear && x.U.IsEqual(maxU)) && emTorqueM.IsBetween( 0.SI<NewtonMeter>(), firstResponse.ElectricMotor.MaxDriveTorque)) { @@ -796,11 +798,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies } if (maxEmTorque.IsSmaller(0) && emTqReq.IsGreater(-maxEmTorque)) { var tmp = TryConfiguration(absTime, dt, outTorque, outAngularVelocity, nextGear, emPos, maxEmTorque, maxEmTorque / emTqReq, allowIceOff); - responses.Add(tmp); + if (!tmp.Response.ElectricSystem.ConsumerPower.IsSmaller(emDrivePower)) { + responses.Add(tmp); + } } // if battery is getting empty try to set EM-torque to discharge battery to lower SoC boundary - var batEnergyAvailable = (DataBus.BatteryInfo.StoredEnergy - BatteryDischargeEnergyThreshold) / dt; - var emDrivePower = -(batEnergyAvailable - ModelData.ElectricAuxDemand); + if (maxEmTorque.IsSmaller(0) && (-emDrivePower).IsGreaterOrEqual(maxEmTorque * firstResponse.ElectricMotor.AngularVelocity)) { // maxEmTorque < 0 ==> EM can still propell // (-emDrivePower).IsGreaterOrEqual(maxEmTorque * firstResponse.ElectricMotor.AngularVelocity) ==> power available from battery for driving does not exceed max EM power (otherwise torque lookup may fail) -- GitLab