When fighters make maneuvers, they often perform yaw, pitch, and roll actions to change the trajectory of the aircraft. This also contains a wealth of ideas and applications of linear space transformation. This article attempts to use the theory of linear algebra to explain how these operations are done. Of course, the same explanation can also be applied to the movement of robots and robotic arms.
For convenience, choose the coordinate system on the plane, assuming that the plane is on a plane, the nose is pointing to the positive direction of the axis, and the left wing is pointing to the positive direction of the axis. The plane is flying on a plane, and the axis is defined in the normal direction of the flight plane. The above is positive. As shown below:
When the plane is flying, the three coordinate axes and the plane move at the same time.
We respectively talk about:
1. yaw
Yaw is a rotation in a plane. As shown in the figure below, it is a schematic diagram of yaw 45°. At this time, the aircraft turns right 45° (clockwise). From the perspective of three-dimensional linear transformation, yaw is about the axis Rotation, if the initial coordinates of the aircraft nose are expressed as a vector , its coordinates will still be after the yaw . This is because the coordinate axis rotates together with the aircraft. For the time being, the coordinate system before the transformation becomes the initial coordinate system, and the yaw is 45° After that, the position of the nose relative to the initial coordinate system is
If the yaw transformation L can be called the transformation of the initial coordinate system, it is easy to find its representation matrix. If the yaw angle of L to that is , then L will be (1,0,0) and (0,1,0 ) Respectively rotate to points
with
The point will remain the same when yaw, because it is on the axis of rotation. For the column vector, if it is the coordinate vector of L , then
Then, the transformation matrix of yaw is:
2. Pitch
The pitch of the aircraft is the rotation in the plane. When the angle is negative, the nose rotates downward, otherwise, it rotates upward. From the perspective of the linear transformation of the three-dimensional space, the pitch is the rotation about the axis. Just like the yaw, there is also a transition matrix relative to the initial coordinate system. If L is a pitch transformation with a rotation angle of , then the matrix represented by L is:
3. Tumble
The roll of the aircraft is the rotation of the plane, the left wing is up, the right wing is down, and the rotation is in the positive direction. From the perspective of the linear transformation of the three-dimensional space, roll is the rotation about the axis, similar to yaw and pitch, the transfer matrix of the initial coordinate system can be transformed by the roll of the i-ball.
If the yaw angle first , then the pitch angle , this compound transformation is linear, and its transformation matrix is not a product . The function of yaw is to convert the standard basis vector to a new direction , so the vector will be used to define the new pitch The direction of the axis, the next pitch transformation is carried out for the new axis (that is , the direction indicated by the vector ), the vectors form a plane, and when pitching, they will rotate together in the plane by an angle , and the vector will not be affected when pitching Because it is on the axis of rotation. Therefore, the effect of the consistent transformation L on the standard basis vector is:
The image of the standard basis vector constitutes a column vector conforming to the transformation representation matrix.
Therefore, the representation matrix conforming to the transformation is the product of the two matrices representing yaw and pitch, but the product must be performed in the reverse order, that is, the yaw matrix is on the left and the pitch matrix is on the right. Similarly, the yaw angle , Then the coincidence transformation of the pitch angle and the roll angle indicates that the matrix should be a product
It can be understood this way, assuming that after three transformations of yaw, pitch, and roll, the vector in the new coordinate system
Then before the roll transformation, the vector is
Before pitch transformation, the vector is
Before the yaw transformation, the vector is
and so
Among them are the coordinates measured in the coordinate system before the transformation, and the coordinates in the new coordinate system
The vector in the standard coordinate system is equal to the vector in the coordinate system , which can be written as:
It is similar to the variable definition in C language programming.
int a;
double abc;
Follow the form of "type + object", where the matrix is the type, and the object is the vector coordinate.
Think of another way to understand compound transformation:
Assuming that the initial coordinate system is the standard coordinate system and remains unchanged, the transformation is based on the basis. Therefore, relative to the original coordinate system, assuming the coordinate vector is , the new coordinate in the original coordinate system after transformation is , The transformation operator is .
After the transformation, the coordinates become in the original coordinate system, and the transformation operator is
Therefore, after comprehensively performing Y and R transformations, the new coordinates in the original coordinate system after the transformation of the original vector are multiplied by the transformation operator:
Perform Y transformation first, and then perform R transformation to get:
In the same way, it is regarded as a transformation, and then the transformation is carried out on the basis of it , then the R transformation is carried out on the basis. The same reason, in the original coordinate system, the transformation operator should be
Therefore, the composite transformation obtained by performing Y, P, and R transformations in turn should be the multiplication of the cubic transformation matrix in composite intuition:
Wherein , , respectively, from the original coordinate system the angle, seen transformation matrix, thus in line with the right by an intuitive understanding of the process as shown below:
As shown below:
Here must just distinguish between space transformation and perspective transformation:
Viewing angle change: Observing the change of the angle, the control itself has not changed, the rectangle is still the original rectangle, the square is still the original square, and the spatial structure has not changed.
Space transformation: the space itself changes, the space is distorted, stretched, etc., for example, a rectangle becomes a parallelogram, etc. Here we should pay attention to a special kind of space transformation, that is, the orthogonal transformation caused by the normal matrix. Orthogonal transformation will not distort or deform anything, but it belongs to space transformation.
Of course, it may need to be assumed here that the space has an absolute orientation, that is, there is a real identity matrix . From this perspective, the perspective transformation can be regarded as a special spatial transformation.
In fact, there is a theorem in the advanced course of linear algebra (the Tongji version of non-mistakers), which is described as follows:
make
as well as
Vector space is a two ordered groups, and so is a linear operator on, so that from the transfer matrix represents, if is corresponding to the representation matrix, and is corresponding to the representation matrix, then , or
The proof of this theorem is also very simple:
The as identity transformation corresponding to the ordered group
with
The representation matrix, then:
Is the representation matrix corresponding to the sum : because the identity transformation is applied to the median vector (that is, it remains unchanged), it is equivalent to the coordinates in the
Is the representation matrix corresponding to : so
Is the representation matrix corresponding to the sum : because the identity transformation is applied to the middle vector (that is, it remains unchanged), it is equivalent to the left multiplication of the coordinates in the middle , that is,
Therefore, it is equivalent to the vector in F. After A transformation, the coordinates in F are obtained . Therefore, for the same transformation, the representations in E and F are different, but they have a similar relationship.
Map the above theorem to the problem of pitch after transformation:
Pitch angle
Initial coordinate system
New coordinate system after transformation
Relative to the transformation of the new coordinate system , here is P
The representation matrix of the P transformation relative to .
The transformation relative to the new coordinate system F, here is
Applying the above formula, you can get:
Example:
Hypothesis
According to the eigenvalues and eigenvectors calculated by octave, it can be seen that the two complex eigenvalues share each other, and the corresponding eigenvectors are also in a mutual relationship. The combined vector has an eigenvalue of 1, and the corresponding feature The vector is a real vector. In fact, the orthogonal transformation in the three-dimensional space must have an eigenvalue with an eigenvalue of 1 (a rigid body transformation does not change the length of the rigid body in any direction). This eigenvalue and eigenvector have very profound meanings. It can classify the above three transformations into one transformation, and the direction corresponding to the feature vector is the symmetry axis of the new transformation, which we will talk about later. For the proof of bars, please refer to my blog post Proving some basic properties of linear space 30. (The basic conclusion is: in the transformation of a rigid body in three-dimensional space, there must be an axis of symmetry. In the direction of the axis of symmetry, the scale of the rigid body does not change. (The characteristic value is 1))
The following figure shows the symmetry axis, which is the original axis after transformation. Note that the entire transformation is equivalent to a rotation of the coordinate system .
The relationship of symmetrical rotation around the direction of the feature vector can be intuitively illustrated by the following figure.
Here is a close-up of the shaft:
In summary, yaw
Pitch
roll
The comprehensive effect of is equivalent to centering the coordinate system around the unit feature vector
Rotate 69.36° to transform the effect completed at one time, so there is no need for the fighters to do the actions step by step. As long as you do a 69.36° rotation according to the calculated vector direction, you can get it in one step. Here the direction of the feature vector is the axis of symmetry. , This is the physical meaning of eigenvectors in engineering.