## 4 Study Cases in the Mechanism Synthesis for Lower Limb Rehabilitation
### Case 2: Cam-Linkage Mechanism  
The second optimization problem is related to the synthesis of a cam-linkage mechanism. The original design problem was presented by [PERSON] et al. [15]. This mechanism is designed to provide rehabilitation routines for adults with motor problems in the lower limbs. The schematic diagram of the cam-linkage mechanism is shown in Figure 3.  
The design variable vector (33) is defined by the link lengths \(r_{1},\ r_{2},\...,\ r_{8}\), the angles \(\beta,\ \gamma,\eta\), the initial position of the mechanism \([x_{0},y_{0}]\) with respect to the \(x-y\) coordinate system, and the position of the slide displacement axis defined by the length \(e\) and the angle \(\alpha\). \[x=[r_{1},r_{2},r_{3},r_{4},r_{5},r_{6},r_{7},r_{8},\alpha,\beta,\gamma,\eta,x _{0},y_{0},e] \tag{33}\]  
The synthesis problem is presented in (34)-(46). \[\mathop{\rm Min}\limits_{x}w_{1}\frac{\sum_{i=1}^{n_{f}}(\theta_{1}^{i}-\theta _{1}^{i})^{2}}{\Theta_{ref}}+w_{2}\frac{R_{0}}{R_{ref}} \tag{34}\] \begin{table}
\begin{tabular}{c c c c} \hline \(x\) & **Parameter** & \(x_{min}\) & \(x_{max}\) \\ \hline \(x_{1}-x_{4}\) & \(r_{1}-r_{4}\) & 0 [m] & 0.6 [m] \\ \(x_{5}\) & \(\theta_{1}\) & 0[rad] & 2\(\pi\) [rad] \\ \(x_{6}-x_{9}\) & \(x_{0},\ y_{0}\) & \(-0.6\) [m] & 0.6 [m] \\ \(x_{10}-x_{24}\) & \(\theta_{2}^{1}-\theta_{2}^{14}\) & \(-\pi\) [rad] & \(\pi\) [rad] \\ \hline \end{tabular}
\end{table} 
Table 2: The maximum and minimum parameters of the \(x\) vector for the four-bar mechanism. Figure 3: Cam-linkage mechanism. subject to:  
\[g_{1} :r_{1}+r_{2}-r_{3}-\sqrt{s_{min}^{2}+e^{2}}\leq 0 \tag{35}\] \[g_{2} :r_{1}+r_{3}-r_{2}-\sqrt{s_{min}^{2}+e^{2}}\leq 0\] (36) \[g_{3} :r_{1}+\sqrt{s_{max}^{2}+e^{2}}-r_{2}-r_{3}\leq 0\] (37) \[g_{4} :r_{2}^{2}+r_{3}^{2}-(d_{AC})_{min}^{2}-2r_{2}r_{3}\cos\pi/6\leq 0\] (38) \[g_{5} :-r_{2}^{2}-r_{3}^{2}+(d_{AC})_{max}^{2}+\] \[2r_{2}r_{3}\cos(\pi-\pi/6)\leq 0\] (39) \[g_{6} :r_{5}^{2}+r_{6}^{2}-(d_{DF})_{min}^{2}-2r_{5}r_{6}\cos\pi/6\leq 0\] (40) \[g7 :-r_{5}^{2}-r_{6}^{2}+(d_{DF})_{max}^{2}+\] Figure 3:0 (41) Figure 3:1 (42) Figure 3:2 (43) Figure 3:3 (44) Figure 3:4 (45) Figure 3:5  
The first term of the weighted objective function (34) refers to the error between the crank angles \(\theta_{1}^{i}\)\(\forall i=\{1,2,...,n_{f}\}\) and the desired angles \(\theta_{1}^{i}\)\(\forall i=\{1,2,...,n_{f}\}\), where \(n_{f}\) is the number of precision points, and \(\theta_{1}^{i}\) is defined by Equation (47). Figure 3:6  
On the other hand, the second term refers to the base radius \(R_{0}\) of the cam (see Figure 3). Both design objectives are weighted by \(w_{1}=0.3\) and \(w_{2}=0.7\), and normalized by \(\Theta_{ref}=0.4246\) [rad] and \(R_{ref}=0.3782\) [m] according to the best results presented in [15]. To guarantee the functionality of the mechanism, the design problem has inequality constraints. The first three constraints (35)-(37) guarantees a complete revolution of the crank angle \(\theta_{2}\) (Grashof criterion), where \(s_{min}\) and \(s_{max}\) are the minimum and maximum values of \(s(\theta_{1})\) in the precision points. The \(s(\theta_{1})\) is given in (48) and is visualized in Figure 3:7  
Figure 3:8  
The next inequality constraints (38)-(41) provide high efficiency of the force transmission from the input link (crank link) to the output link, where the distances between point A to C \(d_{AC}\), and between point D to F \(d_{DF}\) are obtained by (49) and (50), respectively. Figure 3:9 \[g_{1} :r_{1}+r_{2}-r_{3}-\sqrt{s_{min}^{2}+e^{2}}\leq 0 \tag{35}\]0  
The inequality constraints (42)-(44) guarantee the path feasibility in the output link, where the distances between point D to F \(d_{OD}\), and between point B to e \(d_{Be}\) are obtained by (51) and (52), respectively. \[g_{1} :r_{1}+r_{2}-r_{3}-\sqrt{s_{min}^{2}+e^{2}}\leq 0 \tag{35}\]1 \[g_{1} :r_{1}+r_{2}-r_{3}-\sqrt{s_{min}^{2}+e^{2}}\leq 0 \tag{35}\]2The last inequality constraint (45) defines the minimum curvature radius of the cam profile.