Go to Post It's like the people from Pimp my Pit came and had it professionally done. - [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-03-2012, 19:54
Tanaythan's Avatar
Tanaythan Tanaythan is offline
Programmer
AKA: Tanay Nathan
FRC #3256 (Warriorborgs)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2010
Location: San Jose
Posts: 27
Tanaythan is an unknown quantity at this point
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?
__________________
Tanay Nathan
Programmer
Team #3256 Warriorborgs

Last edited by Tanaythan : 18-03-2012 at 23:41. Reason: changing encoder ticks per revolution
Reply With Quote
  #2   Spotlight this post!  
Unread 18-03-2012, 23:01
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
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.
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 17:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi