Tune REV Spark Max PID for shooter

If you have a PID loop then it should be able to react any error regardless of the battery voltage. I don’t know if you need to tune your I gain to accommodate the battery voltage.

I agree. The trick is that the F-term and P-term are proportional to battery voltage, so that is the system error that need to be corrected.

1 Like

Also, no one has mentioned it yet, but keep in mind that if you start with f, and then add p, you can get close, but without an I term, you won’t land exactly at your set point.

That’s actually ok. The I term might cause more problems than it’s worth. I would link to a thread discussing it, but I’m typing on a phone.

Without either an f or an I, your final speed might be nowhere near your set point.

Another method you could use is use bang bang and PID control. Basically, you would have a small zone around your target velocity where you would use PID to control your velocity (maybe around 1000-5000 ticks?). If you are not in that zone to use PID, you would just use bang-bang control, which is essentially just setting your flywheel to 100% speed if under the target velocity and 0% if over the target velocity.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.