# Control of Flexible Robot by Harmonic Functions
## 3 Results
### Control of Flexible Robot
#### 3.3.2 Invariant Control Parameters  
The invariant part of the control is constructed according to (19). The optimization process is performed to obtain the number of intervals \({f_{N}}^{-1}\), natural frequency multiplication factors \(k_{i}\) for obtaining particular \(f_{i}\), phase \(\phi_{i}\), and corresponding amplitudes \(\mathbf{A}_{i}\). The phase \(\phi_{i}~{}=~{}-0.5\pi\) is same for all frequencies \(f_{i}\).  
The objective function \(OF\) aims to fulfil the prescribed trajectory endpoint position and velocity. Physical coordinates \(\varphi_{i}\) and modal coordinates \(\delta_{jk}\) at end time should be ideally equal to the trajectory endpoint static position and their time derivatives (velocities) should be zero, see (30).  
\[\begin{split} OF=&~{}a_{1}\sum_{i}\lvert\varphi_{i} (t_{END})-\varphi_{iEND}\rvert+\\ &+a_{2}\sum_{j}\sum_{k}\lvert\delta_{jk}(t_{END})-\delta_{jEND} \rvert+\\ &+a_{3}\sum_{i}\lvert\phi_{i}(t_{END})\rvert+a_{4}\sum_{j}\sum_ {k}\lvert\delta_{jk}(t_{END})\rvert\end{split} \tag{30}\]  
The optimization process minimizes the objective function in (30), where \(a_{1},\ldots,a_{4}\) are variable weights, \(t_{END}\) is prescribed movement end time, \(\varphi_{iEND}\) and \(\delta_{jEND}\) are prescribed movement endpoint coordinates.  
The extensive optimization brings three frequency multiplication factors \(k_{1}=1\), \(k_{2}=0.5\) and \(k_{3}=2.5\), with resulting frequency \(f_{i}=k_{i}f_{N}\), the 16 intervals of \({f_{N}}^{-1}\), and amplitudes \(\mathbf{A}_{i}\) shown in Table 1.  
Figure 4: Natural motion: residual vibrations. (**a**) Coordinates of time behaviour; (**b**) power spectra density with significant Eigen frequency of 4.2915 Hz.  
Figures 6 and 7 show the behaviour of \(u_{1}\) and \(u_{2}\) input torques, respectively. The \(u_{1}\) plot of Figure 6 shows the first input torque needed for satisfying the desired motion. There are two curves, one is dedicated for the computed torques method, and the second one corresponds to the torque claim of the invariant control. In the cut is the detailed behaviour after the prescribed motion final time. Invariant control modifies input torque so that there is no residual vibration of zero dynamics, contrary to the computed torque method. The second part of Figure 6 graph \(\Delta u_{1}\) shows the difference between computed torques and invariant control \(u_{1}\) behaviour. The red curve represents modification of computed torques \(u_{1}\), claimed due to the invariant part of the control, and the blue line shows the residual (zero dynamics) vibrations of the system with control using the computed torques method. The corresponding behaviour of \(u_{2}\) input torque is shown on Figure 7.  
The advantage of invariant control is that the system moves from one equilibrium to another equilibrium position. The input torque is modified within 5% of the reference torque (computed torque method serves as the reference). The movement within parameter, \(p\), is the only disadvantage of the invariant control, but it is of small amplitude, as shown on Figure 5 (bottom).  
Figure 6: System input torque \(u_{1}\) behaviour for two types of control—computed torques and invariant control and their difference.