# Door Rotation Matrix/Change of Basis Plus Translation

• Cora
In summary, the conversation revolves around creating a torque calculator for a door mechanism using rotation matrices. The issue at hand is that the yaw transformation has no effect on gravity, and there is a need to add a translation or inertia matrix. Suggestions are given to change the order of the matrices and to use two vectors to compute the torque. The conversation also delves into the concept of transformed axes and their relevance to the controls of an airplane.
Cora
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...

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.

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
13.6 KB · Views: 425
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!

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:
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##.

Cora

## 1. What is a Door Rotation Matrix?

A Door Rotation Matrix is a mathematical tool used to describe the rotation of a door in three-dimensional space. It is a 3x3 matrix that represents the orientation of a door with respect to an initial reference frame.

## 2. How is a Door Rotation Matrix calculated?

A Door Rotation Matrix is calculated using trigonometric functions such as sine, cosine, and tangent. The values in the matrix are based on the direction and magnitude of the rotation of the door in three-dimensional space.

## 3. What is Change of Basis Plus Translation?

Change of Basis Plus Translation, also known as rigid body transformation, is a mathematical concept used to describe the movement of an object in space. It involves changing the coordinate system or basis of an object and then applying a translation to its position.

## 4. How is Change of Basis Plus Translation used in door rotation?

In the context of door rotation, Change of Basis Plus Translation is used to describe the movement of a door as it rotates around a fixed point. It allows us to track the position and orientation of the door as it moves in three-dimensional space.

## 5. Why is understanding Door Rotation Matrix and Change of Basis Plus Translation important?

Understanding Door Rotation Matrix and Change of Basis Plus Translation is important in various fields such as computer graphics, robotics, and physics. It allows us to accurately model and simulate the rotation and movement of objects in three-dimensional space, which has many practical applications in these fields.

Replies
2
Views
2K
Replies
8
Views
2K
Replies
1
Views
1K
Replies
4
Views
1K
Replies
4
Views
3K
Replies
1
Views
312
Replies
3
Views
655
Replies
6
Views
9K
Replies
6
Views
2K
Replies
2
Views
1K