From 6fcd89fe27fb2952ae56fd491cfde64e1b2ba05e Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Mon, 24 Apr 2017 18:05:54 +0200 Subject: [PATCH] remove powershift-inertia-factor in computation of powershift losses --- VECTO/GUI/GearboxForm.Designer.vb | 34 ---------- VECTO/GUI/GearboxForm.vb | 4 +- VECTO/Input Files/Gearbox.vb | 9 +-- VECTO/OutputData/JSONFileWriter.vb | 1 - .../InputData/EngineeringInputData.cs | 2 - .../InputData/FileIO/JSON/JSONGearboxData.cs | 65 +++++++------------ .../EngineeringDataAdapter.cs | 1 - .../SimulationComponent/Data/GearboxData.cs | 5 -- .../Impl/AbstractGearbox.cs | 4 +- .../VectoCoreTest/Integration/ATPowerTrain.cs | 1 - 10 files changed, 25 insertions(+), 101 deletions(-) diff --git a/VECTO/GUI/GearboxForm.Designer.vb b/VECTO/GUI/GearboxForm.Designer.vb index 15acbbdce1..709c8b9920 100644 --- a/VECTO/GUI/GearboxForm.Designer.vb +++ b/VECTO/GUI/GearboxForm.Designer.vb @@ -126,12 +126,9 @@ Partial Class GearboxForm Me.PnInertiaTI = New System.Windows.Forms.Panel() Me.PicBox = New System.Windows.Forms.PictureBox() Me.gbPowershiftLosses = New System.Windows.Forms.GroupBox() - Me.Label29 = New System.Windows.Forms.Label() Me.lbAtShiftTime = New System.Windows.Forms.Label() Me.tbATShiftTime = New System.Windows.Forms.TextBox() - Me.tbATInertiaFactor = New System.Windows.Forms.TextBox() Me.Label28 = New System.Windows.Forms.Label() - Me.lbATInertiaFactor = New System.Windows.Forms.Label() Me.tbTCCUpshiftMinAcceleration = New System.Windows.Forms.TextBox() Me.Label34 = New System.Windows.Forms.Label() Me.Label35 = New System.Windows.Forms.Label() @@ -961,12 +958,9 @@ Partial Class GearboxForm ' 'gbPowershiftLosses ' - Me.gbPowershiftLosses.Controls.Add(Me.Label29) Me.gbPowershiftLosses.Controls.Add(Me.lbAtShiftTime) Me.gbPowershiftLosses.Controls.Add(Me.tbATShiftTime) - Me.gbPowershiftLosses.Controls.Add(Me.tbATInertiaFactor) Me.gbPowershiftLosses.Controls.Add(Me.Label28) - Me.gbPowershiftLosses.Controls.Add(Me.lbATInertiaFactor) Me.gbPowershiftLosses.Location = New System.Drawing.Point(459, 598) Me.gbPowershiftLosses.Name = "gbPowershiftLosses" Me.gbPowershiftLosses.Size = New System.Drawing.Size(414, 47) @@ -974,15 +968,6 @@ Partial Class GearboxForm Me.gbPowershiftLosses.TabStop = False Me.gbPowershiftLosses.Text = "Power shift losses" ' - 'Label29 - ' - Me.Label29.AutoSize = True - Me.Label29.Location = New System.Drawing.Point(362, 22) - Me.Label29.Name = "Label29" - Me.Label29.Size = New System.Drawing.Size(16, 13) - Me.Label29.TabIndex = 44 - Me.Label29.Text = "[-]" - ' 'lbAtShiftTime ' Me.lbAtShiftTime.AutoSize = True @@ -999,13 +984,6 @@ Partial Class GearboxForm Me.tbATShiftTime.Size = New System.Drawing.Size(57, 20) Me.tbATShiftTime.TabIndex = 4 ' - 'tbATInertiaFactor - ' - Me.tbATInertiaFactor.Location = New System.Drawing.Point(299, 19) - Me.tbATInertiaFactor.Name = "tbATInertiaFactor" - Me.tbATInertiaFactor.Size = New System.Drawing.Size(57, 20) - Me.tbATInertiaFactor.TabIndex = 43 - ' 'Label28 ' Me.Label28.AutoSize = True @@ -1015,15 +993,6 @@ Partial Class GearboxForm Me.Label28.TabIndex = 41 Me.Label28.Text = "[s]" ' - 'lbATInertiaFactor - ' - Me.lbATInertiaFactor.AutoSize = True - Me.lbATInertiaFactor.Location = New System.Drawing.Point(227, 22) - Me.lbATInertiaFactor.Name = "lbATInertiaFactor" - Me.lbATInertiaFactor.Size = New System.Drawing.Size(66, 13) - Me.lbATInertiaFactor.TabIndex = 42 - Me.lbATInertiaFactor.Text = "Inertia factor" - ' 'tbTCCUpshiftMinAcceleration ' Me.tbTCCUpshiftMinAcceleration.Location = New System.Drawing.Point(299, 19) @@ -1218,9 +1187,6 @@ Partial Class GearboxForm Friend WithEvents tbTCmaxSpeed As System.Windows.Forms.TextBox Friend WithEvents Label27 As System.Windows.Forms.Label Friend WithEvents gbPowershiftLosses As System.Windows.Forms.GroupBox - Friend WithEvents Label29 As System.Windows.Forms.Label - Friend WithEvents tbATInertiaFactor As System.Windows.Forms.TextBox - Friend WithEvents lbATInertiaFactor As System.Windows.Forms.Label Friend WithEvents Label28 As System.Windows.Forms.Label Friend WithEvents tbATShiftTime As System.Windows.Forms.TextBox Friend WithEvents lbAtShiftTime As System.Windows.Forms.Label diff --git a/VECTO/GUI/GearboxForm.vb b/VECTO/GUI/GearboxForm.vb index 6f54e5730a..40f6a17f37 100644 --- a/VECTO/GUI/GearboxForm.vb +++ b/VECTO/GUI/GearboxForm.vb @@ -101,7 +101,7 @@ Public Class GearboxForm TbMinTimeBetweenShifts.Text = DeclarationData.Gearbox.MinTimeBetweenGearshifts.ToGUIFormat() 'cDeclaration.MinTimeBetweenGearshift(GStype) - TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve * 100).ToGUIFormat() ' cDeclaration.TqResv + TbTqResv.Text = (DeclarationData.Gearbox.TorqueReserve * 100).ToGUIFormat() ' cDeclaration.TqResv TbTqResvStart.Text = (DeclarationData.Gearbox.TorqueReserveStart * 100).ToGUIFormat() 'cDeclaration.TqResvStart TbStartSpeed.Text = DeclarationData.Gearbox.StartSpeed.ToGUIFormat() 'cDeclaration.StartSpeed TbStartAcc.Text = DeclarationData.Gearbox.StartAcceleration.ToGUIFormat() ' cDeclaration.StartAcc @@ -314,7 +314,6 @@ Public Class GearboxForm tbDownshiftAfterUpshift.Text = gearbox.DownshiftAfterUpshiftDelay.ToGUIFormat() tbUpshiftAfterDownshift.Text = gearbox.UpshiftAfterDownshiftDelay.ToGUIFormat() - tbATInertiaFactor.Text = gearbox.PowerShiftInertiaFactor.ToGUIFormat() tbATShiftTime.Text = gearbox.PowershiftShiftTime.ToGUIFormat() CbGStype.SelectedValue = gearbox.Type @@ -408,7 +407,6 @@ Public Class GearboxForm gearbox.TCLUpshiftMinAcceleration = tbTCLUpshiftMinAcceleration.Text.ToDouble(0) gearbox.TCCUpshiftMinAcceleration = tbTCCUpshiftMinAcceleration.Text.ToDouble(0) - gearbox.PSInertiaFactor = tbATInertiaFactor.Text.ToDouble(0) gearbox.PSShiftTime = tbATShiftTime.Text.ToDouble(0) diff --git a/VECTO/Input Files/Gearbox.vb b/VECTO/Input Files/Gearbox.vb index 48aeba42f9..782b1a863d 100644 --- a/VECTO/Input Files/Gearbox.vb +++ b/VECTO/Input Files/Gearbox.vb @@ -68,8 +68,6 @@ Public Class Gearbox Public UpshiftAfterDownshift As Double Public TorqueConverterMaxSpeed As Double - Public PSInertiaFactor As Double - Public PSShiftTime As Double @@ -459,12 +457,7 @@ Public Class Gearbox End Get End Property - Public ReadOnly Property PowerShiftInertiaFactor As Double _ - Implements IGearboxEngineeringInputData.PowerShiftInertiaFactor - Get - Return PSInertiaFactor - End Get - End Property + Public ReadOnly Property IGearboxEngineeringInputData_UpshiftMinAcceleration As MeterPerSquareSecond _ Implements IGearboxEngineeringInputData.UpshiftMinAcceleration diff --git a/VECTO/OutputData/JSONFileWriter.vb b/VECTO/OutputData/JSONFileWriter.vb index 33225c4825..83dd11daf1 100644 --- a/VECTO/OutputData/JSONFileWriter.vb +++ b/VECTO/OutputData/JSONFileWriter.vb @@ -138,7 +138,6 @@ Public Class JSONFileWriter body.Add("UpshiftMinAcceleration", gbx.UpshiftMinAcceleration.Value()) body.Add("PowershiftShiftTime", gbx.PowershiftShiftTime.Value()) - body.Add("PowershiftInertiaFactor", gbx.PowerShiftInertiaFactor) WriteFile(header, body, filename) End Sub diff --git a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs index 31cabe02bb..c07ce16b17 100644 --- a/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs +++ b/VectoCommon/VectoCommon/InputData/EngineeringInputData.cs @@ -193,8 +193,6 @@ namespace TUGraz.VectoCommon.InputData MeterPerSquareSecond UpshiftMinAcceleration { get; } Second PowershiftShiftTime { get; } - - double PowerShiftInertiaFactor { get; } } public interface ITorqueConverterEngineeringInputData : ITorqueConverterDeclarationInputData diff --git a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONGearboxData.cs b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONGearboxData.cs index 75bf217ec1..87ef1ef1b0 100644 --- a/VectoCore/VectoCore/InputData/FileIO/JSON/JSONGearboxData.cs +++ b/VectoCore/VectoCore/InputData/FileIO/JSON/JSONGearboxData.cs @@ -55,8 +55,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public override IList<ITransmissionInputData> Gears { - get - { + get { var resultGears = new List<ITransmissionInputData>(); var gears = Body.GetEx(JsonKeys.Gearbox_Gears); for (var i = 1; i < gears.Count(); i++) { @@ -70,8 +69,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public override TableData ShiftPolygon { - get - { + get { if (Body[JsonKeys.Gearbox_TorqueConverter] == null || Body[JsonKeys.Gearbox_TorqueConverter]["ShiftPolygon"] == null) { return null; } @@ -128,8 +126,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] - get - { + get { var gears = Body.GetEx(JsonKeys.Gearbox_Gears); if (!gears.Any()) { throw new VectoSimulationException("At least one Gear-Entry must be defined in Gearbox!"); @@ -142,8 +139,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] - get - { + get { var gears = Body.GetEx(JsonKeys.Gearbox_Gears); if (!gears.Any()) { throw new VectoSimulationException("At least one Gear-Entry must be defined in Gearbox!"); @@ -167,8 +163,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] - get - { + get { var gears = Body.GetEx(JsonKeys.Gearbox_Gears); if (!gears.Any()) { throw new VectoSimulationException("At least one Gear-Entry must be defined in Gearbox!"); @@ -183,8 +178,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public virtual GearboxType Type { - get - { + get { //return Body.GetEx<string>(JsonKeys.Gearbox_GearboxType).ParseEnum<GearboxType>(); var typeString = Body.GetEx<string>(JsonKeys.Gearbox_GearboxType); if (!"AT".Equals(typeString)) { @@ -206,8 +200,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public virtual TableData ShiftPolygon { - get - { + get { try { return ReadTableData(Body.GetEx(JsonKeys.Gearbox_Gears)[1].GetEx<string>("ShiftPolygon"), "TorqueConverter Shift Polygon", false); @@ -229,8 +222,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public virtual IList<ITransmissionInputData> Gears { - get - { + get { var resultGears = new List<ITransmissionInputData>(); var gears = Body.GetEx(JsonKeys.Gearbox_Gears); var gearNr = 1; @@ -298,7 +290,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON if (!TolerateMissing) { throw; } - retVal.LossMap = new TableData(Path.Combine(BasePath, lossMap.ToString()) + MissingFileSuffix, DataSourceType.Missing); + retVal.LossMap = new TableData(Path.Combine(BasePath, lossMap.ToString()) + MissingFileSuffix, + DataSourceType.Missing); } } else { retVal.Efficiency = gear[JsonKeys.Gearbox_Gear_Efficiency] != null @@ -311,7 +304,8 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON retVal.ShiftPolygon = ReadTableData(gear.GetEx<string>(JsonKeys.Gearbox_Gear_ShiftPolygonFile), string.Format("Gear {0} shiftPolygon", gearNumber)); } catch (Exception) { - retVal.ShiftPolygon = new TableData(Path.Combine(BasePath, shiftPolygonFile.Value<string>()) + MissingFileSuffix, DataSourceType.Missing); + retVal.ShiftPolygon = new TableData(Path.Combine(BasePath, shiftPolygonFile.Value<string>()) + MissingFileSuffix, + DataSourceType.Missing); } } //retVal.ShiftPolygon = gear[JsonKeys.Gearbox_Gear_ShiftPolygonFile] != null @@ -353,8 +347,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public Second DownshiftAfterUpshiftDelay { - get - { + get { return Body["DownshiftAfterUpshiftDelay"] == null ? DeclarationData.Gearbox.DownshiftAfterUpshiftDelay : Body.GetEx<double>("DownshiftAfterUpshiftDelay").SI<Second>(); @@ -363,8 +356,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public Second UpshiftAfterDownshiftDelay { - get - { + get { return Body["UpshiftAfterDownshiftDelay"] == null ? DeclarationData.Gearbox.UpshiftAfterDownshiftDelay : Body.GetEx<double>("UpshiftAfterDownshiftDelay").SI<Second>(); @@ -373,8 +365,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public MeterPerSquareSecond UpshiftMinAcceleration { - get - { + get { return Body["UpshiftMinAcceleration"] == null ? DeclarationData.Gearbox.UpshiftMinAcceleration : Body.GetEx<double>("UpshiftMinAcceleration").SI<MeterPerSquareSecond>(); @@ -383,27 +374,20 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public Second PowershiftShiftTime { - get - { + get { return Body["PowershiftShiftTime"] == null ? 0.8.SI<Second>() : Body.GetEx<double>("PowershiftShiftTime").SI<Second>(); } } - public double PowerShiftInertiaFactor - { - get { return Body["PowershiftInertiaFactor"] == null ? 1 : Body.GetEx<double>("PowershiftInertiaFactor"); } - } - #endregion #region ITorqueConverterInputData public MeterPerSquareSecond CLUpshiftMinAcceleration { - get - { + get { return Body[JsonKeys.Gearbox_TorqueConverter] != null && Body[JsonKeys.Gearbox_TorqueConverter]["CLUpshiftMinAcceleration"] != null ? Body.GetEx(JsonKeys.Gearbox_TorqueConverter).GetEx<double>("CLUpshiftMinAcceleration").SI<MeterPerSquareSecond>() @@ -413,8 +397,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public MeterPerSquareSecond CCUpshiftMinAcceleration { - get - { + get { return Body[JsonKeys.Gearbox_TorqueConverter] != null && Body[JsonKeys.Gearbox_TorqueConverter]["CCUpshiftMinAcceleration"] != null ? Body.GetEx(JsonKeys.Gearbox_TorqueConverter).GetEx<double>("CCUpshiftMinAcceleration").SI<MeterPerSquareSecond>() @@ -424,8 +407,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public virtual PerSecond ReferenceRPM { - get - { + get { return Body[JsonKeys.Gearbox_TorqueConverter] != null && Body[JsonKeys.Gearbox_TorqueConverter][JsonKeys.Gearbox_TorqueConverter_ReferenceRPM] != null ? Body.GetEx(JsonKeys.Gearbox_TorqueConverter) @@ -437,8 +419,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public PerSecond MaxInputSpeed { - get - { + get { return Body[JsonKeys.Gearbox_TorqueConverter] != null && Body[JsonKeys.Gearbox_TorqueConverter]["MaxTCSpeed"] != null ? Body.GetEx(JsonKeys.Gearbox_TorqueConverter).GetEx<double>("MaxTCSpeed").RPMtoRad() @@ -448,8 +429,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON public virtual TableData TCData { - get - { + get { if (Body[JsonKeys.Gearbox_TorqueConverter] == null || Body[JsonKeys.Gearbox_TorqueConverter][JsonKeys.Gearbox_TorqueConverter_TCMap] == null) { return null; @@ -469,8 +449,7 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON KilogramSquareMeter ITorqueConverterEngineeringInputData.Inertia { - get - { + get { return Body[JsonKeys.Gearbox_TorqueConverter] != null && Body[JsonKeys.Gearbox_TorqueConverter][JsonKeys.Gearbox_TorqueConverter_Inertia] != null ? Body.GetEx(JsonKeys.Gearbox_TorqueConverter) diff --git a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs index 466a9b0ba7..1dc5acad84 100644 --- a/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs +++ b/VectoCore/VectoCore/InputData/Reader/DataObjectAdapter/EngineeringDataAdapter.cs @@ -244,7 +244,6 @@ namespace TUGraz.VectoCore.InputData.Reader.DataObjectAdapter if (retVal.Type.AutomaticTransmission()) { retVal.PowershiftShiftTime = gearbox.PowershiftShiftTime; - retVal.PowershiftInertiaFactor = gearbox.PowerShiftInertiaFactor; } retVal.DownshiftAfterUpshiftDelay = gearbox.DownshiftAfterUpshiftDelay; diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Data/GearboxData.cs b/VectoCore/VectoCore/Models/SimulationComponent/Data/GearboxData.cs index 2dff578401..580bdab56e 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Data/GearboxData.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Data/GearboxData.cs @@ -101,9 +101,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data [SIRange(0.5, 1)] public Second PowershiftShiftTime { get; internal set; } - [Range(0, 1)] - public double PowershiftInertiaFactor { get; internal set; } - // ReSharper disable once UnusedMember.Global -- used via Validation public static ValidationResult ValidateGearboxData(GearboxData gearboxData, ValidationContext validationContext) { @@ -118,8 +115,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Data result.AddRange(gearboxData.TorqueConverterData.Validate(mode, gearboxData.Type, emsMission)); //result.AddRange(gearboxData.PowershiftShiftTime.Validate(mode, gearboxData.Type)); //result.AddRange(gearboxData.PowershiftInertiaFactor.Validate(mode, gearboxData.Type)); - validationContext.MemberName = "PowershiftInertiaFactor"; - Validator.TryValidateProperty(gearboxData.PowershiftInertiaFactor, validationContext, result); validationContext.MemberName = "PowershiftShiftTime"; Validator.TryValidateProperty(gearboxData.PowershiftShiftTime, validationContext, result); } diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AbstractGearbox.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AbstractGearbox.cs index cd1643c6e8..c3c2fb3477 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/AbstractGearbox.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/AbstractGearbox.cs @@ -155,9 +155,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl var torqueGbxIn = outTorque / ModelData.Gears[Gear].Ratio; var deltaEngineSpeed = DataBus.EngineSpeed - outAngularVelocity * ModelData.Gears[Gear].Ratio; var deltaClutchSpeed = (DataBus.EngineSpeed - PreviousState.OutAngularVelocity * ModelData.Gears[Gear].Ratio) / 2; - var torqueInertia = ModelData.PowershiftInertiaFactor * EngineInertia * deltaEngineSpeed / - ModelData.PowershiftShiftTime; - var shiftLossEnergy = (torqueGbxIn + torqueInertia) * deltaClutchSpeed * ModelData.PowershiftShiftTime; + var shiftLossEnergy = torqueGbxIn * deltaClutchSpeed * ModelData.PowershiftShiftTime; return shiftLossEnergy.Abs(); } diff --git a/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs b/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs index 6357636c9f..ecfb707bd3 100644 --- a/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs +++ b/VectoCore/VectoCoreTest/Integration/ATPowerTrain.cs @@ -162,7 +162,6 @@ namespace TUGraz.VectoCore.Tests.Integration UpshiftAfterDownshiftDelay = DeclarationData.Gearbox.UpshiftAfterDownshiftDelay, UpshiftMinAcceleration = DeclarationData.Gearbox.UpshiftMinAcceleration, PowershiftShiftTime = 0.8.SI<Second>(), - PowershiftInertiaFactor = 0.7, TorqueConverterData = TorqueConverterDataReader.ReadFromFile(torqueConverterFile, 1000.RPMtoRad(), MaxTcSpeed, ExecutionMode.Engineering, gbxType == GearboxType.ATSerial ? 1 : 1 / ratios[0], -- GitLab