View Single Post
  #10   Spotlight this post!  
Unread 28-02-2012, 09:35
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 746
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Gyro Autobalancing

I always go back to the basics on controls questions.

Your control loop is only as good as your sensor feedback.

Have you tried to see what a single Gyro input does when you are using the get angle in Labview? Did you notice that the gyro drifts over time, 1-10 degrees? Because of this drift problem, your PID will always be seeking "ZERO" if that is your set point, but your gyro is reporting the wrong angle in relation to your robot.

Study the sensor first, and determine if it's responsive enough, and "accurate" for your controls loop. Always do that first to prove that to yourself, before writing the first bit of code. Turns out, you can use labview to study the raw data from the sensor to determine it's response, and accuracy over time. You “could” reset the gyro before you visit the ramp, but try mounting the gyro on the robot and flipping the ramp back and forth about 3-4 times, then make the ramp go back to level, does your gyro raw data still read 0 degrees after just a few iteration of tilt cycles? If not, your control loop won't work either because your sensor data is mis-reporting due to gyro drift of integrating an angle from the gyro rate.

Spend some time on getting accurate sensor feedback, before moving to control loops is what I am suggesting.

Bottom line, the problem may not be your control loop, but because your sensor is mis-reporting, has noise, is effected by another axial movement, such as acceleration of the robot, etc…
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369