Rotation matrix in two-dimensional space. Representation of rotation matrices in terms of Euler angles The image direction cosine matrix has the size

Rotation matrix(or direction cosine matrix) is an orthogonal matrix that is used to perform its own orthogonal transformation in Euclidean space. When multiplying any vector by a rotation matrix, the length of the vector is preserved. The determinant of the rotation matrix is ​​equal to one.
It is usually believed that, unlike the transition matrix when rotating the coordinate system (basis), when multiplied by the rotation matrix of a column vector, the coordinates of the vector are transformed in accordance with the rotation of the vector itself (and not the rotation of the coordinate axes; that is, the coordinates of the rotated vector are obtained in the same fixed coordinate system). However, the difference between the two matrices is only in the sign of the rotation angle, and one can be obtained from the other by replacing the rotation angle with the opposite one; both are mutually inverse and can be obtained from each other by transposition.

Rotation matrix in 3D space

Any rotation in three-dimensional space can be represented as a composition of rotations around three orthogonal axes (for example, around the axes Cartesian coordinates). This composition corresponds to a matrix equal to the product of the corresponding three rotation matrices.
The rotation matrices around the axis of the Cartesian coordinate system by the angle α in three-dimensional space are:
Rotation around the x-axis:

Rotation around the y-axis:

Rotation around the z-axis:

After the transformations, we get the formulas:
X-axis
x"=x;
y":=y*cos(L)+z*sin(L) ;
z":=-y*sin(L)+z*cos(L) ;


Y-axis
x"=x*cos(L)+z*sin(L);
y"=y;
z"=-x*sin(L)+z*cos(L);


Z-axis
x"=x*cos(L)-y*sin(L);
y"=-x*sin(L)+y*cos(L);
z"=z;


All three turns are made independently of each other, i.e. if it is necessary to rotate around the axes Ox and Oy, first a rotation is made around the Ox axis, then, in relation to the obtained point, a rotation is made around the Oy axis.

In this case, positive angles correspond to the rotation of the vector counterclockwise in the right coordinate system, and clockwise in the left coordinate system, if viewed against the direction of the corresponding axis. The right coordinate system is related to the choice of the right basis (see gimlet rule).

Consider the problem of finding the direction cosines that define the orientation of the moving coordinate system Oxyz with respect to some, let's call it fixed, coordinate system OXYZ. We denote the initial coordinate system of the moving trihedron as Ox 0 y 0 z 0 and, before the rotation, it coincided with the coordinate system OXYZ, respectively. Let the trihedron Oxyz move from position Ox 0 y 0 z 0 to the current one as a result of one rotation by an angle around the On axis, given by a unit vector in the OXYZ coordinate system. The On axis can take different directions, not necessarily coinciding with one of the axes of the OXYZ trihedron. Let's represent the used coordinate systems and their connections by a graph-scheme:

- matrix of direction cosines that specifies the orientation of the trihedron Ox v y v z v , one of whose axes (let the first axis Ox v) specifies the orientation of the rotation axis On;

- rotation matrix about the axis On .

Then the desired finite rotation matrix is ​​determined by the relation

.

Or expanding the expression and using the properties (1.9) , we obtain the final rotation matrix in the following form

(1.11)

Direction cosines specifying the orientation of the On axis of software rotation through the angle . Thus, the position of the moving coordinate system is specified using four parameters: , .

Matrix form of Euler's formula

Let the point M be given in the coordinate system SC m, which is defined by the vector

where are the projections of the vector on the axes of the coordinate system SC m , which is marked with the subscript “m”.

Let us determine the linear speed of the point M in projections onto the axes of the coordinate system SC m . According to the Euler formula, we have

. (1.12)

Here, is the angular velocity vector of the coordinate system SC m with respect to the coordinate system SC s , expressed in projections of this vector on the axes of the coordinate system SC m .

Using the matrix form of the vector product, we write

We write the result in matrix form

, (1.13)

Where (1.14)

Index “~” (tilde) indicates the skew-symmetric form of this matrix.

Poisson formula

In the traditional form of notation, the angular velocity can be represented as



Note that in formula (1.13) the condition

In the general case, when we derive the working relation in a different way.

Let us differentiate the relation

Or in another form

(1.18)

To recalculate the vectors of forces, moments, etc. from one coordinate system to another, it is necessary to calculate the transition matrix, the elements of which are the cosines of the angles between the axes of the original and rotated coordinate systems. This matrix is ​​determined by the sequence of rotation angles that allow you to move from one coordinate system to another. The implementation of such a transition requires no more than three rotations of the coordinate system. The choice of a sequence of rotation angles is usually determined by the physical content of the problem. Ego can be angles measured using control system instruments, angles on which aerodynamic loads depend, etc.

