## 2 The FNA Method
### The Prediction of Machining Trajectory
#### 2.2.2 The Solution of Difference Equation Initial Conditions  
For the difference Equation (3), solving its initial conditions is to obtain the values of \(p_{x}(-2),p_{x}(-1),q_{x}(-2),and\)\(q_{x}(-1)\). The values of \(p_{x}(-2)\) and \(p_{x}(-1)\) can be easily obtained by adding another two sampling points in Figure 1b, and for \(q_{x}(-2)\) and \(q_{x}(-1)\), according to the error relationship between the input and output of the servo system, the following equation can be obtained:  
\[\left\{\begin{array}{l}q_{x}(-2)=p_{x}(-2)-\varepsilon_{x}(-2)\\ q_{x}(-1)=p_{x}(-1)-\varepsilon_{x}(-1)\end{array}\right. \tag{11}\]  
where \(\varepsilon_{x}(-2)\) and \(\varepsilon_{x}(-1)\) are the tracking errors at \(p_{x}(-2)\) and \(p_{x}(-1)\), respectively. According to the control principle of the servo system [34], the tracking error \(\varepsilon_{x}\) is proportional to the speed \(f_{x}\) in the uniform motion state as follows:  
\[\varepsilon_{x}=K_{x}f_{x} \tag{12}\]  
\(K_{x}\) in the above formula is a scale factor, which can be deduced from Appendix A as  
\[K_{x}=\frac{b_{0}-2a_{0}-a_{1}+2}{1+b_{0}+b_{1}}T_{s} \tag{13}\]  
For the more general non-uniform motion state, the tracking error is also approximately proportional to the speed by the factor \(K_{x}\). Therefore, if the X-axis speeds \(f_{x}(-2)\)\(f_{x}(-1)\) at \(p_{x}(-2)\), and \(p_{x}(-1)\) can be obtained, the approximations of \(\varepsilon_{x}(-2)\) and \(\varepsilon_{x}(-1)\) can be found; thus, the approximations of \(q_{x}(-2)\) and \(q_{x}(-1)\) can be obtained.  
The values of \(f_{x}(-2)\) and \(f_{x}(-1)\) can be obtained by decomposing the speed \(\hat{F}_{-2}\) and \(\hat{F}_{-1}\) in Figure 3. Although the exact directions of \(\hat{F}_{-2}\) and \(\hat{F}_{-1}\) are difficult to achieve, the direction of \(\hat{F}_{-2}\) can be approximately set to be the same as the vector \((\mathbf{P}_{-1}-\mathbf{P}_{-3})\), considering the directional asymptotic property of the continuous small line segments. Therefore, the following equation can be obtained:  
\[\frac{\hat{F}_{-2}}{\|\hat{F}_{-2}\|}=\frac{\mathbf{P}_{-1}-\mathbf{P}_{-3}}{\|\mathbf{P}_ {-1}-\mathbf{P}_{-3}\|} \tag{14}\]  
The X-axis component of the above equation is  
\[\frac{\hat{f}_{x}(-2)}{\|\hat{F}_{-2}\|}=\frac{p_{x}(-1)-p_{x}(-3)}{\|\mathbf{P}_ {-1}-\mathbf{P}_{-3}\|} \tag{15}\]  
Replacing the \(\hat{F}_{-2}\) in the above equation with the feedrate \(F_{\text{a}}\), the value of \(\hat{f}_{x}(-2)\) can be obtained as  
\[\hat{f}_{x}(-2)=\frac{p_{x}(-1)-p_{x}(-3)}{\|\mathbf{P}_{-1}-\mathbf{P}_{-3}\|}F_{ \text{a}} \tag{16}\]  
Combining the above equation with Equation (12), the approximation of the tracking error at \(p_{x}(-2)\) can be obtained as  
\[\varepsilon_{x}(-2)\approx\frac{p_{x}(-1)-p_{x}(-3)}{\|\mathbf{P}_{-1}-\mathbf{P}_{-3 }\|}K_{x}F_{\text{a}} \tag{17}\]  
Then, the approximation of \(q_{x}(-2)\) can be achieved as  
\[\hat{q}_{x}(-2)=p_{x}(-2)-\varepsilon_{x}(-2)\approx p_{x}(-2)-\frac{p_{x}(-1 )-p_{x}(-3)}{\|\mathbf{P}_{-1}-\mathbf{P}_{-3}\|}K_{x}F_{\text{a}} \tag{18}\]  
Similarly, the approximation of \(q_{x}(-1)\) can be obtained as  
\[\hat{q}_{x}(-1)\approx p_{x}(-1)-\frac{p_{x}(0)-p_{x}(-2)}{\|\mathbf{P}_{0}-\mathbf{P} _{-2}\|}K_{x}F_{\text{a}} \tag{19}\]  
So far, the approximations of \(q_{x}(-2)\), \(q_{x}(-1)\) in the initial conditions of the difference Equation (3) have been achieved.