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

Merge pull request #390 in VECTO/vecto-sim from...

Merge pull request #390 in VECTO/vecto-sim from ~EMQUARIMA/vecto-sim:feature/VECTO-477-at-powershift-remove-inertia-factor to develop

* commit '87759114':
  adapt testcases, remove now redundant testcases
  remove powershift-inertia-factor in computation of powershift losses
parents 483ff57f 87759114
No related branches found
No related tags found
No related merge requests found
Showing with 38 additions and 127 deletions
......@@ -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
......
......@@ -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)
......
......@@ -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
......
......@@ -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
......
......@@ -193,8 +193,6 @@ namespace TUGraz.VectoCommon.InputData
MeterPerSquareSecond UpshiftMinAcceleration { get; }
Second PowershiftShiftTime { get; }
double PowerShiftInertiaFactor { get; }
}
public interface ITorqueConverterEngineeringInputData : ITorqueConverterDeclarationInputData
......
......@@ -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)
......
......@@ -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;
......
......@@ -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);
}
......
......@@ -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();
}
......
......@@ -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],
......
......@@ -61,39 +61,26 @@ namespace TUGraz.VectoCore.Tests.Models.SimulationComponent
}
[Test,
TestCase(200, 2u, 1, 562, 620, 36.4855),
TestCase(400, 2u, 1, 562, 620, 55.9878),
TestCase(600, 2u, 1, 562, 620, 75.4901),
TestCase(800, 2u, 1, 562, 620, 94.9924),
TestCase(200, 2u, 1, 562, 600, 39.6371),
TestCase(400, 2u, 1, 562, 600, 59.4279),
TestCase(600, 2u, 1, 562, 600, 79.218),
TestCase(800, 2u, 1, 562, 600, 99.0095),
TestCase(400, 3u, 1, 500, 490, 9.6354),
TestCase(400, 3u, 1, 550, 490, 17.325),
TestCase(600, 3u, 1, 550, 490, 33.5574),
TestCase(200, 2u, 0.7, 562, 620, 31.3906),
TestCase(400, 2u, 0.7, 562, 620, 50.8929),
TestCase(600, 2u, 0.7, 562, 620, 70.3952),
TestCase(800, 2u, 0.7, 562, 620, 89.8975),
TestCase(200, 2u, 0.7, 562, 600, 33.6832),
TestCase(400, 2u, 0.7, 562, 600, 53.4741),
TestCase(600, 2u, 0.7, 562, 600, 73.2648),
TestCase(800, 2u, 0.7, 562, 600, 93.0557),
TestCase(400, 3u, 0.7, 500, 490, 15.9818),
TestCase(400, 3u, 0.7, 550, 490, 21.8670),
TestCase(600, 3u, 0.7, 550, 490, 38.0991),
TestCase(200, 2u, 562, 620, 19.5023),
TestCase(400, 2u, 562, 620, 39.0046),
TestCase(600, 2u, 562, 620, 58.5069),
TestCase(800, 2u, 562, 620, 78.0092),
TestCase(200, 2u, 562, 600, 19.7908),
TestCase(400, 2u, 562, 600, 39.5816),
TestCase(600, 2u, 562, 600, 59.3723),
TestCase(800, 2u, 562, 600, 79.1632),
TestCase(400, 3u, 500, 490, 30.7900),
TestCase(400, 3u, 550, 490, 32.4643),
TestCase(600, 3u, 550, 490, 48.6965),
]
public void TestShiftLossComputation(double torqueDemand, uint gear, double inertiaFactor, double preShiftRpm,
double postShiftRpm,
double expectedShiftLoss)
public void TestShiftLossComputation(double torqueDemand, uint gear, double preShiftRpm,
double postShiftRpm, double expectedShiftLoss)
{
var engineInertia = 5.SI<KilogramSquareMeter>();
var gearboxData = ATPowerTrain.CreateGearboxData(GearboxType.ATSerial);
var container = new VehicleContainer(ExecutionMode.Engineering);
gearboxData.PowershiftInertiaFactor = inertiaFactor;
gearboxData.PowershiftShiftTime = 0.8.SI<Second>();
var cycleDataStr = "0, 0, 0, 2\n100, 20, 0, 0\n1000, 50, 0, 0";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment