diff --git a/VECTO Changelog.txt b/VECTO Changelog.txt index 944eaa0ba87dd68611ffd7205231d8f616e6024e..c87911b5f0e7da81724507af466f73e42404251a 100644 --- a/VECTO Changelog.txt +++ b/VECTO Changelog.txt @@ -21,8 +21,8 @@ VECTO x.x (current source - next release) o Engages if Pwheel < 0 o Disengages if Underspeed is reached. - Improved gear shift model for torque converter -- Updates in torque converter IN DEVELOPMENT - +- Updates in torque converter [IN DEVELOPMENT] +- Look-Ahead Coasting now uses real coasting also if road gradient > 0 which means the coasting deceleration can be so high that no braking is necessary. In this case the braking phase will be ommitted and the total deceleration time can be shorter than expected by the given target coasting deceleration. diff --git a/VECTO/Input Files/cGBX.vb b/VECTO/Input Files/cGBX.vb index f8d9b575a650f72de3c47a09da80c2b76170a268..8936d6d9bd0f2e61566239f09bdbd150ee85e60b 100644 --- a/VECTO/Input Files/cGBX.vb +++ b/VECTO/Input Files/cGBX.vb @@ -48,7 +48,7 @@ Public Class cGBX Public TC_PeBrake As Single Public TCMout As Single Public TCnout As Single - + Public TCmustReduce As Boolean Public Sub New() @@ -275,7 +275,7 @@ Public Class cGBX End Function - Public Function TCiteration(ByVal nUout As Single, ByVal PeOut As Single) As Boolean + Public Function TCiteration(ByVal nUout As Single, ByVal PeOut As Single, ByVal t As Integer) As Boolean Dim nUin As Single Dim Mout As Single Dim VZ As Integer @@ -289,9 +289,10 @@ Public Class cGBX Dim MsgSrc As String - MsgSrc = "GBX/TCiteration" + MsgSrc = "GBX/TCiteration/t= " & t TC_PeBrake = 0 + TCmustReduce = False 'Dim nUmin As Single 'Dim nUmax As Single @@ -304,23 +305,53 @@ Public Class cGBX 'nUmax = nnormTonU(GBX.fGSnnUp(Mout)) 'Start values: Estimate torque converter state - nUin = Math.Min(VEH.nNenn, nUout * 2) + 'nUin = Math.Min(VEH.nNenn, nUout * 2) + If t = 0 Then + nUin = nUout + Else + nUin = MODdata.nU(t - 1) + End If 'If nUin > nUmax Then nUin = nUmax 'If nUin < nUmin Then nUin = nUmin - nUstep = DEV.TCnUstep - VZ = 1 - lastErr = 99999 - nu = nUout / nUin + + If nu > TCnu(TCdim) Then + nu = TCnu(TCdim) + nUin = nUout / nu + ElseIf nu < TCnu(0) Then + nu = TCnu(0) + nUin = nUout / nu + End If + mu = fTCmu(nu) MoutCalc = fTCtorque(nu, nUin) * mu + nUstep = DEV.TCnUstep + + If MoutCalc > Mout Then + VZ = -1 + Else + VZ = 1 + End If + + lastErr = 99999 + 'Iteration Do While Math.Abs(1 - MoutCalc / Mout) > DEV.TCiterPrec And nUstep > DEV.TCnUstepMin +lb10: nUin += VZ * nUstep nu = nUout / nUin + + If nu > TCnu(TCdim) Or nu < TCnu(0) Then + nUin -= VZ * nUstep + nUstep /= 2 + VZ *= -1 + GoTo lb10 + End If + + mu = fTCmu(nu) MoutCalc = fTCtorque(nu, nUin) * mu If Math.Abs(1 - MoutCalc / Mout) > lastErr Then @@ -330,24 +361,49 @@ Public Class cGBX lastErr = Math.Abs(1 - MoutCalc / Mout) Loop + If nUin < VEH.nLeerl Then MODdata.ModErrors.TCextrapol = "" nUin = VEH.nLeerl nu = nUout / nUin + + If nu > TCnu(TCdim) Then + nu = TCnu(TCdim) + nUin = nUout / nu + ElseIf nu < TCnu(0) Then + + WorkerMsg(tMsgID.Err, "Torque converter creeping not possible with current TC characteristics!", MsgSrc) + Return False + + 'nu = TCnu(0) + 'nUin = nUout / nu + End If + mu = fTCmu(nu) MoutCalc = fTCtorque(nu, nUin) * mu + End If + + + If Math.Abs(1 - MoutCalc / Mout) > DEV.TCiterPrec Then + If MoutCalc < Mout Then - WorkerMsg(tMsgID.Err, "MoutCalc < Mout while nUin = nIdle!", MsgSrc) - Return False - End If + + + If MoutCalc > 0 Then TCmustReduce = True + + Else + + TC_PeBrake = nMtoPe(nUout, Mout - MoutCalc) - TC_PeBrake = nMtoPe(nUout, Mout - MoutCalc) + + End If End If + TCMin = MoutCalc / mu TCnUin = nUin diff --git a/VECTO/MODcalc/cPower.vb b/VECTO/MODcalc/cPower.vb index 872dbd8140847c3e6ba89288b8384be759e92d0a..f388d0dbf68635fa1af31c63694741105430b88d 100644 --- a/VECTO/MODcalc/cPower.vb +++ b/VECTO/MODcalc/cPower.vb @@ -39,6 +39,9 @@ Public Class cPower Private LastGearChange As Integer Private LastClutch As tEngClutch + Public Positions As New List(Of Short) + + Public Sub New() bHEVinit = False bHorEVinit = False @@ -407,7 +410,6 @@ lb10: Dim nU As Single Dim nn As Single Dim vCoasting As Single - Dim Positions As New List(Of Short) Dim Vmax As Single Dim Vmin As Single Dim Tlookahead As Integer @@ -424,6 +426,7 @@ lb10: Dim MsgSrc As String + MsgSrc = "Power/PreRun" 'Check Input @@ -442,6 +445,8 @@ lb10: Gvorg = DRI.Gvorg Nvorg = DRI.Nvorg + Positions = New List(Of Short) + 'Generate Positions List For i = 0 To MODdata.tDim Positions.Add(0) @@ -634,7 +639,7 @@ lb10: If Vh.V(i - 1) - Vh.V(i) > 0.0001 And Not Positions(i) = 4 Then Positions(i) = 1 Next - 'Mark Look-Ahead Coasting Positions + 'Look-Ahead Coasting i = MODdata.tDim + 1 Do i -= 1 @@ -688,7 +693,7 @@ lb10: 'If Vrollout < Vist Then Vh.SetSpeed(j, vCoasting) Positions(j) = 3 - Vh.NoDistCorr(j) = True + ' Vh.NoDistCorr(j) = True Else Exit For End If @@ -701,35 +706,6 @@ lb10: Loop Until LookAheadDone Or i = 0 - 'Correct distance error - 'If t - 1 > 0 Then - ' DistError = 0 - ' For i = t To i0 - ' DistError += (Vh.Vsoll(i) - Vh.V(i)) - ' Next - - ' DistError0 = DistError - - ' Do While DistError - Vh.V(t) > 0 'Math.Abs(DistError - Vh.V(t - 1)) < Math.Abs(DistError) - ' Vh.DuplicatePreRun(t - 1) - ' DistError -= Vh.V(t) - ' MODdata.tDim += 1 - ' Loop - - - - ' 'Vh.Weg(i0) += DistError0 - - ' 'For i = t To i0 - ' ' Vh.NoDistCorr(i) = True - ' 'Next - - ' 'For i = i0 To 0 Step -1 - ' ' Vh.Weg(i) -= DistError0 - ' 'Next - - 'End If - i = i0 End If @@ -949,19 +925,20 @@ lbGschw: GoTo lbGschw - '- Deceleration limit --------------------------- - 'Else - ' 'Check whether Deceleration too high - ' amax = GEN.aDesMin(Vist) - ' If amax > -0.001 Then - ' WorkerMsg(tMsgID.Err, "aDesMax(dec) invalid! v= " & Vist & ", aDesMax(dec) =" & amax, MsgSrc) - ' Return False - ' End If - ' If aist < amax - 0.0001 Then - ' Vh.SetSpeed0(jz, Vh.V0(jz) + amax) - ' GoTo lbGschw - ' End If - '---------------------------------------------------- + + ElseIf FirstSecItar Then 'this is necessary to avoid speed reduction failure + + 'Check whether Deceleration too high + amax = GEN.aDesMin(Vist) + If amax > -0.001 Then + WorkerMsg(tMsgID.Err, "aDesMax(dec) invalid! v= " & Vist & ", aDesMax(dec) =" & amax, MsgSrc) + Return False + End If + If aist < amax - 0.0001 Then + Vh.SetSpeed0(jz, Vh.V0(jz) + amax) + GoTo lbGschw + End If + End If @@ -1013,7 +990,6 @@ lbGschw: ' GoTo lbGschw 'End If - '************************************ Gear selection ************************************ If VehState0 = tVehState.Stopped Or TracIntrOn Then @@ -1233,11 +1209,17 @@ lbCheck: PaGetr = fPaG(Vist, aist) Pkup = PvorD + PlossGB + PlossDiff + PaGetr + PlossRt - If Not GBX.TCiteration(fnUout(Vist, Gear), Pkup) Then + If Not GBX.TCiteration(fnUout(Vist, Gear), Pkup, jz) Then WorkerMsg(tMsgID.Err, "TC Iteration failed!", MsgSrc & "/t= " & jz + 1) Return False End If + If GBX.TCmustReduce Then + Vh.ReduceSpeed(jz, 0.999) + FirstSecItar = False + GoTo lbGschw + End If + nn = (GBX.TCnUin - VEH.nLeerl) / (VEH.nNenn - VEH.nLeerl) Else @@ -1901,7 +1883,7 @@ lb_nOK: Dim Grad As Single - vstep = 0.1 + vstep = 5 nU = fnU(v, Gear, False) Pdrag = FLD.Pdrag((nU - VEH.nLeerl) / (VEH.nNenn - VEH.nLeerl)) diff --git a/VECTO/MODcalc/cVh.vb b/VECTO/MODcalc/cVh.vb index b7d23dbb48d774043ff064dc8ebe6dc7186f3314..b3ba12e67d138b41c24f81b3eaec80de30c58109 100644 --- a/VECTO/MODcalc/cVh.vb +++ b/VECTO/MODcalc/cVh.vb @@ -269,7 +269,6 @@ Public Class cVh End Sub - Public Sub SetMaxAcc(ByVal t As Integer) Dim a As Single Dim v As Single @@ -430,6 +429,8 @@ Public Class cVh lVairBeta.Insert(t, lVairBeta(t)) End If + MODdata.Px.Positions.Insert(t, MODdata.Px.Positions(t)) + MODdata.Duplicate(t) If PHEMmode = tPHEMmode.ModeADVANCE Then @@ -505,6 +506,9 @@ Public Class cVh lVairBeta.RemoveAt(t) End If + MODdata.Px.Positions.RemoveAt(t) + + MODdata.Cut(t) If PHEMmode = tPHEMmode.ModeADVANCE Then diff --git a/VECTO/cDEV.vb b/VECTO/cDEV.vb index d938b10928fa2d34b6124e94085e6550f2c0ec70..035d0cee1a1559581af1e5928dc38417604c76df 100644 --- a/VECTO/cDEV.vb +++ b/VECTO/cDEV.vb @@ -154,6 +154,7 @@ Public Class cDEV Conf0.SingleVal = -0.000001 MyOptions.Add("negFCerr", Conf0) + '**************************** END: Parameters Configuration '***************************** '***************************************************************************************** '***************************************************************************************** @@ -175,6 +176,7 @@ Public Class cDEV negFCerr = MyOptions("negFCerr").SingleVal + End Sub 'Demo for Delegate Function