## 5 Optimization Design
### Optimization Example  
The parameters of the particle swarm algorithm are shown in Table 4. Through the iterative calculation of the objective function, the variation curve of the objective function value with iteration times is obtained and shown in Figure 9. The optimization results of the dimension parameters of the mechanism are shown in Table 5, and the optimization results of the performance index of the mechanism are shown in Table 6.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Design Variable** & **Initial Value** & **Constraint Range** \\ \hline \(a\) (mm) & 180 & (100, 200) \\ \(b\) (mm) & 120 & (50, 200) \\ \(c\) (mm) & 80 & (50, 150) \\ \(d\) (mm) & 100 & (50, 150) \\ \(l_{\text{a}}\) (mm) & 180 & (150, 300) \\ \(l_{\text{b}}\) (mm) & 180 & (150, 300) \\ \hline \hline \end{tabular}
\end{table}
Table 3: The initial value and constraint range of the design variables.  
It can be seen from Figure 9 that the algorithm converges is faster and the curve is steep. As the iteration times gradually increases, the objective function value gradually tends to a fixed value. After about 57 iterations, the objective function value \(F\) tends to be stable and the optimization result reaches the best.  
It can be seen from Tables 4 and 5 that after using the particle swarm algorithm to optimize the reconfigurable parallel mechanism, the dimension parameters \(b\), \(c\), \(d\) and \(l_{\text{b}}\) have increased, while the dimension parameters \(a\) and \(l_{\text{a}}\) have decreased. It is calculated that, in the 1T2R motion mode, the workspace index of the mechanism has increased by 39.60%, and the rotational dexterity index has increased by 20.17%. In the 2T1R motion mode, the workspace index of the mechanism has increased by 1.31%, and the load capacity index has increased by 60.88%. These results could provide a reference for the design of mechanism dimension parameters.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Motion Mode** & **Performance Index** & **Before Optimization** & **After Optimization** \\ \hline \multirow{2}{*}{1T2R} & Workspace index & 0.6126 & 0.8552 \\  & Rotational dexterity index & 0.7800 & 0.9373 \\ \hline \multirow{2}{*}{2T1R} & Workspace index & 0.9619 & 0.9745 \\  & Load capacity index & 127.5462 & 205.1983 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Optimization results of the performance index.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Population size & 50 \\ Iteration times & 80 \\ Personal learning coefficient & 1.8 \\ Social learning coefficient & 2.0 \\ Weight coefficient & 0.9 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Parameters of the particle swarm algorithm.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Dimension Parameter** & **Before Optimization** & **After Optimization** \\ \hline \(a\) (mm) & 180 & 155.2789 \\ \(b\) (mm) & 120 & 154.9881 \\ \(c\) (mm) & 80 & 147.8838 \\ \(d\) (mm) & 100 & 149.9985 \\ \(l_{\text{a}}\) (mm) & 180 & 174.9823 \\ \(l_{\text{b}}\) (mm) & 180 & 235.0947 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Optimization results of the dimension parameters.  
Figure 9: Variation in the objective function value with iteration times.