10 views (last 30 days)

Show older comments

Good Morning All,

I am attempting to find the Torque Roll Axis given the equations below. According to my understanding the TRA direction is the product of a normalizing constant of the first column of inverse moment of inertia tensor, the inverse moment of inertia tensor and the torque axis which in this case is x so just the matrix [1 0 0].

I have the following inertia matrix (M_theta):

I=[2.519 4.458 4.409 -.1678 .5385 -.0947];

and should receive TRA_Direction as: [0 0 0 .992113 .0347851 .120426] but I do not. Is there anything that I am missing here when normalizing the first column or taking the inverse? Should I always take the absolute value even though its not mentioned? Is my code correct with that of the photo? Any suggestions would be greatly appreciate.

Thanks,

Here is the code I have wrote:

function[TRA_Direction]= TRA_Direction(I)

% User Input

% I: Moment of Inertia Matrix expressed as [Ixx,Iyy,Izz,Ixy,Ixz,Iyz]

%

% Output

% TRA_Direction: The Direction of the TRA

%Mass Inertia Matrix

M_Theta=zeros(3,3);

M_Theta(1,1)=I(1);

M_Theta(1,2)=-I(4);

M_Theta(1,3)=-I(5);

M_Theta(2,1)=-I(4);

M_Theta(2,2)=I(2);

M_Theta(2,3)=-I(6);

M_Theta(3,1)=-I(5);

M_Theta(3,2)=-I(6);

M_Theta(3,3)=I(3);

Inv_M_Theta=inv(M_Theta);

a=norm([Inv_M_Theta(1,1) Inv_M_Theta(2,1) Inv_M_Theta(3,1)]);

Torque_Axis=[1 0 0];

Theta_TRA=a*Inv_M_Theta*Torque_Axis';

TRA_Direction=[0 0 0 Theta_TRA']';

Roger Stafford
on 28 Aug 2013

Yes, by the term "normalizing constant" in this context is clearly meant a constant such that when it is multiplied by the vector in question, that vector would then have a norm length of one, which of course means that you should have

a=1/norm([Inv_M_Theta(1,1) Inv_M_Theta(2,1) Inv_M_Theta(3,1)]);

Another worry for you is which norm are they referring to here, the L2 norm which you have used here or another norm: L1, L_infinity, etc?

Also you need to make sure there is a proper understanding of the order of elements in I(4), I(5), and I(6). You have assumed they are Ixy, Ixz, and Iyz, respectively, but they might be some other order such as Iyz, Izx, and Ixy as in vector products.

Finally, you need to consider the accuracy of values in I. You give them to only three or four significant digits, but perhaps they need to be given more accurately than that to achieve the results you seek.

Note that you can simplify your notation by writing:

M_theta = [I(1),-I(4),-I(5);-I(4),I(2),-I(6);-I(5),-I(6),I(3)];

and

a = 1/norm(Inv_M_Theta(:,1));

instead of what you have.

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!