# Smooth Interpolation Design with Consideration of Corner Tolerance Constraints for Robotics
## 4 CTC Algorithm  
A corner tolerance occurs when the velocity profiles of line segments overlap. The maximum corner tolerance occurs at half of the overlapping time (\(T_{ol}/2\)). Figure 9 presents the overlapping area of Figure 7. Figure 9a shows the trajectory of block 1 and block 2 at the corner after overlapping; P\({}_{1}\), P\({}_{4}\), and P\({}_{3}\) and are produced from P\({}_{1}\), P\({}_{2}\), and P\({}_{3}\). Here, the distance from P\({}_{2}\) to P\({}_{4}\) is the maximum corner tolerance. Figure 9 presents the velocity profiles of block 1 and block 2 and the overlapped velocity profile, where \(V_{x1}\) and \(V_{x2}\) represent the velocity profiles on the \(x\)-axis of block 1 and block 2, respectively, and the blue solid line formed by P\({}_{1}\), P\({}_{4}\), and P\({}_{3}\) represents the velocity profile of the two blocks after overlapping. The maximum corner tolerance occurs at point P\({}_{4}\). Figure 8: Comparison of velocity profile with _OVLP_ equal to 80% and without _OVLP_. (**a**) Trajectory. (**b**) Tangential velocity. Velocities on the (**c**) \(x\)-axis and (**d**) \(y\)-axis. Figure 9: Schematic of corner tolerance. (**a**) Trajectory. (**b**) \(X\)-axis velocity profile. The three-dimensional corner tolerance (\(\varepsilon\)) can be calculated from the \(x\), \(y\), and \(z\) parameters as follows:  
\[\varepsilon=\sqrt{{\varepsilon_{x}}^{2}+{\varepsilon_{y}}^{2}+{\varepsilon_{z}}^ {2}} \tag{26}\]  
In Figure 9a, \(\varepsilon_{x1}\) is the distance from P\({}_{1}\) to P\({}_{2}\) for block 1 in the \(x\) direction and can be calculated by integrating the area of BDE in Figure 9b; this area represents the distance from P\({}_{5}\) to P\({}_{2}\) in the \(X\) direction. To obtain \(\varepsilon_{x1}\), the \(S_{1}\) term in Equation (16) can be replaced by Equation (27), where \(t\) is substituted with \(T_{ol}/2\) and \(J\) is substituted with \(J_{x1}\), obtaining Equation (28). \[S=Jt^{3}/6 \tag{27}\]  
\[\varepsilon_{x1}=\frac{J_{x1}T_{ol}}{48} \tag{28}\]  
When considering the overlap effect, P\({}_{5}\) should move to a distance projected on the \(x\)-axis relative to P\({}_{4}\), represented as \(\varepsilon_{x2}\). The value of \(\varepsilon_{x2}\) represents the area under ACD and is given by Equation (29), where \(J_{x2}\) represents the jerk of N\({}_{2}\) along the \(x\) direction. \[\varepsilon_{x2}=\frac{J_{x2}T_{ol}}{48} \tag{29}\]  
The distance between P\({}_{4}\) and P\({}_{2}\) on the \(X\)-axis is represented by \(\varepsilon_{x}\) and can be calculated using the following equation. \[\varepsilon_{x}=\varepsilon_{x1}-\varepsilon_{x2} \tag{30}\]  
Here, \(\varepsilon_{x}\) represents the corner tolerance \(\varepsilon\) projected on the \(x\)-axis. Similarly, the corner tolerance components in the \(y\) and \(z\) directions can be calculated using Equations (31) and (32). \[\varepsilon_{y}=\varepsilon_{y1}-\varepsilon_{y2} \tag{31}\]  
\[\varepsilon_{z}=\varepsilon_{z1}-\varepsilon_{z2} \tag{32}\]  
where \(\varepsilon_{y1}={J_{y1}T_{ol}}^{3}/48\), \(\varepsilon_{y2}={J_{y2}T_{ol}}^{3}/48\), \(\varepsilon_{z1}={J_{z1}T_{ol}}^{3}/48\), and \(\varepsilon_{z2}={J_{z2}T_{ol}}^{3}/48\). The relationship between \(T_{ol}\) and \(\varepsilon\) can be obtained by substituting Equations (30)-(32) into (26). Figure 8:0  
Summing the squares of Equation (33) produces Equation (34), where \(\left(J_{x1}-J_{x2}\right)^{2}+\left(J_{y1}-J_{y2}\right)^{2}+\left(J_{z1}-J_{ z2}\right)^{2}\) is abbreviated to \(J_{xyz}\)  
Figure 8:1  
After jerk and corner tolerance have been determined, \(T_{ol}\) can be obtained using Equation (35), and the CTC equation can be expressed as follows:  
Figure 8:2  
In Section 2, the S-shaped design method was adopted to plan the translation and orientation. In Section 3, the VPO method was applied to plan a line segment, solving the discontinuity problem. By contrast with the conventional ADAI approach, the VPO method can explicitly specify the corner tolerance for each corner.