## 4 Test Case: A Two-Link Flexible Robot Arm  
### System Description  
The proposed control strategy is applied to the two-link flexible robot arm shown in Figure 2, already employed in [35] as a benchmark for vibration control. Figure 1: The flowchart of the numerical procedure to feedback gains design. The system has two DOFs, described by the absolute rotations \(\theta_{1}\) and \(\theta_{2}\). The revolute joint A is actuated through the torque \(T_{m}\) exerted by a DC motor. The revolute joint B is passive with a torsional spring \(k_{s}\) (made through two linear springs). The flexibility of the robotic arm is mimicked by the linear torsional spring located at the passive joint, while the links are rigid. This yields to an underactuated two-link robot arm with \(N=2\) and \(N_{B}=1\). All the relevant system parameters are defined in Table 1.  
The link rotations are measured through two incremental encoders, with 500 pulses per revolute. This low resolution perturbs the sensed displacements and the estimated speeds, that are obtained through numerical derivatives, and therefore attention to the robustness issue should be paid in the controller design. The DC motor driving joint A has the moment of inertia \(J_{m}\), to be summed to the moment of inertia \(J_{d}\) of the coupling. The length of the first link, connected to joint A, is \(l_{1}\), its mass \(m_{1}\) and the moment of inertia with respect to point A is \(l_{1}\). The length of the second link, connected to joint B, is \(l_{2}\), its mass \(m_{2}\) and the moment of inertia with respect to point B is \(l_{2}\). The mass \(m_{enc}\) of the second encoder together with the mounting bracket mass \(m_{b}\) should be accounted for as well, i.e., \(m_{2,eq}=m_{2}+m_{enc}+m_{b}\). \begin{table}
\begin{tabular}{c c c} \hline \hline
**System Parameters** & **Units** & **Values** \\ \hline \(k_{s}\) & \(\frac{\text{Im}}{\text{rad}}\) & 0.1772 \\ \(J_{m}\) & kgm\({}^{2}\) & \(2.70\times 10^{-5}\) \\ \(J_{d}\) & kgm\({}^{2}\) & \(1.08\times 10^{-5}\) \\ \(m_{1}\) & kg & 0.050 \\ \(m_{2}\) & kg & 0.021 \\ \(l_{1}\) & m & 0.170 \\ \(l_{2}\) & m & 0.155 \\ \(l_{1}\) & kgm\({}^{2}\) & \(4.82\times 10^{-4}\) \\ \(l_{2}\) & kgm\({}^{2}\) & \(1.68\times 10^{-4}\) \\ \(m_{enc}\) & kg & 0.100 \\ \(m_{b}\) & kg & 0.025 \\ \(g\) & \(\frac{\text{Im}}{\text{s}^{2}}\) & 9.81 \\ \(c_{11}\) & \(\frac{\text{Nms}}{\text{rad}}\) & \(1.20\times 10^{-2}\) \\ \(c_{12}\) & \(\frac{\text{Nms}}{\text{rad}}\) & \(4.00\times 10^{-4}\) \\ \(c_{21}\) & \(\frac{\text{Nms}}{\text{rad}}\) & \(4.00\times 10^{-4}\) \\ \(c_{22}\) & \(\frac{\text{Nms}}{\text{rad}}\) & \(3.00\times 10^{-4}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: System parameters. Figure 2: The two-link flexible robot arm and its kinematic scheme. The nonlinear model of the system is obtained through the Lagrangian approach, leading to the following equation of motion (\(g\) is the gravitational acceleration):  
\[ \begin{bmatrix}J_{m}+J_{d}+J_{1}+m_{2,eq}l_{1}^{2}&\frac{1}{2}m_{2}l_{1}l_{2}\cos (\theta_{1}-\theta_{2})\\ \frac{1}{2}m_{2}l_{1}l_{2}\cos(\theta_{1}-\theta_{2})&J_{2}\end{bmatrix}\begin{bmatrix} \tilde{\theta}_{1}\\ \tilde{\theta}_{2}\end{bmatrix} + \begin{bmatrix}\frac{1}{2}m_{2}l_{1}l_{2}\sin (\theta_{1}-\theta_{2})\tilde{\theta}_{2}^{2}\\ -\frac{1}{2}m_{2}l_{1}l_{2}\sin(\theta_{1}-\theta_{2})\tilde{\theta}_{1}^{2} \end{bmatrix} \\ + \begin{bmatrix}c_{11}&c_{12}\\ c_{21}&c_{22}\end{bmatrix}\begin{bmatrix}\tilde{\theta}_{1}\\ \tilde{\theta}_{2}\end{bmatrix} + \begin{bmatrix}\left(\frac{1}{2}m_{1}+m_{2,eq} \right)gl_{1}\sin\theta_{1}\\ \frac{1}{2}m_{2}gl_{2}\sin\theta_{2}\end{bmatrix} + \begin{bmatrix}k_{s}&-k_{s} \\ -k_{s}&k_{s}\end{bmatrix}\begin{bmatrix}\theta_{1}\\ \theta_{2}\end{bmatrix} = \begin{bmatrix}1\\ 0\end{bmatrix} T_{m}, \tag{13}\]  
In the presence of small displacements about an equilibrium configuration, the system in Equation (13) can be locally linearized to apply the theory of linear control.