The official short shifting bench racing thread

http://i.kinja-img.com/gawker-media/image/upload/s--_uZzxyxN--/c_fit,fl_progressive,q_80,w_320/18z9znpvodo2bpng.png

:o Please move on if you aren’t interested in keyboard racing, this thread will serve as an attempt to answer the question: “How much does short shifting really hurt 1/4 mile performance on a B8.5 S4”

The main motivation for this came from dparms thread on thrust curves for the facelift vs pre-facelift DSG cars here http://www.audizine.com/forum/showthread.php/510547-2013-DSG-has-different-gear-ratios-than-2012-DSG?p=8120455&viewfull=1#post8120455. He was nice enough to supply me with source data from some dyno pulls he had. I believe it was stasis stg 1 flash.

The key to this argument is to understand the RELATIVE changes in performance, not to match/predict real-world performance.

Assumptions (there are going to be a shit load of them)

  1. Constant rolling friction with coefficient of friction 0.017;
  2. Approximate air drag, parameters are taken from here: http://www.carfolio.com/specifications/models/car/?car=268598
  3. Dyno figures will be supplied with each simulation and assumed to be torque at the wheels;
  4. Transmission is forced to keep min 4000 RPM (configurable actually), prevents motor from “bogging” down at launch;
  5. The launch is shitty, there is no tire model here, so this aspect is easily the weakness.
  6. Car weighs 4150 lbs with driver (rest of physical parameters can be seen in simulation code).

Methodology

Using newtons laws to compute total longitudinal forces, and simulate until reaching 1/4 mile distance. Compute the gear shifts based on ratios provided by dparm, have the option for including the short shifting. Here is a basic list of the functions

gear = checkShiftMap(currentGear, RPM);
powertrainTorque = engineTorque(RPM) * TransRatio(gear) * FD_ratio;
totalForce = powertrainTorque * tireRadius - rollingFriction - airDrag;

Keep in mind that the accuracy of this is also a function of the dyno I have, which after plotting some HP figures, seems a little strange on the top end. Would be nice to get better data if anyone has it.

Here’s what I get if I assume a dyno of this

https://farm4.staticflickr.com/3894/15160385015_5644421057_b.jpg

Short Shifting DSG = 11.86@116.37 with 60 ft 1.84 sec

https://farm4.staticflickr.com/3900/15159997792_1f7f2b4326_b.jpg

Shifting at 7200 RPM = 11.58@118.66 with 60 ft 1.83 sec

https://farm4.staticflickr.com/3867/14973808187_ea5811f424_b.jpg

This gives an idea of the thrust curve at the wheels (where the dotted green includes drag and rolling friction)

https://farm4.staticflickr.com/3923/15157406841_992a3f98b3_o.jpg

So according to this math, the DSG short shifting is costing a stg 2 car (most likely running a race tune) .3 seconds in the 1/4 mile and 2.4 MPH in trap speed. Seems reasonable to me. Might be better if we have better dyno source data, I asked Arin but he didn’t reply to my PM.

TL:DR There is no shortened version, this is AR ;D

I will include the code below so anyone else can run it in MATLAB, there are absolutely bugs to be found. I place the functions in separate files, you’ll need the signal processing toolbox to call the statistical spline function csaps.

Edit - adding this

But here is easily the most important comparison of the powertrain force at the road, the blue signal is the normal shifting, while the red is from the short shifting trans. The short shifting means that you are sooner in a higher gear, and thus even though the torque at the flywheel might be greater, the taller gear means you have less force at the road. Taking the integral of the difference in these two traces should correspond to the difference in speed, modulo the difference in drag force.

https://farm4.staticflickr.com/3881/15138048616_f92c32676b_b.jpg

Here is my code, which is reasonably commented, feel free to point out bugs. Like I mentioned in the OP, the functions are saved as separate files (which is how I matlab)

% % % B8.5 S4 Longitudinal Acceleration Simulation
clear all

