## 2 B-Spline Corner Smoothing Method
### B-Spline Curve  
The B-spline curve \(C(u)\) is applied to smooth the corner between the linear tool paths, which can be defined as follows [27]:  
\[C(u)=\sum_{i=0}^{n}N_{i,p}(u)P_{i}\ u\in[0,1] \tag{1}\]  
where \(n+1\) and \(p\) represent the number of control points and the order of B-spline, respectively. They are set as 9 and 4, respectively. The knot vector is constructed as [0 0 0 0 0 1/5 2/5 3/5 4/5 1 1 1 1 1]. The basic functions \(N_{i,p}(u)\) are given as:  
\[\left\{\begin{array}{l}N_{i,0}(u)=\begin{cases}1\quad\text{if }u_{i}\leq u_{i+1}\\ 0\quad\text{else}\\ N_{i,p}(u)=\frac{u-u_{i}}{u_{i+p}-u_{i}}N_{i,p-1}(u)+\frac{u_{i+p+1}-u}{u_{i+p +1}-u_{i+1}}N_{i+1,p-1}(u)\end{cases}\end{array}\right. \tag{2}\]  
where \(0/0=0\).  
Additionally, the B-spline curve can be simplified as:  
\[C(u)=\sum_{i=0}^{8}A_{i}(u)P_{i}\ u\in[0,1] \tag{3}\]  
where \(A_{i}(u),(i=0,1,\dots,8)\) is a polynomial, which can be deduced from the basis function \(N_{i,p}(u)\). The detailed descriptions \(A_{i}(u)\) are given in Appendix A.  
The derivative of B-spline can be expressed as:  
\[C(u)^{\prime}=\frac{dC(u)}{du}=\sum_{i=0}^{8}A_{i}(u)^{\prime}P_{i}\ u\in[0,1] \tag{4}\]  
\[C(u)^{\prime\prime}=\frac{d^{2}C(u)}{du^{2}}=\sum_{i=0}^{8}A_{i}(u)^{\prime \prime}P_{i}\ u\in[0,1] \tag{5}\]  
\[C(u)^{\prime\prime\prime}=\frac{d^{3}C(u)}{du^{3}}=\sum_{i=0}^{8}A_{i}(u)^{ \prime\prime\prime}P_{i}\ u\in[0,1] \tag{6}\]  
In the process of moving along the transition curve \(C(u)\), the velocity \(v\), acceleration \(a\) and jerk \(j\) are typical kinematic parameters, whose vector form can be expressed:  
\[\left\{\begin{array}{l}\overset{\rightarrow}{v}=\frac{dC(u)}{ds}\frac{ds} {dt}=v\overset{\rightarrow}{T}\\ \overset{\rightarrow}{a}=\frac{d^{2}C(u)}{ds^{2}}(\frac{ds}{dt})^{2}+\frac{ dC(u)}{ds}\frac{d^{2}s}{dt^{2}}=kv\overset{\rightarrow}{N}+a\overset{ \rightarrow}{T}\\ \overset{\rightarrow}{j}=\frac{d^{2}C(u)}{ds^{3}}(\frac{ds}{dt})^{3}+3\frac {d^{2}C(u)}{ds^{4}}\frac{ds}{dt}\frac{d^{2}s}{dt^{2}}+\frac{d^{3}s}{dt^{3}} \frac{dC(u)}{ds}=(\frac{dk}{ds}v^{3}+3 avk)\overset{\rightarrow}{N}+(j-k^{2}v ^{3})\overset{\rightarrow}{T}\end{array}\right. \tag{7}\]  
where  
\[v=\frac{ds}{dt^{2}},a=\frac{d^{2}s}{dt^{2}},j=\frac{d^{3}s}{dt^{3}},\overset{ \rightarrow}{T}=\ \frac{dC(u)}{ds}/\|\frac{dC(u)}{ds}\|,\overset{ \rightarrow}{N}=\ \frac{d^{2}C(u)}{ds^{2}}/\|\frac{d^{2}C(u)}{ds^{2}}\| \tag{8}\]  
\[k=\ \frac{\|C(u)^{\prime}\times C(u)^{\prime\prime}\|}{\|C(u)^{\prime}\|^{3}} \tag{9}\]  
In Equation (7), \(t,s\) and \(k\) denote time, arc length and curvature, respectively. As shown in Equation (7), the actual machine motion along the tool path is related to the profiles of the kinematic parameters (i.e., \(v\), \(a\) and \(j\)) and the continuity of geometric parameters (i.e.,\(k\) and \(dk/ds\)). Therefore, in order to enhance the machining efficiency, it is necessary to strengthen the smoothness of the tool path.  
For convenience of description, the control point \(P_{i}(i=0,1,\ldots,8)\) of the transition curve in the multi segment linear tool path can be given as \(P_{j,i}(j=0,1,\ldots,N,i=0,1,\ldots,8)\), \(N\) represents the number of corners. In order to obtain the control points, the error feasible area, \(\mathrm{G}^{3}\) continuity and curvature optimization are discussed as follow.