# Synthesis of Four-Link Initial Kinematic Chains with Spherical Pairs for Spatial Mechanisms
## 2 Materials and Methods  
Let us consider a spatial initial kinematic chain of the RSS type (R is a rotational pair, S is a spherical pair). Figure 1 shows a spatial initial kinematic chain, where \(A\) is a rotational pair, and \(B\), \(C\) are spherical pairs. The method for solving the problem of synthesizing this initial kinematic chain is based on introducing two spatial moving bodies, rigidly connected to the input and output links, and finding circular points in the relative motion of these bodies. Statement of the problem: let \(N\) finite positions of two solids \(Q_{1}(X_{A}\), \(Y_{A}\), \(Z_{A}\), \(\varphi_{i}^{1}\), \(\psi_{i}^{1}\), \(\theta_{i}^{1}\)) and \(Q_{2}(X_{Di}\), \(Y_{Di}\), \(Z_{Di}\), \(\varphi_{i}^{2}\), \(\psi_{i}^{2}\), \(\theta_{i}^{2})\) be given, where \(\theta_{i}^{j}\), \(\psi_{i}^{j}\), \(\varphi_{i}^{j}\) are the Euler angles relative to the fixed coordinate system \(OXYZ\). It is required to find such points \(A(X_{A}\), \(Y_{A}\), \(Z_{A})\) in the fixed coordinate system, \(B(x_{B}\), \(y_{B}\), \(z_{B})\), of solid \(Q_{1}\) and \(C(x_{C}\), \(y_{C}\), \(z_{C})\) of solid \(Q_{2}\), where the distance between points \(B\) and \(C\) in all positions of solids \(Q_{1}\) and \(Q_{2}\) differs little from some constant value \(R\). The coordinates of point \(D(X_{D}\), \(Y_{D}\), \(Z_{D})\) are given. We need to find 10 unknown parameters, which are \(X_{A}\), \(Y_{A}\), \(Z_{A}\), \(x_{B}\), \(y_{B}\), \(z_{B}\), \(x_{C}\), \(y_{C}\), \(z_{C}\), and \(R\). We can minimize the difference \(\Delta qi\) for each position, which is expressed as  
\[\Delta_{q_{i}}=\left|\overset{\longrightarrow}{B_{i}C_{i}}\right|^{2}-R^{2}= (X_{C_{i}}-X_{B_{i}})^{2}+(Y_{C_{i}}-Y_{B_{i}})^{2}+(Z_{C_{i}}-Z_{B_{i}})^{2} -R^{2},\ \left(i=\overset{\longrightarrow}{1,N}\right) \tag{1}\]  
where \(x_{Bi}\), \(y_{Bi}\), and \(z_{Bi}\) are the coordinates of point \(B\) in the position \(i\) on solid \(Q_{1}\), and \(x_{Ci}\), \(y_{Ci}\), and \(z_{Ci}\) are the coordinates of point \(C\) in the position \(i\) on solid \(Q_{2}\). The matrix \(T_{j\theta}^{j}\) is composed of directional cosines (or transformation matrices) that relate the local coordinate systems of each solid \(Q_{1}\) and \(Q_{2}\) to a fixed coordinate system. The matrix itself is built from the Euler angles \(\theta_{i}^{j}\), \(\psi_{i}^{j}\), \(\varphi_{i}^{j}\) of each solid in each position \(i\)  
Figure 1: Kinematical schema of a three-link open chain ABCD. where \(j=1\), \(2\) refers to the two solids [13]. The components of the matrix are structured as follows:  
\[T_{j0}^{i}= \begin{bmatrix}e_{i1}^{j}&e_{i2}^{j}&e_{i3}^{j}\\ m_{j1}^{j}&m_{j2}^{j}&m_{j3}^{j}\\ n_{i1}^{j}&n_{i2}^{j}&n_{i3}^{j}\end{bmatrix} ,(j=\overline{1,2};i=\overline{1,N}) \tag{2}\]  
where \(e_{i1}^{j}\), \(e_{i2}^{j}\), \(e_{i3}^{j}\) are the components of the first row (often representing the direction cosines of the local \(x\)-axis in the fixed coordinate system); \(m_{i1}^{j}\), \(m_{i2}^{j}\), \(m_{i3}^{j}\) are the components of the second row (typically representing the direction cosines of the local \(y\)-axis in the fixed coordinate system); \(n_{i1}^{j}\), \(n_{i2}^{j}\), \(n_{i3}^{j}\), \(i\) represent the components of the third row (usually the direction cosines of the local \(z\)-axis in the fixed coordinate system). These represent the direction cosines of the local \(x\)-axis relative to the fixed axes:  
\[ \begin{split}& e_{i1}^{j}=cos\psi_{i}^{j}:cos\varphi_{i}^{j}- cos\theta_{i}^{j}\cdot sin\psi_{i}^{j}\cdot sin\varphi_{i}^{j}\\ & e_{i2}^{j}=-cos\psi_{i}^{j}\cdot sin\varphi_{i}^{j}-cos\theta_{i} ^{j}\cdot sin\psi_{i}^{j}\cdot cos\varphi_{i}^{j}\\ & e_{i3}^{j}=sin\theta_{i}^{j}\cdot sin\psi_{i}^{j}\end{split}  \tag{3}\]  
These represent the direction cosines of the local \(y\)-axis relative to the fixed axes:  
\[