View Single Post
  #27   Spotlight this post!  
Unread 20-11-2009, 16:04
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: pic: Cyber Blue Swerve Chassis - Rear View

Quote:
Originally Posted by reversed_rocker View Post
when we built our crab drive, one problem we had was that the motor would over shoot the intended position, then try to swing back, and the process repeats.
This is a classic controls problem. You guys have implemented a "P" controller. Adding a derivative term will help, and make it a "PD" controller. One way to tune the system is to increase Kp until it gets pretty close to oscillating constantly, and then increase Kd until it doesn't overshoot any more. If at any point it starts acting "funny", decrease the constant some. One thing that really helps is to get back the position data at each point in time and then plot it.

I believe that there are some white papers around, but until I finally got the chance to take a controls class and talk with someone who does controls for a living, I had a little trouble with tuning the loops too.

I've used the following successfully many times in the past.
Code:
power = Kp * error + Kd * (error - last_error)
Reply With Quote