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

Skip to content
Snippets Groups Projects
Commit 96e82763 authored by Markus QUARITSCH's avatar Markus QUARITSCH
Browse files

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

Merge pull request #437 in VECTO/vecto-sim from ~EMKRISPMI/vecto-sim:bugfix/pto-energy-bilance to develop

* commit '3b3a4877':
  User Manual: Updated pto description
  User Manual: PTO Behavior described
  PTO corrected bug when PTO cycle begins with torque != 0
  PTO-Energy Bilance: updated tests to cover additional error-cases
parents f7be3db6 3b3a4877
No related branches found
No related tags found
No related merge requests found
Showing
with 7977 additions and 6734 deletions
Documentation/User Manual Source/left-of-segment.PNG

17.2 KiB

File added
File added
File added
File added
##PTO
Here the simulation of PTO related fuel consumption in VECTO is described.
![](pics/pto.png)
The PTO related influence on the fuel consumption is considered in VECTO as follows:
### Losses in the PTO "Transmission" part (blue)
Considered by constant power consumption as a function of the PTO type. Power consumption added in all vehicle operation conditions as VECTO does not differentiate between clutch open/closed and gear engaged/disengaged. Configurable in the [Vehicle Editor](#vehicle-editor). The values are displayed in the following table:
| Technology | Power Loss \[W] |
|------------------------------------------------------------------------------------------|-----------------|
| None | 0 |
| only the drive shaft of the PTO - shift claw, synchronizer, sliding gearwheel | 50 |
| only the drive shaft of the PTO - multi-disc clutch | 1000 |
| only the drive shaft of the PTO - multi-disc clutch, oil pump | 2000 |
| drive shaft and/or up to 2 gear wheels - shift claw, synchronizer, sliding gearwheel | 300 |
| drive shaft and/or up to 2 gear wheels - multi-disc clutch | 1500 |
| drive shaft and/or up to 2 gear wheels - multi-disc clutch, oil pump | 3000 |
| drive shaft and/or more than 2 gear wheels - shift claw, synchronizer, sliding gearwheel | 600 |
| drive shaft and/or more than 2 gear wheels - multi-disc clutch | 2000 |
| drive shaft and/or more than 2 gear wheels - multi-disc clutch, oil pump | 4000 |
### Idling losses of the PTO "Consumer" (red)
Torque loss as a function of speed as determined by the DIN 30752-1 procedure. If PTO transmission includes shifting element (i.e. declutching of consumer part possible) the torque losses of the consumer in VECTO input shall be defined with zero. Not relevant during PTO cycle. Configurable in the [Vehicle Editor](#vehicle-editor) and following the file format described in [PTO-Consumer](#pto-consumer).
### Power consumption of the PTO "Consumer" (red) during the PTO cycle
A specific PTO cycle (time-based, engine speed and torque from PTO consumer as determined by the DIN 30752-1 procedure) is simulated during vehicle stops additionally labelled as “with PTO activation”. Power consumption in the PTO transmission part added to power demand from the PTO cycle. The cycle is configurable in the [Vehicle Editor](#vehicle-editor) and follows the file format described in [PTO-Cycle](#pto-cycle).
##PTO
VECTO supports the simulation of PTO related components and losses in the powertrain. Structurally this consists of 2 components (PTO transmission, PTO consumer) and 3 different kind of losses (transmission, idling, cycle).
### Structural Overview of PTO Components
![](pics/pto.png)
#### Losses in the PTO "Transmission" part (blue)
This is considered by constant power consumption as a function of the PTO type. The power consumption is added in all vehicle operation conditions, due to VECTO not differentiating between clutch open/closed and gear engaged/disengaged. The PTO type is configurable in the [Vehicle Editor](#vehicle-editor). The exact values are shown in the following table:
| Technology | Power Loss \[W] |
|------------------------------------------------------------------------------------------|-----------------|
| None | 0 |
| only the drive shaft of the PTO - shift claw, synchronizer, sliding gearwheel | 50 |
| only the drive shaft of the PTO - multi-disc clutch | 1000 |
| only the drive shaft of the PTO - multi-disc clutch, oil pump | 2000 |
| drive shaft and/or up to 2 gear wheels - shift claw, synchronizer, sliding gearwheel | 300 |
| drive shaft and/or up to 2 gear wheels - multi-disc clutch | 1500 |
| drive shaft and/or up to 2 gear wheels - multi-disc clutch, oil pump | 3000 |
| drive shaft and/or more than 2 gear wheels - shift claw, synchronizer, sliding gearwheel | 600 |
| drive shaft and/or more than 2 gear wheels - multi-disc clutch | 2000 |
| drive shaft and/or more than 2 gear wheels - multi-disc clutch, oil pump | 4000 |
#### Idling losses of the PTO "Consumer" (red)
The idling losses are a function of speed as determined by the DIN 30752-1 procedure. If the PTO transmission includes a shifting element (i.e. declutching of consumer part possible) the torque losses of the consumer in VECTO input shall be defined with zero. This is only used outside of PTO cycles, since the PTO cycles already include these losses. The idling losses are defined as a lossmap dependend on speed which is configurable in the [Vehicle Editor](#vehicle-editor). The file format is described in [PTO-Consumer](#pto-consumer).
#### Cycle losses during the PTO cycle of the PTO "Consumer" (red)
A specific PTO cycle (time-based, engine speed and torque from PTO consumer as determined by the DIN 30752-1 procedure) is simulated during vehicle stops labelled as "with PTO activation". The execution of the driving cycle stops during this time and the pto cycle is executed. Afterwards the normal driving cycle continues.
Power consumption in the PTO transmission part added to power demand from the PTO cycle. The cycle is configurable in the [Vehicle Editor](#vehicle-editor) and follows the file format described in [PTO-Cycle](#pto-cycle). The timings in the PTO cycle get shifted to start at 0.
### Behavior During PTO Driving Cycles
A PTO cycle can only be activated during a stop phase in the driving cycle. When the PTO cycle is activated VECTO exhibits the following behavior: Half of the stop time is added before the pto cycle, and the other half is added afterwards. If the halved stop times are still longer than 3 seconds, they get divided even further to 3 intervals in order to achieve a more appealing visualization in the output (falling down, low baseline, rising again).
The following image shows the behavior of running PTO cycles during a normal driving cycle:
![](pics/pto-behavior.png)
(#) Normal driving behavior.
(#) The first half of the stop phase begins, the vehicle stops and the engine speed goes down to idle speed (if there is enough time).
(#) The PTO cycle continues from the last engine speed in stop phase and sets it to the engine speed of the first entry in the PTO cycle.
(#) After the PTO cycle ends, the second half of the stop phase begins and the engine speed again goes to idle speed (if enough time passes).
(#) After the stop phase the normal driving behavior starts again - the vehicle drives off.
##PTO Cycle (.vptoc)
The PTO cycle defines the power demands during standing still and doing a pto operation. This can only be used in [Engineering Mode](#engineering-mode) when a pto transmission is defined. It can be set in the [Vehicle-Editor](#vehicle-editor). The basic file format is [Vecto-CSV](#csv) and the file type ending is ".vptoc". A PTO cycle is time-based and may have variable time steps.
Header: **\<t>, \<Engine speed>, \<PTO Torque>**
**Bold columns** are mandatory. Only the listed columns are allowed (no other columns!).<br />
The order is not important when the headers are annotated with \<angle-brackets\> (less-than-sign "<" and greater-than-sign ">").<br />
Units are optional and are enclosed in [square-brackets] after the header-column. Comments may be written with a preceding hash-sign "#".
| Identifier | Unit | Description |
|------------------|-------|--------------------------------------------------------------------------------------------------------------------------------------------|
| **t** | [s] | The time during the pto cycle. Must always be increasing. |
| **Engine speed** | [rpm] | Actual engine speed |
| **PTO Torque** | [Nm] | The torque at the PTO consumer (including prop-shaft losses if applicable) as measured by the DIN test converted to torque at engine speed |
**Example:**
~~~
<t> [s], <Engine speed> [rpm], <PTO Torque> [Nm]
0 , 600 , 0
1 , 600 , 0
2 , 900 , 0
3 , 1200 , 50
4 , 1200 , 70
5 , 1200 , 100
~~~
##PTO Cycle (.vptoc)
The PTO cycle defines the power demands during standing still and doing a pto operation. This can only be used in [Engineering Mode](#engineering-mode) when a pto transmission is defined. It can be set in the [Vehicle-Editor](#vehicle-editor). The basic file format is [Vecto-CSV](#csv) and the file type ending is ".vptoc". A PTO cycle is time-based and may have variable time steps. Regardless of starting time, VECTO shifts it to always begin at 0[s].
Header: **\<t>, \<Engine speed>, \<PTO Torque>**
**Bold columns** are mandatory. Only the listed columns are allowed (no other columns!).<br />
The order is not important when the headers are annotated with \<angle-brackets\> (less-than-sign "<" and greater-than-sign ">").<br />
Units are optional and are enclosed in [square-brackets] after the header-column. Comments may be written with a preceding hash-sign "#".
| Identifier | Unit | Description |
|------------------|-------|--------------------------------------------------------------------------------------------------------------------------------------------|
| **t** | [s] | The time during the pto cycle. Must always be increasing. Gets shifted to begin with 0 by VECTO (if thats not already the case). |
| **Engine speed** | [rpm] | Actual engine speed |
| **PTO Torque** | [Nm] | The torque at the PTO consumer (including prop-shaft losses if applicable) as measured by the DIN test converted to torque at engine speed |
**Example:**
~~~
<t> [s], <Engine speed> [rpm], <PTO Torque> [Nm]
0 , 600 , 0
1 , 600 , 0
2 , 900 , 0
3 , 1200 , 50
4 , 1200 , 70
5 , 1200 , 100
~~~
This diff is collapsed.
Documentation/User Manual/pics/pto-behavior.png

58 KiB

This diff is collapsed.
This diff is collapsed.
......@@ -110,13 +110,13 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
// PWheelCycle --> AxleGear --> Clutch --> Engine <-- Aux
var powertrain = new PWheelCycle(container, data.Cycle, data.AxleGearData.AxleGear.Ratio, data.VehicleData,
gearbox.ModelData.Gears.ToDictionary(g => g.Key, g => g.Value.Ratio))
gearbox.ModelData.Gears.ToDictionary(g => g.Key, g => g.Value.Ratio))
.AddComponent(new AxleGear(container, data.AxleGearData))
.AddComponent(data.AngledriveData != null ? new Angledrive(container, data.AngledriveData) : null)
.AddComponent(gearbox, data.Retarder, container)
.AddComponent(new Clutch(container, data.EngineData));
var engine = new CombustionEngine(container, data.EngineData, pt1Disabled: true);
var idleController = GetIdleController(data.PTO, engine);
var idleController = GetIdleController(data.PTO, engine, container);
powertrain.AddComponent(engine, idleController)
.AddAuxiliaries(container, data);
......@@ -147,7 +147,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
}
var engine = new CombustionEngine(container, data.EngineData);
var idleController = GetIdleController(data.PTO, engine);
var idleController = GetIdleController(data.PTO, engine, container);
powertrain.AddComponent(engine, idleController)
.AddAuxiliaries(container, data);
......@@ -207,7 +207,7 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
}
var engine = new CombustionEngine(container, data.EngineData);
var idleController = GetIdleController(data.PTO, engine);
var idleController = GetIdleController(data.PTO, engine, container);
cycle.IdleController = idleController as IdleControllerSwitcher;
powertrain.AddComponent(engine, idleController)
......@@ -218,12 +218,12 @@ namespace TUGraz.VectoCore.Models.Simulation.Impl
return container;
}
private static IIdleController GetIdleController(PTOData pto, ICombustionEngine engine)
private static IIdleController GetIdleController(PTOData pto, ICombustionEngine engine, IVehicleContainer container)
{
var controller = engine.IdleController;
if (pto != null && pto.PTOCycle != null) {
var ptoController = new PTOCycleController(pto.PTOCycle);
var ptoController = new PTOCycleController(container, pto.PTOCycle);
controller = new IdleControllerSwitcher(engine.IdleController, ptoController);
}
......
......@@ -175,7 +175,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
: Left.StoppingTime;
}
if (Left.StoppingTime.IsGreater(6 * Constants.SimulationSettings.TargetTimeInterval)) {
// 7 pahses
// 7 phases
return GetStopTimeIntervalSevenPhasesPTO();
}
if (Left.StoppingTime.IsGreater(0)) {
......
......@@ -29,6 +29,7 @@
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
using System;
using System.Linq;
using TUGraz.VectoCommon.Exceptions;
using TUGraz.VectoCommon.Models;
......@@ -36,6 +37,7 @@ using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Configuration;
using TUGraz.VectoCore.Models.Connector.Ports;
using TUGraz.VectoCore.Models.Connector.Ports.Impl;
using TUGraz.VectoCore.Models.Simulation;
using TUGraz.VectoCore.Models.Simulation.Data;
using TUGraz.VectoCore.Models.SimulationComponent.Data;
using TUGraz.VectoCore.OutputData;
......@@ -44,7 +46,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
{
public class PTOCycleController : PowertrainDrivingCycle, IIdleController
{
public ITnOutPort RequestPort {
public ITnOutPort RequestPort
{
set { NextComponent = value; }
}
......@@ -52,8 +55,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
protected Second IdleStart;
public PTOCycleController(DrivingCycleData cycle) : base(null, cycle)
public PTOCycleController(IVehicleContainer container, IDrivingCycleData cycle)
: base(null, cycle)
{
DataBus = container;
Duration = Data.Entries.Last().Time - Data.Entries.First().Time;
}
......@@ -61,13 +66,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
bool dryRun = false)
{
if (outAngularVelocity != null) {
throw new VectoException("{0} can only handle idle requests: AngularVelocity has to be null!", GetType().ToString());
throw new VectoException("{0} can only handle idle requests: AngularVelocity has to be null!",
GetType().ToString());
}
if (!outTorque.IsEqual(0)) {
throw new VectoException("{0} can only handle idle requests: Torque has to be 0!", GetType().ToString());
}
if (IdleStart == null) {
IdleStart = absTime;
PreviousState.InAngularVelocity = DataBus.EngineSpeed;
}
return base.Request(absTime - IdleStart, dt);
}
......@@ -80,7 +87,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public void Reset()
{
CycleIterator.Reset();
PreviousState.InAngularVelocity = CycleIterator.LeftSample.AngularVelocity;
IdleStart = null;
}
......
/*
* This file is part of VECTO.
*
* Copyright © 2012-2016 European Union
*
* Developed by Graz University of Technology,
* Institute of Internal Combustion Engines and Thermodynamics,
* Institute of Technical Informatics
*
* VECTO is licensed under the EUPL, Version 1.1 or - as soon they will be approved
* by the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use VECTO except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* https://joinup.ec.europa.eu/community/eupl/og_page/eupl
*
* Unless required by applicable law or agreed to in writing, VECTO
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*
* Authors:
* Stefan Hausberger, hausberger@ivt.tugraz.at, IVT, Graz University of Technology
* Christian Kreiner, christian.kreiner@tugraz.at, ITI, Graz University of Technology
* Michael Krisper, michael.krisper@tugraz.at, ITI, Graz University of Technology
* Raphael Luz, luz@ivt.tugraz.at, IVT, Graz University of Technology
* Markus Quaritsch, markus.quaritsch@tugraz.at, IVT, Graz University of Technology
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
using System;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Models.Simulation;
using TUGraz.VectoCore.Models.Simulation.DataBus;
using TUGraz.VectoCore.OutputData;
namespace TUGraz.VectoCore.Models.SimulationComponent
{
/// <summary>
/// Base class for all vecto simulation components.
/// </summary>
public abstract class VectoSimulationComponent : LoggingObject
{
[NonSerialized] protected readonly IDataBus DataBus;
/// <summary>
/// Constructor. Registers the component in the cockpit.
/// </summary>
/// <param name="dataBus">The vehicle container</param>
protected VectoSimulationComponent(IVehicleContainer dataBus)
{
DataBus = dataBus;
// if a component doesn't want to be registered in DataBus, it supplies null to the constructor
// (mk 2016-08-31: currently the only example is PTOCycleController, to not interfere with the real DrivingCycle)
if (dataBus != null)
dataBus.AddComponent(this);
}
public void CommitSimulationStep(IModalDataContainer container)
{
if (container != null) {
DoWriteModalResults(container);
}
DoCommitSimulationStep();
}
protected abstract void DoWriteModalResults(IModalDataContainer container);
/// <summary>
/// Commits the simulation step.
/// Writes the moddata into the data writer.
/// Commits the internal state of the object if needed.
/// </summary>
protected abstract void DoCommitSimulationStep();
}
public abstract class StatefulVectoSimulationComponent<TStateType> : VectoSimulationComponent where TStateType : new()
{
protected internal TStateType CurrentState;
protected internal TStateType PreviousState;
protected StatefulVectoSimulationComponent(IVehicleContainer container)
: base(container)
{
CurrentState = new TStateType();
PreviousState = new TStateType();
}
protected void AdvanceState()
{
PreviousState = CurrentState;
CurrentState = new TStateType();
}
}
public abstract class StatefulProviderComponent<TStateType, TProviderOutPort, TProviderInPort, TOutPort> :
StatefulVectoSimulationComponent<TStateType>
where TStateType : new()
where TProviderOutPort : class
where TProviderInPort : class
{
protected TOutPort NextComponent;
protected StatefulProviderComponent(IVehicleContainer container) : base(container) {}
public TProviderOutPort OutPort()
{
return this as TProviderOutPort;
}
public TProviderInPort InPort()
{
return this as TProviderInPort;
}
public virtual void Connect(TOutPort other)
{
NextComponent = other;
}
protected override void DoCommitSimulationStep()
{
AdvanceState();
}
}
public class SimpleComponentState
{
public NewtonMeter OutTorque = 0.SI<NewtonMeter>();
public NewtonMeter InTorque = 0.SI<NewtonMeter>();
public PerSecond OutAngularVelocity = 0.SI<PerSecond>();
public PerSecond InAngularVelocity = 0.SI<PerSecond>();
public void SetState(NewtonMeter inTorque, PerSecond inAngularVelocity, NewtonMeter outTorque,
PerSecond outAngularVelocity)
{
InTorque = inTorque;
InAngularVelocity = inAngularVelocity;
OutTorque = outTorque;
OutAngularVelocity = outAngularVelocity;
}
}
/*
* This file is part of VECTO.
*
* Copyright © 2012-2016 European Union
*
* Developed by Graz University of Technology,
* Institute of Internal Combustion Engines and Thermodynamics,
* Institute of Technical Informatics
*
* VECTO is licensed under the EUPL, Version 1.1 or - as soon they will be approved
* by the European Commission - subsequent versions of the EUPL (the "Licence");
* You may not use VECTO except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* https://joinup.ec.europa.eu/community/eupl/og_page/eupl
*
* Unless required by applicable law or agreed to in writing, VECTO
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*
* Authors:
* Stefan Hausberger, hausberger@ivt.tugraz.at, IVT, Graz University of Technology
* Christian Kreiner, christian.kreiner@tugraz.at, ITI, Graz University of Technology
* Michael Krisper, michael.krisper@tugraz.at, ITI, Graz University of Technology
* Raphael Luz, luz@ivt.tugraz.at, IVT, Graz University of Technology
* Markus Quaritsch, markus.quaritsch@tugraz.at, IVT, Graz University of Technology
* Martin Rexeis, rexeis@ivt.tugraz.at, IVT, Graz University of Technology
*/
using System;
using TUGraz.VectoCommon.Models;
using TUGraz.VectoCommon.Utils;
using TUGraz.VectoCore.Models.Simulation;
using TUGraz.VectoCore.Models.Simulation.DataBus;
using TUGraz.VectoCore.OutputData;
namespace TUGraz.VectoCore.Models.SimulationComponent
{
/// <summary>
/// Base class for all vecto simulation components.
/// </summary>
public abstract class VectoSimulationComponent : LoggingObject
{
[NonSerialized] protected IDataBus DataBus;
/// <summary>
/// Constructor. Registers the component in the cockpit.
/// </summary>
/// <param name="dataBus">The vehicle container</param>
protected VectoSimulationComponent(IVehicleContainer dataBus)
{
DataBus = dataBus;
// if a component doesn't want to be registered in DataBus, it supplies null to the constructor
// (mk 2016-08-31: currently the only example is PTOCycleController, in order to not interfere with the real DrivingCycle)
if (dataBus != null)
dataBus.AddComponent(this);
}
public void CommitSimulationStep(IModalDataContainer container)
{
if (container != null) {
DoWriteModalResults(container);
}
DoCommitSimulationStep();
}
protected abstract void DoWriteModalResults(IModalDataContainer container);
/// <summary>
/// Commits the simulation step.
/// Writes the moddata into the data writer.
/// Commits the internal state of the object if needed.
/// </summary>
protected abstract void DoCommitSimulationStep();
}
public abstract class StatefulVectoSimulationComponent<TStateType> : VectoSimulationComponent where TStateType : new()
{
protected internal TStateType CurrentState;
protected internal TStateType PreviousState;
protected StatefulVectoSimulationComponent(IVehicleContainer container)
: base(container)
{
CurrentState = new TStateType();
PreviousState = new TStateType();
}
protected void AdvanceState()
{
PreviousState = CurrentState;
CurrentState = new TStateType();
}
}
public abstract class StatefulProviderComponent<TStateType, TProviderOutPort, TProviderInPort, TOutPort> :
StatefulVectoSimulationComponent<TStateType>
where TStateType : new()
where TProviderOutPort : class
where TProviderInPort : class
{
protected TOutPort NextComponent;
protected StatefulProviderComponent(IVehicleContainer container) : base(container) { }
public TProviderOutPort OutPort()
{
return this as TProviderOutPort;
}
public TProviderInPort InPort()
{
return this as TProviderInPort;
}
public virtual void Connect(TOutPort other)
{
NextComponent = other;
}
protected override void DoCommitSimulationStep()
{
AdvanceState();
}
}
public class SimpleComponentState
{
public NewtonMeter OutTorque = 0.SI<NewtonMeter>();
public NewtonMeter InTorque = 0.SI<NewtonMeter>();
public PerSecond OutAngularVelocity = 0.SI<PerSecond>();
public PerSecond InAngularVelocity = 0.SI<PerSecond>();
public void SetState(NewtonMeter inTorque, PerSecond inAngularVelocity, NewtonMeter outTorque,
PerSecond outAngularVelocity)
{
InTorque = inTorque;
InAngularVelocity = inAngularVelocity;
OutTorque = outTorque;
OutAngularVelocity = outAngularVelocity;
}
}
}
\ No newline at end of file
......@@ -90,7 +90,7 @@ namespace TUGraz.VectoCore.Tests.Reports
[TestCase(@"TestData\Integration\EngineeringMode\Class2_RigidTruck_4x2\Class2_RigidTruck_ENG.vecto"),
TestCase(@"TestData\Integration\EngineeringMode\Class5_Tractor_4x2\Class5_Tractor_ENG.vecto"),
TestCase(@"TestData\Integration\EngineeringMode\Class9_RigidTruck_6x2_PTO\Class9_RigidTruck_ENG_PTO.vecto")]
TestCase(@"TestData\Integration\EngineeringMode\Class9_RigidTruck_6x2_PTO\Class9_RigidTruck_ENG_PTO.vecto"),]
public void TestFullCycleModDataIntegrityMT(string jobName)
{
RunSimulation(jobName, ExecutionMode.Engineering);
......@@ -111,7 +111,7 @@ namespace TUGraz.VectoCore.Tests.Reports
foreach (var run in jobContainer.Runs) {
modData.Add(Tuple.Create(((ModalDataContainer)run.Run.GetContainer().ModalData).Data,
((DistanceBasedDrivingCycle)((VehicleContainer)run.Run.GetContainer()).DrivingCycle).Data.Entries.Last()
.Distance));
.Distance));
}
var auxKeys =
new Dictionary<string, DataColumn>(
......@@ -156,7 +156,7 @@ namespace TUGraz.VectoCore.Tests.Reports
var eAux = ((SI)row[SummaryDataContainer.E_AUX]).Value();
var eClutchLoss = ((SI)row[SummaryDataContainer.E_CLUTCH_LOSS]).Value();
var eTcLoss = ((SI)row[SummaryDataContainer.E_TC_LOSS]).Value();
var eShiftLoss = ((SI)row[SummaryDataContainer.E_SHIFT_LOSS]).Value();
//var eShiftLoss = ((SI)row[SummaryDataContainer.E_SHIFT_LOSS]).Value();
var eGbxLoss = ((SI)row[SummaryDataContainer.E_GBX_LOSS]).Value();
var eRetLoss = ((SI)row[SummaryDataContainer.E_RET_LOSS]).Value();
var eAngleLoss = ((SI)row[SummaryDataContainer.E_ANGLE_LOSS]).Value();
......@@ -184,7 +184,7 @@ namespace TUGraz.VectoCore.Tests.Reports
// E_fcmap_pos = E_fcmap_neg + E_powertrain_inertia + E_aux_xxx + E_aux_sum + E_clutch_loss + E_tc_loss + E_gbx_loss + E_shift_loss + E_ret_loss + E_angle_loss + E_axl_loss + E_brake + E_vehicle_inertia + E_air + E_roll + E_grad + E_PTO_CONSUM + E_PTO_TRANSM
Assert.AreEqual(eFcMapPos,
eFcMapNeg + ePowertrainInertia + eAux + eClutchLoss + eTcLoss + eGbxLoss + eRetLoss + eAngleLoss +
eAxlLoss + eBrakeLoss + eVehInertia + eAir + eRoll + eGrad + ePTOconsumer + ePTOtransm, 1e-3,
eAxlLoss + eBrakeLoss + eVehInertia + eAir + eRoll + eGrad + ePTOconsumer + ePTOtransm, 1e-5,
"input file: {0} cycle: {1} loading: {2}",
inputFile, cycle, loading);
......@@ -284,15 +284,14 @@ namespace TUGraz.VectoCore.Tests.Reports
(Watt)(row[(int)ModalResultField.P_aux] != DBNull.Value ? row[(int)ModalResultField.P_aux] : 0.SI<Watt>());
var pBrakeLoss = (Watt)row[(int)ModalResultField.P_brake_loss];
var pBrakeIn = (Watt)row[(int)ModalResultField.P_brake_in];
var pClutchLoss = (Watt)row[(int)ModalResultField.P_clutch_loss];
var pClutchOut = (Watt)row[(int)ModalResultField.P_clutch_out];
var pWheelInertia = (Watt)row[(int)ModalResultField.P_wheel_inertia];
var pPTOconsumer = ptoConsumerColumn == null || row[ptoConsumerColumn] is DBNull
var pPTOconsumer = ptoConsumerColumn == null || row[ptoConsumerColumn.ColumnName] is DBNull
? 0.SI<Watt>()
: (Watt)row[ptoConsumerColumn];
var pPTOtransm = ptoTransmissionColumn == null || row[ptoTransmissionColumn] is DBNull
: (Watt)row[ptoConsumerColumn.ColumnName];
var pPTOtransm = ptoTransmissionColumn == null || row[ptoTransmissionColumn.ColumnName] is DBNull
? 0.SI<Watt>()
: (Watt)row[ptoTransmissionColumn];
: (Watt)row[ptoTransmissionColumn.ColumnName];
// P_trac = P_veh_inertia + P_roll + P_air + P_slope
Assert.AreEqual(pTrac.Value(), (pAir + pRoll + pGrad + pVehInertia).Value(), 1E-3, "time: {0} distance: {1}", time,
distance);
......@@ -308,10 +307,27 @@ namespace TUGraz.VectoCore.Tests.Reports
Assert.AreEqual(pRetIn.Value(), (pAxleIn + pLossRet).Value(), 1E-3, "time: {0} distance: {1}", time, distance);
Assert.AreEqual(pGbxIn.Value(), pClutchOut.Value(), 1E-3, "time: {0} distance: {1}", time, distance);
var pClutchLoss = (Watt)(row[(int)ModalResultField.P_clutch_loss] != DBNull.Value
? row[(int)ModalResultField.P_clutch_loss]
: 0.SI<Watt>());
Assert.AreEqual(pEngOut.Value(), (pClutchOut + pClutchLoss).Value(), 1E-3,
"time: {0} distance: {1}", time, distance);
var pClutchOut = row[(int)ModalResultField.P_clutch_out];
if (pClutchOut != DBNull.Value) {
Assert.AreEqual(pGbxIn.Value(), (pClutchOut as Watt).Value(), 1E-3, "time: {0} distance: {1}", time, distance);
Assert.AreEqual(pEngOut.Value(), (pClutchOut as Watt + pClutchLoss).Value(), 1E-3, "time: {0} distance: {1}",
time, distance);
}
var pTC_Loss = (Watt)(row[(int)ModalResultField.P_TC_loss] != DBNull.Value
? row[(int)ModalResultField.P_TC_loss]
: 0.SI<Watt>());
var pTCOut = row[(int)ModalResultField.P_clutch_out];
if (pTCOut != DBNull.Value) {
Assert.AreEqual(pGbxIn.Value(), (pTCOut as Watt).Value(), 1E-3, "time: {0} distance: {1}", time, distance);
//Assert.AreEqual(pEngOut.Value(), (pTCOut as Watt + pTC_Loss).Value(), 1E-3, "time: {0} distance: {1}",
// time, distance);
}
Assert.IsTrue(pLossGbx.IsGreaterOrEqual(pShiftLoss + pGbxInertia), "time: {0} distance: {1}", time,
distance);
......@@ -325,14 +341,14 @@ namespace TUGraz.VectoCore.Tests.Reports
"time: {0} distance: {1}", time, distance);
// P_eng_fcmap = sum(Losses Powertrain)
var pLossTot = pClutchLoss + pLossGbx + pLossRet + pGbxInertia + pLossAngle + pLossAxle + pBrakeLoss +
var pLossTot = pClutchLoss + pTC_Loss + pLossGbx + pLossRet + pGbxInertia + pLossAngle + pLossAxle + pBrakeLoss +
pWheelInertia + pAir + pRoll + pGrad + pVehInertia + pPTOconsumer + pPTOtransm;
var pEngFcmapCalc = (pLossTot + pEngInertia + pAux).Value();
Assert.AreEqual(pEngFcmap.Value(), pEngFcmapCalc, 0.5, "time: {0} distance: {1}", time, distance);
Assert.AreEqual(pEngFcmap.Value(),
(pTrac + pWheelInertia + pBrakeLoss + pLossAxle + pLossRet + pLossGbx + pGbxInertia + pEngInertia + pAux +
pClutchLoss + pPTOtransm + pPTOconsumer).Value(), 0.5, "time: {0} distance: {1}", time, distance);
pClutchLoss + pTC_Loss + pPTOtransm + pPTOconsumer).Value(), 0.5, "time: {0} distance: {1}", time, distance);
}
}
......@@ -355,7 +371,7 @@ namespace TUGraz.VectoCore.Tests.Reports
foreach (var run in jobContainer.Runs) {
modData.Add(Tuple.Create(((ModalDataContainer)run.Run.GetContainer().ModalData).Data,
((DistanceBasedDrivingCycle)((VehicleContainer)run.Run.GetContainer()).DrivingCycle).Data.Entries.Last()
.Distance));
.Distance));
}
var auxKeys =
new Dictionary<string, DataColumn>(
......
t,Engine speed,PTO Torque
# [s],[rpm],[Nm]
0,600,0
1,600,0
2,900,0
3,1200,47.87750416
4,1200,67.91951027
5,1200,103.5934139
6,1200,142.5363262
7,1200,166.111409
8,1200,171.0628326
9,1200,165.0796753
10,1200,158.6919685
11,1200,153.2632141
12,1200,144.49562
13,1200,135.5139389
14,1200,131.4482469
15,1200,128.4894196
16,1200,131.626042
17,1200,153.7727524
18,1200,175.9667
19,1200,183.5483045
20,1200,183.8551277
21,1200,177.923716
22,1200,167.7081726
23,1200,154.8998108
24,1200,141.3471672
25,1200,134.1808388
26,1200,126.8244091
27,1200,121.6745926
28,1200,80.85182495
29,900,0
30,600,0
31,600,0
t,Engine speed,PTO Torque
# [s],[rpm],[Nm]
0,600,40
1,600,47
2,900,47.87750416
3,1200,47.87750416
4,1200,67.91951027
5,1200,103.5934139
6,1200,142.5363262
7,1200,166.111409
8,1200,171.0628326
9,1200,165.0796753
10,1200,158.6919685
11,1200,153.2632141
12,1200,144.49562
13,1200,135.5139389
14,1200,131.4482469
15,1200,128.4894196
16,1200,131.626042
17,1200,153.7727524
18,1200,175.9667
19,1200,183.5483045
20,1200,183.8551277
21,1200,177.923716
22,1200,167.7081726
23,1200,154.8998108
24,1200,141.3471672
25,1200,134.1808388
26,1200,126.8244091
27,1200,121.6745926
28,1200,80.85182495
29,900,0
30,600,0
31,600,0
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