Page 2 of 2

Re: Best sine parameter to vary for traction control?

Posted: Mon Mar 06, 2023 12:42 am
by catphish
cloudy wrote: Sun Mar 05, 2023 6:51 pm A few questions come to mind:
  • Do you correct at a flat rate per cycle, linearly against error size or even apply some exponent?
  • Do you pull / return throttle at the same rate?
  • Do you have hysteresis or just set a target well outside of "straight and steady" slipAngle noise?
Firstly, I should clarify that my algorithm is limiting current, not wheelspin, and it runs in the main inverter loop at 8.8kHz, so things are going to be a bit different compared with running the algorithm at 100Hz, however I hope the same principles apply.

1) I apply a correction that is linear multiple of the error error.
2) My algorithm *can* increase and decrease at different rates, but using the same rate is fine for most circumstances.
3) There's no hysteresis, but because correction is a multiple of error, when everything is okay, the corrections are negligible.

For example, in your case, if the slip is 20% then the throtmax can be assumed to be correct, so no change is required. If it was 40% then you would decrease throtmax twice as fast as if it was 30%.

I hope this makes sense, and I'll be interested to know if this helps. You'll still be contending with throttle ramps of course, but hopefully this will smooth things out.

Re: Best sine parameter to vary for traction control?

Posted: Sat Mar 11, 2023 2:48 pm
by cloudy
Not able to get as close with an integral approach, tried a few things. Probably need to look towards PID - the derivative should prevent the overshoot both of these approaches give.
tcutest5.JPG

Re: Best sine parameter to vary for traction control?

Posted: Sat Mar 25, 2023 2:51 pm
by cloudy
Back to testing this. This time implemented a full PID controller.

Parameters need a fair bit of tuning, but best result yet. Still oscillating but slip angle was kept within 40% - current is being pulled back within 50ms of the slip starting, but still takes 200ms to control.
pidmode.JPG