Whitepaper: Two Jointed Arm Dynamics

Since Team 449 (like many others, I’m sure) has been considering a two jointed arm, I started thinking about how we could go about controlling it. I derived a dynamics model for the arm which can be used to create simulations or calculate feed forward. Most notably, the feed forwards for the two joints are not independent from each other, so that might complicate your control schemes a little bit.

Please let me know if you find any errors - my solution is a little different from some others I’ve seen, and while I think my derivation is solid I would love to be proved wrong.

Two_Jointed_Arm_Dynamics.pdf (179.2 KB)

26 Likes

I noticed that you have to variables s2 and c2, that weren’t defined in the paper. I did however see a page that calculated the inverse kinematics of this kind of arm that mentioned these constants:


Is this what you meant?

1 Like

In the paper it says cx and sx and defined as cos(x) and sin(x).

1 Like

Ah I see, thank you

2 Likes

Question about our particular implementation, where we our elbow motor is at the base of the robot, chained up to our shoulder joint and then down to the elbow. This creates a virtual 4-bar, so the motion of the shoulder does not change the absolute angle of the elbow. How does this change the feedforward analysis? I’m missing how this affects the cross-coupling of the potential/kinetic energy of the 2 joints.

2 Likes

I’ve been avoiding thinking about that, but I think basically nothing changes, except we have (assuming 1:1 V4B configuration) that \theta_1 + \theta_2 = \alpha, where \alpha is some constant angle relative to horizontal (usually 0 for a 4-bar keeping the arm horizontal), or \theta_2 = \alpha - \theta_1. This also means \dot{\theta}_1 = -\dot{\theta}_2, \ddot{\theta}_1 = -\ddot{\theta}_2.

image
(Note \theta_2 would have a negative value in the drawing shown).

To use the dynamics, I think you would just remove the second row across the whole dynamics equation (since \theta_2 is no longer free and there’s no u_2) to solve for or by using \theta_1 and its derivatives (for forward dynamics and feedforward voltage, respectively) and determine \theta_2 and its derivatives by the relations listed above.

If you have some ratio’d 4-bar going on, you’ll have to figure out what your relationship between \theta_1 and \theta_2 are (e.g. \theta_2 = 2\theta_1) and compute the derivatives from there, as appropriate.

Let me know if that makes any sense.

Yeah, that makes sense. But in our case our 2nd joint is powered and I’m interested in figuring out how the applied voltage changes with our 4-bar configuration. Your dynamics equations correctly calculate \tau_2 the torque needed on the 2nd joint. But some of that torque is provided by the 4-bar itself, so the voltage applied to the 2nd motor is different than the non-4-bar case. I’m guessing we can’t/don’t modify the Lagrangian to figure this out, but use force body diagrams to figure out the torque split between the 4-bar and the motor?

1 Like

Sure it’s split? Thinking about the free body diagram, the elbow load is held at an angle relative to gravity only, shouldn’t change depending on your first link?

The static gravity-torque term doesn’t change, for sure. I’m less sure (not sure) about the dynamic terms.

1 Like

Actually, let me rephrase that. To hold the elbow at a certain angle with a 4-bar requires 0V. To hold the elbow with a non-4-bar requires >0V. Both require the same torque to hold position, but not the same torque from the motor.

Static case:
I only see two zero-torque positions, the tool cg at absolute -90 and absolute +90 from elbow center of rotation. Anywhere between those requires torque applied by something, I assume must be the motor.

Tracing the 1:1 chain reduction away from the joint location, the torque remains constant through that power train to wherever the motor sits. I don’t see how your chain generates free torque.

It’s simpler than the original case, because the elbow motor position setpoint aligned with zero torque doesn’t move based on shoulder position anymore.

Yeah, I think I’m confusing not having to apply voltage in our case because we don’t have a large enough load to overcome the static friction in our gearbox, etc. Thanks!

1 Like

Could you post an image or FBD/schematic of your setup? I’m not an expert but I believe the lagrangian derivation is flexible enough to determine the torque dynamics, if you compute the potential energy and kinetic energy appropriately.

I apparently don’t have any stills of it, so here’s a video. https://photos.app.goo.gl/jEwYhE1TdFDgcHPi6

I won’t pretend to understand the rigging, but I think I understand the kinematics. We can keep the same forward kinematics in terms of joint angles \theta_1, \theta_2 like before, but we’ll call the angle that the motor/gearbox outputs swept through as \alpha_1, \alpha_2. By inspection from the below sketches (if I understand the system correctly), we have \theta_1 = \alpha_1, \theta_2 = \alpha_2 - \alpha_1.
image

From here, I think you should be able to repeat the lagrangian mechanics derivation except plugging in \alpha_1, \alpha_2 - \alpha_1 instead of \theta_1, \theta_2 and taking derivatives with respect to the \alpha angles instead of the \theta angles.

Thank you for this. I tried this approach a few times and never believed the results, mostly because I couldn’t get the same results twice in a row. These calculations are way too tedious! This time I used a symbolic toolbox to chug through it. The C and Tg matrices change slightly. The Tg change makes sense. I have no conceptual feeling for the Coriolis terms, so I’ll just roll with the math :slight_smile:

Two_Joineted_Arm_Dynamics_with_Four_Bar.pdf (342.4 KB)

3 Likes

This is how everyone actually does this in practice. Many-term algebra sucks and computers are better at it than humans.

1 Like

One question I forgot to ask concerns the angular velocity Jacobian. I feel this should change with the change of coordinates. Am I correct that Jw2 should change to
[0 0
0 0
0 1] ?

I believe you’re right - my understanding of it is that if \omega_i makes link j rotate, the column should be [0, 0, 1]', otherwise it should be 0. This rule is from the normal convention where each joint is directly driven, which doesn’t exactly apply 1:1 here, but I think you’re right that in your case, w_1 does not make link 2 rotate but only translate, so J_{\omega 2} should have all 0s in the first column.

1 Like

Nice! In that case the math really decouples, which makes a lot of sense. So much so that I’d recommend all teams use four-bar rigging on their elbow joint just to make their feedforward math easy!
Symbolic_Arm_Dynamics_Original.pdf (240.3 KB)
Symbolic_Arm_Dynamics_Virtual_Four_Bar.pdf (151.6 KB)

2 Likes