# Design and Experiment of a Novel Facade Cleaning Robot with a Biped Mechanism
## 3 Trajectory Generation
### Fifth-Degree Polynomial Interpolation  
A fifth-degree polynomial interpolation generates a smooth trajectory from a starting point of a gait to an ending point as the speed and the acceleration are represented as fourth and third degrees,  
Figure 12: The schematic figure of the biped robot in three-dimensional space.  
\begin{table}
\begin{tabular}{c c} \hline
**Notation** & **Parameters** \\ \hline \(l_{i}\) & Link length \\ \(m_{i}\) & Mass \\ \(d\) & Length from center of the foot unit to the joint \\ \(l_{3}\) & Length between the joint of each foot unit \\ \(x_{d}\) & Length of \(l_{3}\) on the X–Y plane \\ \hline \end{tabular}
\end{table}
Table 3: Physical Parameters. (\(i=1,2\)).  
respectively. Since all trajectory parameters (position, speed, and acceleration) in this approach are represented as a continuous function, load forces to the actuators can be decreased. Given these advantages, we used this technique for our generation of trajectories, an approach that has been successfully used previously in the community [37; 38; 39].  
The trajectories of position \(x_{r}(t)\), \(y_{r}(t)\), \(z_{r}(t)\), speed \(\dot{x}_{r}(t)\), \(\dot{y}_{r}(t)\), \(\dot{z}_{r}(t)\), and acceleration \(\ddot{x}_{r}(t)\), \(\ddot{y}_{r}(t)\), \(\ddot{z}_{r}(t)\) in terms of time \(t\) are defined as follows:  
\[\{x,y,z\}_{r}(t) =\sum_{i=0}^{5}a_{\{x,y,z\}_{i}i}t^{i} \tag{8}\] \[\{\dot{x},\dot{y},\dot{z}\}_{r}(t) =\sum_{i=1}^{5}ia_{\{x,y,z\}_{i}i}t^{i-1}\] (9) \[\{\ddot{x},\ddot{y},\ddot{z}\}_{r}(t) =\sum_{i=2}^{5}i(i-1)a_{\{x,y,z\}_{i}i}t^{i-2} \tag{10}\]  
where \(a_{i}(i=0,\cdots,5)\) represents coefficients and these are derived from initial states and final states of a given gait. The initial and final states are defined as \(\{x,y,z\}_{s}\) and \(\{x,y,z\}_{f}\), respectively. Let transformation time \(T\) [s] be constant. Using Equations (8)-(10), the initial states at the starting times, \(a_{0}\), \(a_{1}\), and \(a_{2}\), are derived as follows:  
\[\{x,y,z\}_{r}(0) =a_{x,y,z0}=\{x,y,z\}_{s} \tag{11}\] \[\{\dot{x},\dot{y},\dot{z}\}_{r}(0) =a_{x,y,z1}=\{\dot{x},\dot{y},\dot{z}\}_{s}=0\] (12) \[\{\ddot{x},\ddot{y},\ddot{z}\}_{r}(0) =2a_{x,y,z2}=\{\ddot{x},\ddot{y},\ddot{z}\}_{s}=0. \tag{13}\]  
Additionally, from the relation of the final states at the ending time, we have  
\[\{x,y,z\}_{r}(T) =\sum_{i=0}^{5}a_{\{x,y,z\}_{i}}T^{i}=\{x,y,z\}_{f} \tag{14}\] \[\{\dot{x},\dot{y},\dot{z}\}_{r}(T) =\sum_{i=1}^{5}ia_{\{x,y,z\}_{i}}T^{i-1}=\{\dot{x},\dot{y},\dot{z }\}_{f}\] (15) \[\{\ddot{x},\ddot{y},\ddot{z}\}_{r}(t) =\sum_{i=2}^{5}i(i-1)a_{\{x,y,z\}_{i}}t^{i-2}=\{\ddot{x},\ddot{y},\ddot{z}\}_{f}. \tag{16}\]  
By representing Equations (14)-(16) as a matrix form, \(a_{3}\), \(a_{4}\), and \(a_{5}\) are derived as follows:  
\[\begin{bmatrix}a_{\{x,y,z\}}5\\ a_{\{x,y,z\}}4\\ a_{\{x,y,z\}}3\end{bmatrix}=A^{-1}\begin{bmatrix}\{x,y,z\}_{f}-\{x,y,z\}_{s} \\ 0\\ 0\end{bmatrix}, \tag{17}\]  
where  
\[A=\begin{bmatrix}T^{5}&T^{4}&T^{3}\\ 5T^{4}&4T^{3}&3T^{2}\\ 20T^{3}&12T^{2}&6T\end{bmatrix}.\]  
As the fifth-degree polynomial interpolation can be calculated uniquely depending upon the initial conditions \(\{x,y,z\}_{s}\), the final conditions \(\{x,y,z\}_{f}\), and the transformation time \(T\), the gait generation strategy is therefore designed by defining these states.