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 cb6e269e authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

adapting state machine for serial hybrid strategy

parent 4bd94b33
Branches
Tags
No related merge requests found
......@@ -126,14 +126,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
public class SerialHybridStrategy : AbstractSerialHybridStrategy<Gearbox>
{
public SerialHybridStrategy(VectoRunData runData, IVehicleContainer container) : base(runData, container) { }
protected override DrivetrainDemand GetDrivetrainPowerDemand(Second absTime, Second dt, NewtonMeter outTorque,
PerSecond outAngularVelocity, GenSetOperatingPoint maxPowerGenset)
{
......@@ -600,7 +594,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
break;
case StateMachineState.Acc_S1:
if (/*DataBus.BatteryInfo.StateOfCharge >= StrategyParameters.MinSoC &&*/
DataBus.BatteryInfo.StateOfCharge < StrategyParameters.TargetSoC
DataBus.BatteryInfo.StateOfCharge < StrategyParameters.MinSoC
&& -drivetrainDemand.ElectricPowerDemand >
optimalGensetPoint.ElectricPower) {
return StateMachineState.Acc_S2;
......@@ -612,14 +606,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies
break;
case StateMachineState.Acc_S2:
if (DataBus.BatteryInfo.StateOfCharge >= StrategyParameters.TargetSoC) {
return StateMachineState.Acc_S0;
if (DataBus.BatteryInfo.StateOfCharge > StrategyParameters.MinSoC) {
return StateMachineState.Acc_S1;
}
if (DataBus.BatteryInfo.StateOfCharge >= StrategyParameters.MinSoC &&
DataBus.BatteryInfo.StateOfCharge < StrategyParameters.TargetSoC
&& -drivetrainDemand.ElectricPowerDemand <=
optimalGensetPoint.ElectricPower) {
if (DataBus.BatteryInfo.StateOfCharge < StrategyParameters.MinSoC &&
-drivetrainDemand.ElectricPowerDemand < optimalGensetPoint.ElectricPower) {
return StateMachineState.Acc_S1;
}
break;
......
......@@ -364,7 +364,8 @@ namespace TUGraz.VectoCore.Tests.Integration.Hybrid
[
TestCase(30, 0.7, 0, TestName = "S4 Serial Hybrid DriveOff 30km/h SoC: 0.7, level"),
TestCase(80, 0.7, 0, TestName = "S4 Serial Hybrid DriveOff 80km/h SoC: 0.7, level"),
TestCase(30, 0.22, 0, TestName = "S4 Serial Hybrid DriveOff 30km/h SoC: 0.22, level")
TestCase(30, 0.22, 0, TestName = "S4 Serial Hybrid DriveOff 30km/h SoC: 0.22, level"),
TestCase(80, 0.22, 0, TestName = "S4 Serial Hybrid DriveOff 80km/h SoC: 0.22, level"),
]
public void S4HybridDriveOff(double vmax, double initialSoC, double slope)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment