Modelling Torque and Torque Converters.

Speed against time(continuous)

Low speed acceleration is actually quiet good, which doesnt make much sense given the vehicle is accelerating in the worst possible gear with the engine completely out of its torque band.

It’s almost like they have tried to model torque multiplication, causing oddly high, low speed acceleration, even when out of band.

Although, the mid to high end appears to be modelled relatively accurately actually, the differences in accel are wayyy too small tho.

+1, engine torque is something that is desperately needed in this game.

1 Like

absolutely dead and buried post but i think they must have some kind of power difference between engines in the game since they specify that engines have power at a certian rpm.

for example the leo 2 has 1500 at 2600rpm, leclerc has 1500 at 2500rpm and the abrams has 1500 at 3000rpm (because turbine). Is the rpm value just for show then or does that mean the leclerc has more power at low rpm and therfore better acceleration? I have alway wondered about this and i would love if people looked into it more.

Note that i forgot but this could be another way to balance the game. I am of the opinion that the tank factors that are classified should be used to balance that tanks since you cant just model them like real life, leaving them open to be changed in whatever way you want. (within realistic margins of course)

You could reenforce the leclerc’s role as a speedy fast accelerating tank by buffing its troque to make it more competitive, since it pales in most aspects compared to the other top tier alternatives.

I did some follow-up experiments on this topic, and here are my results.

Method
I used Pzkpfw III J1, which has no torque converter nor CVT. A gear was selected manually. The vehicle speed and acceleration of a Pzkpfw III J1 were measured on the runway in Cargo Port map. Time for the tank to reach 2 kph from 0kph, 4 kph from 2 kph, 6 kph from 4 kph, … , were calculated from the obtained data, and acceleration for each velocity was calculated. Acceleration characteristics were measured 5 times and obtained acceleration data were averaged.

Results
First, I would like to show one of the raw measurement data.
image
The black line shows the selected gear, and the blue line shows the vehicle speed. Most noticeable in gear 6, the speed curve seems similar to the previous reports in this topic. Similar 5 results were processed and acceleration characteristics of the tank were obtained.

Here’s the relation between tank acceleration and vehicle speed.
image
I must note first that there is a greater error in low gears because the vehicle speed has increased too quickly. However, with all the gear ratios, vehicle acceleration seems to be exceptionally high at low speeds, less than approx. 8 km/h. This threshold velocity seems to be the same for all the gears, and regardless of engine RPM.

I also calculated the powertrain output. Output power can be calculated by multiplying vehicle mass (kg), acceleration (m/s^2) and speed (m/s). This formula ignores the friction that the vehicle receives from the terrain, but I consider it to be a good basis on which we discuss.
image
As seen clearly, peak output seems too small, and greatly differs among each gear. A Pzkpfw III J1 is supposed to have 300 hp peak performance, and the engine output should not be affected by the gear ratio. Of course the vehicle faces more friction at higher speeds, but I think this result cannot be explained solery with friction.

So, I divided the engine output with corresponding gear ratio, which makes no physical sense at all.
image
The “engine output” seems more viable this time. The peak output is more aligned, especially for 5th and 6th gear (purple and brown). For the other gears, the high power range might be truncated, and hence appear to have lower output. Also, it seems that something like “common output power” exist for low velocity regions. From this result, it is likely that the developer team wrongly applied gear ratio not to torque but to output.

I also tried to estimate engine torque. Engine output P = 2πnT, where T is engine torque and n is engine RPM. So engine RPM is needed to calculate engine torque from output power. However, I found out that engine rpm shown in game is not what we can rely on.
image
The engine RPM and vehicle speed are not proportional, even in conditions where the clutch should be fully connected. Engine RPM seems to follow something like n = cgv + n_min, where c is a constant, g is gear ratio, v is vehicle speed, and n_min is the minimum RPM. It should be n = cgv when clutch is fully connected. Also, in-game engine RPM data seems to respond after the vehicle speed changes. This might be to recreate the tachometer response in real life. So I also tried to calculate engine RPM from vehicle speed, but I couldn’t figure out the proportionality constant.

Conclusions
Acceleration characteristics of Pzkpfw III J1 tank was measured on a runway in Cargo Port map.

It is likely that the developer team wrongly multiplied engine output when they implemented gear shift mechanism instead of engine torque. Therefore, this tank has excessive acceleration (torque) with low gears, and low output with high gears. And it was found that the acceleration at low speeds, less than approx. 8 km/h, is exceptionally high. However, this might be necessary to aid tanks to move and rotate at very low speeds. Engine RPM, which seems to be calculated after vehicle speed, is also not calculated correctly. So, let alone engine torque, none of the power output, engine revolution and clutch operations are correctly modeled.

Of course War Thunder is a game, and has to be fun to play. If it is too hard just to move a tank, it would ruin player experience. However, current implementation cannot reproduce the individuality of each tank and is reducing attractiveness.
It will be a hard rework since modification on the base powertrain model will affect all the tanks. But I would love to see tanks with their unique drive systems running around.

6 Likes

Excellent Work, Think you’re on to something.

1 Like

the wolfpack has a 10 speed gearbox lol additional gears indeed

I have been considering about the new powertrain model and how to implement it.

Suggestion on improved model

A petrol tank engine should have a torque characteristic like this.
image
I made it based on the previous experimental result. It produces maximum torque at higher engine revolution to resemble a naturally aspirated petrol engine. It has a peak power of 300 HP, so that I can compare it with Pzkpfw. III J. In the actual implementation, this torque curve has to be modified according to the maximum rpm, the maximum output torque and the corresponding rpm, the maximum output power and the corresponding rpm and the type of engine.

.
The ratio of revs to torque is adjusted by the gearbox, and the vehicle acceleration will be as shown in this graph.
image
The solid lines show the proposed model, and the dotted lines show the experimental result. It is based on the assumption that the powertrain is lossless and there is no drag related to vehicle speed.
The vehicle has obviously high mobility at all velocities compared to the current implementation.

.
So I assumed a transmission efficiency of 65% and recalculated.
image
This time the difference is minimal and there would be no significant change in the game balance. With the current implementation, many tanks struggle to accelerate at medium speeds, but this implementation should alleviate this problem. It has a grater acceleration at high speeds, but this will be compensated for to some extent by drag, which increases as a vehicle speeds up.

.
The problem is how we should model clutch operations. Here’s a torque curve with clutch operation combined.
image
Theoretically, the clutch output torque can be kept at the maximum engine output torque (orange line). However, this is unrealistic as there has to be some margin between the output torque and the maximum torque the engine can produce. The green line shows the output torque when the driver has kept the output torque at 70% of the maximum engine torque, which produces something similar to the current in-game model shown with the red dotted line. (Last time I said that the development team hadn’t modelled clutch operation, but it seems they have. I must applogise to them.)
The driver will first increase the engine revs to the point where it can deliver the maximum torque and gradually connects the clutch plates. Then he will try to keep the output torque and engine revs constant.

.
So, with all the elements above taken into account, the overall powertrain characteristic will look like the graph below. The dashed line shows the experimental data.
image
Powertrain efficiency is assumed to be 65%, the torque transmitted at half clutch is 70% of peak torque, and velocity dependent friction is ignored. Clutch operation is already taken into account.
It seems to have enough low-speed performace at low gears, even without the special processing that the current in-game model has.
At high speeds, this model shows better performance. However, there will be less difference when we take frictions into account.

.
Finally, I would like to present some Java-like pseudocode. I will not claim any rights to this code, so please use it freely.

Spoiler
public final float ENGINE_MAX_HP = 300; // HP
public final float ENGINE_MAX_RPM = 3000; // RPM
public final float CLUTCH_EFFICIENCY = 0.7f; // may depend on crew skill
public final float[] GEAR_RATIO = new float[] { /* actual figure comes here */ };

public final Engine ENGINE = new PetrolEngine(ENGINE_MAX_HP, ENGINE_MAX_RPM);
public final Coupler COUPLER = new Clutch(ENGINE, CLUTCH_EFFICIENCY);
public final Transmission TRANSMISSION = new SequentialGearbox(COUPLER, GEAR_RATIO);

public final float BASE_SPEED_RPM_RATIO = TODO: speed vs transmission output RPM. Calculated based on the gear and sprocket radius.
public final float VEHICLE_MASS = 21800; // kg
public final float TOTAL_EFFICIENCY = 0.65f; // can be adjusted to simulate transmissions which is known to be efficient.

/** Calculates the final acceleration of the vehicle. */
public float (float vehicleSpeed) {
	return TOTAL_EFFICIENCY * 2 * PI * BASE_SPEED_RPM_RATIO * TRANSMISSION.outputTorque(vehicleSpeed * BASE_SPEED_RPM_RATIO) / VEHICLE_MASS;
	// Deceleration from drag has to be subtracted elsewhere
}

/** Returns internal RPM used for indicators and sounds. */
public float engineRpm(float vehicleSpeed) {
	return TRANSMISSION.engineRpm(vehicleSpeed * BASE_SPEED_RPM_RATIO);
}

public static abstract class Transmission { // normal gear box and CVT
	public abstract float outputTorque(float outputRpm);
	public abstract float engineRpm(float outputRpm);
	
	/** Whether the driver should shift up the gear or not on automatic mode. */
	public abstract boolean shouldShiftUp(float outputRpm);
	public abstract boolean shouldShiftDown(float outputRpm);
}

public static class SequentialGearbox extends Transmission {
	private final Coupler coupler;
	private final float[] gearRatio;
	
	private int gear;
	
	public SequentialGearbox(Coupler coupler, float[] gearRatio) {
		this.coupler = coupler;
		this.gearRatio = gearRatio;
	}
	
	@Override
	public float outputTorque(float outputRpm) {
		return this.calculateOutputTorque(outputRpm, this.gear);
	}
	
	public boolean shouldShiftUp(float outputRpm) {
		if (this.gear >= this.gearRatio.length -1) { return false; }
		return calculateOutputTorque(outputRpm, this.gear + 1) > calculateOutputTorque(outputRpm, gear);
		// compare output torque among two states.
	}
	public boolean shouldShiftDown(float outputRpm) {
		if (this.gear <= 0) { return false; }
		return calculateOutputTorque(outputRpm, this.gear - 1) > calculateOutputTorque(outputRpm, gear);
	}
	
	private float calculateOutputTorque(float outputRpm, int gear) {
		float gearRatio = this.gearRatio[this.gear];
		// NOTE: Reverse and neutral gear have to be taken into account.
		float gearInputRpm = outputRpm * gearRatio;
		return gearRatio * this.coupler.outputTorque(gearInputRpm);
	}
	
	public float engineRpm(float outputRpm) {
		return this.coupler.engineRpm(outputRpm * this.gearRatio[this.gear]);
		// Coupler output RPM and transmission output differs in case of CVT.
	}
}

public static abstract class Coupler { // clutch and torue convertor
	public abstract float outputTorque(float outputRpm);
	public abstract boolean shouldDisconnect(float outputRpm);
	public abstract float engineRpm(float outputRpm);
}

public static class Clutch extends Coupler {
	private final Engine engine;
	private final float clutchEfficiency;
	
	private boolean fullyConnected;
	
	public Clutch(Engine engine, float clutchEfficiency) {
		this.engine = engine;
		this.clutchEfficiency = clutchEfficiency;
	}
	
	@Override
	public float outputTorque(float outputRpm) {
		return calculateOutputTorque(outputRpm, this.fullyConnected);
	}
	
	@Override
	public boolean shouldDisconnect(float outputRpm) {
		return this.calculateOutputTorque(outputRpm, false) > this.calculateOutputTorque(outputRpm, true);
	}
	
