View Single Post
  #6   Spotlight this post!  
Unread 15-02-2005, 10:27
ZZII 527's Avatar
ZZII 527 ZZII 527 is offline
"Scale Electric Vehicle"
AKA: Shane Colton
FRC #0097
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Cambridge, MA
Posts: 366
ZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond reputeZZII 527 has a reputation beyond repute
Send a message via AIM to ZZII 527
Re: arm-limitting gyro PD loop producing some strange results

Ah! Thank you! Yea I don't know what I was thinking with pwm01_temp. I'm still a bit confused though about how I can get it to do exactly what I want. Consider the following example:

With P-control centered at 127:
The motor can hold the arm outward stationary at 127 (they don't backdrive). If you hang a tetra from the arm, though, they will backdrive. This will lead to an upwards correction until the gyro stops rotating. At which point, the PWM goes back to 127. In this case the arm drifts downwards.

What I am trying to get is the PWM to adjust itself until it is providing enough force to the motors to counteract the downward drift. I'm not sure if this is integral action...I don't care if the arm returns to its original angle as long as it just stops drifiting. So in the example, if I hung a tetra and the arm started drifting downwards, the code should add to the PWM until it has stopped the drifting, but not necessarily bring it back to it's original angle.

Is this do-able or am I completely misusing the PD loop?
Thanks again! Sorry to keep changing my questions.


-Shane
__________________
MIT Mechanical Engineering
>> College Mentor, Team 97: Cambridge Rindge and Latin School with The Edgerton Center, MIT Mechanical Engineering, Bluefin Robotics, and Draper Laboratory
>> Alumnus, Team 527: Plainedge HS

Last edited by ZZII 527 : 15-02-2005 at 10:29.