How to calculate torqueScale correctly

Your forum for all discussions around Modding.
User avatar
asyvan
Posts: 549
Joined: Sun Aug 28, 2016 12:21 am
Location: Sweden

How to calculate torqueScale correctly

Post by asyvan »

Maybe a moderator can pin this post?

The way to calculate the torqueScale needs also to use maxRpm and the torque-curve. The torque-curve comes from the normRpm values in the motor section. The value you need, lets call this normTorque, is where the multiplication normRpm * normTorque is at it's highest. In the example below it is torque=0.88 where normRpm="0.86" and I will call these normTorque_max and normRpm_max in the formula.

From a GIANTS Puma with 225 HP:

Code: Select all

<motor torqueScale="0.952" minRpm="850" maxRpm="2200" maxForwardSpeed="53" maxBackwardSpeed="22">
                    <torque normRpm="0.45" torque="0.9"/>
                    <torque normRpm="0.5" torque="0.97"/>
                    <torque normRpm="0.59" torque="1"/>
                    <torque normRpm="0.72" torque="1"/>
                    <torque normRpm="0.86" torque="0.88"/>
                    <torque normRpm="1" torque="0.72"/>
</motor>
The formula is:

Code: Select all

torqueScale = (desired_HP * 30) / (revised_factor * Pi * normTorque_max * normRpm_max * maxRpm)
This formula/torqueScale will give you a HP output in the game (as seen by gsVehicleDebugPhysics) that matches your desired_HP.
Doing the math on this example fits pretty well with the value of 0.952 as indicated above.

Code: Select all

(225 * 30) / (1.3596 * 3.1416 * 0.88 * 0.86 * 2200) = 0.95
In game with gsDebugVehiclePhysics the above Puma CVX 185 with 225 HP shows 225.68 HP. If you use 225.68 in the formula instead of 225 you actually get the exact value 0.952 as configured in the XML.

The revised_factor of 1.3596 that I used in the math example is something I have averaged from several Giants original FS19 vehicles so it should match pretty good. The easiest way is to enter the formula in Excel if you want to calculate the torqueScale for your vehicles and change it.

Here is a Google Spreadsheet I made that you can download or copy in order to calculate this.
https://docs.google.com/spreadsheets/d/ ... sp=sharing
Image

I have recorded a tutorial and explanation of the engine and motor configuration using my spreadsheet and showing in-game that the spreadsheet is consistent and exact to the decimals.

Here is the video:
https://youtu.be/FbGsChHjOFU


Hope everyone interested to learn about engine modding will enjoy it :-)

Remember this post I made a while ago about how to change the XML (and i3D) without restarting your game every time.
How to edit mods without restarting your game viewtopic.php?f=895&t=148588

Good luck.
Last edited by asyvan on Fri Sep 06, 2019 9:15 am, edited 3 times in total.
//Jens Ejvinsson
Farming History: FS11, FS13, FS15, FS17, FS19 (Steam)
Logitech G29, Logitech/Saitek Sidepanel, Logitech F710 Wireless gamepad
PC Gamer - "The Silent Beast" i7-7700K @ 5Ghz, GTX 1070 @ 2.1GHz

Case IH Puma CVX With Tracks
Väderstad Rapid A600-800S Seed Drill
Tutorial compilation for FS19 - list of all my How To guides
User avatar
don_apple
Moderator
Posts: 8049
Joined: Thu Oct 28, 2010 9:31 pm
Location: Planet Earth

Re: How to calculate torqueScale correctly

Post by don_apple »

Thanks for sharing this information. I've pinned the topic as requested so that it doesn't get lost.
Gruß/Regards,
don_apple

Apple iMac 27" (2017), Quad-Core i7 4.2 GHz, 48GB, AMD Radeon R580 8GB
Bitte benutzt das öffentliche Forum für Supportfragen und nicht PN/Please use the public forum for support questions and not PM
FS22 Bugtracker
log.txt Image Server Forenregeln Board rules
User avatar
asyvan
Posts: 549
Joined: Sun Aug 28, 2016 12:21 am
Location: Sweden

Re: How to calculate torqueScale correctly

Post by asyvan »

The spreadsheet is now updated to calculate both torqueScale (if you have a desired HP) and HP (if you have a configured torqueScale)

Check it out at this link:
https://docs.google.com/spreadsheets/d/ ... sp=sharing
//Jens Ejvinsson
Farming History: FS11, FS13, FS15, FS17, FS19 (Steam)
Logitech G29, Logitech/Saitek Sidepanel, Logitech F710 Wireless gamepad
PC Gamer - "The Silent Beast" i7-7700K @ 5Ghz, GTX 1070 @ 2.1GHz

Case IH Puma CVX With Tracks
Väderstad Rapid A600-800S Seed Drill
Tutorial compilation for FS19 - list of all my How To guides
User avatar
asyvan
Posts: 549
Joined: Sun Aug 28, 2016 12:21 am
Location: Sweden

Re: How to calculate torqueScale correctly

