## 4 Bidirectional Feed Rate Scanning of S-Shaped Profile  
For the processing trajectory of the end effector of the manipulator, its feed rate vector is obtained by combining the tangential velocities of the tool tip and the tool axis direction, with its magnitude equal to the feed rate modulus and its direction determined by the tangential composition of the tool tip spline and the tool axis direction spline. In this study, the feed rate in the tool axis direction is set to zero. Similarly, the acceleration vector is obtained by combining the tangential acceleration and the normal acceleration of the tool tip and the tool axis motion. Therefore, the feed rate vector \(V\) and the acceleration vector \(A\) at any point on the processing trajectory of the manipulator's end effector can be expressed as follows:  
\[V=[v\tau,0] \tag{19}\]  
\[A=\left[a\tau+\frac{v^{2}}{\rho}\mathbf{n},0\right] \tag{20}\]  
where the unit tangential at any point on the tool tip spline is denoted as \(\tau\), while the unit normal at any point on the tool tip spline is denoted as \(n\). The curvature radius is represented by \(\rho\). Figure 6: Schematic diagram of dynamic speed control planning. Acceleration control case: (**a**) feed rate curve; (**b**) acceleration curve; (**c**) jerk curve; deceleration control case: (**d**) feed rate curve; (**e**) acceleration curve; (**f**) jerk curve. The obtained representation pertains to the feed rate and acceleration of arbitrary points on the processing trajectory in the task space. However, during the actual machining process, the known variables are the velocity \(\dot{\theta}\) and acceleration \(\ddot{\theta}\) constraints of each axis in the joint space. It becomes necessary to make real-time adjustments to the maximum feed rate and acceleration in the bidirectional velocity scanning, as well as the velocity extremum at the endpoints, based on the known kinematic constraints in the joint space. According to the differential kinematic relationship, the following mapping relationships exist between the velocity and acceleration vectors in the joint space and the task space. \[\dot{\theta}={J_{ac}}^{-1}\mathbf{V} \tag{21}\]  
\[\ddot{\theta}={J_{ac}}^{-1}A-{J_{ac}}^{-1}{J_{ac}}\left({J_{ac}}^{-1}V\right) \tag{22}\]  
The feed rate constraints in the bidirectional scanning can be divided into geometric constraints and time constraints in the task space. Geometric constraints include the maximum feed rate \(V_{\max}\), maximum normal acceleration \(A_{n,\max}\), and maximum normal jerk \(J_{n,\max}\). Time constraints consist of the maximum tangential acceleration \(A_{t,\max}\) and maximum tangential jerk \(J_{t,\max}\). The geometric parameters of the path include the maximum chord error \(\delta\) and the curvature \(\kappa_{i,\max}\) at key points along the curve segment. These parameters summarizing the tangential velocity constraints in the task space are discussed in Reference [9]. In this paper, we provide a summary in the bidirectional scanning flowchart as shown in Figure 7. In the figure, the velocity curve from right to left represents the backward scanning, and vice versa for the forward scanning. In order to simplify calculations, it is common to approximate the feed rate at points along the path as the maximum or very close to the maximum velocity. Based on this approximation, the formulas for correcting the maximum tangential feed rate and acceleration are straightforward. By calculating the corresponding Jacobian matrix \(J_{ac}\) and the curve unit tangent \(\tau\), optimized values for the maximum tangential feed rate \(V_{\max}^{\text{opt}}\) and maximum tangential acceleration \(A_{\max}^{\text{opt}}\) can be obtained.