View Single Post
  #14   Spotlight this post!  
Unread 11-04-2004, 02:17
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
Re: Need help programming our swerve with feedback?

Quote:
Originally Posted by eugenebrooks
In physics terms, you are creating a harmonic oscillator
about the set point. The oscillation is a natural consequence of the linear force, much in the same manner that a mass bounces back and forth when suspended by a spring. You can reduce the finickyness by adding a damping term that operates much as a shock does on a car. This is done by adding a force that is proportional to, in this case the rotational, velocity and in opposition to the travel. This is easily done in he code by remembering the arm position from the prior poll with the computer, or interrupt as the case may be, and subtracting the current value. If you do this, you will find that you can increase the constant of proportionality for power to the drive motor, tightening up control, while preventing oscillation. There is a value for the damping, referred to as critically damped in physics terms if I remember correctly, that is somewhat magic in behavior.

We used this form of damping on 1280s arm at the
SanJose regional, and it was quite effective...
Well by oscillate a little, he meant it overshot a few inches then returned to it's target spot. In theory it would have a damped oscillation that continued infinitely, but since this is all digital the oscillation dampened quickly and disappeared.

If you were at SVR you probably saw our arm. A lot of programming went into keeping that monster controllable.