## Concept and Kinematic Model Formulation
### Kinematic Linear n-Sensor Model  
Considering a CFRP structure (e.g., a beam) connected by \(n\) ideal bars and subjected to a plane in-deformation, and assuming that the maximum allowable displacement range is smaller than 1 \(\upmu\)m, the movement \(\delta L\) of two connected sections can be expressed as:  
\[\delta L=L_{i}-L_{i,0}, \tag{4}\]  
where \(L_{i}\) represents the instantaneous length of the \(i\)-th bar and \(L_{i,0}\) is the distance of the \(i\)-th segment, respectively. The relationship between distortions and FBGs' movements can be modeled as shown in Figure 2. The actual end effector position includes the effect of kinematic errors, achieved by the composition of three roto-translations. These matrices are defined by Equations (5)-(9). \[M_{i-1,i}=M^{a}{}_{i-1,i}\cdot M^{b}{}_{i-1,i}\cdot M^{c}{}_{i-1,i}, \tag{5}\]  
\[M^{a}{}_{i-1,i}=\left[ \begin{array}{cccc}1&0&0&a\\ 0&\cos(\alpha_{i})&-\sin(\alpha_{i})&0\\ 0&\sin(\alpha_{i})&\cos(\alpha_{i})&0\\ 0&0&0&1\end{array} \right], \tag{6}\]  
\[M^{b}{}_{i-1,i}=\left[ \begin{array}{cccc}\cos(\beta_{i})&0&\sin(\beta_{i}) &0\\ 0&1&0&b\\ -\sin(\beta_{i})&0&\cos(\beta_{i})&0\\ 0&0&0&1\end{array} \right], \tag{7}\]\[M^{c}{}_{i-1,i}=\left[ \begin{array}{cccc}1&0&0&0\\ 0&1&0&0\\ 0&0&1&c\\ 0&0&0&1\end{array} \right], \tag{8}\]  
where matrices \(M^{a}\), \(M^{b}\), and \(M^{c}\) elements are exhaustively described in [41; 42]. By considering a vertical slide as a series of elementary parallel manipulator systems, as shown in Figure 3, it is possible to generalize the kinematic model for micro-deformation measurements. In particular, the error and the compensation system of MT can be represented by Equation (9). \[M_{0,n}=\prod_{i=1}^{n}M_{i-1,i}, \tag{9}\]  
where the matrices represent the three subsequent functions to transfer the tool tip point of MT from the position (0; 0; 0) to the position (\(x;y;z\)). The tool tip point (TTP) is one of the most interesting points in a MT, in fact it represents the ideal contact point between the tool and the workpiece. Any undesired displacements at TTP may generate the machining errors. A calibration model has been developed to compensate the thermal effects. The nominal TTP position (\(x;y;z\)) can be appropriately stated using the transformation matrix formalism as follows:  
\[D=i\cdot D_{x}+j\cdot D_{y}+k\cdot D_{z}, \tag{10}\]  
where the error spatial components are expressed by Equation (11). \[ \begin{array}{l}D_{x}=\alpha_{0}+\alpha_{1}\cdot\delta L_{1}+\alpha_{2} \cdot\delta L_{2}+\alpha_{3}\cdot\delta L_{3}+\alpha_{4}\cdot\delta L_{4}+ \alpha_{5}\cdot\delta L_{5}\\ D_{y}=\beta_{0}+\beta_{1}\cdot\delta L_{1}+\beta_{2}\cdot\delta L_{2}+\beta_{ 3}\cdot\delta L_{3}+\beta_{4}\cdot\delta L_{4}+\beta_{5}\cdot\delta L_{5}\\ D_{z}=\gamma_{0}+\gamma_{1}\cdot\delta L_{1}+\gamma_{2}\cdot\delta L_{2}+ \gamma_{3}\cdot\delta L_{3}+\gamma_{4}\cdot\delta L_{4}+\gamma_{5}\cdot\delta L _{5}\end{array} , \tag{11}\]  
\(\delta L_{j}\) is the elongation measured by the sensor \(j\) (\(j\) = 1,..., 5). These errors can depend on the position of the vertical axis along the \(z\)-direction. In order to investigate the feasibility of the FBG sensor implementation, the first phase was to study the machine tool behavior through a set of simulations. A model may be built by a Finite Element (FE) analysis that represents the main MT features, focusing on structural parts and sensor positions. The study was performed on a ram of a milling machine and the simulation results are shown in Figure 4. The FE analyses were executed simulating a set of ram configurations applying a static load on \(x\)-, \(y\)-, and \(z\)-axes. Figure 4 illustrates an example of the simulations obtained from the FE analysis applying a static load (2000 N) on the \(x\)-axis (Figure 4a) and the \(y\)-axis (Figure 4b).