I am trying to find a Direction Cosine Matrix (DCM) for the Euler angle body 1-2-3 sequence. I tried making my own function and using the MATLAB function, but the result is matrices that are not equal to each other. But, if I were to use the 'ZYX' sequence, I would get a matrix that is equal to the transpose of the matrix produced by my function.I mean that transpose(EA123toDCM) = E123toDCM if I changed the sequence to 'ZYX'. I never got two equal matrices. Can you fix my code so I would get two equal DCM matrices for the body 1-2-3 sequence? Also, for the E123toDCM line, I am using the sequence 'XYZ'. Is that correct or should it be 'ZYX'? I know that that for a DCM of sequence 1-2-3 = R3(theta1)*R2(theta2)*R1(theta3). Is ZYX sequence the same as a 1-2-3 sequence?

Elements Of Electromagnetics
7th Edition
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Sadiku, Matthew N. O.
ChapterMA: Math Assessment
Section: Chapter Questions
Problem 1.1MA
icon
Related questions
Question

I am trying to find a Direction Cosine Matrix (DCM) for the Euler angle body 1-2-3 sequence. I tried making my own function and using the MATLAB function, but the result is matrices that are not equal to each other. But, if I were to use the 'ZYX' sequence, I would get a matrix that is equal to the transpose of the matrix produced by my function.I mean that transpose(EA123toDCM) = E123toDCM if I changed the sequence to 'ZYX'. I never got two equal matrices. Can you fix my code so I would get two equal DCM matrices for the body 1-2-3 sequence?

Also, for the E123toDCM line, I am using the sequence 'XYZ'. Is that correct or should it be 'ZYX'? I know that that for a DCM of sequence 1-2-3 = R3(theta1)*R2(theta2)*R1(theta3). Is ZYX sequence the same as a 1-2-3 sequence?

 

EA = [pi/3; -pi/4; -pi/6];
EA123toDCM = EA123DCM(EA)

E123toDCM = angle2dcm(EA(1,1), EA(2,1), EA(3,1), 'XYZ')

 

function [R] = EA123DCM(EA)


    theta1 = EA(1,1);
    theta2 = EA(2,1);
    theta3 = EA(3,1);
    
    
    R1 = @(a)[1    0      0    ;
              0  cos(a) -sin(a);
              0  sin(a) cos(a)];
          
    R2 = @(a)[cos(a)  0 sin(a) ;
                0     1   0    ;
              -sin(a) 0 cos(a)];
          
    R3 = @(a)[ cos(a) -sin(a) 0;
               sin(a) cos(a)  0; 
                 0      0     1];
     
    R = R3(theta1)*R2(theta2)*R1(theta3);

end

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Basic Mechanics Problems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Elements Of Electromagnetics
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
Mechanics of Materials (10th Edition)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
Thermodynamics: An Engineering Approach
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
Control Systems Engineering
Control Systems Engineering
Mechanical Engineering
ISBN:
9781118170519
Author:
Norman S. Nise
Publisher:
WILEY
Mechanics of Materials (MindTap Course List)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:
9781337093347
Author:
Barry J. Goodno, James M. Gere
Publisher:
Cengage Learning
Engineering Mechanics: Statics
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:
9781118807330
Author:
James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:
WILEY