% % % These are for toggling the simulation settings, boolean switches
shortShift_bool = 1;
tuned_bool = 1;
facelift_bool = 1;

dt = .01; %% Simulation Time Step in Seconds
kappa = 0.290 * 1/2 * 1.2 * 2.20; %% Drag Force — f_d = C_d * 1/2 * rho * A * v^2
vehicleMass_kg = 4150 / 2.2; %%
tireRadius = 26.02 * .0254 / 2;
sixtyFootIndex = 1;
mu = 0.03 * vehicleMass_kg * 9.8; %% Rolling Friction — mu = c * mg
minEngineSpeed = 4000; %% Assume for slip on launch, otherwise, will bog down
correctionFactor = 1.35; %% Use this to tune the dyno for specific application

% % Calculations
engineDyno = getEngineDyno(tuned_bool, correctionFactor);

% % Initialize States
displacement_M = 0;
velocity_MPerS = 0;
engineSpeed_RPM = minEngineSpeed;
gear_enum = 1;
i = 1;

while displacement_M(i) <= (1609.34 / 4)
% % Computer Powertrain Forces
engineTorque_lbFt = ppval(engineDyno, engineSpeed_RPM(i));
engineTorque_NM(i) = engineTorque_lbFt * 1.356;
engiorce_N(i) = getTransRatio(gear_enum, facelift_bool) *…
engineTorque_NM(i) / tireRadius;

% %     Compute Total Force
aeroDrag = -kappa * velocity_MPerS(i)^2;
rollingFriction = -mu;
totalForce_N(i) = engineForce_N(i) + aeroDrag + rollingFriction;

% %     Update Longitudinal States
displacement_M(i + 1) = displacement_M(i) + velocity_MPerS(i) * dt + ...
    1 / 2 * dt^2 * totalForce_N(i) / vehicleMass_kg;
velocity_MPerS(i + 1) = ...
    velocity_MPerS(i) + totalForce_N(i) * dt / vehicleMass_kg; 
i = i + 1;

% %     Update Internal States
gear_enum = checkForShift(gear_enum, engineSpeed_RPM(i - 1), shortShift_bool);
engineSpeed_RPM(i) = max(getEngineSpeed(velocity_MPerS(i), ...
    gear_enum, facelift_bool), minEngineSpeed);

end

for j = 1 : length(engineSpeed_RPM)
if displacement_M(j) >= 60 * 0.3048
sixtyFootIndex = j;
break
end
end
timeVec = dt * (1 : i);
trapSpeed = velocity_MPerS(i) / 0.44704;
disp([‘Quarter Mile Time = ’ num2str(i * dt) ’ sec’])
disp([‘Quarter Mile Trap Speed = ’ num2str(trapSpeed) ’ mph’])
disp([‘Sixty Foot Time = ’ num2str(j * dt) ’ sec’])

figure(1)
clf
plot(timeVec, velocity_MPerS ./ 0.44704)
xlabel(‘Time (sec)’)
ylabel(‘Velocity (MPH)’)

figure(2)
clf
plot(timeVec, engineSpeed_RPM)
xlabel(‘Time (sec)’)
ylabel(‘Engine Speed (RPM)’)

figure(3)
clf
plot(timeVec(1 : end-1), engineTorque_NM / 1.35581795)
xlabel(‘Time (sec)’)
ylabel(‘Engine Torque (lb ft)’)

figure(4)
clf
plot(timeVec, displacement_M * 3.28084)
xlabel(‘Time (sec)’)
ylabel(‘Distance (ft)’)
title([‘Quarter Mile Time = ’ num2str(i * dt) …
’ sec at ’ num2str(trapSpeed) ’ mph, (Facelift, ShortShift, Tuned) = (’ …
num2str(facelift_bool) ‘,’ num2str(shortShift_bool) ‘,’ …
num2str(tuned_bool) ‘)’])

