|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
CANJaguar PID tuning in Position mode
Hi all,
This is our first year using CANbus and I was wondering how you guys tune your PID constants for Position mode. We figured out how to do so in Speed mode with our shooter, but the turret right now is a little bit trickier. We got the constants from BDC-COMM before, but the P value seemed a little too high. Our P value ended up being 150.0 with an I value of .4. For the hardware of the turret, we use an encoder with 360 ticks per revolution. Is this normal? If it is not, how do we tune it in position mode? Last edited by Tanaythan : 18-03-2012 at 23:41. Reason: changing encoder ticks per revolution |
|
#2
|
||||
|
||||
|
Re: CANJaguar PID tuning in Position mode
Sounds good to me.
We use a 10 turn pot on our turret, so our inputs range from 0 to 10. Our P value is around 700. Depending on which motors you are using and your gearing, it sounds like it's in the ballpark. An I value of .4 (if you choose to use it) also sounds in the ballpark. We had issues with the I value due to the nature of our turret. There is a tiny little bit of free play in it, and we have some elastics tied to it to help manage our wire bundles. It created some interesting dynamics, and adding an I value caused wind-up over time, and then the turret would "spontaneously" overshoot and drift away from the setpoint. We opted for a P-only loop, and tuned our P value by increasing it to the point of instability, then dialled it back. It still overshoots and oscillates a tiny little bit, but it still gets there plenty fast, and most importantly it stays put once it does. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|