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

compute shift losses for measured speed mode with gear

parent 820c64e5
Branches
Tags
No related merge requests found
...@@ -228,10 +228,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -228,10 +228,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return dryRunResponse; return dryRunResponse;
} }
// this code has to be _after_ the check for a potential gear-shift!
// (the above block issues dry-run requests and thus may update the CurrentState!)
CurrentState.TransmissionTorqueLoss = inTorque - (outTorque / effectiveRatio); CurrentState.TransmissionTorqueLoss = inTorque - (outTorque / effectiveRatio);
if (Gear != PreviousState.Gear &&
ConsiderShiftLosses(new GearInfo(Gear, torqueConverterLocked), outTorque)) {
CurrentState.PowershiftLosses = ComputeShiftLosses(dt, outTorque, outAngularVelocity);
}
inTorque += CurrentState.PowershiftLosses ?? 0.SI<NewtonMeter>();
CurrentState.SetState(inTorque, inAngularVelocity, outTorque, outAngularVelocity); CurrentState.SetState(inTorque, inAngularVelocity, outTorque, outAngularVelocity);
CurrentState.Gear = Gear; CurrentState.Gear = Gear;
// end critical section // end critical section
...@@ -339,6 +342,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -339,6 +342,9 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
if (ModelData.Type.AutomaticTransmission()) { if (ModelData.Type.AutomaticTransmission()) {
container[ModalResultField.TC_Locked] = !CurrentState.TorqueConverterActive; container[ModalResultField.TC_Locked] = !CurrentState.TorqueConverterActive;
container[ModalResultField.P_gbx_shift_loss] = CurrentState.PowershiftLosses == null
? 0.SI<Watt>()
: CurrentState.PowershiftLosses * avgInAngularSpeed;
} }
// torque converter fields are written by TorqueConverter (if present), called from Vehicle container // torque converter fields are written by TorqueConverter (if present), called from Vehicle container
} }
...@@ -382,6 +388,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -382,6 +388,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public class CycleGearboxState : GearboxState public class CycleGearboxState : GearboxState
{ {
public bool TorqueConverterActive; public bool TorqueConverterActive;
public NewtonMeter PowershiftLosses { get; set; }
} }
public class CycleShiftStrategy : IShiftStrategy public class CycleShiftStrategy : IShiftStrategy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment