Lightweight Shooter PID Tuning

We are currently having a few problems getting our flywheels to keep at a constant RPM. We have tried both a Bang-Bang controller, the Talon SRX’s built in speed PID, and even the standard LabVIEW PID controller. I’m thinking that our wheels are too light, but would like a second opinion on this.

Current setup:

775 Pro Motor
3:1 Versaplanetary Gearbox
Versaplanetary Integrated Encoder installed after the 3:1 stage (between the stage and output shaft)
Andymark 4" plaction wheel with hex hub direct driven off the gearbox

The encoder gets a clean signal in (verified by using just the joystick to drive the motor). When we use the CTRE speed example, the flywheel oscillates back and forth. We also tried using the LabVIEW PID with a high output of 1 and a low output of 0. We got better results with that, as it did not constantly kick back and forth. When trying the bang-bang controller, the motor would overshoot the desired RPM almost instantly, then stop outputting altogether until it dropped back below that RPM, effectively pulsing the motor over and over.

We were able to get closest with the LabVIEW PID function, but it would still pulse constantly. High P numbers would get it to take off too fast and pulse at a slower rate. Low P numbers (very low, like .00001) would even out the pulses to a point, but eventually would not even drive the motor due to it being too low.

Any help, whitepapers we should look at, etc. would be greatly appreciated. We are at the point where we would almost just scale the voltage instead of the speed control. Should we add weight inside the wheel to give it a bit more momentum?

What are the complete values for Kf,Kp,Ki,Kd ?

Oscillating suggests too large of a p-gain, which might be overcompensating for a weak f-gain.

The LV loop works better likely because you set the min output to ‘0’, which means you are likely overshooting the RPM.

You can do the same thing with Talon SRX by using the “TALON - CONFIG PEAK OUTPUT”.vi and setting in the “Reverse Peak Output” to ‘0’.

Try freshly calculating the F-gain (zero P, I, and D) and start with that (no load).

Then test at various RPMs to see what your error is like. Then start increasing P until the closed-loop begins to oscillate (then back off).

So this is going to sound really dumb, but I think I have it figured out now. Instead of selecting true on the “Reverse Sensor Output”, I had selected true on “Reverse Closed-Loop Output” instead. Now, with values of 0.1 for P and 0.05 for F, it is within 20 RPM of the target.

Thank you for your replies!