# Global Time-Varying Path Planning Method Based on Tunable Bezier Curves
## 3 Transient Path under the Single-Obstacle Environment
### Generating Curve  
In Step 4 and Step 5, the feature points of obstacles and the feature points of curves are extracted respectively. In Step 6, a Bezier curve is generated from the feature points of the curve \(P_{i}^{0}\). The curves representing the path can be circular arcs, sine and cosine curves, \(N\)-polynomial curves, Bezier splines, \(B\)-splines, and so on. In this paper, the Bezier curve is taken as an example to describe how to use the feature points of the curve to plan the time-varying trajectory. Feature points can be obtained according to the obstacle \(P_{1}^{0}\)-\(P_{n}^{0}\). According to these feature points and the scale factor \(\kappa\), a Bezier curve with \(n\)-1 order can be generated. From \(P_{1}^{0}\) to \(P_{n}^{0}\), a polygon composed of polylines formed by various feature points is referred to as a feature polygon. In Figure 5, the point after the first iteration satisfies the following relationship. \[\left\{ \begin{array}{l}P_{1}^{1}=(1-\kappa)P_{1}^{0}+\kappa P_{ 1}^{0}\\ P_{2}^{1}=(1-\kappa)P_{2}^{0}+\kappa P_{3}^{0}\\ P_{3}^{1}=(1-\kappa)P_{3}^{0}+\kappa P_{4}^{0}\\ \end{array} \right. \tag{11}\]  
The point after the second iteration satisfies the following relationship. \[\left\{ \begin{array}{l}P_{1}^{2}=(1-\kappa)P_{1}^{1}+\kappa P_{ 1}^{1}\\ P_{2}^{2}=(1-\kappa)P_{2}^{1}+\kappa P_{3}^{1}\\ \end{array} \right. \tag{12}\]  
After the third iteration, the point on the Bezier curve is obtained, which satisfies the following relationship. \[p(\kappa)=P_{1}^{3}=(1-\kappa)P_{1}^{2}+\kappa P_{2}^{2} \tag{13}\]  
The points and segments in the diagram satisfy the following relationships. \[P_{i}^{j}=(1-\kappa)P_{i}^{j-1}+\kappa P_{i+1}^{j-1} \tag{14}\]  
\[\overline{P_{i}^{j-1}P_{i}^{j}}\bigg{/}\overline{P_{i}^{j}P_{i+1}^{j-1}}= \kappa\big{/}(\kappa-1) \tag{15}\]  
where \(P_{i}^{j}\) is the \(i\)th point after the \(j\)th iteration and \(p(\kappa)\) is the function representing the Bezier curve, \(\kappa\in[0,1]\). When \(\kappa\) changes from 0 to 1, a cubic Bezier curve defined by \(n\) = 4 vertices in the graph is generated. By analogy, the \(n\)th degree Bezier curve \(p(\kappa)\) defined by \(n\)+1 vertices can be obtained that satisfies the following equation. \[p(\kappa)=\sum_{i=1}^{n+1}C_{n}^{i-1}(1-\kappa)^{n+1-i}\kappa^{i-1}P_{i}^{0} \tag{16}\]  
where \(C_{n}^{i-1}\) is the number of combinations expressed in probability theory. The \(p(\kappa)\) corresponding to the Bezier curve can be sorted out as a matrix as follows. \[p(\kappa)=\mathbf{P}\mathbf{K}_{1}(1-\kappa)\mathbf{K}_{2}(\kappa)\mathbf{H}^{T} \tag{17}\]  
The matrices \(\mathbf{P}\), \(\mathbf{K}_{1}\), \(\mathbf{K}_{2}\) and \(\mathbf{H}\) in the equation are as follows. \[\mathbf{P}=\left[P_{1}^{0},P_{2}^{0},\cdots,P_{n}^{0}\right] \tag{18}\]  
Figure 5: Schematic diagram of the Bezier curve (example of \(\kappa\) = 0.3). \[\mathbf{K}_{1}(1-\kappa)=\left[\left(1-\kappa\right)^{n},\left(1-\kappa\right)^{n-1}, \cdots,\left(1-\kappa\right)^{0}\right]\cdot\mathbf{I}_{n} \tag{19}\]  
\[\mathbf{K}_{2}(\kappa)=\left[\kappa^{0},\kappa^{1},\cdots,\kappa^{n}\right]\cdot \mathbf{I}_{n} \tag{20}\]  
\[\mathbf{H}^{\rm T}=\left[\lambda_{1},\lambda_{2},\cdots,\lambda_{n}\right] \tag{21}\]  
where \(\mathbf{P}\) is the geometric matrix of feature points; \(\mathbf{K}_{1}\) and \(\mathbf{K}_{2}\) are diagonal matrices related to parameter \(\kappa\); \(\mathbf{H}\) is the weight matrix; \(\lambda_{i}=C_{n}^{i-1}\) is the weight coefficient. Deriving the variables \(\mathbf{K}_{1}\), \(\mathbf{K}_{2}\) and \(p(\kappa)\) to \(\kappa\), the following equations can be obtained. \[P_{i}^{j}=(1-\kappa)P_{i}^{j-1}+\kappa P_{i+1}^{j-1} \tag{14}\]0  
\[P_{i}^{j}=(1-\kappa)P_{i}^{j-1}+\kappa P_{i+1}^{j-1} \tag{14}\]1  
\[P_{i}^{j}=(1-\kappa)P_{i}^{j-1}+\kappa P_{i+1}^{j-1} \tag{14}\]2  
\[P_{i}^{j}=(1-\kappa)P_{i}^{j-1}+\kappa P_{i+1}^{j-1} \tag{14}\]3  
Just substituting the specific \(\kappa\) value into the above derivation equations, the matrix related to \(\kappa\) can be solved in advance.