MATLAB Answers

normalizing constant of a column and inverse matrix understanding

10 views (last 30 days)
Melissa on 28 Aug 2013
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.
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
a=norm([Inv_M_Theta(1,1) Inv_M_Theta(2,1) Inv_M_Theta(3,1)]);
Torque_Axis=[1 0 0];
TRA_Direction=[0 0 0 Theta_TRA']';
  1 Comment
Melissa on 28 Aug 2013
If I divide by the normalizing constant. Theta_TRA=(1/a)*(Inv_M_Theta*Torque_Axis') I get fairly close to the correct values but I still have a negative for the second value in TRA_Theta.

Sign in to comment.

Answers (1)

Roger Stafford
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)];
a = 1/norm(Inv_M_Theta(:,1));
instead of what you have.
Melissa on 29 Aug 2013
Thanks for the response Roger, you always know how to help me out. The [1 0 0] is suppose to represent the axis to which the torque is being applied, in this case its the x axis so its [1 0 0]. I am going to apply the L2 and such norms and see my only real concern is why I am obtaining the negative value in the y direction. In regards to the order of input of I, they can be changed to whatever as long as they are input into the correct place into M_theta. Thanks for the shortcut notation though to shorten the code. I will try the above suggestions and ::fingers crossed::. :)

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!