## 5 Simulation Examples
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Case** & **Pose \(\mathbf{R}_{\text{des}}\)** & **Load \(\mathbf{\tau}\) [Nm]** & **Desired Stiffness \(\mathbf{K}_{\text{des}}\) [Nm/rad]** \\ \hline Case 1a & \(\mathbf{R}_{\text{des1}}\) & \(\mathbf{\tau}_{\text{la}}=\begin{pmatrix}11.62\\ 8.09\\ 4.05\end{pmatrix}\) & \(\mathbf{K}_{\text{des1a}}=\begin{pmatrix}1806.79&323.63&765.79\\ 323.63&443.92&-49.61\\ 765.79&-49.61&634.78\end{pmatrix}\) \\ Case 1b & \(\mathbf{R}_{\text{des1}}\) & \(\mathbf{\tau}_{\text{lb}}=\begin{pmatrix}9.26\\ 11.39\\ 4.55\end{pmatrix}\) & \(\mathbf{K}_{\text{des1b}}=\begin{pmatrix}1131.24&160.46&62.27\\ 160.46&1918.78&-134.28\\ 62.27&-134.28&588.78\end{pmatrix}\) \\ Case 1c & \(\mathbf{R}_{\text{des1}}\) & \(\mathbf{\tau}_{\text{lc}}=\begin{pmatrix}7.24\\ 6.60\\ 2.72\end{pmatrix}\) & \(\mathbf{K}_{\text{des1c}}=\begin{pmatrix}1600.13&-353.41&320.28\\ -353.41&1687.70&244.90\\ 320.28&244.90&477.74\end{pmatrix}\) \\ Case 2a & \(\mathbf{R}_{\text{des2}}\) & \(\mathbf{\tau}_{\text{2a}}=\begin{pmatrix}2.95\\ 8.05\\ 2.08\end{pmatrix}\) & \(\mathbf{K}_{\text{des2a}}=\begin{pmatrix}1302.42&-140.27&518.72\\ -140.27&617.78&147.18\\ 518.72&147.18&503.89\end{pmatrix}\) \\ Case 2b & \(\mathbf{R}_{\text{des2}}\) & \(\mathbf{\tau}_{\text{2b}}=\begin{pmatrix}-7.64\\ 9.56\\ -5.90\end{pmatrix}\) & \(\mathbf{K}_{\text{des2b}}=\begin{pmatrix}1670.44&180.42&499.26\\ 180.42&1226.99&-350.38\\ 499.26&-350.38&676.84\end{pmatrix}\) \\ Case 2c & \(\mathbf{R}_{\text{des2}}\) & \(\mathbf{\tau}_{\text{2c}}=\begin{pmatrix}3.70\\ 14.72\\ -2.58\end{pmatrix}\) & \(\mathbf{K}_{\text{des2c}}=\begin{pmatrix}1563.55&298.57&15.13\\ 298.57&2395.40&-280.72\\ 15.13&-280.72&687.41\end{pmatrix}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Six sub-cases of the simulation with different desired poses, applied loads and desired stiffness matrices. Figure 5: _variable-stiffness device_ (VSD) for simulation: (**a**) CAD model of the VSD, (**b**) diagram of the VSD, (**c**) stiffness–tension curve of the VSD. Here, we take Case 1a as an example to perform the proposed method. The other five sub-cases are similar to Case 1a. In Case 1a, the rotation matrix \(\mathbf{Q}\) is computed according to (24),  
\[\mathbf{Q}=\left( \begin{array}{ccc}0.159&-0.432&0.888\\ -0.727&0.557&0.401\\ 0.668&0.710&0.225\end{array} \right)\,, \tag{43}\]  
which transforms \(\mathbf{K}_{\text{des1a}}\) to a diagonal matrix \({}^{E}\mathbf{K}_{\text{des1a}}=\mathbf{diag}\{-975,-2937,-2756\}\) [Nm/rad]. According to (15), the transpose of the Jacobian matrix \(\mathbf{J}_{1}\) of the 3 DJM at the given pose \(\mathbf{R}_{\text{des1}}\) is computed  
\[\mathbf{S}_{1}=\mathbf{J}_{1}^{T}=\left( \begin{array}{ccc}0.05&-0.02&-0.04&-0.01&0.03 &0.06\\ -0.04&-0.04&0&0.05&0.05&0.01\\ -0.01&0.02&-0.02&0.01&-0.03&0.03\end{array} \right)\,. \tag{44}\]  
The matrix \(\mathbf{S}_{1}\) is divided into two parts as below  
\[\mathbf{S}_{p1}=\left( \begin{array}{ccc}0.05&-0.04&0.03\\ -0.04&0&0.05\\ -0.01&-0.02&-0.03\end{array} \right)\,,\quad\mathbf{S}_{s1}=\left( \begin{array}[] {ccc}-0.02&-0.01&0.06\\ -0.04&0.05&0.01\\ 0.02&0.01&0.03\end{array} \right)\,. \tag{45}\]  
The proposed method is implemented to solve the optimization model (34) to find out the cable tension distribution for the desired stiffness \(\mathbf{K}_{\text{des1a}}\). The iteration curve of the proposed method for Case 1a is shown in Figure 6a, which shows that the optimization process achieves the termination condition within 7 generations and the optimal cable tension distribution for the desired stiffness \(\mathbf{K}_{\text{des1a}}\) is  
\[\mathbf{T}_{\text{opt1a}}=(20.84,72.86,139.73,83.88,123.42,248.62)^{T}\,[N].\]  
The corresponding actual stiffness \(\mathbf{K}_{\text{act1a}}\) and \(\mathbf{\overline{K}}_{\text{act1a}}\) are computed as below  
\[\mathbf{K}_{\text{act1a}}=\left( \begin{array}{ccc}1842.37&339.16&787.59\\ 324.04&388.59&-29.52\\ 810.48&-61.30&640.20\end{array} \right)\,, \tag{46}\]  
\[\mathbf{\overline{K}}_{\text{act1a}}=\left(