As an example, consider the calculation of the matrix of direction cosines of the angles between the axes of the initial starting (inertial) 0o,x/n_y/n2/n and associated O xug coordinate systems. Let the beginnings of both systems coincide. The first turn is at the corner f around the inertial axis Oo, y7n (Fig. 1.5). The second rotation occurs around the intermediate axis 0(),2 " on the corner d. Finally, the third rotation is performed around the associated axis Ox by an angle of 7. Thus, as a result

Rice. 1.5. Transition from the starting coordinate system to the associated successive rotations by angles f, d, 7 there is a transition from the initial starting coordinate system Ook associated wow g(Fig. 1.5). It is these angles that are usually measured by the sensors of the control system.

Rice. 1.6. Consecutive corner turns f, &, 7

Injection f between the projection of the longitudinal axis of the aircraft Ox onto the plane Oo ?x/„g1 the initial starting coordinate system and the axis Oo,.m/n are called yaw angle. Injection d between the longitudinal axis of the aircraft and the plane Oo / L7 „2 / „ is called pitch angle. Angle 7 between the associated axis Oy and the plane Oo ?xy" called roll angle. These angles, most often used in ballistics problems, differ from the corresponding angles determined according to GOST 20058-74 in inertial system coordinates associated with the local vertical.

The elements of the direction cosine matrix are the corresponding projections of the unit vectors /, /, To, directed along the associated axes, to the initial starting axes. The direct calculation of these projections is quite difficult, therefore, we first consider the transition matrices generated by individual rotations by angles f, g), 7. According to the above methodology, each time we will project unit vectors directed along the axes of the rotated coordinate system onto the axes of the original coordinate system (Fig. 1.6). Then it is quite simple to calculate the matrices of direction cosines corresponding to successive rotations by angles f, d, 7:

According to the coordinate system transformation under consideration, the direction cosine matrix corresponding to the transition from the initial starting to the associated coordinate system will be calculated as a product of individual matrices:

By multiplying matrices, we get

If in the initial starting coordinate system a certain vector is specified with its components

then the components of this vector in the associated coordinate system

can be calculated using the matrix b: or

Formula (1.2.2) determines the transformation of the vector from the initial starting to the associated coordinate system.

The transition from the bound to the initial starting coordinate system is performed using inverse matrix L ~ l(or a transposed matrix // due to the orthonormality of the matrix L):

Using this method, one can find the transition matrix from the velocity coordinate system to the bound one. In this case, we restrict ourselves to the case when the aircraft has a plane of symmetry, and the orientation of the velocity vector is given by the angles of attack a and slip ?3:

Recalculation of an arbitrary vector a v , given in the velocity coordinate system by its components

into a coupled coordinate system is carried out by the formula

Thus, for given angles that define the position of one coordinate system in relation to another, it is always possible to calculate the transition matrix as the product of individual matrices corresponding to successive rotations through these angles.

The rotation matrix is ​​used to rotate the coordinate system or object, scene.

Rotation matrices around the main axes.

Rotation matrix around an arbitrary axis.

Generalized rotation matrix.

It would be desirable to set position of object in space unambiguously. It is quite obvious that any position is uniquely determined by 3 rotations around different axes. But the question arises in what order to rotate and how to choose the axes?

The generalized rotation matrix can be specified in different ways. On the one hand, we can rotate the object around fixed axes. On the other hand, around the axes associated with the object, they are also called local. It is worth remembering that the operation of matrix multiplication is not commutative, therefore, in order to uniquely determine the position, you need to know not only 3 angles, but also the matrix multiplication scheme.

There are 2 popular schemes.
1) Rotation matrix in terms of Euler angles.
2) The rotation matrix through the angles of the aircraft (LA): yaw, pitch and roll (yaw, pitch and roll).
Since the first requires a large number calculations, then in practice the second is usually used.

Rotation matrix in terms of Euler angles.

Euler angles are three angles that uniquely determine the orientation of a rigid body, determining the transition from a fixed coordinate system to a moving one.
A moving coordinate system is a coordinate system attached to a body. Sometimes they say in the ice cream in the body. Before we give definitions of angles, we need one more thing. The line of nodes ON - the line of intersection of the plane OXY and Oxy

α (or φ) is the angle between the Ox axis and the ON axis. Value range )