Main Content

Rodrigues to Rotation Angles

Convert Euler-Rodrigues vector to rotation angles

  • Rodrigues to Rotation Angles block

Libraries:
Aerospace Blockset / Utilities / Axes Transformations

Description

The Rodrigues to Rotation Angles block converts the three-element Euler-Rodrigues vector into rotation angles. The block Rotation Order parameter specifies both the rotation sequence as well as the order of the rotation angles in the output. For example, if Rotation Order has a value of ZYX, the block outputs are in the rotation order z-y-x (yaw, pitch, and roll). The Euler-Rodrigues angles represent a right-hand passive transformation from frame A to frame B. The resulting rotation angles represent a series of right-hand intrinsic passive rotations from frame A to frame B. For more information on Euler-Rodrigues vectors, see Algorithms.

Ports

Input

expand all

Euler-Rodrigues vector to transform into rotation angles.

Data Types: double

Output

expand all

Rotation angles, returned as a 3-by-1 vector, in radians. Quaternion scalar is the first element.

Data Types: double

Parameters

expand all

Rotation order for three rotation angles.

For the 'ZYX', 'ZXY', 'YXZ', 'YZX', 'XYZ', and 'XZY' rotations, the block generates an R2 angle that lies between ±pi/2 radians (±90 degrees), and R1 and R3 angles that lie between ±pi radians (±180 degrees).

For the 'ZYZ', 'ZXZ', 'YXY', 'YZY', 'XYX', and 'XZX' rotations, the block generates an R2 angle that lies between 0 and pi radians (180 degrees), and R1 and R3 angles that lie between ±pi (±180 degrees). However, in the latter case, when R2 is 0, R3 is set to 0 radians.

Programmatic Use

Block Parameter: rotationOrder
Type: character vector
Values: 'ZYX' | 'ZYZ' |'ZXY' | 'ZXZ' | 'YXZ' | 'YXY' | 'YZX' | 'YZY' | 'XYZ' | 'XYX' | 'XZY' | 'XZX'
Default: 'ZYX'

Algorithms

An Euler-Rodrigues vector b represents a rotation by integrating a direction cosine of a rotation axis with the tangent of half the rotation angle as follows:

b=[bxbybz]

where:

bx=tan(12θ)sx,by=tan(12θ)sy,bz=tan(12θ)sz

are the Rodrigues parameters. Vector s represents a unit vector around which the rotation is performed. Due to the tangent, the rotation vector is indeterminate when the rotation angle equals ±pi radians or ±180 deg. Values can be negative or positive.

References

[1] Dai, J.S. "Euler-Rodrigues formula variations, quaternion conjugation and intrinsic connections." Mechanism and Machine Theory, 92, 144-152. Elsevier, 2015.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2017a