Thursday, June 15, 2017

Technically Sound(ing) - Balancing the Heavyweights

Simulation of suspension and weight distribution


For well over a year, our programmers and testers have been spending a huge amount of time and effort with the goal of bringing more interesting cargo and trailer combinations into our games, adding proper support for one of the most requested features: doubles, heavy cargo, advanced and multi-joint trailers.

You may wonder why this feature, in particular, should be so difficult and demanding to pull off. After all, we had reasonably working road trains in one of our earlier sims in the 18 Wheels of Steel series games. But the fidelity and accompanying complexity of our physics simulation has increased by an order of magnitude since then. Making sure all things are in balance and in sync is getting more complex as well. Efficient physics of the trailer where many wheels are touching the road is proving to be a tough task; we had to iterate a lot, especially with cargo weight distribution and accompanied suspension loads.


Over its lifetime, a trailer will carry thousands and thousands of tons of cargo, ideally while operating with as little maintenance as possible. To withstand the harsh demands, and to deliver the load to its destination safely, it is crucial to observe the weight of the cargo. If you overload a trailer, or if you do not balance the weight right, it may cause damage to the trailer, its suspension or wheels, it may damage the road, and most importantly, it will make it unsafe to operate. With the never-ceasing demand to transport more and heavier cargo, the transportation industry has adopted new solutions to overcome the technical and legal limitations, in most cases centering around adding more length and axles to the tractor and semi-trailer .

It is not just about the number of axles though, it is about where they are and how trailer as a whole behaves while under load. There are considerable differences between North America and Europe.

In Europe, the legislative push is to limit the overall length of the truck and trailer combo, while making sure the total weight is distributed such that no wheel is pressing on the road surface too hard. Ultimately, this has lead to adding axles to the rear of the tractor as well as adding them generously under the relatively limited-length trailer. As engineers realized that putting more wheels next to each other causes problems with tyre scrub (due to high lateral friction, a paper about the topic here, chapter 2.1.3), a creative solution was adopted, making the wheels follow the turn or even steerable.



On the other hand, in the USA, the regulation is a bit more flexible about total truck length. There are still tough restrictions regarding weight on each axle, but there is also legislation in place making sure that the weight is not concentrated over a short length, pushing to increase the distances between the axles. The engineers, in turn, made the trailers longer to spread the weight in such way that it will comply with Federal Bridge Formula (source). To lessen tyre wear and to make it possible to make turns in reasonable fashion, trailers with multiple pivot points were adopted.



The primary duty of suspension is keeping the wheel on the road. It is effectively pushing the wheel into the ground to make sure that friction caused by wheels is sufficient to either brake or to corner. It is also in place to absorb the energy of impacts from road bumps, potholes, uneven roads or unexpected shifts of weight caused by side wind. The suspension system has to be incredibly durable, each axle has its own suspension system which takes care of the load on each wheel separately, working as a dynamic system absorbing energy from the environment. There are several types of suspensions used in cargo transportation, but this may deserve a future topic of its own.

Brakes are arguably the most critical part of a vehicle. Either from standpoint of safety of others on road, or safety of the cargo, we all want them to work as intended. With multiple axles on the vehicle, each axle has to have its own brake system.

By far the most complicated problem we encountered was the distribution of weight along the multiple axles and pivots of new trailers. We had to rework weight distribution algorithms in order to make it work for new trailers and to make sure that old ones wouldn't be negatively affected. Our constant battle with the numerical stability of the suspension simulation code is far from over.

During testing and tuning, we encountered many issues, some quite hilarious, especially when we had to (re)learn backing and reversed steering. We had a lot of fun debugging it. In general sense, it was all about making the behavior of the trailer appear to work correctly with the player's input. That proved to be the largest challenge for us, especially with steerable trailers for ETS2. We definitely enjoyed working on them immensely. In the end, our determination, grit, and dedication prevailed, and it was a very proud moment for us to share our experience and the final product of our tireless effort with all of you!

No comments:

Post a Comment

Spam, offensive, hateful and other inappropriate comments will be removed and authors may be permanently restricted from commenting.

Note: Only a member of this blog may post a comment.