figure(5)
clf
hold on
plot(timeVec(1 : end-1), engiiorce_N)
plot(timeVec(1 : end-1), totalForce_N, ‘g–’)
xlabel(‘Time (sec)’)
ylabel(‘Force (N)’)
legend(‘Engine Force’, ‘Total Force’)

% % Dyno for Engine Model Used

RPM_vec = 3000 : 1 : 7200;
TQ_vec = ppval(engineDyno, RPM_vec);
HP_vec = TQ_vec .* RPM_vec / 5252;

figure(7)
clf
hold on
plot(RPM_vec, TQ_vec)
plot(RPM_vec, HP_vec, ‘r’)

xlabel(‘Engine Speed (RPM)’)
ylabel(‘Dyno’)
legend(‘Engine Torque (lb-ft)’, ‘Horse Power (WHP)’)
title([‘Max Torque = ’ num2str(max(TQ_vec)) ’ lb-ft, Max Horsepower = ’ …
num2str(max(HP_vec)) ’ HP, (Facelift, ShortShift, Tuned) = (’ …
num2str(facelift_bool) ‘,’ num2str(shortShift_bool) ‘,’ …
num2str(tuned_bool) ‘)’])


FUNCTIONS

function gear = checkForShift(gear, engineSpeed, shortShift_bool)

if shortShift_bool
if engineSpeed >= 6200
gear = gear + 1;
return;
end
else
if engineSpeed >= 7200
gear = gear + 1;
return;
end
end

function spline = getEngineDyno(tuned_bool, correctionFactor)

if ~tuned_bool
engineDyno = […
2500 232.5;…
3000 243.75;…
3500 255;…
4000 258.75;…
4500 258.75;…
5000 255;…
5500 240;…
6000 210;…
6500 202.5;…
7000 180;…
7100 180];
else
engineDyno = […
2500 247.5;…
3000 262.5;…
3500 273.75;…
4000 277.5;…
4500 277.5;…
5000 277.5;…
5500 270;…
6000 247.5;…
6500 240;…
7000 228.75;…
7100 225];
end

spline = …
csaps(engineDyno(:, 1) , engineDyno(:, 2) * correctionFactor, .99);

function ratio = getTransRatio(gear, facelift_bool)

if facelift_bool
gearShiftRatios = [3.692, 2.150, 1.406, 1.025, 0.787, 0.625, 0.519];
finalDrive = 3.875;
else
gearShiftRatios = [3.690, 2.240, 1.560, 1.180, 0.920, 0.750, 0.620];
finalDrive = 3.875;
end

ratio = finalDrive * gearShiftRatios(gear);

function engineSpeed_RPM = getEngineSpeed(velocity_MPerS, gear, …
facelift_bool)
tireRadius = 26.02 * 2.54 / 200;

angVelocity_PerS = velocity_MPerS / tireRadius;
angVelocity_RevPerS = angVelocity_PerS / (2 * pi);
crankAngVelocity_RevPerS = angVelocity_RevPerS * …
getTransRatio(gear, facelift_bool);

engineSpeed_RPM = crankAngVelocity_RevPerS * 60;

Interesting.

I would have expected a little bigger difference, but I have extremely little experience to draw from…

I’ve done something very similar using just a perl code (not matlab). Would you mind sending me your input data for the engine (dyno), and the output data and I’ll see if my code results match yours?

Jim G.

Awesome work man, way above my head.

I think .3 would be a good starting point, anyway to calculate the difference in trap speed also?

Interesting way of looking at this that I hadn’t thought of. Cool stuff. Love the logo!

It’s not too bad, just simple newtons law :), just gotta parse through all the code jargon. But at the end of the day it’s just F = ma!

Anyways, the .3 seconds is a starting place I assume, looking forward to what others think and maybe if there are some bugs. If you look next to the times, the trap speed is there, the 11.58 time is 118.66 MPH and the 11.84 is 116.37 MPH, so about a delta of 2.4 MPH.

Sure, sent you an email. Interested in where we differ, there’s a zillion places to screw up the unit conversions. I tried to do all the sim in SI units while a lot of info was given in English.

Will add these to the OP, but provides the best comparison. The first shows the shifting in time.

https://farm4.staticflickr.com/3862/14974500098_b970822813_b.jpg

But here is easily the most important comparison of the powertrain force at the road, the blue signal is the normal shifting, while the red is from the short shifting trans. The short shifting means that you are sooner in a higher gear, and thus even though the torque at the flywheel might be greater, the taller gear means you have less force at the road. Taking the integral of the difference in these two traces should correspond to the difference in speed, modulo the difference in drag force.

https://farm4.staticflickr.com/3881/15138048616_f92c32676b_b.jpg

Looks like we have a few minor differences somewhere…

Short shift :
Mine : 11.84@116.45 with 60 ft 1.82 sec
Yours : 11.86@116.37 with 60 ft 1.84 sec

7100 rpm
Mine : 11.56@118.81 with 60 ft 1.80 sec
Yours : 11.58@118.66 with 60 ft 1.84 sec

When I get some more time I might look into where the differences are, but these are pretty close…

I did notice to get these comparisons I had to use zero as the shift times. I’ve seen numbers like 120ms for shift times, but I’m not sure torque is ever really completely interrupted (?).

Looks like you are using his Stasis dyno map and adjusting it up by 35%? I’ve got some data I pulled from the APR dyno they published - I’ll have to run that and see what it shows… 411hp at the road seems high - APR didn’t show that on their hub dyno…

… So using the APR published wheel values from their B8 tune didn’t make much difference - it’s a little lower since the max HP is 388 and I’m using a 1.0 factor on that. Their dyno is a hub based one, I think, so these would be a little higher since you wouldn’t have the rotational inertia of the wheels/tires (?).

http://i616.photobucket.com/albums/tt241/jgreat_bucket/S5/Logs/accel_compare_zps8e3a88e8.png

Result from my code is 11.65@117.67 with a 1.80 60’ time. So 0.09s and 1.15 mph slower - same 60’.

Comments on what is done.

