Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

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

bugfix max speed calculation for e-motor, further fixes for PEV

revert changes in velocity gearshift preprocessor
correct name of generated file in testcase
parent c6d35dc8
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public PowertrainPosition Position { get; }
public PerSecond MaxSpeed
{
get { return _maxSpeed ?? (_maxSpeed = ModelData.FullLoadCurve.FullLoadEntries.MaxBy(x => x.MotorSpeed).MotorSpeed) / ModelData.Ratio; }
get { return _maxSpeed ?? (_maxSpeed = (ModelData.FullLoadCurve.FullLoadEntries.MaxBy(x => x.MotorSpeed).MotorSpeed) / ModelData.Ratio); }
}
public Watt DragPower(PerSecond electricMotorSpeed)
......@@ -192,6 +192,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
emTorque = 0.SI<NewtonMeter>();
}
if (Position == PowertrainPosition.BatteryElectricE2 && !DataBus.GearboxInfo.GearEngaged(absTime)) {
// electric motor is after the gearbox but no gear engaged - ignore inertia and drag...
emTorqueDt = 0.SI<NewtonMeter>();
emTorque = 0.SI<NewtonMeter>();
}
if (ElectricPower == null || emTorqueDt == null) {
// no electric system or EM shall be off - apply drag only
// if EM is off, calculate EM drag torque 'forward' to be applied on drivetrain
......@@ -218,8 +224,8 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
var electricSupplyResponse =
ElectricPower.Request(absTime, dt, electricPower, dryRun);
if (!dryRun && !(electricSupplyResponse is ElectricSystemResponseSuccess)) {
if (!emOff && DataBus.HybridControllerInfo != null && !avgEmSpeed.IsEqual(DataBus.HybridControllerInfo.ElectricMotorSpeed(Position))) {
if (!dryRun && !emOff && !(electricSupplyResponse is ElectricSystemResponseSuccess)) {
if (DataBus.HybridControllerInfo != null && !avgEmSpeed.IsEqual(DataBus.HybridControllerInfo.ElectricMotorSpeed(Position))) {
return new ResponseInvalidOperatingPoint(this);
}
throw new VectoException(
......
......@@ -155,7 +155,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
acceleration, delta, Constants.SimulationSettings.OperatingPointInitialSearchIntervalAccelerating,
getYValue: response => {
var r = (ResponseDryRun)response;
return r.Clutch.PowerRequest;
return r.Gearbox.PowerRequest;
},
evaluateFunction: acc => {
var response = vehicle.Request(time, simulationInterval, acc, gradient, true);
......@@ -164,7 +164,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
},
criterion: response => {
var r = (ResponseDryRun)response;
return r.Clutch.PowerRequest.Value() * 100;
return r.Gearbox.PowerRequest.Value() * 100;
},
abortCriterion: (response, cnt) => {
var r = (ResponseDryRun)response;
......
......@@ -496,7 +496,7 @@ namespace TUGraz.VectoCore.Tests.Integration.BatteryElectric
const bool largeMotor = true;
var modFilename = string.Format("SimpleParallelHybrid-B2_cycle_{0}-{1}_{2}_{3}", declarationMission, initialSoC, payload, pAuxEl);
var modFilename = string.Format("SimpleBatteryElectric-B2_cycle_{0}-{1}_{2}_{3}", declarationMission, initialSoC, payload, pAuxEl);
const PowertrainPosition pos = PowertrainPosition.BatteryElectricE2;
var job = CreateEngineeringRun(
cycle, modFilename, initialSoC, pos, 2, 2, largeMotor: true);
......
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