# Spatial Data-Based Automatic and Quantitative Approach in Analyzing Maintenance Reachability
## 3 Materials and Methods
### Generation of the Arm's Maximum Solution Set
#### 3.1.2 Position Expression of Each Joint in Global Coordinate  
For the purpose of representing all joints in one coordinate system, a coordinate system for each link is established, and two adjacent coordinate systems are connected by a homogeneous transformation matrix. Therefore, the coordinates of one of the coordinate systems are transformed into the other. Consequently, the links in the model can be connected by corresponding homogeneous transformation matrices. The joints can be represented in the same coordinate system. The simple mechanism shown in Figure 2 represents the attitude relationship between any near two joints. The homogeneous transformation matrix, which was also called the D-H transformation matrix, between these two adjacent links is generally represented as \({}^{i-1}T_{i}\). \[{}^{i-1}T_{i}= \begin{bmatrix}R_{3*3}&P_{3*1}\\ O_{1*3}&I_{1*1}\end{bmatrix} = \begin{bmatrix}\cos\theta_{i}&-\sin\theta_{i}\cos \alpha_{i}&\sin\theta_{i}\sin\alpha_{i}&a_{i}\cos\theta_{i}\\ \sin\theta_{i}&\cos\theta_{i}\cos\alpha_{i}&-\cos\theta_{i}\sin\alpha_{i}&a_{ i}\sin\theta_{i}\\ 0&\sin\alpha_{i}&\cos\alpha_{i}&d_{i}\\ 0&0&0&1\end{bmatrix}  \tag{1}\]  
The meaning of each parameter in Equation (1) is:  
1. \(a_{i}\) represents the vertical distance between the axes of near two joints (z-axis) and the length of link \(i\);
2. \(a_{i}\) represents the angle between the axes of near two joints (z-axis) and the twist angle of link \(i\);
3. \(d_{i}\) represents the distance between the vertical lines (x-axis) of near two joints' axes and the offset distance of link \(i\) relative to link \(i-1\);
4. \(\theta_{i}\) represents the angle between the vertical lines (x-axis) of near two joints' axes and the rotation angle of link \(i\) relative to link \(i-1\). This formula represents the transformation from the \(i\) coordinate system to the \(i-1\) coordinate system. In this formula:  
\(R_{3*3}\), \(P_{3*1}\), \(O_{1*3}\), \(I_{1*1}\) represents the rotation matrix, position matrix, perspective matrix, and scale matrix, respectively;  
\(a_{i}\), \(a_{i}\) represents the vertical distance and the angle between the axes of near two joints (z-axis);  
\(d_{i}\), \(\theta_{i}\) represents the distance and the angle between the vertical lines (x-axis) of near two joints' axes. In the four matrixes above, the position matrix is the major concern in the proposed methodology. The nth coordinate system can be transformed into the reference coordinate system by several D-H transformation matrices:  
\[{}^{0}T_{n}={}^{0}T_{1}{}^{1}T_{2}\cdots{}^{n-1}T_{n} \tag{2}\]  
According to the transition process, the coordinate systems in the arm model are unified into the reference coordinate system. Figure 3 shows the transition result by taking the hand as the reference coordinate system. Table 1 shows the required parameter values in the D-H transformation matrixes. Figure 2: Relationship Between Two Adjacent Links. In Table 1, \(i\) ranges from 1 to 7, which are the first DOF of the wrist joint; the DOF of the forearm; the second DOF of the wrist joint; the DOF of the elbow joint; and the first, second, and third DOF of the shoulder joint. \(l\) is the length of the forearm, the value of which is 267 mm, and \(h\) is the length of the upper arm, the value of which is 339 mm. \(\theta_{1}\), \(\theta_{3}\) are the rotational angles of the wrist joint; \(\theta_{2}\) is the rotational angle of the forearm; \(\theta_{4}\) is the rotational angle of the elbow joint; \(\theta_{5}\), \(\theta_{6}\), \(\theta_{7}\) are the rotational angles of the shoulder joint. The ranges of \(\theta_{1}\) to \(\theta_{7}\) are \(-135^{\circ}\leq\theta_{1}\leq-45^{\circ}\), \(-90^{\circ}\leq\theta_{2}\leq 70^{\circ}\), \(-175^{\circ}\leq\theta_{3}\leq 10^{\circ}\), \(0^{\circ}\leq\theta_{4}\leq 142^{\circ}\), \(0^{\circ}\leq\theta_{5}\leq 180^{\circ}\), \(45^{\circ}\leq\theta_{6}\leq 225^{\circ}\), \(-135^{\circ}\leq\theta_{7}\leq 90^{\circ}\).