My VESC package, Trick and Trail, is now available (for self-balanced boards)

The primary innovation in the Trick and Trail Package is the throttle and brake control. In Balance and Float Packages we see that the throttle and braking control is governed by a PID loop. PID stands for proportional, differential, and integral and these factors apply to the board angle and cycle time to determine the current output. In general, boards that feel unstable have high differential and integral factors. These factors are time related so that the more time the board spends at a certain pitch angle, the more impact these factors have on the output of the motor. The feeling they create is generally referred to as “trottery”, after the Chinese knock off, the trotter.

As Float package has evolved Surdado has been able to remove the trottery feeling by removing the differential factor, reducing/limiting the integral factor, and depending largely on the proportional factor for current output. This allows for a predictable current output with minimal overshoot. However, it is limited in that it only has proportional and integral factors as the primary controls (although there are many other factors you can play with).

The solution that Trick and Trail implements can be considered to be multiple proportional factors and no integral or differential factors. Instead the user decides specifically what current they want at what pitch angle. For example, we can say at 1 degree we would like 20 A output. This would be equivalent to a proportional kp of 20. If that was the only point we defined this would feel just like Float package with Angle P 20 and I of 0. But we have 6 points we can define. So instead let’s define 1 degree of pitch as 10A and 2 degrees of pitch as 40A. That means from 0 to 1 degrees we will have a kp of 10A/1=10. Then from 1 to 2 degrees our kp will linearly scale from 10 to 20 (40A/2). Then above 2 degrees it will continue with a kp of 20 so that 3 degrees gives us 20 * 3 = 60A.

wow. that’s pretty cool to think about.

2 Likes