# Control of Flexible Robot by Harmonic Functions
## 3 Results
### Input-Output Linearization with Output Parametrization  
It is necessary to split the state vector \(\mathbf{x}\) into \(\mathbf{x}_{a}\) and \(\mathbf{x}_{z}\) according to (2). The claim on the regularity of submatrix \(\mathbf{B}_{a}\) derived from matrix \(\mathbf{B}\) in (20) directly implies the splitting of vector \(\mathbf{x}\):  
\[\mathbf{x_{a}}=\begin{bmatrix}\varphi_{1}\\ \varphi_{2}\end{bmatrix}\qquad\mathbf{x_{z}}=\begin{bmatrix}\delta_{11}\\ \delta_{12}\\ \delta_{13}\\ \delta_{21}\\ \delta_{22}\\ \delta_{23}\end{bmatrix} \tag{23}\]  
Figure 1: Model of robot with two flexible arms.  
The flexible double pendulum endpoint coordinates \(x_{2}\) and \(y_{2}\) are system outputs \(\mathbf{y}\), and it corresponds with the length of vector \(\mathbf{x}_{a}\). Input-output linearization can be accomplished. Outputs are obtained using the following relations:  
\[\mathbf{y}=\begin{bmatrix}x_{2}\\ y_{2}\end{bmatrix}=\mathbf{R}_{2}(\mathbf{x},\Phi_{11},\dots,\Phi_{23},\Psi_{ 11},\dots,\Psi_{23}) \tag{24}\]  
The coordinates in the vector \(\mathbf{x}_{a}\) are now changed to the \(\begin{bmatrix}x_{2}\\ y_{2}\end{bmatrix}\) end effector (double pendulum endpoint) coordinates. Equation (24) is used to obtain \(\begin{bmatrix}\varphi_{1}\\ \varphi_{2}\end{bmatrix}\) coordinates and its time derivatives according to (6) and (7) to be substituted into (20). Following one dimensional parametrization (typically endpoint trajectory, see (25)) ensures the endpoint position and leaves free movement along this parameter. Then, the zero dynamics control actions use this free parameter for realizing its unwanted movements.  
\[\mathbf{y}=\begin{bmatrix}x_{2}\\ y_{2}\end{bmatrix}=\mathbf{P}_{2}(p(t)) \tag{25}\]  
The system inputs \(\mathbf{u}=\begin{bmatrix}u_{1}\\ u_{2}\end{bmatrix}\) are obtained from (12), but the following procedure could also be used. Outputs functions (24) and their parametrization (25) are the second-time derivate:  
\[\ddot{\mathbf{R}}_{2} = \begin{bmatrix}\ddot{x}_{2}\\ \ddot{y}_{2}\end{bmatrix}=\frac{\partial\mathbf{R}_{2}}{\partial\mathbf{x}} \ddot{\mathbf{x}}+\frac{\mathrm{d}}{\mathrm{d}t}\bigg{(}\frac{\partial\mathbf{ R}_{2}}{\partial\mathbf{x}}\bigg{)}\dot{\mathbf{x}} \tag{26}\] \[\ddot{\mathbf{P}}_{2} = \begin{bmatrix}\ddot{x}_{2}\\ \ddot{y}_{2}\end{bmatrix}=\frac{\partial\mathbf{P}_{2}}{\partial p}\ddot{p}+ \frac{\partial^{2}\mathbf{P}_{2}}{\partial p^{2}}\dot{p}^{2} \tag{27}\]  
In (26), the coordinates acceleration \(\ddot{\mathbf{x}}\) are substituted from (20), and outputs acceleration \(\ddot{x}_{2}\), \(\ddot{y}_{2}\) are replaced from (27). The control inputs are obtained from the resulting alternative expression:  
\[\begin{split}\begin{bmatrix}u_{1}\\ u_{2}\end{bmatrix}=&\bigg{(}\frac{\partial\mathbf{R}_{2}}{\partial \mathbf{x}}\mathbf{M}^{-1}\mathbf{B}\bigg{)}^{-1}\Bigg{(}\frac{\partial \mathbf{P}_{2}}{\partial p}\ddot{p}+\frac{\partial^{2}\mathbf{P}_{2}}{\partial p ^{2}}\dot{p}^{2}-\\ &-\frac{\partial\mathbf{R}_{2}}{\partial\mathbf{x}}\mathbf{M}^{-1 }\mathbf{F}-\frac{\mathrm{d}}{\mathrm{d}t}\bigg{(}\frac{\partial\mathbf{R}_{2 }}{\partial\mathbf{x}}\bigg{)}\dot{\mathbf{x}}\Bigg{)}\end{split} \tag{28}\]  
The right-hand side of (28) also depends on the state vector \(\mathbf{x}\) and its time derivative \(\dot{\mathbf{x}}\). Therefore, inputs could also be evaluated according to (12) in the form with only \(p\) and \(\mathbf{x}_{z}\) coordinates.  
The advantage of such a strategy is that flexible robot endpoint never leaves the prescribed trajectory, and zero dynamics (\(\mathbf{x}_{z}\)) control actions are realized only along the parameter, \(p\).