Friction Implementation Question


I’m part of the “Custom Shaders Patch” development team for AC. I’m currently working on a sim-physics-based friction/damping model to avoid having to adjust the Simucube (or other wheel) driver friction per-car (since e.g. a car with power steering needs lower friction/damping in driver settings than one without, and having to adjust is quite annoying). However, I’m having a bit of difficulty with the algorithm (oscillating vibration, mainly) for friction.

Was wondering if anyone from Granite would be interested in giving some direction for how the Simucube friction algorithm works, as I’ve found it to be rather good and would like something similar (but physics-based) in the sim.



Figure the silence means “no” but thought I’d bump this in case it’s simply been forgotten. And to clarify, not looking for actual code or a block diagram, just a general overview of the functionality and inputs.

The friction effect implementation in our servo drive products is not something we are willing to disclose right now. However, I can say that the implementation and quality of the effect produced is dependent on the input quality, i.e. in servo drive application, the encoder counts per revolution. What type of input data is available for the effect in AC physics? Is it possible to add low-pass filters there?

1 Like

I can use wheel position and its derivatives (velocity, accel), steering goal output torque (excluding friction and damping), and that’s pretty much it. Filters are a good idea, it’s just that implementation is quite tricky, so averaging filters (which cause a lot of delay and have other problems) are the most accessible. Engine runs at 0.003s per step. I’m not particularly adept with controls engineering, so this is a bit out of my wheelhouse, hence me reaching out.

A parallel question to this is: is there a way to send the Simucube driver a goal friction % from the sim? I could produce a Simucube-only option that’s calibrated to the motor and its drivers to produce a realistic friction torque response, provided I was able to dynamically update the friction% value in the profile at high frequency.

Friction and other effect coefficient calculations in real time are not possible, as every change does cause a slight notch in the effect due to parameter recalculation.

You could use DirectInput friction effect. In Simucube, that can be updated at fast rate, but as DirectInput is based on 16bit axis values and quite coarse granularity, the effects are not ideal and as-per-spec implemented effect on the device side is much too strong for DD wheels.

I thought about DI as well but hadn’t looked too far into it (as it’d need the same calibration as the driver-based idea).

To that end, still preferable to do it within the sim so no calibration is needed.