Post by asyvan »

Here is how to use the spreadsheet at:
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Assume you are making or changing a mod, and don't know what to enter as:
* torqueScale
* maxForwardSpeed
* minForwardGearRatio

This the motorConfiguration you have (as an example) started with:

Code: Select all

<motorConfigurations>
        <motorConfiguration name="My Tractor Mod" hp="300" price="0">
                <motor torqueScale="" minRpm="850" maxRpm="2200" maxForwardSpeed="" maxBackwardSpeed="22" brakeForce="7" lowBrakeForceScale="0.22">
                    <torque normRpm="0.45" torque="0.9"/>
                    <torque normRpm="0.5" torque="0.97"/>
                    <torque normRpm="0.59" torque="1"/>
                    <torque normRpm="0.72" torque="1"/>
                    <torque normRpm="0.86" torque="0.88"/>
                    <torque normRpm="1" torque="0.72"/>
          </motor>
         <transmission minForwardGearRatio="" maxForwardGearRatio="300" minBackwardGearRatio="32" maxBackwardGearRatio="300" />
</motorConfiguration>
First, start with the torqueScale calculator entering the HP you want (300 HP) and then the maxRpm (2200) and the torque curve.
This will give you the torqueScale (1.266) that you need.
Image

Next, enter the torqueScale in the HP calculator
Enter any value in minForwardGearRatio (like 10) for now.
Image

Last, in Speed Calculator enter the desired max speed in maxForwardSpeed (53 km/h).
This will give you the minForwardGearRatio (13.46) that you need.
Image

Now you have everything you need, and you can create the motorConfiguration like this:

Code: Select all

<motorConfigurations>
        <motorConfiguration name="My Tractor Mod" hp="300" price="0">
                <motor torqueScale="1.266" minRpm="850" maxRpm="2200" maxForwardSpeed="53" maxBackwardSpeed="22" brakeForce="7" lowBrakeForceScale="0.22">
                    <torque normRpm="0.45" torque="0.9"/>
                    <torque normRpm="0.5" torque="0.97"/>
                    <torque normRpm="0.59" torque="1"/>
                    <torque normRpm="0.72" torque="1"/>
                    <torque normRpm="0.86" torque="0.88"/>
                    <torque normRpm="1" torque="0.72"/>
          </motor>
         <transmission minForwardGearRatio="13.46" maxForwardGearRatio="300" minBackwardGearRatio="32" maxBackwardGearRatio="300" />
</motorConfiguration>
Here is your Torque Curve, shown with HP and rpm as calculated by the spreadsheet.
Image

Hope this helps.
//Jens Ejvinsson
Farming History: FS11, FS13, FS15, FS17, FS19 (Steam)
Logitech G29, Logitech/Saitek Sidepanel, Logitech F710 Wireless gamepad
PC Gamer - "The Silent Beast" i7-7700K @ 5Ghz, GTX 1070 @ 2.1GHz

Case IH Puma CVX With Tracks
Väderstad Rapid A600-800S Seed Drill
Tutorial compilation for FS19 - list of all my How To guides
DRandi
Posts: 53
Joined: Tue Jan 08, 2019 7:05 pm

Re: How to calculate torqueScale correctly

Post by DRandi »

One suggestion. I would change the name of the final graph from torque curve to power curve. It would help eliminate nomenclature confusion.
astro80
Posts: 40
Joined: Sat Jun 04, 2016 6:31 pm

Re: How to calculate torqueScale correctly

Post by astro80 »

Thank you
DRandi
Posts: 53
Joined: Tue Jan 08, 2019 7:05 pm

Re: How to calculate torqueScale correctly

Post by DRandi »

No, thank you for the graphs and illustrations. 😁
User avatar
asyvan
Posts: 549
Joined: Sun Aug 28, 2016 12:21 am
Location: Sweden

Re: How to calculate torqueScale correctly

Post by asyvan »

Spreadsheet updated. If you have copied/download it previously, check it out again.
https://docs.google.com/spreadsheets/d/ ... sp=sharing

Image
//Jens Ejvinsson
Farming History: FS11, FS13, FS15, FS17, FS19 (Steam)
Logitech G29, Logitech/Saitek Sidepanel, Logitech F710 Wireless gamepad
PC Gamer - "The Silent Beast" i7-7700K @ 5Ghz, GTX 1070 @ 2.1GHz

Case IH Puma CVX With Tracks
Väderstad Rapid A600-800S Seed Drill
Tutorial compilation for FS19 - list of all my How To guides
User avatar
asyvan
Posts: 549
Joined: Sun Aug 28, 2016 12:21 am
Location: Sweden

Re: How to calculate torqueScale correctly

Post by asyvan »

First post updated with link to my Youtube video tutorial and explanation of how this works and how to use my spreadsheet. It includes in-game showing the changes as well.
https://youtu.be/FbGsChHjOFU
//Jens Ejvinsson
Farming History: FS11, FS13, FS15, FS17, FS19 (Steam)
Logitech G29, Logitech/Saitek Sidepanel, Logitech F710 Wireless gamepad
PC Gamer - "The Silent Beast" i7-7700K @ 5Ghz, GTX 1070 @ 2.1GHz

