# A Feedrate Planning Method for the NURBS Curve in CNC
## 2 Feedrate Planning of a NURBS Curve Based on CCC
### Establishment of the CCC Mathematical Model  
The problems in the existing \(C_{2}(s)\) constructing method and their causes are analyzed in the previous section, which is the basis of establishment of the CCC mathematical model in this section. Establishing the coordinate system shown in Figure 3a for any NURBS curve segment, the abscissa is the accumulated arc length, and its maximum value is the arc length \(s_{e}\) of the NURBS curve segment, while the ordinate is the feedrate. \(C_{1}(s)\) in the figure is the constraint curve, and \(f_{\min}\) is the minimum value of \(C_{1}(s)\). Let the expression of the CCC to be constructed be \(\mathrm{g}(s)\). If any point \((\tau,\mathrm{g}(\tau))\) and \((s_{u},C_{1}(s_{u}))\) are taken from each of \(\mathrm{g}(s)\) and \(C_{1}(s)\) as shown in Figure 3a, it can be known from the content of Section 2.1 that when \(\tau\leq s_{u}\), \((\tau,\mathrm{g}(\tau))\) must lie below the deceleration curve \(D_{u}(s)\) passing through \((s_{u},C_{1}(s_{u}))\) (to simplify the derivation process, the geometric constraint of \(C_{1}(s)\) to \((\tau,\mathrm{g}(\tau))\) is not considered here), namely  
\[\mathrm{g}(\tau)\ \leq D_{u}(\tau)=\sqrt{2a_{\mathrm{T}}(s_{u}-\tau)+C_{1}^{2} (s_{u})},\ \ s\in[0,s_{u}] \tag{4}\]  
Letting  
\[\mathrm{g}(\tau)\ \leq D_{u}(\tau)=\sqrt{2a_{\mathrm{T}}(s_{u}-\tau)+C_{1}^{2} (s_{u})},\ \ s\in[0,s_{u}] \tag{5}\]  
the following inequation can be obtained:  
\[\mathrm{g}(s)\leq D_{u}(s)=\sqrt{\lambda_{u}-2a_{\mathrm{T}}s},\ \ s\in[0,s_{u}] \tag{6}\]  
Since \(\sqrt{\lambda_{u}-2a_{\mathrm{T}}s}\) is a monotonically increasing function of \(\lambda_{u}\), in order to make this inequation hold for \(\lambda_{u}\) corresponding to any point on \(C_{1}(s)\), a feasible value of \(\mathrm{g}(s)\) is:  
\[\mathrm{g}(s)=f_{1}(s)=\sqrt{\lambda_{\min}-2a_{\mathrm{T}}s},\ \ s\in[0,s_{e}] \tag{7}\]  
where \(\lambda_{\min}\) is the minimum value that \(\lambda_{u}\) can be on \(C_{1}(s)\). The square root of the negative number is specified as 0. At this point, the curve corresponding to \(\mathrm{g}(s)\) is the critical deceleration curve \(f_{1}(s)\) in Figure 3b. In addition, \(\mathrm{g}(s)=f_{\min}\) can also guarantee that Equation (6) always holds, so the expression of \(\mathrm{g}(s)\) is:  
\[\mathrm{g}(s)=\max\Bigl{(}\sqrt{\lambda_{\min}-2a_{\mathrm{T}}s},f_{\min} \Bigr{)},\ \ s\in[0,s_{e}] \tag{8}\]  
The curve corresponding to this expression is shown in Figure 4. If the feedrate is planned based on it, \(C_{2}(s)\) can be decelerated to \(f_{\min}\) along \(f_{1}(s)\) and then move with a constant feedrate to the end of the NURBS curve segment, when the constructing \(C_{2}(s)\) intersects with \(f_{1}(s)\). However, the way moving to the end of the NURBS curve with the low feedrate \(f_{\min}\) obviously has poor machining efficiency. Therefore, the appropriate acceleration should be performed to improve machining efficiency. In addition, in order to avoid \(C_{2}(s)\) exceeding the constraint of \(C_{1}(s)\) during the acceleration process, a critical acceleration curve can be obtained according to the constructing method of the above critical deceleration curve \(f_{1}(s)\) with the following process:  
Each point on a NURBS curve has a corresponding acceleration curve \(A_{u}(s)\), of which the expression is:  
\[A_{u}(s)=\sqrt{\kappa_{u}+2a_{\mathrm{T}}s},\ \ \kappa_{u}=C_{1}^{2}(s_{u})-2a_{ \mathrm{T}}s_{u} \tag{9}\]  
If the minimum value of \(\kappa_{u}\) is recorded as \(\kappa_{\min}\), the mathematical model of the critical acceleration curve can be obtained as  
\[f_{2}(s)=\sqrt{\kappa_{\min}+2a_{\mathrm{T}}s} \tag{10}\]  
which is shown in Figure 5a. In summary, the complete mathematical model of CCC corresponding to the NURBS curve is:  
\[\mathrm{g}(s)=\max[f_{1}(s),f_{2}(s),f_{\min}],\ \ s\in[0,s_{e}] \tag{11}\]  
and the corresponding curve is shown in Figure 5b. Figure 4: The \(\mathrm{g}(s)\) curve and the feedrate planning process based on it.