Door Rotation Matrix/Change of Basis Plus Translation

Click For Summary

Discussion Overview

The discussion revolves around the application of rotation matrices and change of basis in calculating torque for a door mechanism in a vehicle, specifically addressing the effects of roll, pitch, and yaw on the torque generated by gravity at the center of gravity (CG) of the door. Participants explore the mathematical formulation and conceptual understanding of these transformations in a practical context.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes their approach using rotation matrices for roll, pitch, and yaw to calculate torque, noting that the yaw transformation does not affect the gravity vector due to the fixed basis used.
  • Another participant suggests an alternative method of applying transformations relative to a transformed set of axes, arguing that this approach would allow yaw to affect the direction of gravity.
  • A participant reflects on their initial setup of axes and acknowledges the oversight in not considering the position vector of the CG, which impacts the effectiveness of the yaw transformation.
  • One participant draws an analogy to airplane controls to illustrate how transformations should be considered relative to the object's axes rather than fixed Earth-based axes.
  • Several participants emphasize the need to change the order of the rotation matrices and clarify the vectors needed to compute torque, including the cross product of vectors related to the axis of rotation and gravity.
  • There is a correction regarding a variable notation, where a participant clarifies that "T" was a typo for "R," indicating the rotation matrix.

Areas of Agreement / Disagreement

Participants express differing views on the appropriate method for applying rotation transformations, with some advocating for a fixed basis approach and others for a relative axes approach. There is no consensus on the best method, and the discussion remains unresolved regarding the implications of these choices on the torque calculation.

Contextual Notes

Participants note the importance of the order of matrix multiplication and the need for position vectors in torque calculations, indicating potential limitations in the initial approach. The discussion highlights the complexity of applying transformations in a real-world scenario.

Cora
Messages
10
Reaction score
0
I think I'm having a really big block over a really small hangup, so forgive me. I'm on an internship and this is my first time working with rotations/change of basis in a real world scenario.

I'm creating a calculator that gives torque in a door mechanism, after a given roll and pitch of the vehicle. It's for the torque in a door check mechanism, but the general torque at the axis of rotation (along door hinges) will suffice for this calculator. I am using rotation matrices to find the component of gravity into and out of the door, then multiplying that against the distance from the axis to the CG to find the torque created by gravity.

I'm setting up the matrices in Excel.

What I've got currently is Rx*Ry*Rz, where Rx is the roll transformation, Ry is the pitch and Rz is the yaw. That successive matrix is then multiplied against the gravity vector. The calculator gives accurate values for the gravity at the center of mass after the pitch and roll, but since I haven't accounted for the distance from the axis to the CG, the Rz matrix has no effect on the gravity.

I feel like I need to add a translation or inertia matrix in there somewhere. The door is being treated as a point mass at the center of gravity.

Rx*Ry*Rz
[1 0 0;0 cos(α) -sin(α);0 sin(α) cos(α)]*[cos(β) 0 sin(β);0 1 0;-sin(β) 0 cos(β)]*[cos(γ) -sin(γ) 0;sin(γ) cos(γ) 0; 0 0 1]
Gravity Vector
[0;0;W]
where α=roll angle, β=pitch angle, γ=yaw angle, W=weight

Thanks SO much with any direction anyone might be able to help with. I've spent hours staring by it at myself, but no one on my team has used linear algebra in decades...
 
Physics news on Phys.org
It looks like your pitch, roll and yaw matrices are all expressed relative to a fixed basis. That makes the maths simple but are you sure that's what you want? If you do it that way then it's true that yaw has no effect on gravity.

An alternative way to do it, that seems more intuitive to me, is to specify an order for applying the transformations, transform the axes as well as the vector at each step, and then apply each transformation relative to a transformed set of axes.

