Why is the Euler Output of the Quaternion Block different than the Euler Angles block in the Aerospace Blockset?

2 次查看(过去 30 天)
Why is the Euler Output of the Quaternion Block different than the Euler Angles block in the Aerospace Blockset?
In my model, both the blocks are fed by the same Forces and Moments, however the Euler output of the blocks is different.

采纳的回答

MathWorks Support Team
Yes, the output Euler of the 'Euler Angles' block is different than the output Euler of the 'Quaternions' block, especially the Pitch (Theta) component of Euler. Theta, from the Quaternion block, is actually limited in range from [-90, +90] degrees.
The difference occurs because of the way the Quaternions block determines the Pitch angle. If you look under the mask, you will see that the Quaternions block calculates the four parameters (e0,e1,e2,e3). These four quaternions are then converted into euler angles. The euler angle Theta (pitch) is caluclated by
theta = asin(e1*e3-e2*e0)
Where 'asin' is a MATLAB function which gives the arc sin or the sin inverse. The range of this function is [-pi/2, pi/2] radians. That is why you see the theta limited in a range from [-90 +90] degrees.
Therefore, the way in which you visualize the output pitch is diffferent.

更多回答(1 个)

James Tursa
James Tursa 2020-5-9
On a related note, the Aerospace Toolbox uses a different quaternion convention than the Robotics Toolbox. One is basically the conjugate of the other. The Aerospace Toolbox quaternion convention seems to be geared more towards quaternions used for coordinate system transformations, and the Robotics Toolbox quaternion convention seems to be geared more towards quaternions used for active vector rotations ... i.e., rotating a vector within the same frame. As a result, you will not see consistency between these two toolboxes ... often one result is opposite of the other. For more discussion on this see these links:

类别

Help CenterFile Exchange 中查找有关 Unit Conversions 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by