Makes sense. Love the Shuffleboard. I am still confused however how PID would help get over the current draw… if that makes sense. Is the idea a faster recovery?
Are you certain this is actually the behavior you are seeing and not that the ball entering the shooter is reducing its speed? Do you observe this behavior running the shooter and feeder with no ball? It seems unlikely that the shooter would slow noticeably that quickly since it’s a flywheel, unless it is very light.
Assuming that you don’t need 100% power to keep your shooter at speed with no load, a tuned PID will back off on the shooter voltage when it sees that the shooter is up to speed, and then apply more voltage when it sees that the shooter is slowing down (because it just shot a ball, or the battery is getting soft).
If you are running the shooter motors at 100% now, PID won’t (and can’t help), and your decision becomes “do we want a very powerful shooter whose speed varies?” or “do we want a less powerful shooter that is consistent?”… though with 2 CIMs, I’d be surprised if you are anywhere near 100% voltage under no load…
Right now you have no recovery at all. In simplistic terms your velocity PID loop motor output looks something like this:
output = kF + (kP * error)
Where kF represents a FeedForward term, and (kP * error) represents a proportional response to the error.
If you have kP set to 0, then you’ll notice that your PID loop actually provides no help to maintain your velocity closed-loop, because despite the error, your kP is 0 thus will never help adjust the motor output to compensate for the error.
Another important piece of all of this, is that if your kF is completely saturating the motor (running it at or near 100% output) then no matter what your kP, kI, and kD values are, your PID loop can never recover from the error because there’s no ceiling for motor output left.
The advice to gear your shooter in a way that allows you to run it at some percentage 1/2 - 2/3 of motor without the sag is good. That leaves you 1/2 - 1/3 motor output possible to help you overcome the error from things like the feeder motor starting, or friction of the balls entering the flywheel.
I highly suggest reading through the CTRE documentation on Closed-Loop control modes.. It gives you the basic steps you need to follow in order to tune your velocity PID. If you’re using TalonSRX motor controllers, then it even gives you the math you need to figure out what your starting kF and kP values should be. Once you have those, you may not even need a kD depending on how your shooter is functioning.
Shooter does not need 100% power, its power is relatively high but not 100%. I figuredwith the other motor on we just couldn’t satisfy the current requirements… but sounds like I could be wrong
Makes sense. Unfortunately I think we are going to be running our shooter around 93% of full power. Hopefully that isn’t too high… I worry it is…
It all depends on the shooter itself.
We for example with our shooter observe about a 20% reduction when the ball hits the shooter from the intake. We are only running at about 40% so there’s plenty of motor ceiling left to compensate for the erorr so we can get all our shots out consistently scoring.
Good luck with yours.