Velocity control for flywheel

I just got my robot to shoot full-field by increasing the gear ratio. Here’s a video of it in action:

I’m expecting a significant amount of battery drain even during a single match because the robot’s flywheel will be spinning at high speed the entire match. The battery drain is known to have a gradual negative effect on my flywheel’s speed. Therefore, I’m considering implementing some form of velocity control on my robot to adjust for the battery drain over time, and to also ensure a consistent shot every time.

I’m new to velocity control, so I’ve researched on the forums and I came up with the following methods:

  1. The PID control option in ROBOTC.
  2. TBH (Take Back Half) by James Pearman.
  3. Bang Bang.

I already know how Bang Bang works. It’s switching between two states (in my case, the flywheel motor power levels) based on a single condition (i.e. is flywheel spinning above or below a certain speed?).

I want to know what important things I need to know about using each control method, and the pros and cons of each. I do get that there has to be some fine tuning involved, but that’s beside my point here. Based on the video, what do you think I should use?

I would use take back half for flywheels as a general rule. It’s easier to tune and a flywheel models the ideal system for tbh better than for pid. If you have ratchets in your gear box, you could use bangbang but you have to be careful of stalls due to overworking the motors.

Overall we have found that a well tuned PI loop is better than TBH. The best way to find what’s best is to just try all of the velocity controls and see what works best.