## 4 Optimization of Parasitic Motion
In this paper, the quasi-newton algorithm is used for the direction-specific optimization and the pattern search to simultaneously optimize all parasitic motions. We prefer the Quasi-Newton methods for a direction-specific optimization because it is simple and convenient when the Hessian is quite difficult to compute analytically due to system nonlinearity. For the vectorized evaluation, the pattern-search is chosen because it is a non-gradient rapid convergence algorithm for multi-objective nonlinear system. Moreover, thus solvers are valiance in Matlab optimization toolbox. For the direction-specific optimization, the x- and y-axis linear motions can be rewritten as:  
\[\mathbf{v}_{x}=\frac{(\mathbf{v}_{1}\times\mathbf{v}_{2})^{T}}{\mathbf{v}_{0}\cdot(\mathbf{v}_{1} \times\mathbf{v}_{2})} \begin{bmatrix}-a_{1z}c\xi_{1}&-a_{1z}s\xi_{1}\\ -a_{2z}c\xi_{2}&-a_{2z}s\xi_{2}\\ -a_{3z}c\xi_{3}&-a_{3z}s\xi_{3}\end{bmatrix}\begin{Bmatrix}\omega_{x}\\ \omega_{y}\end{Bmatrix} , \tag{32}\]  
and,  
\[\mathbf{v}_{y}=\frac{(\mathbf{v}_{2}\times\mathbf{v}_{0})^{T}}{\mathbf{v}_{0}\cdot(\mathbf{v}_{1} \times\mathbf{v}_{2})} \begin{bmatrix}-a_{1z}c\xi_{1}&-a_{1z}s\xi_{1}\\ -a_{2z}c\xi_{2}&-a_{2z}s\xi_{2}\\ -a_{3z}c\xi_{3}&-a_{3z}s\xi_{3}\end{bmatrix}\begin{Bmatrix}\omega_{x}\\ \omega_{y}\end{Bmatrix} . \tag{33}\]  
To minimize the parasitic motion in a specific direction with the Equations (32) and (33) over the intended rotational workspace, the linear motion along the z-axis has no role. Moreover, it is difficult to use linear programming due to the nonlinearity of \(\mathbf{C}_{1}\) and \(\mathbf{C}_{2}\). Thus, the average \(\delta v\) along the specified direction and entire rotational workspace is obtained by summing over all the columns to create a row of sums and then summing across the row to get the array's total sum as in Equations (34) and (35). \[\delta v_{x} =f(r_{p},\xi_{2},\xi_{3},\alpha_{2},\alpha_{3},\psi,\theta,\phi, \omega_{x},\omega_{y})=\sum_{j=1}^{n}\sum_{k=1}^{m}v_{x}, \tag{34}\] \[\delta v_{y} =f(r_{p},\xi_{2},\xi_{3},\alpha_{2},\alpha_{3},\psi,\theta,\phi, \omega_{x},\omega_{y})=\sum_{j=1}^{n}\sum_{k=1}^{m}v_{y}. \tag{35}\]  
Then, the Quasi-Newton algorithm is applied consecutively for Equations (34) and (35) as shown in Equation (36). Quasi-Newton method: The quasi-Newton methods build up a curvature information at each iteration to formulate a quadratic model problem of the form:  
\[\min_{\delta_{i}}\quad\frac{1}{2}\delta_{i}^{T}\mathbf{H}\delta_{i}+\mathbf{g}^{T} \delta_{i}+[f(\xi_{2},\xi_{3},\alpha_{2},\alpha_{3})], \tag{36}\]  
where \(\mathbf{H}\) is a positive definite symmetric matrix and \(\mathbf{g}\) is a constant vector. The condition for the optimality of Equation (36) is:  
\[\
abla f(\delta_{i}^{*})=\mathbf{H}\delta_{i}^{*}+\mathbf{g}=0. \tag{37}\]  
Then, the optimal solution is obtained by inverting Equation (37):  
\[\delta_{i}^{*}=-\mathbf{H}^{-1}\mathbf{c}. \tag{38}\]  
Although several methods exists for updating the Hessian matrix (\(\mathbf{H}\)) in Equation (36), Broyden-Fletcher-Goldfarb-Shanno (BFGS) is known to be effective [30]. The BFG method updates the Hessian matrix using the following relation:  
\[\mathbf{H}_{k+1}=\mathbf{H}_{k}\frac{\mathbf{q}_{k}\mathbf{q}_{k}^{T}}{\mathbf{q}_{k}^{T}\mathbf{q}_{k }}-\frac{\mathbf{H}_{k}^{T}\mathbf{s}_{k}^{T}\mathbf{s}_{k}\mathbf{H}_{k}}{\mathbf{s}_{k}^{T}\mathbf{ H}_{k}\mathbf{s}_{k}}, \tag{39}\]  
where,  
\[\mathbf{s}_{k} =\delta_{k+1}-\delta_{k},\] \[\mathbf{q}_{k} =\
abla f(\delta_{k+1})-\
abla f(\delta_{k}).\]  
The inverse of \(\mathbf{H}\) is updated through the Davidon-Fletcher-Powell (DFP) method at each iteration [30]. At each iteration, a line search is performed in the direction :  
\[\lambda=-\mathbf{H}_{k}^{-1}\Delta f(\delta_{k}) \tag{40}\]  
The optimization result tells varying \(\delta_{i}\) over the intended workspace, for the optimal parasitic motion, is the same result for all example manipulators used in this paper.