Generating force feedback from slip angle data?

Started by
2 comments, last by ikt 2 years, 4 months ago

Hi there!

Context:
I've been developing a plugin to add steering wheel support to a game, and force feedback is a natural part of it. The current implementation is a naive one based on the vehicles' velocity vector, and the force feedback makes the players' wheel turn the car wheels towards that direction, which emulates the self-aligning torque. Paired with some extra logic to add road surface detail and other effects, this works quite well and drives convincingly. I've not received negative feedback on this method.

Problem:
Recently, I've been attempting to extract more data from the game, to provide a more accurate force feedback model. The core in this is the slip angle, but I've been unable to find proper fields until very recently. I hope someone here could help me on the right track, with the limited data I've been able to get from the game.

From the vehicle instance, I can access four wheel/suspension objects, which have fields that describe the wheel. Two fields caught my interest:

  • One vector that indicates the wheel's world velocity
  • One vector that indicates where the wheel is applying force towards - with the amplitude being the velocity-at-tire of said wheel.

If I take the angle between these, I get the slip angle. While this might not be the ideal way to get it, I think it's accurate (enough) after checking with edits to the vehicles' optimum slip angle.

Now my force feedback value is composed of the following values:

  1. A value based on the ratio between the actual slip angle and optimum slip angle
  2. A value based on the lateral distance between these two vectors

With 1. implemented, the overall steering feel is great, but at very low speeds, the force ramps up in random directions as the angle calculation reaches implausible numbers.
With 2. added, the random spikes at low speeds disappear, but the feeling around zero slip angle is vague. Additionally, it's harder to feel when the car starts to lose traction (understeer) or transition into oversteer.

So in short, I have the direction of the force, but no real idea what the amplitude of the force should be. Can I distill more information from those two vectors I get from the game? How is this torque-at-the-steering-wheel built up in other games/simulators?

Thanks in advance ?

Advertisement

ikt said:
If I take the angle between these, I get the slip angle. While this might not be the ideal way to get it, I think it's accurate (enough) after checking with edits to the vehicles' optimum slip angle.

This is exactly how we calculate the slip angle ?
The angle between the direction of the wheel is moving and where the wheel is pointing.

Regarding force feedback, usually the used tire formula can provide the self aligning torque too, which not only depends on slip angle, but also tire load and camber.
Better FFBs use more physical based approach, using kingpin offset, caster angle and pneumatic trail.

ikt said:
With 1. implemented, the overall steering feel is great, but at very low speeds, the force ramps up in random directions as the angle calculation reaches implausible numbers.

That's something you have to deal with all the time. Most tire formulas start to get unstable below 5 m/s, so this vibration shows up in force feedback too. I simply start damping the applied steering wheel torques as the speed decreases.

For reference, this is a typical relation between the FFB torque and the slip angle.

Self − Aligning Torque and Lateral Friction coefficient for aircraft tire.  | Download Scientific Diagram

Thanks for your reply ?

Looks like what I have is a decent approach after all, then. I've settled on the first method described, with some basic processing for loads, longitudinal slip and some dampening for low speeds, which works great.

I might look into implementing the Pacejka tire formula as that seems to only need slip angle, slip ratio, load and camber, which I all have too. But it's reassuring that's all I seem to need.

This topic is closed to new replies.

Advertisement