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.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?
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.