View Single Post
  #15   Spotlight this post!  
Unread 17-02-2012, 16:47
vamfun vamfun is offline
Mentor :Contol System Engineer
AKA: Chris
FRC #0599 (Robodox)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2003
Location: Van Nuys, California
Posts: 182
vamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of lightvamfun is a glorious beacon of light
Send a message via AIM to vamfun
Re: Team 254 2011 FRC Code

Hi,
Thanks for posting your code. The architecture is very pleasing to a controls engineer. I like control loops and filters as classes.

Can you expand a little on your use of negitive inertia. I assume this is equivalent to adding derivatives of the control input to improve performance, but I would like to hear more about your use. Any papers to refererence?

Also, I think you can use much simpler functions to fit your Victors. One linearizer that involves a single parameter to adjust is:

vic_cmd = min_cmd/(1 - (1-min_cmd)*input_cmd)

where min_cmd = the minimum command to keep the motor moving, i.e. equivalent to the torque required to overcome dynamic friction.
All commands are normalized [-1,1]. One can play with min_cmd to get a very good fit. The equation is valid for input_cmd>0. You have to change a few signs for input_cmd<0 and the min_cmd can be different for each sign.
This equation follows directly from the steady state current model of the h_bridge with a low frequency pwm. The current model is summarized in this older post. I will write a blog post on this later.

Attached is a curve fit of some old data I had on a victor. Maybe Joe Ross sent it to me and it could be an 883 or 884. The inverse is obtained by taking the victor speed and running it through the inverse function above.
Attached Thumbnails
Click image for larger version

Name:	victor curve fit.jpg
Views:	109
Size:	96.2 KB
ID:	11957  

Last edited by vamfun : 17-02-2012 at 17:06.