## 4 Results
### Five-Bar Mechanism  
The five-bar mechanism considered is shown in Figure 2a, while its dynamic properties are listed in Table 1. In this first test case the static and the viscous friction forces have been neglected (\(\mathbf{f}_{s}=\mathbf{0}\), \(\mathbf{F}_{\eta}=\mathbf{0}\)) as well as the interaction forces between the end-effector and the environment (\(\mathbf{f}_{e}=\mathbf{0}\)), while both the cases in which the mechanism works on the horizontal (\(\mathbf{f}_{g}=\mathbf{0}\)) or the vertical (\(\mathbf{f}_{g}\
eq\mathbf{0}\)) plane have been considered. The end-effector moves a payload of 2 kg following a typical pick and place trajectory, shown in Figure 2b, consisting in a vertical motion of 0.1 m between the Cartesian positions \(\mathbf{P}_{0}=[-0.4,\ -0.6]\) m and \(\mathbf{P}_{1}=[-0.4,\ -0.5]\) m, a horizontal motion of 0.5 m from \(\mathbf{P}_{1}\) to \(\mathbf{P}_{2}=[0.1,\ -0.5]\) m and another vertical motion of 0.1 m from \(\mathbf{P}_{2}\) to \(\mathbf{P}_{3}=[0.1,\ -0.6]\) m.  
In such a task, the tool center point (TCP) moves from \(\mathbf{P}_{0}\) to \(\mathbf{P}_{3}\) and returns back in \(T=1.6\) s. Each linear segment of the trajectory is executed following a double-S speed profile in the workspace \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Parameters** & **Joint 1 and Joint 2** \\ \hline K\({}_{r}\) & \multicolumn{1}{c}{Gear ratio \([-]\)} & 1/20 \\ I & \multicolumn{1}{c}{Motor inertia \([\mathrm{kg}\cdot\mathrm{m}^{2}]\)} & \(4.13\cdot 10^{-5}\) \\ R & \multicolumn{1}{c}{Motor winding resistance \([\Omega]\)} & 2.6 \\ K\({}_{e}\) & \multicolumn{1}{c}{Motor velocity constant \([\mathrm{Vs}/\mathrm{rad}]\)} & 0.42 \\ K\({}_{t}\) & \multicolumn{1}{c}{Motor torque constant \([\mathrm{Nm}/\mathrm{A}]\)} & 0.42 \\ \(\mathbf{\eta}\) & \multicolumn{1}{c}{Efficiency \([-]\)} & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Five-bar mechanism parameters. Figure 2: Five-bar mechanism: (a) kinematic schematic and (b) end-effector trajectory path in Cartesian space. with acceleration and deceleration times equal to \(1/3\,T_{i}\) and acceleration ramp rise and fall times equal to \(1/10\,T_{i}\), with \(T_{i}\) the time period of each trajectory segment (see Figure 3a). The position, velocity and acceleration profiles of actuated joints corresponding to the chosen end-effector path have been computed by means of the inverse kinematics and are shown in Figure 3b. Both the motors of the system are equipped with regenerative drives and torsional springs designed following the approach described in Section 3. According to Equation (54), the lower bounds for the two springs must be included in the following range:  
\[\text{vertical plane}: \quad\left\{ \begin{array}{l}0<k_{1}^{L}<17.23\,\text{Nm}/\text{ rad}\\ 0<k_{2}^{L}<6.42\,\text{Nm}/\text{rad}\end{array} \right. \tag{55}\] \[\text{horizontal plane}: \quad\left\{ \begin{array}{l}0<k_{1}^{L}<11.62\,\text{Nm}/\text{ rad}\\ 0<k_{2}^{L}<8.92\,\text{Nm}/\text{rad}\end{array} \right. \tag{56}\]  
A lower bound equal to \(1\) Nm has been set for both the spring stiffnesses in both the considered cases, as such a choice gives reasonable values for the variable \(\theta\) computed according to Equation (47):  
\[\text{vertical plane}: \quad\left\{ \begin{array}{l}\theta_{1}(k_{1}^{L}=1)=9.36\,\text{ rad}\\ \theta_{2}(k_{2}^{L}=1)=-3.09\,\text{rad}\end{array} \right. \tag{57}\] \[\text{horizontal plane}: \quad\left\{ \begin{array}{l}\theta_{1}(k_{1}^{L}=1)=2.47\,\text{ rad}\\ \theta_{2}(k_{2}^{L}=1)=6.35\,\text{rad}\end{array} \right. \tag{58}\]  
Figure 3: Five-bar mechanism trajectory planning: (**a**) TCP coordinates vs. time and (**b**) joint coordinates vs. time. By solving the bounded optimization problem, the following optima are found:  
\[\text{vertical plane}: \left\{ \begin{array}{ll}\mathbf{\theta}_{1}^{*}=1.67\,\text{rad}&k_{1}^ {*}=4.3\,\text{Nm/rad}\\ \mathbf{\theta}_{2}^{*}=8.73\,\text{rad}&k_{2}^{*}=1.2\,\text{Nm/rad}\\ \mu^{*}=0\end{array} \right. \tag{59}\] \[\text{horizontal plane}: \left\{