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

Skip to content
Snippets Groups Projects
Commit d6a8acc0 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

AT Shift Strategy: add shift losses for estimation of acceleration after...

AT Shift Strategy: add shift losses for estimation of acceleration after gearshift, add engine inertia for consideration of acceleration after gearshift

new method for estimation of acceleration based on torque and speed at gearbox ouput
provide gear as input for considering shift losses
correct computation of shift losses for 1C-2C shifts
atgearbox: store engine inertia for computation of required inertia power
parent c75d3532
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
protected bool RequestAfterGearshift;
private WattSecond _powershiftLossEnergy;
protected internal KilogramSquareMeter EngineInertia;
public bool TorqueConverterLocked
{
......@@ -67,6 +68,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
LastShift = -double.MaxValue.SI<Second>();
TorqueConverter = new TorqueConverter(this, _strategy, container, ModelData.TorqueConverterData,
runData);
EngineInertia = runData.EngineData.Inertia;
}
public IIdleController IdleController
......@@ -256,7 +258,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
if (RequestAfterGearshift /*&& Gear != PreviousState.Gear*/) {
LastShift = absTime;
Gear = _strategy.Engage(absTime, dt, outTorque, outAngularVelocity);
_powershiftLossEnergy = ComputeShiftLosses(outTorque, outAngularVelocity);
_powershiftLossEnergy = ComputeShiftLosses(outTorque, outAngularVelocity, Gear);
} else {
if (PreviousState.PowershiftLossEnergy != null && PreviousState.PowershiftLossEnergy.IsGreater(0)) {
_powershiftLossEnergy = PreviousState.PowershiftLossEnergy;
......
......@@ -38,6 +38,7 @@ using TUGraz.VectoCore.Models.Connector.Ports.Impl;
using TUGraz.VectoCore.Models.Simulation.DataBus;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data.Gearbox;
using TUGraz.VectoCore.Utils;
namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{
......@@ -223,7 +224,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
// UPSHIFT - Special rule for 1C -> 2C
if (!_gearbox.TorqueConverterLocked && ModelData.Gears.ContainsKey(gear + 1) &&
ModelData.Gears[gear + 1].HasTorqueConverter && outAngularVelocity.IsGreater(0)) {
var result = CheckUpshiftTcTc(absTime, outTorque, outAngularVelocity, gear, currentGear);
var result = CheckUpshiftTcTc(absTime, dt, outTorque, outAngularVelocity, gear, currentGear);
if (result.HasValue) {
return result.Value;
}
......@@ -231,7 +232,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return false;
}
private bool? CheckUpshiftTcTc(Second absTime, NewtonMeter outTorque, PerSecond outAngularVelocity, uint gear,
private bool? CheckUpshiftTcTc(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, uint gear,
GearData currentGear)
{
// C -> C+1
......@@ -241,16 +242,23 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var nextGearboxInSpeed = outAngularVelocity * nextGear.TorqueConverterRatio;
var nextGearboxInTorque = outTorque / nextGear.TorqueConverterRatio;
var shiftLosses = _gearbox.ComputeShiftLosses(outTorque, outAngularVelocity, gear + 1) / ModelData.PowershiftShiftTime / nextGearboxInSpeed;
nextGearboxInTorque += shiftLosses;
var tcOperatingPoint = _gearbox.TorqueConverter.FindOperatingPoint(nextGearboxInTorque, nextGearboxInSpeed);
var engineSpeedOverMin = tcOperatingPoint.InAngularVelocity.IsGreater(minEngineSpeed);
var avgSpeed = (DataBus.EngineSpeed + tcOperatingPoint.InAngularVelocity) / 2;
var engineMaxTorque = DataBus.EngineStationaryFullPower(avgSpeed) / avgSpeed;
var engineInertiaTorque = Formulas.InertiaPower(DataBus.EngineSpeed, tcOperatingPoint.InAngularVelocity, _gearbox.EngineInertia, dt) / avgSpeed;
var engineTorqueBelowMax =
tcOperatingPoint.InTorque.IsSmallerOrEqual(engineMaxTorque - engineInertiaTorque);
var reachableAcceleration = EstimateAccelerationForGear(gear + 1, outAngularVelocity);
var reachableAcceleration = EstimateAcceleration(outAngularVelocity, outTorque); // EstimateAccelerationForGear(gear + 1, outAngularVelocity);
var minAcceleration = VectoMath.Min(ModelData.TorqueConverterData.CCUpshiftMinAcceleration,
DataBus.DriverAcceleration);
var minAccelerationReachable = reachableAcceleration.IsGreaterOrEqual(minAcceleration);
if (engineSpeedOverMin && minAccelerationReachable) {
if (engineSpeedOverMin && engineTorqueBelowMax && minAccelerationReachable) {
Upshift(absTime, gear);
return true;
}
......
......@@ -149,10 +149,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return nextGear.TorqueConverterLocked;
}
protected internal WattSecond ComputeShiftLosses(NewtonMeter outTorque, PerSecond outAngularVelocity)
protected internal WattSecond ComputeShiftLosses(NewtonMeter outTorque, PerSecond outAngularVelocity, uint gear)
{
var torqueGbxIn = outTorque / ModelData.Gears[Gear].Ratio;
var deltaClutchSpeed = (DataBus.EngineSpeed - PreviousState.OutAngularVelocity * ModelData.Gears[Gear].Ratio) / 2;
var ratio = ModelData.Gears[gear].Ratio;
if (double.IsNaN(ratio)) {
ratio = ModelData.Gears[gear].TorqueConverterRatio;
}
var torqueGbxIn = outTorque / ratio;
var deltaClutchSpeed = (DataBus.EngineSpeed - PreviousState.OutAngularVelocity * ratio) / 2;
var shiftLossEnergy = torqueGbxIn * deltaClutchSpeed * ModelData.PowershiftShiftTime;
return shiftLossEnergy.Abs();
......
......@@ -88,5 +88,26 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return acceleration.Cast<MeterPerSquareSecond>();
}
protected MeterPerSquareSecond EstimateAcceleration(PerSecond gbxOutSpeed, NewtonMeter gbxOutTorque)
{
var vehicleSpeed = DataBus.VehicleSpeed;
var avgSlope =
((DataBus.CycleLookAhead(Constants.SimulationSettings.GearboxLookaheadForAccelerationEstimation).Altitude -
DataBus.Altitude) / Constants.SimulationSettings.GearboxLookaheadForAccelerationEstimation).Value().SI<Radian>();
var airDragLoss = DataBus.AirDragResistance(vehicleSpeed, vehicleSpeed) * DataBus.VehicleSpeed;
var rollResistanceLoss = DataBus.RollingResistance(avgSlope) * DataBus.VehicleSpeed;
//DataBus.GearboxLoss();
var slopeLoss = DataBus.SlopeResistance(avgSlope) * DataBus.VehicleSpeed;
var axleLoss = DataBus.AxlegearLoss();
var accelerationPower = gbxOutSpeed * gbxOutTorque - axleLoss - airDragLoss - rollResistanceLoss - slopeLoss;
var acceleration = accelerationPower / DataBus.VehicleSpeed / (DataBus.TotalMass + DataBus.ReducedMassWheels);
return acceleration.Cast<MeterPerSquareSecond>();
}
}
}
\ No newline at end of file
......@@ -224,7 +224,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
inTorque += CurrentState.InertiaTorqueLossOut / effectiveRatio;
if (Gear != PreviousState.Gear &&
ConsiderShiftLosses(new GearInfo(Gear, torqueConverterLocked), outTorque)) {
CurrentState.PowershiftLosses = ComputeShiftLosses(outTorque, outAngularVelocity);
CurrentState.PowershiftLosses = ComputeShiftLosses(outTorque, outAngularVelocity, Gear);
}
if (CurrentState.PowershiftLosses != null) {
var averageEngineSpeed = (DataBus.EngineSpeed + outAngularVelocity * ModelData.Gears[Gear].Ratio) / 2;
......
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