Quote:
Originally Posted by thatprogrammer
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!
|
Austin is completely correct with his math AFAIK, but there's also an intuitive way to think about it: When your arm is at 90deg (straight up), you don't want to be applying any force to counter gravity - it can balance like that. However, when it's at 0 deg (flat on the robot), you want to be applying the maximum counter gravity force. cosine is 1 at 0deg and 0 at 90deg, so this makes sense.
The reason that cosine makes sense (to me) is that you can imagine the arm as a line on a circle, going from the centre to the edge. You can get the x position of the arm (which is what will determine the amount of force due to gravity) with the cosine of the angle of the pivot. This, I think, answers your 3rd question - it's because force of gravity doesn't scale linearly with the angle, it scales with the linear position of the centre of gravity of the arm.
Cosine is nonlinear, but because of the reasons above, (and what Austin mentioned, which is basically the same thing but with actual math behind it) it's in the system already - what we're applying just counteracts that, allowing us to ignore gravity (which makes the entire thing a linear system).
For your 1st question, we just did guess and check, IIRC

You can also find it from the system dynamics (Weight/MOI of arm, force of gravity, and torque applied by motor), but you'll usually need to tune it anyways. It's also not a huge deal if you get it a bit wrong - the control loop can absorb a lot of it if needed.