Like Drob23’s - this is just a rough model using F=ma basics and some estimation of the most important factors.

  • Drag is based on a Cd = 0.27 with 23.68 sq. ft. frontal area (in the S4 media package) and uses standard sea-level conditions for density.
  • Rolling res is from 4150 lbs of weight and using Drob’s 0.03 for the rolling resistance meas.
    • I think that’s probably high, I found numbers more like 0.017, but… /shrug/. Also - neither of the 2 above account for any lift produced and keep these values constant regardless of conditions.
  • Shift times are 0.0 sec, and use the face-lift Stronic ratios. This is a bit generous I think.
  • 4150lb weight might be high depending on how much junk is the car - my S5 was 4035 with a 1/4 tank of gas and me in it at the drag strip (I’m pushing 200 in my old age…:wink: And the DSG doesn’t weigh 115 lbs more than the 6MT I don’t think. My 4035 was completely stock except for PSS tires which were maybe 10 lbs lighter.
  • Rotational inertia effects are not directly modeled - the thought was that engine torque values would already include them.

Great stuff Jim, glad to see our numbers are approximately close. I’ll think about implementing the shifting delay, and yea, I scaled the Stasis dyno because it was for stg 1 and seemed relatively tame compared to what I’ve seen. But what I scaled above might be more of a race tune…also, I think the dyno is somewhat wrong, because of how the HP continues to rise up top. Usually, these tunes seem to roll off torque more to get a flat HP curve.

The nice thing about these methods is we can change parameters or equations to see what might change. Interesting question about the rotational mass, I kind of assumed it to be embedded within the dyno pull, but it might make sense to add them to the model.

In any case, I think we’ll be able to make some “approximate” conclusions on what the implication is for this DSG tune. I think .3-.5 secs in ET seems reasonable, will also be nice to see how this varies for a stock vs stg 2 car vs stg 1 - where the claim has been all the returns are up top. But absolutely tuned stg 2 cars should not be running stock times “because the DSG is short shifting”.

I’ll look at this all again tomorrow, again, thanks for your contributions.

Drob, excellent work and info. Thanks

That is really cool stuff! I’m assuming the dyno numbers would be based on a 100 tune? Can you do a sim based on a 93 tune dyno? That would really help some of the folks with 2014 models get a realistic time range to compare.

I think all dynos are somewhat wrong for this type of purpose - if you are looking to see deltas for a given modification, they are a useful tool - but as absolute #'s – not so much.

[quote=""]
The problem is that you don’t know what the overall rotational inertia is. The dyno does have the drivetrain intertias accounted for at whatever omega-dot the single gear pull did, but 1st gear the losses will be much higher since you are accelerating things much quicker - 6th gear the losses will be less, and if you had a dyno that would just hold RPM to measure torque the inertial effects would be zero.

Maybe adding in the wheels/tires and using the delta from an assumed 4th gear dyno pull would be better, but I’m not sure it’s worth the effort.

I agree this is a good tool for comparing things and looking at relative effects – sort of like a dyno - it’s close enough to give you good feedback, even if it’s not 100% accurate.

Glad to help - this kind of stuff is a fun distraction :wink:

drob, do you have a cousin named Arthur?

quick question - can you define short shifting? It wasn’t explicit. Is that 6200? I believe some of the guys get a 6200 shift and a 5800 2-3. Not sure.

Can you do this on pump gas? A bit more relevant as most go on pump.

ideally

pump gas, and use the short shift + super short shift like some of the guys (the 6200 and 5800). Primetime will know what the sequence is. And use shit DA of about 2000 feet because that’s what these guys are seeing in the summertime.

+karma for a few days. Great read. Sure it’s bench racing, but that’s fine. Nobody in their right mind has anything against bench racing or keyboard calculating. Reality is this is what the scientific method is all about.

It’s not like you’re using this to say ‘ABC is better than XYZ’…you’re trying to estimate performance losses due to a particular limitation (shift RPM).

p.s. nerd! :slight_smile:

Thanks! Like I mentioned in the OP, this is really designed to show what the relative difference in performance might be if you assume the short shifting or change in gearing for the B8’s to B8.5’s. These relative changes might vary if we assume a stock dyno or stg 1 or stg 2 or stg 2 100 oct…but I would never use this tool to predict actual times.

The interesting point we make with these simulations is seeing how the differences affect 1/4 mile runs, rather than debates about how it changes the engine torque/HP (for math geeks, we’re studying the solutions of the differential equations rather than simply the vector fields that define them).

But I don’t think we’ll ever approach modeling true performance numbers, mainly due to how nonlinear the tire is at time of launch. The dyno plots are also kind of garbage. You can see we get 60 fts of ~1.8 sec while guys like Ron and Jeff are seeing ~1.6 sec, which is quite a difference.

An aside - another interesting question might be doing the inverse of what we did, i.e. taking highly telemeterized data and computing the engine torque from the actual performance at the strip. This is kind of what a dyno does, but they have the use data from the movement of the dyno rollers rather than actual longitudinal motion. There’s a reason engineers use engine dynos and quote brake HP.

lol I’ll take that as a compliment, I was actually home sick the other day and got bored (also tired about the speculation on short shifting). I have since modified the shifting logic, you can see it explicitly below. This is kind of what I saw at the strip, shift 1-2 at 5900 and then 2-3, 3-4, etc at 6400. Not short shifting implies shifting at 7200. Jim is doing something similar.

I just got source data for a dyno from Jim which he screen grabbed from APR. Before any 1/4 runs are presented, we’ll show the assumed dyno like you see in the OP. The stasis dyno seems wrong based on how the HP oscillates at the end. Going to add the shifting time delay and change the parameters to more what Jim assumed.

Shifting Logic

function [gear, shiftTimer_sec] = checkForShift(gear, engineSpeed, …
shortShift_bool, shiftDuration_sec, shiftTimer_sec)

if shortShift_bool
if (gear == 1 && engineSpeed >= 5900) || engineSpeed >= 6400
gear = gear + 1;
shiftTimer_sec = shiftDuration_sec;
return;
end
else
if engineSpeed >= 7200
gear = gear + 1;
shiftTimer_sec = shiftDuration_sec;
return;
end
end

OK, here’s the simulation making a couple assumptions

https://farm6.staticflickr.com/5553/14985522457_a635ccd970_b.jpg

  1. APR Stg 2 Pump Gas File taken from B8 dyno here;
  2. Car + driver weight is 4100 lbs;
  3. DSG shifts take .1 sec, during which time, engine torque = 0;
  4. Rolling friction coeff = .017 and C_d for air drag = .27;
  5. There is unfortunately no model for DA, just assume APR dyno is actual (it’s wheel torque, right?).
  6. “Launch Control” is at 3000 RPM and always keeps engine at or above this (no bogging down)

Thanks to Jim for using the tool to pull data, I used the interpolation spline and this is the dyno I get with the sampled internal data:

https://farm4.staticflickr.com/3842/14985590027_8eaa3db860_b.jpg

The numbers end up being pretty close to the APR figure, any error is due to either the lack of resolution in the APR figure, or the fact that I interpolated the data Jim grabbed.

Here are the results for a tuned B8.5 vs a tuned B8.5 with short shifting. The legend shows true as 1 and false as 0.

Distance

https://farm4.staticflickr.com/3836/14985650610_0edc49a397_b.jpg

Engine speed

https://farm6.staticflickr.com/5560/15172309435_903caac00a_b.jpg

Force at the ground

https://farm4.staticflickr.com/3863/15171930192_7451886d17_b.jpg

Next I ran a B8 tuned vs B8.5 tuned short shifting (the B8 has shorter gearing)

Distance

https://farm6.staticflickr.com/5565/14985616409_ed779dac40_b.jpg

Engine speed

https://farm4.staticflickr.com/3915/15171975142_d120af9ecf_b.jpg

Force at ground

https://farm4.staticflickr.com/3920/15171975102_6f4cb542a3_b.jpg

Comments: The numbers are a little closer, now that I assume 3000 RPM initial launch. I did this because the times seemed too fast (they still do lol). Probably need some better data, if anyone has a good dyno pull that would be helpful. The B8’s are marginally faster if we assume the engines are the same, on the order of .04 sec in et according to calculations (using difference in gear ratios).

Interestingly, Jim pointed out that the dynos are significantly different on APR’s webpage for the B8’s vs the B8.5’s, specifically showing the short shifting issue. Jim, maybe you could post the gif that you made? Is this a way to for APR to blame the Audi gearing on the facelift problems? I probably need to better understand exactly how a dyno works, as my understanding is it shows the engine torque at the wheels, taking into account drivetrain inertia and friction. A pull is done in 4th gear since it approximates a 1-1 ratio, and they remove the final drive ratio?

Here is the comparison gif (animated - should cycle between B8 and B8.5) - I’m not sure how relevant it is, but I think it’s about the only data we have from APR on the B8.5 vs B8… The B8.5 is DSG, and that prevents it from getting to higher revs. I seem to remember Arin saying that the 6MT also had a little bit lower drivetrain loss than the DSG… So - keep in mind that this is NOT an apples to apples, but despite that there may be some info to be gleaned…

Mike - looks like your spline is bad near redline - HP from the APR data should be 388, but since the blip is so small I doubt it changes the results much.

http://i616.photobucket.com/albums/tt241/jgreat_bucket/S5/Logs/30T_APR_compare_zps3a385e45.gif

Very cool guys… I think the launch rpm’s are a little off as the 60’s seem high especially given the et’s and traps… The last set by Jim seem spot on et and mph wise but 60 still seems high… The whole DA throws a wrench into it but if you look at the top times their done in 0 or negative DA’s so it’s pretty close IMO… It’s early so I need to read it again and digest it better! lol Appreciate you guys doing this, again great stuff!