Case IH Puma CVX With Tracks
Väderstad Rapid A600-800S Seed Drill
Tutorial compilation for FS19 - list of all my How To guides
Stegei
GIANTS Software | CTO
Posts: 1787
Joined: Sat Jun 09, 2007 10:51 am

Re: How to calculate torqueScale correctly

Post by Stegei »

Thanks for explaining this . Great video and spread sheet.
There is one issue with the peak power calculation if the peak power is not achieved at on of the specified torque curve points but somewhere in the middle (the torque curve values are linearly interpolated). You can for example use the original norm rpm values and replace the torque values with
0.4, 0.6, 0.8, 1.2, 1, 0.6

Your sheet would calculate that the peak power is achieved with rpm 1584 (norm 0.72) and torque 1.2, while the correct peak power is actually at rpm 1716 (norm 0.78) with torque 1.114. (Power@0.72 = 0.72 * 1.2 = 0.864 < power@0.78 = 0.78 * 1.114 = 0.869).

The excel I linked here viewtopic.php?f=963&t=151860&start=15#p1178920 does that correctly.
The "magic" happens in column G where I calculate the rpm at which the peak power is achieved between two interpolation points (curve input values). This is calculated (given the points 0 and 1) as "(normRpm1 * torque0 - normRpm0 * torque1) / (2.0 * (torque0 - torque1))" clamped to normRpm0/normRpm1 if the two torque values are different. If they are identical, the value should be normRpm1.

You should be able to replace this quite easily in your sheet by replacing column W with this formula and making the other calculations in V and X based on column W.
User avatar
asyvan
Posts: 549
Joined: Sun Aug 28, 2016 12:21 am
Location: Sweden

Re: How to calculate torqueScale correctly

Post by asyvan »

Stegei wrote: Fri Sep 06, 2019 12:03 pm The excel I linked here viewtopic.php?f=963&t=151860&start=15#p1178920 does that correctly.
The "magic" happens in column G where I calculate the rpm at which the peak power is achieved between two interpolation points (curve input values). This is calculated (given the points 0 and 1) as "(normRpm1 * torque0 - normRpm0 * torque1) / (2.0 * (torque0 - torque1))" clamped to normRpm0/normRpm1 if the two torque values are different. If they are identical, the value should be normRpm1.
Fantastic. Thanks, I knew it was (well, I assumed it was) like this but I could not figure out how to calculate it. It took me a while even with your formula above to understand it, I don't have Excel so I had to find a way to view your spreadsheet.

So I modified my spreadsheet with your formula for interpolating a new normRpm. Thank you for your help.

For users that already have used, or are using, the spreadsheet prior to this modification:
- The error is very small, and only occurs at some changes of the torque curve.
//Jens Ejvinsson
Farming History: FS11, FS13, FS15, FS17, FS19 (Steam)
Logitech G29, Logitech/Saitek Sidepanel, Logitech F710 Wireless gamepad
PC Gamer - "The Silent Beast" i7-7700K @ 5Ghz, GTX 1070 @ 2.1GHz

Case IH Puma CVX With Tracks
Väderstad Rapid A600-800S Seed Drill
Tutorial compilation for FS19 - list of all my How To guides
User avatar
O Baude
Posts: 748
Joined: Sun Mar 03, 2019 12:36 am

Re: How to calculate torqueScale correctly

Post by O Baude »

Fantastic work! Thanks for doing this.

Only one remark. Is it possible, that this spredsheet will be interated one day into a single program?
That it will be possible one day, to use the intern calculations offline?
Where the dll's of the programm are also included inot the programm itself?
Means only one exe, wihout any setup routine. Par example LS19_TorqueScaleCalculator.exe.
This prevents, when Excel is updated by Microsoft, that this excel spreadsheet must also be updated. And that the program is usable even in 10 years.
User avatar
Unknownerr
Posts: 120
Joined: Sat Nov 24, 2018 3:40 pm

Re: How to calculate torqueScale correctly

Post by Unknownerr »

I looked at Ideal combine config and used spreadsheet and i get smaller results than in stock combine config. Torque scale is same as in spreadsheet rpm is a bit lower its weird why i get lower results and when i enter torque scale into hp calculator i get lower hp
User avatar
Unknownerr
Posts: 120
Joined: Sat Nov 24, 2018 3:40 pm

Re: How to calculate torqueScale correctly

Post by Unknownerr »

And if i understand correctly revised_factor can vary with some vehicles? I used 1.2922 so it match with in game config for that combine. Btw thanks for this formula i was searching a lot for how to calculate TS in FS19
HeinPk
Posts: 3
Joined: Tue Dec 10, 2019 2:09 am

Re: How to calculate torqueScale correctly

Post by HeinPk »

Is there one for calculating maxForce for implements? Could someone create one?
Post Reply