Kinematic Model of a Desktop Robot Manipulator with 5 Degrees of Freedom

Robotics became available to everyone and is becoming a part of almost all aspects in our life. If earlier robotic complexes were produced mainly for industry and were expensive, large, and cumbersome to design and use, today a number of compact and inexpensive robots have been created. A desktop robot manipulator is a full-fledged assistant for the housekeeping or small business companies which can perform routine operations: carrying objects over a short distance, tightening screws and nuts, soldering PCBs, cutting products, 3D printing, drawing on any surface. To solve problems involving work in open space without additional artificially created obstacles, the manipulator needs only 5 degrees of freedom. The present article describes a kinematic model for a desktop robot manipulator, which solves the problems of process positioning a desktop robot manipulator with 5 degrees of freedom.


Introduction
To describe the geometry of a robotic arm, a kinematic diagram is used -a sequence of links connected by joints. The scheme of the considered robot is shown in Figure 1. All joints are of the same typerotational, therefore, the location of adjacent links is determined only by the angular variable. The kinematic model of the arm is obtained by solving 2 problems of kinematics: forward and inverse.
The forward problem has one clear solution and is the calculation of the coordinates of the position and orientation of the working body for a given set of generalized coordinates.
The inverse problem is to calculate a set of generalized coordinates for given coordinates of the working tool. Since the position of the gripper in space can be achieved in different ways, the inverse problem of kinematics will always have several solutions.

Solution of the forward problem of kinematics
To solve the forward problem of kinematics, the Denavit-Hartenberg parameters are used. This approach for determining the position and orientation of the links allows using 4 coordinates, instead of 6 (3 linear and 3 angular). Simplification is achieved by snapping coordinate systems to the links of the manipulator. The peculiarity of this robot is that all the links are rotational.

Determination of Denavit-Hartenberg parameters
Binding of coordinate systems to links is shown in Figure 2. The origin of coordinates is determined by the intersection of zi and xi. The coordinate system of the working tool is selected in such a way that the z coordinate is directed towards the action of the gripper. Z0 is placed in the direction of rotation of the original (initial) coordinate system.
The ai and alphai parameters -are always constants for manipulators. Since all joints are rotational, di is a constant displacement and а thetai -is a constant displacement and. The sizes d1 and d5 can be neglected, because in a real robot, they are at the junction of two joints. Of the lengths, only a2 and a3 are important.

Calculation of angular coordinates through matrix transformations
After obtaining the Denavit-Hartenberg parameters, it was necessary to calculate the displacement of the final coordinate system relative to the base one. This was done using homogeneous matrix transformations that carry information about the linear displacement and spatial orientation of coordinate systems relative to each other (1).
• ! " -matrix of homogeneous transformations; • ! " -rotation matrix of the n th coordinate system relative to the base " " " coordinate system; • ! " -the vector of the linear displacement of the coordinate system ! ! ! relative to " " " .
Next, the transformation matrices were calculated for each of the five joints, taking into account the Denavit-Hartenberg parameters and the known properties of the rotation matrices (2).
The final matrix was obtained by multiplying the matrices obtained at each step by formula 2. The result is presented below (3). The resulting matrix contains all the necessary information but is inconvenient for perception. It can be used to find the angular coordinates explicitly through the Euler angles. The rotation matrix given using the Euler angles looks like this (4): The angle θ is known and equals 0°. Since the angle θ is equal to 0, the element r33 is equal to 1. This leads to ambiguity of the solution, since only the sum of the angles can be calculated. To get a specific solution, let us take ψ as 0°. As a result, the angle φ is equal to -90° (5):

Solution of the inverse problem of kinematics
The inverse problem of kinematics is to find the generalized coordinates of all five joints of the desktop robot-manipulator for the given coordinates of the working body. For the solution, an analytical method is used through kinematic decomposition (solution of the inverse problem of kinematics in position and orientation). The diagram of the manipulator, according to which the geometric relationships are built, is shown in Figure 3.  Figure 3. Geometric diagram of a robotic arm.
To solve the inverse problem of kinematics, we project a point onto the x0y0, plane, which corresponds to the last joint, which affects the position of the working body coordinate system. This point is also called a flange point. In the manipulator diagram this is a ( " point at joint θ4. It is necessary to find the trigonometric relationship between the angular generalized coordinates of the manipulator based on the coordinates of the vector p4. Let's first calculate the angle θ1. This is the angle of rotation of the manipulator base (6). However, there is another solution for this angle: % = + atan2( ( " , ( " ). In this case, the manipulator turns half a turn and the solution becomes ambiguous. To calculate the subsequent angles, we will take the value of θ1 as in formula 6.
Using the Pythagorean theorem, the cosine theorem, the angle difference formula and the basic trigonometric identity, we obtain the formula for calculating θ3 (10).
Because cos θ3 is 1, then the angle θ3 is 0.
The angle θ2 will be sought as the difference between the angles α and β, where: • α is formed by segments a and c ( = 0,because = 0); • β is formed by segments a and a2. The last links provide the orientation of the working body in accordance with the matrix. To solve the problem, we will use the rotation matrix specified using the Euler angles, which was found when solving the forward problem of kinematics.
Angles θ4 and θ5 correspond to angles ψ and φ: As in the solution of the forward problem of kinematics, '' = 1 leads to ambiguity in the solution. To avoid this, instead of 0 for θ you can assign a small value that does not affect the essence of the calculations (for example, 0.001).

Conclusion
The article proposes a kinematic model of a desktop robot manipulator and provides a solution to the forward and inverse kinematics problem for finding the coordinates of the positioning of the working tool. The configuration of a robotic arm is considered, elongated along one axis; all angles were 0 ° or ± 90 °.
The use of Denavit-Hartenberg parameters and transformation matrices is a relevant method for solving the forward problem of kinematics. However, finding the angles of generalized coordinate systems using the geometric method for inverse kinematics can lead to ambiguities and complex calculations. To solve such problems, numerical-iterative methods can also be used, for example, Jacobi matrices.