## 6 Deviation State Space Model for the MAP of Three-Dimensional Weakly Rigid Parts
### Deviation Conversion from the Part to the Global Coordinate System  
As mentioned earlier, from the perspective of modelling the deviation vectors of each part, each part has an independent part coordinate system \(L_{\text{pcs}}\). For the angle joint assembly system, in the contact fit area of two parts, two contact surface normal vectors exist in each part coordinate system, and the un-unified two normal vectors greatly affect the modelling and calculation efficiency of the deviation flow state model. From the perspective of multi-station assembly flow modelling, a unified global coordinate system \(L_{\text{gcs}}\) is established and a mathematical relationship between the global coordinate system at the assembly level and the part coordinate system at the part level is established by means of a homogeneous transformation matrix. Figure 12 has the local coordinate systems \(L_{\text{pcs}1}\) and \(L_{\text{pcs}2}\) of part 1 and part 2 and the global coordinate system \(L_{\text{gcs}}\) of the assembly system. According to the right-handed spiral criterion specifying the positive direction of rotation of the coordinate axes, the rotation vector angles of x, y and z of coordinate system \(L_{\text{pcs}1}\) with respect to coordinate system \(L_{\text{gcs}}\) are noted as \(\omega_{\text{x}}\), \(\omega_{y}\), \(\omega_{z}\) and the origin of coordinate system \(L_{\text{pcs}1}\). The translation vector displacement of the origin of the coordinate system \(L_{\text{pcs}1}\) with respect to the origin of the coordinate system \(L_{\text{gcs}}\) is noted as \(t_{\text{x}}\), \(t_{\text{y}}\), \(t_{z}\). Figure 11: Diagram of the multi-working assembly state of a weakly rigid flat part. With the introduction of the global coordinate system \(L_{gcs}\), the normal vectors \(n_{1}^{p1}\) and \(n_{2}^{p2}\) of the non-uniform coordinate system in Figure 12 can be transformed into the normal vectors \(n_{1}^{s}\) and \(n_{2}^{s}\) of the uniform coordinate system, and the rotation transformation matrix from the coordinate system \(L_{\text{pcs1}}\) to the coordinate system \(L_{gcs}\) can be found as \(R_{p1/g}\) and translational transformation matrix \(T_{p1/g}\):  
\[R_{p1/g}= \begin{bmatrix}c\omega_{z}c\omega_{y}&c\omega_{z}s\omega_{y}s\omega_{ x}-s\omega_{z}c\omega_{x}&c\omega_{z}s\omega_{y}c\omega_{x}+s\omega_{z}s\omega_{x} \\ s\omega_{z}c\omega_{y}&s\omega_{z}s\omega_{y}s\omega_{x}+c\omega_{z}c\omega_{x} &s\omega_{z}s\omega_{y}c\omega_{x}-c\omega_{z}s\omega_{x}\\ -s\omega_{y}&c\omega_{y}s\omega_{x}&c\omega_{y}c\omega_{x}\end{bmatrix} ,\ T_{p1/g }= \begin{bmatrix}t_{x}\\ t_{y}\\ t_{z}\end{bmatrix}  \tag{33}\]  
At station \(k\), note that \(X_{A_{1}}{}^{p1}(k){=}\big{[}{x_{A_{1}}}^{p1}(k),{y_{A_{1}}}^{p1}(k),{z_{A_{1} }}^{p1}(k),v\big{]}^{T}\) denotes the coordinates of the homogeneous position coordinates of point \(A\) in the coordinate system \(L_{\text{pcs1}}\) for any point \(A\) on part 1. \(\Delta X_{A_{1}}{}^{p1}(k){=}\big{[}\Delta{x_{A_{1}}}^{p1}(k),\Delta{y_{A_{1}} }^{p1}(k),\Delta{z_{A_{1}}}^{p1}(k),\Delta{\sigma}^{p1}(k),\Delta{\beta}^{p1}( k)\big{]}^{T}\) denotes the vector of part deviations of point A in the coordinate system \(L_{\text{pcs1}}\). Where \(v\) is the coordinate projection coefficient, then the relationship between the coordinates \(X_{A_{1}}{}^{s}(k)\) and \(X_{A_{1}}{}^{p1}(k)\) and the deviation vector \(\Delta X_{A_{1}}{}^{s}(k)\) and \(\Delta X_{A_{1}}{}^{p1}(k)\) of the homogeneous position coordinates of point \(A\) in the coordinate system \(L_{\text{gcs}}\) is:  
\[X_{A_{1}}{}^{s}(k){=}\ \Lambda_{1}{\cdot}X_{A_{1}}{}^{p1}(k) \tag{34}\] \[\Delta X_{A_{1}}{}^{s}(k){=}\ \Pi_{1}{\cdot}\Delta X_{A_{1}}{}^{p1}(k)\]  
\[ \begin{bmatrix}x_{A_{1}}{}^{s}(k)\\ y_{A_{1}}{}^{s}(k)\\ z_{A_{1}}{}^{s}(k)\\ v\end{bmatrix} {=} \begin{bmatrix}R_{p1/g}&T_{p1/g}\\ &1\end{bmatrix} {bmatrix} \begin{bmatrix}x_{A_{1}}{}^{p1}(k)\\ y_{A_{1}}{}^{p1}(k)\\ z_{A_{1}}{}^{p1}(k)\\ v\end{bmatrix}  \tag{35}\] \[