I was testing some PIDF closed loop speed control on a drive drain motor set. I was observing the command voltage and actual voltage. I notice the actual never rested at zero volts when command was 0.0. I know Close loop tries to close and error but 0.0 is the target and closeLoopError was creeping up too. Is there a deadband setting I’m missing. Break mode is OFF. The command voltage kept creeping up till the motor finally started to move the bot. The only PIDF setting are P=1.2 and F=0.41. I and D are = 0.0 so there should be no I accumulator. I didn’t see movement for 2+ minutes of sitting still so in a match we should never be sitting that long. I’m looking for the few seconds here and there when at rest to save the few watts.
If a CAN Talon is behaving differently than what you expect, all you have to do is perform a self-test (section 2 of the talon srx software reference manual). That provides enough information to deduce why the Talon is doing what it was doing at that moment.
I have looked at the self test to see the PIDF set points and Allowable close loop error. When viewing the page I could not scroll the list. The list seemed to go beyond the bottom of the page but how to view them?
Some quick solutions are
[1] Grab a laptop/PC with a bigger screen.
If you are using WiFi/Ethernet, this is easy enough.
[2] Self Test,
mouse-click the self-test results to give it focus,
select-all,
copy,
then paste into your favorite text editor.
Select-all can be done with the shortcut CTRL+A
Copy can be done with the shortcut CTRL+C
Paste can be done with the shortcut CTRL+V
ClosedLoopErr is way on top, sensor-position is in the top half, I would check those first.
One possible cause: Your sensor “forward” is different from your motor’s “forward,” and thus you actually have an unstable loop that will shoot off to max voltage if you perturb it.
On the plus side, this is very easy to test for and to fix. On the minus side, make sure you test for it with the robot on blocks, or bad things can happen.
Our sensors were out of phase. We used the talonSRX.revercesensordirection (true); PIDF SPEED control for the most part is working satisfactorily. Just at idle and enabled there is a noticeable creep over 2-3 minutes
I still don’t understand what this means. If you are saying the sensor position register is changing while the robot-is-disabled/nothing-is-moving, you should investigate that.
Otherwise my guess (at interpreting your last post) is your closedLoopErr is not quite zero, and therefore the motor output is not quite zero, causing the sensor to move slowly. But again this is easy to prove if you grab the self-test, look at the closedLoopErr and applied output voltage.
I just noticed your FGain is not zero? If you’re doing position closed loop, then why are you setting a nonzero fgain? Or are you doing velocity closed loop?
Yes we are using velocity close loop. We are sending the applied output voltage to the smartdashbiard. It trends like 0.4 >>>>> 0.5 >>>>> 0.8 >>>>> 1.0 and around 1.8 the bot moves. It takes 2 minuts to observe this.