	private float calculateOutputTorque(float outputRpm, boolean connected) {
		if (connected) return this.engine.outputTorque(outputRpm);
		else return this.clutchEfficiency * this.engine.maxTorque();
	}
	
	@Override
	public float engineRpm(float outputRpm) {
		if (fullyConnected) return this.engine.engineRpm(outputRpm);
		else return this.engine.maxTorqueRpm();
	}
}

public static abstract class Engine { // petrol, diesel, gas turbine.
	private final float maxHp;
	private final float maxRpm;
	
	public Engine(float hp, float rpm) {
		this.maxHp = hp;
		this.maxRpm = rpm;
	}
	public float outputTorque(float outputRpm) {
		return maxHp * this.baseOutputTorque(outputRpm / maxRpm);
	}
	
	/** Normalised output torque curve. Peak performance is 1 HP and maximum RPM is 1. */
	protected abstract float baseOutputTorque(float outputRpm);
	public abstract float maxTorque();
	public abstract float maxTorqueRpm();-
	
	public float engineRpm(float outputRpm) {
		return outputRpm;
		// Some engines like gas turbine with multiple shafts may have different internal engine speed than output.
	}
}

Functions named “acceleration” and “engineRpm” return acceleration and engine rpm used to simulate tank movement. Functions named “shouldShiftUp”, “shouldShiftDown”, “shouldConnetClutch” provide data for automatic mode operation. Gears and clutch are operated after a certain time depending on crew skill.
Priority was given to clarity, so that some parts of the code can be made more efficient. Also, the engine response time is ignored and only gear and clutch operations are considered.

.
Roadmap on How We Proceed Implementation
It would be too large a modification to implement all the engine types and transmission types for every tank. So I suggest we split the problem down into smaller steps, like the following roadmap.

  1. Introduce the new powertrain implementation to all the tanks and see if it needs any adjustments. I think tanks can share the same model at this stage.
  2. Implement mechanisms that have a greater impact, such as torque converter, gas turbine engine and CVT.
  3. Implement elements that give less significant differences, such as the difference between diesel and petrol engines.
  4. Implement tank specific characteristics.
  5. (And the implementation of steering systems may follow.)

Summary
I explained my powertrain model and introduced a pseudo code to show a possible implementation and for clarification.
I think this modelling torque problem needs to be devided into smaller sub-problems like my roadmap. (I’m not sure if I need to post new suggestion threads for each step… Or should we discuss all the steps in this thread?)

1 Like

Imo this is possible, but with simplifications, each engine is assigned an “engine type” which maps to a specific curve shape, based on the fuel type etc…, then the curve is adjusted to fit known points of maximum torque and maximum power, thus a broadly accuracte torque curve can be produced for all vehicles in game, with a format similar to that of aircraft.

1 Like

Really just need torque values since horsepower is derived from torque multiplied by RPM.

Yes it would be converted to torque, but max power gives us another torque value which was my point.

Awesome suggestion +1

I feel like if the torque/power curve isn’t known for an engine, Gaijin could just apply a generic curve depending on the engine type.

However with specific engines that have more well known curves, like the Ford GAA V-8, Gaijin could implement their specific curve.

Engine power and torque curve of Ford V-8 engine from TM 9-1731B.
image

image
(In this graph, I believe Ford is the Ford GAA V-8, GM is the General Motors 6046 twin diesel, and W-2 is the Russian V-2 engine on the likes of the T-34. The graph might not be accurate to other sources on these engines)

1 Like

Yes this is what i am suggesting here

1 Like

I think we’re all saying the same thing:
・introduce generic torque curve based on engine type and adjust it based on several known operating points (steps 2 and 3 of my roadmap),
・and then introduce engine specific torque/power curve if it is known (step 4 of my road map).

1 Like

Are you able to do the power analysis instead with a theoretical torque value?

1 Like

Sorry, but my test result file has somehow been corrupted.
I can restore it by repeating all the process I did last time, but it will take some time (1 or 2 weeks I suppose).

1 Like