# Transformation matrix using Rotation Matrix producing identity

26 views (last 30 days)
Melissa on 11 Jul 2013
Good Afternoon All,
I am trying to find a transformation matrix from a local coordinate system to a global system using Euler angles (goal is to transform the local stiffness to global stiffness). The matrix is simply the rotational matrix, i.e. euler to DCM (rotation in xyz). According to all the published articles in regards to the mount transformation its DCM*K*DCM'. Easy enough to code but my logic may be faulty in this aspect....isn't DCM*DCM' the identity matrix? I am sure I am missing something here because the same thing has been published in multiple articles (<http://www.mecheng.osu.edu/adl/files/adl/conference_papers/C07-8.pdf)>. Everything works wonderful when I have zero degrees for the Euler angles but when I start applying the rotational (transformation) matrix the DCM cancel one another out. Anyone have any suggestions on how to resolve this issue? Should I just use DCM*K?
Here is my code:
K=[100 100 400]; Angles=[30,0,0];
%K_mi Mount Stiffness Matrix Caclulation
%Note: K_mi is the static input stiffness by user
%Obtaining Initial Individual Stiffness Values (Initial Input)
Kx=K(1);Ky=K(2); Kz=K(3);
%Setting up initial matrix
K_mi=zeros(3,3);
K_mi(1,1)=Kz;
K_mi(2,2)=Ky;
K_mi(3,3)=Kx;
%R_gmi: Rotational Transformation Matrix of K_mi
%Obtaining the Initial Orientation Value of Mounts
Theta=Angles(1); Rho=Angles(2); Phi=Angles(3);
Theta=Theta*pi/180; Rho=Rho*pi/180; Phi=Phi*pi/180;
%Rotational Matrix using Euler Angles
% Mathetmatical Representation XYZ Rotation
%[ cy*cz, sz*cx+sy*sx*cz, sz*sx-sy*cx*cz]
%[-cy*sz, cz*cx-sy*sx*sz, cz*sx+sy*cx*sz]
%[ sy, -cy*sx, cy*cx]
Rot_gmi=zeros(3,3);
Rot_gmi(1,1)=cos(Rho)*cos(Phi);
Rot_gmi(1,2)=cos(Theta)*sin(Phi)+sin(Theta)*sin(Rho)*cos(Phi);
Rot_gmi(1,3)=sin(Theta)*sin(Phi)-cos(Theta)*sin(Rho)*cos(Phi);
Rot_gmi(2,1)=-cos(Rho)*sin(Phi);
Rot_gmi(2,2)=cos(Theta)*cos(Phi)-sin(Theta)*sin(Rho)*sin(Phi);
Rot_gmi(2,3)=sin(Theta)*cos(Phi)+cos(Theta)*sin(Rho)*sin(Phi);
Rot_gmi(3,1)=sin(Rho);
Rot_gmi(3,2)=-sin(Theta)*cos(Rho);
Rot_gmi(3,3)=cos(Theta)*cos(Rho);
Rot_gmi;
%K_gmi: Local Stiffness Matrix transformed to Global coordinates
K_gmi=Rot_gmi*K_mi*Rot_gmi';

Matt J on 11 Jul 2013
Edited: Matt J on 11 Jul 2013
Everything works wonderful when I have zero degrees for the Euler angles but when I start applying the rotational (transformation) matrix the DCM cancel one another out.
Only because of the fortuitous combination of data that you've chosen. Try using
K=[200 300 400];
and you will see that you get K_gmi~=K_mi
>> K_gmi, K_mi
K_gmi =
400.0000 0 0
0 275.0000 -43.3013
0 -43.3013 225.0000
K_mi =
400 0 0
0 300 0
0 0 200
Iain on 12 Jul 2013
I think I figured it out:
Reactive force = K * Displacement
If we have a matrix "K" defined in axis "A", and the displacement measured in axis "B", with a set of euler angles or a DCM (DCM, the way I'm using it transfers B to A):
K * DCM * Displacement = reactive force in axis A (not wanted)
DCM' * K * DCM * Displacement = reactive force in axis B (wanted)
Thats why its got both.