Say the order of application you choose is pitch (rot around x axis) then roll (rot around y axis) then yaw (rot around z axis).
Say the vector that represents the centralised door hinge is v, which lies in the x-y plane.
Then when you apply pitch you rotate v, and the y and z axes around the x axis, to get v' and new y', z' axes.
Next apply roll: rotate v', and the x and z' axes around the y' axis, to get v'' and new x', z'' axes.
Finally apply yaw: rotate v'' around the z'' axis, to get v'''.

Because z'' is no longer vertical, the yaw transformation will affect the direction of gravity for the hinge.

The matrices you use for these transformations will be more complex. The pitch matrix is unchanged. The roll matrix will depend on both the angles of pitch and roll. The yaw matrix will depend on all three angles.
 
  • Like
Likes   Reactions: Cora
I think I see what you're saying. I'm kicking myself for not saving my notebook from my dynamics class.

Originally I had aligned the y-axis with the bottom edge of the door, the z axis with the hinge/front edge of the door. The origin being at the front bottom corner. My thought was that I would just translate the door's weight vector through the pitch, roll and yaw. I didn't take into consideration the position vector of the CG. So my yaw transformation doesn't affect the weight vector because I'm applying the transformation ABOUT the Z axis TO the z axis, rather than a vector positioned away from it. Does this seem like I've pinpointed the right problem?
 

Attachments

  • Snapshot.jpg
    Snapshot.jpg
    13.6 KB · Views: 493
From the diagrams, it looks like you've got the right idea Cora.
I find it helps to think about it from the point of view of an aeroplane pilot and what the controls of the aeroplane do. The aeroplane will usually have some nonzero pitch and roll relative to the Earth's up-down direction and some Yaw relative to say the East-West direction. But those coordinates are not relevant to the incremental impact of the controls of the attitude of the plane.

The important axes that determine the effect of the plane's controls are where x points from aft to fore, y points from one wingtip to the other and z is perpendicular to those two in the direction from wheels to roof. The elevators (tail flaps) control pitch by pulling back/pushing forward on the yoke ('steering stick'), the ailerons (small flaps on the wings) control roll by pushing the yoke to either side, and the rudder controls yaw via foot pedals.

All adjustments made to those control surfaces are relative to the aeroplane's transformed axes, not to the Earth-based axes. If you're flying upside down (eg in the middle of a barrel roll or a loop-the-loop) and you want to fly further from the ground, you need to pitch down relative to the plane's axes by pushing forward on the yoke.

To confuse things though, at least some of the plane's instruments give indicators of configuration relative to the Earth rather than to the plane's axes. I'm pretty sure the attitude indicator shows pitch relative to gravity, but I'm not sure about roll. It's just as well commercial airlines don't spend much time flying upside down!
 
  • Like
Likes   Reactions: Cora
Hi Cora,

first you have to change the order of you matrices in the product, your rotation matrix ##R## has to be ##R=R_z R_y R_x## (first roll, then pitch, then yaw; the rightmost matrix corresponds to the first transformation, i.e. to the roll).

To compute the torque, you need 2 vectors: a vector ##\mathbf a## parallel to the axis of rotation of the door, and a vector ##\mathbf r## from the axis of rotation of the door to its center of mass. The to compute the torque about this axis you need to compute the cross product of ##T\mathbf r## and ##m\mathbf g## (##m## is the mass of the door and ##\mathbf g## is the gravity vector), and then take the orthogonal projection of ##m T\mathbf r \times \mathbf g## onto the vector ##T\mathbf a##.

And https://www.physicsforums.com/threads/door-rotation-matrix-change-of-basis-plus-translation.823423/members/andrewkirk.265790/ is right, yaw does not change the magnitude of the torque.
 
Last edited by a moderator:
  • Like
Likes   Reactions: Cora
Hawkeye18 said:
Hi Cora,

first you have to change the order of you matrices in the product, your rotation matrix ##R## has to be ##R=R_z R_y R_x## (first roll, then pitch, then yaw; the rightmost matrix corresponds to the first transformation, i.e. to the roll).

To compute the torque, you need 2 vectors: a vector ##\mathbf a## parallel to the axis of rotation of the door, and a vector ##\mathbf r## from the axis of rotation of the door to its center of mass. The to compute the torque about this axis you need to compute the cross product of ##T\mathbf r## and ##m\mathbf g## (##m## is the mass of the door and ##\mathbf g## is the gravity vector), and then take the orthogonal projection of ##m T\mathbf r \times \mathbf g## onto the vector ##T\mathbf a##.

And https://www.physicsforums.com/threads/door-rotation-matrix-change-of-basis-plus-translation.823423/members/andrewkirk.265790/ is right, yaw does not change the magnitude of the torque.

Thanks for talking that through. I figured I was missing at least one position vector. What is the variable T?
 
Last edited by a moderator:
Cora said:
What is the variable T?
Sorry, it was a typo, it should be ##R##.
 
  • Like
Likes   Reactions: Cora

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 6 ·
Replies
6
Views
11K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K