Go to Post Its not the event that matters - its the preparation for the event that matters! - Ken Patton [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #23   Spotlight this post!  
Unread 18-10-2016, 01:37
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: 800
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: Tuning PID Constants Over a Range

Quote:
Originally Posted by thatprogrammer View Post
A few questions (just started taking physics this year, apologizes if any of these questions have obvious answers that I haven't learned yet).

1. How did you determine the multiplier required to allow the arm to cancel out gravity?
2. How does multiplying by the cosine of the angle of the arm result in a linear system? Isn't cosine non-linear by definition?
3. Why do you not simple scale your voltage multiplier in proportion to the angle of the arm?

Thanks for all your help!
If you work out the physics, you'll get the following:

torque = J * angular_acceleration + r cross F_gravity

F_gravity cross r -> F_gravity * r * cos(theta)

So, you get

torque = J * d^2 (theta) /dt^2 + F_gravity * r * cos(theta)


When linearizing, you want to convert your system to be linear. The only nonlinear term above (assuming that torque is your input, which is a reasonable assumption for now) is the F_gravity * r * cos(theta). So, if we define

torque = torque_linear + F_gravity * r * cos(theta)

And then do a variable substitution, we get a linear system back. i.e.

torque_linear = J * d^2 (theta) /dt^2

Yay! (I think this answers 2 and 3).

As long as you aren't too far off, your system will work just fine with the wrong gain. One way to do it would be to measure the voltage required to hold your arm horizontal, and use that as the coefficient. We've traditionally ignored this term and let the rest of the loop take up the slack.

Last edited by AustinSchuh : 19-10-2016 at 01:09. Reason: Fixed missing theta caught by Ahad
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:14.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi