Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 113 Optimal Reconfiguration of a Limited Parallel Robot for Forward Singularities Avoidance Carlos Llopis-Albert1 , Francisco Valero1 , Vicente Mata1 , Rafael J. Escarabajal1 , Pau Zamora-Ortiz1 , José L. Pulloquinga1 1Centro de investigación de Ingeniería Mecánica (CIIM). Universitat Politècnica de València – Camino de Vera s/n, 46022 – Valencia, Spain Corresponding author: Carlos Llopis-Albert, e-mail address: cllopisa@upvnet.upv.es Received: 18 November 2019; Accepted: 21 March 2020; Published: April 2020 Abstract The positioning of the anchoring points of a Parallel Kinematic Manipulator has an important impact on its later performance. This paper presents an optimization problem to deal with the reconfiguration of a Parallel Kinematic manipulator with four degrees of freedom and the corresponding algorithms to address such problem, with the subsequent test on an actual robot. The cost function minimizes the forces applied by the actuators along the trajectory and considers singular positions and the feasibility of the active generalized coordinates. Results are compared among different algorithms, including evolutionary, heuristics, multi-strategy and gradient-based optimizers. Keywords: Parallel robot; non-linear optimization; rehabilitation; trajectory; singularity 1. Introduction Currently, there is a growing interest in robot trajectory planning (Dash, Chen, Yeo, & Yang, 2005; Rubio, Llopis-Albert, Valero, & Suñer, 2016; Valero, Rubio, & Llopis-Albert, 2019). Different optimization approaches are being proposed for this kind of problems (Llopis-Albert, Rubio, & https://doi.org/10.4995/muse.2020.13352 http://orcid.org/0000-0002-1349-2716 http://orcid.org/0000-0003-2295-4035 https://orcid.org/0000-0003-2255-0567 https://orcid.org/0000-0001-6535-9098 https://orcid.org/0000-0002-7284-2181 https://orcid.org/0000-0003-0403-4593 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 114 Valero, 2018) including the notions, methods, and operations of mobile robots (Rubio, Valero, & Llopis-Albert, 2019). Particularly, Parallel Kinematic Manipulators (PKMs) has drawn special attention. Compared with serial robots, PKMs can manage higher velocity, accuracy and load capability. However, they exhibit more limited workspace and forward kinematics singularities (Arakelian, Briot, & Glazunov, 2008; Gosselin & Angeles, 1990; Xianwen Kong & Gosselin, 2002), which entail a set of characteristics: a) at least one degree of freedom (DoF) turns uncontrollable; b) they cannot resist some exerted wrenches; c) they are not able to leave such singularity without external help; d) the forces in its joints tend to infinity; and e) it is likely that the manipulator adopts another assembly configuration. This problem can be tackled by a rigorous trajectory planning of the robot’s end-effector, which must consider the avoidance of singularities within the workspace and actuation demands. The reconfiguration of the PKM can help with this task (Patel & George, 2012). This paper addresses the geometrical redesign of a reconfigurable PKM (RPKM) meant for knee rehabilitation. The trajectories of the mobile platform of the RPKM depend on the patient’s rehabilitation procedure and cannot be easily adapted for singularity avoidance (Araujo-Gómez, Díaz-Rodríguez, Mata, & González-Estrada, 2019; Araujo-Gómez, Mata, Díaz-Rodríguez, Valera, & Page, 2017; Vallés et al., 2018). The reconfiguration is treated as a non-linear optimization problem where the design variables are the positions of the four limbs linked to the fixed and mobile platforms, whereas the objective function comprises the total active force needed to follow a defined trajectory subject to several constraints on the value of the determinant of the Forward Jacobian and on the limit values allowed for the active generalized coordinates. This optimization problem is solved by means of various approaches, including evolutionary algorithms, heuristics optimizers, multi-strategy algorithms and gradient-based optimizers (Yang, 2017). Finally, the results can be compared despite the complexity that the assessment of these optimization algorithms imply (Beiranvand, Hare, & Lucet, 2017). This paper is organized as follows: Section 2 explains the kinematic and dynamic modeling of the 3UPS+RPU PKM, including the intrinsic forward singularities and the optimization approach. https://doi.org/10.4995/muse.2020.13352 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 115 Section 3 shows the application of the methodology to different cases, and Section 4 states the conclusions. 2. Methodology 2.1. Kinematic model and forward singularities This paper deals with the optimization of a PKM reconfiguration in order to avoid forward singularities when moving around its workspace. The analyzed PKM is a reconfigurable robot with four DoF (two translations and two rotations) for knee diagnosis and rehabilitation (Vallés et al., 2018). This PKM is named 3UPS+RPU by its architecture, where the underlined letter is the actuated joint. The universal, prismatic, revolute and spherical joints are represented by U, P, R, and S respectively. In Fig. 1 is presented the kinematic modeling implemented for the 3UPS-RPU PKM with 3 identical external limbs and a central limb. In this PKM the actuated joints are the prismatic ones. The fixed reference system is denoted by �𝑂𝑂𝑓𝑓 − 𝑋𝑋𝑓𝑓𝑌𝑌𝑓𝑓𝑍𝑍𝑓𝑓�, while the reference system attached to the mobile platform is given by {𝑂𝑂𝑚𝑚 − 𝑋𝑋𝑚𝑚𝑌𝑌𝑚𝑚𝑍𝑍𝑚𝑚}. Figure 1. Kinematic modeling for 3UPS-RPU PKM. https://doi.org/10.4995/muse.2020.13352 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 116 The coordinates of the origin of the mobile reference system attached to the mobile platform are xm and zm. The angles rotated by the mobile platform regarding Ym and Zm are represented by θ and ψ, respectively. Note that ym and the angle rotated regarding Xm (𝜙𝜙) are always zero because of the PKM topology. The location of the connection points to the fixed platform is defined by the radius R, the angles βFD, βFI and the distance ds along the Xf. Regarding the mobile platform, the location of the vertices depend on Rm, βMD and βMI. Eventually, the geometric reconfiguration of the 3UPS- RPU PKM to be minimized is based on 7 geometrical parameters (R, βFD, βFI, Rm, βMD, βMI and ds). This study uses these 7 geometrical parameters as the design variables. The modeling of the manipulator using Denavit-Hartenberg notation is developed by a set of 22 generalized coordinates 𝑞𝑞𝑖𝑖𝑖𝑖 (Table 1). The subscript 𝑖𝑖 denotes the number of the limb and 𝑗𝑗 the coordinate within the limb, see Fig. 1. Table 1. General coordinates in Denavit-Hartenberg notation. Joint i j αi ai di θi Universal 1,2,3 1 -π/2 0 0 qij 1,2,3 2 π/2 0 0 qij Prismatic 1,2,3 3 0 0 qij 0 Spherical 1,2,3 4 π/2 0 0 qij 1,2,3 5 π/2 0 0 qij 1,2,3 6 π/2 0 0 qij Revolute 4 1 -π/2 0 0 qij Prismatic 4 2 -π/2 0 qij π Universal 4 3 -π/2 0 0 qij 4 4 0 0 0 qij The inverse kinematic problem can be posed as a set of explicit expressions in function of the actuated generalized coordinates q13, q23, q13, q42 and the design variables: https://doi.org/10.4995/muse.2020.13352 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 117 (q13)2 = R2 + �2 ∙ xm − 2 ∙ Cθ ∙ Cψ ∙ Rm� ∙ R + Rm2 + +�2 ∙ zm ∙ Sθ − 2 ∙ Cθ ∙ Cψ ∙ xm� ∙ Rm + xm2 + zm2 (q23)2 = R2 − 2 ∙ R ∙ �� Cθ ∙ Cψ ∙ CFD ∙ CMD − Sψ ∙ CFD ∙ SMD + +Cψ ∙ SFD ∙ SMD + Cθ ∙ Sψ ∙ SFD ∙ CMD � ∙ Rm + CFD ∙ xm� + +Rm2 − 2 ∙ Rm ∙ �Sθ ∙ CMD ∙ zm + Sψ ∙ SMD ∙ xm − Cθ ∙ Cψ ∙ CMD ∙ xm� + +xm2 + zm2 (q33)2 = R2 − 2 ∙ R ∙ �� Cθ ∙ Cψ ∙ CFI ∙ CMI − Sψ ∙ CFI ∙ SMI + +Cψ ∙ SFI ∙ SMI + Cθ ∙ Sψ ∙ SFI ∙ CMI � ∙ Rm + CFI ∙ xm� + +Rm2 − 2 ∙ Rm ∙ �Sθ ∙ CMI ∙ zm + Sψ ∙ SMI ∙ xm − Cθ ∙ Cψ ∙ CMI ∙ xm� + +xm2 + zm2 (q42)2 = ds2 − 2 ∙ ds ∙ xm + xm2 + zm2 ⎭ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎬ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎫ (1) where Cθ, Sθ, CFD, SFD denote cos(θ), sin(θ), cos(βFD), sin(βFD), respectively. The relation between actuated generalized velocities and the velocities of the mobile platform is determinate by time derivate of the equations (1). The velocity relations through a matrix expression is: Φ𝑎𝑎 ∙ � �̇�𝑞13 �̇�𝑞23 �̇�𝑞33 �̇�𝑞42 � = Φ𝑥𝑥 ∙ ⎣ ⎢ ⎢ ⎡ �̇�𝑥𝑚𝑚 �̇�𝑧𝑚𝑚 �̇�𝜃 �̇�𝜓 ⎦ ⎥ ⎥ ⎤ (2) where Φ𝑎𝑎 is the Inverse Jacobian and Φ𝑥𝑥 the Forward Jacobian. An inverse singularity is presented when the determinant of Φ𝑎𝑎 becomes zero, and a forward singularity occurs with determinant of Φ𝑥𝑥 is equal to zero. For the PKM under study, the Φ𝑎𝑎 is equal to the identity matrix, which prevent the occurrence of inverse singularities. On the other hand, the Φ𝑥𝑥 is a function of the four DoF of the mobile platform (xm, zm, θ, ψ). In that case, the 3UPS+RPU PKM will undergo a forward singularity. https://doi.org/10.4995/muse.2020.13352 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 118 2.2. Dynamic model The dynamic model of the parallel manipulator can be obtained by applying the D’Alembert’s Principle and the Principle of Virtual Power (Tsai, 1999): −𝑄𝑄�⃗ 𝑖𝑖𝑖𝑖 + Φ𝑞𝑞 𝑇𝑇 ∙ 𝜆𝜆 = 𝑄𝑄�⃗ 𝑔𝑔𝑔𝑔𝑎𝑎𝑔𝑔 + 𝑄𝑄�⃗ 𝑒𝑒𝑥𝑥 + 𝑄𝑄�⃗ 𝑓𝑓𝑔𝑔𝑖𝑖𝑓𝑓 + 𝑄𝑄�⃗ 𝑎𝑎𝑓𝑓𝑎𝑎 Φ𝑞𝑞 ∙ �⃗̈�𝑞 = 𝑏𝑏�⃗ (3) Where: 𝑄𝑄�⃗ 𝑔𝑔𝑔𝑔𝑎𝑎𝑔𝑔 The gravitational generalized forces 𝑄𝑄�⃗ 𝑖𝑖𝑖𝑖 The inertial generalized forces 𝑄𝑄�⃗ 𝑓𝑓𝑔𝑔𝑖𝑖𝑓𝑓 The friction generalized forces 𝑄𝑄�⃗ 𝑒𝑒𝑥𝑥, The external generalized forces applied to the mobile platform 𝑄𝑄�⃗ 𝑎𝑎𝑓𝑓𝑎𝑎 The active generalized forces exerted by the actuators Φ𝑞𝑞 The restriction Jacobian matrix 𝜆𝜆 The vector of Lagrange multipliers �⃗̈�𝑞 The generalized accelerations and 𝑏𝑏�⃗ The vector comprising the acceleration terms quadratic in velocities. The �⃗�𝑞 is a set of generalized coordinates from the active (independent) and passive joints (secondary), organized as: �⃗�𝑞 = � 𝑞𝑞11, 𝑞𝑞12, 𝑞𝑞21, 𝑞𝑞22, 𝑞𝑞31, 𝑞𝑞32, 𝑞𝑞41, 𝑥𝑥𝑚𝑚, 𝑧𝑧𝑚𝑚, 𝜃𝜃, 𝜓𝜓��������������������������� 𝑞𝑞13, 𝑞𝑞23, 𝑞𝑞33, 𝑞𝑞42����������� 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 (𝑞𝑞𝑠𝑠) 𝐼𝐼𝑆𝑆𝑆𝑆𝑆𝑆𝐼𝐼𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝐼𝐼 (𝑞𝑞𝑖𝑖) � 𝑇𝑇 (4) For the 3UPS+RPU PKM, the Φ𝑞𝑞 matrix is defined by deriving respect to �⃗�𝑞 the subsequent 11 constraint equations: https://doi.org/10.4995/muse.2020.13352 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 119 ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎡ 𝐶𝐶11 ∙ 𝑆𝑆12 ∙ 𝑞𝑞13 − 𝑅𝑅 − 𝑥𝑥𝑚𝑚 + 𝑅𝑅𝑚𝑚 ∙ 𝐶𝐶𝜃𝜃 ∙ 𝐶𝐶𝜓𝜓 −𝐶𝐶12 ∙ 𝑞𝑞13 + 𝑅𝑅𝑚𝑚 ∙ 𝐶𝐶𝜃𝜃 ∙ 𝐶𝐶𝜓𝜓 𝑆𝑆11 ∙ 𝑆𝑆12 ∙ 𝑞𝑞13 − 𝑧𝑧𝑚𝑚 − 𝑅𝑅𝑚𝑚 ∙ 𝑆𝑆𝜃𝜃 𝐶𝐶21 ∙ 𝑆𝑆22 ∙ 𝑞𝑞23 + 𝑅𝑅 ∙ 𝐶𝐶𝐹𝐹𝐹𝐹 − 𝑥𝑥𝑚𝑚 − 𝑅𝑅𝑚𝑚 ∙ 𝐶𝐶𝑀𝑀𝐹𝐹 ∙ 𝐶𝐶𝜃𝜃 ∙ 𝐶𝐶𝜓𝜓 + 𝑅𝑅𝑚𝑚 ∙ 𝑆𝑆𝑀𝑀𝐹𝐹 ∙ 𝑆𝑆𝜓𝜓 −𝐶𝐶22 ∙ 𝑞𝑞23 + 𝑅𝑅 ∙ 𝑆𝑆𝐹𝐹𝐹𝐹 − 𝑅𝑅𝑚𝑚 ∙ 𝐶𝐶𝑀𝑀𝐹𝐹 ∙ 𝐶𝐶𝜃𝜃 ∙ 𝑆𝑆𝜓𝜓 − 𝑅𝑅𝑚𝑚 ∙ 𝑆𝑆𝑀𝑀𝐹𝐹 ∙ 𝐶𝐶𝜓𝜓 𝑆𝑆21 ∙ 𝑆𝑆22 ∙ 𝑞𝑞23 − 𝑧𝑧𝑚𝑚 + 𝑅𝑅𝑚𝑚 ∙ 𝐶𝐶𝑀𝑀𝐹𝐹 ∙ 𝑆𝑆𝜃𝜃 𝐶𝐶31 ∙ 𝑆𝑆32 ∙ 𝑞𝑞33 + 𝑅𝑅 ∙ 𝐶𝐶𝐹𝐹𝐹𝐹 − 𝑥𝑥𝑚𝑚 − 𝑅𝑅𝑚𝑚 ∙ 𝐶𝐶𝑀𝑀𝐹𝐹 ∙ 𝐶𝐶𝜃𝜃 ∙ 𝐶𝐶𝜓𝜓 − 𝑅𝑅𝑚𝑚 ∙ 𝑆𝑆𝑀𝑀𝐹𝐹 ∙ 𝑆𝑆𝜓𝜓 −𝐶𝐶32 ∙ 𝑞𝑞33 − 𝑅𝑅 ∙ 𝑆𝑆𝐹𝐹𝐹𝐹 − 𝑅𝑅𝑚𝑚 ∙ 𝐶𝐶𝑀𝑀𝐹𝐹 ∙ 𝐶𝐶𝜃𝜃 ∙ 𝑆𝑆𝜓𝜓 + 𝑅𝑅𝑚𝑚 ∙ 𝑆𝑆𝑀𝑀𝐹𝐹 ∙ 𝐶𝐶𝜓𝜓 𝑆𝑆31 ∙ 𝑆𝑆32 ∙ 𝑞𝑞33 − 𝑧𝑧𝑚𝑚 + 𝑅𝑅𝑚𝑚 ∙ 𝐶𝐶𝑀𝑀𝐹𝐹 ∙ 𝑆𝑆𝜃𝜃 −𝑆𝑆41 ∙ 𝑞𝑞42 − 𝑥𝑥𝑚𝑚 + 𝑆𝑆𝑑𝑑 𝐶𝐶41 ∙ 𝑞𝑞42 − 𝑧𝑧𝑚𝑚 ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎤ = 0�⃗ 11𝑥𝑥1 (5) Grouping �⃗̈�𝑞 and 𝜆𝜆 the Eq. (3) can be rewritten in matrix form, it can be expressed as follows: � 𝑀𝑀 �Φ𝑞𝑞� 𝑇𝑇 Φ𝑞𝑞 0 � ∙ ��⃗̈�𝑞 𝜆𝜆 � = � 𝑄𝑄�⃗ 𝑓𝑓𝑓𝑓 + 𝑄𝑄�⃗ 𝑔𝑔𝑔𝑔𝑎𝑎𝑔𝑔 + 𝑄𝑄�⃗ 𝑒𝑒𝑥𝑥 + 𝑄𝑄�⃗ 𝑓𝑓𝑔𝑔𝑖𝑖𝑓𝑓 + 𝑄𝑄�⃗ 𝑎𝑎𝑓𝑓𝑎𝑎 𝑏𝑏�⃗ � (6) where 𝑄𝑄�⃗ 𝑖𝑖𝑖𝑖 is divides in the mechanical system mass matrix (M), and the generalized forces related to Coriolis and Centrifugal accelerations (𝑄𝑄�⃗ 𝑓𝑓𝑓𝑓). In this case the 0 is an 11x11 null matrix. The velocity of the general coordinates (�⃗̇�𝑞), using coordinate partitioning method (Wehage, Wehage, & Ravani, 2015), can be express in function of the independent coordinates as: �⃗̇�𝑞 = � �̇�𝑞��⃗ 𝑑𝑑 �̇�𝑞��⃗ 𝑖𝑖� = � −�Φ𝑞𝑞 𝑑𝑑� −1 ∙ Φ𝑞𝑞 𝑖𝑖 1 � ∙ ��̇�𝑞��⃗ 𝑖𝑖 � = 𝑅𝑅∗ ∙ ��̇�𝑞��⃗ 𝑖𝑖 � (7) in this case, Φ𝑞𝑞𝑖𝑖 and Φ𝑞𝑞𝑠𝑠 are parts of the restriction Jacobian matrix Φ𝑞𝑞 related to the independent and secondary generalized coordinates, respectively; 1 is a 4x4 identity matrix. Multiplying both sides of Eq. (6) by 𝑅𝑅∗ the equation of motion can be compactly written follows: (𝑅𝑅∗)𝐹𝐹×𝑁𝑁𝑇𝑇 ∙ �𝑀𝑀𝑁𝑁×𝑁𝑁 ∙ �⃗̈�𝑞𝑁𝑁×1 − 𝑄𝑄�⃗ 𝑓𝑓𝑓𝑓𝑁𝑁×1 − 𝑄𝑄�⃗ 𝑔𝑔𝑔𝑔𝑎𝑎𝑔𝑔𝑁𝑁×1 − 𝑄𝑄 �⃗ 𝑓𝑓𝑔𝑔𝑖𝑖𝑓𝑓𝑁𝑁×1 − 𝑄𝑄 �⃗ 𝑒𝑒𝑥𝑥𝑁𝑁×1� = = (𝑅𝑅∗)𝐹𝐹×𝑁𝑁𝑇𝑇 ∙ 𝑄𝑄�⃗ 𝑎𝑎𝑓𝑓𝑎𝑎𝑁𝑁𝑥𝑥1 = (𝑅𝑅 ∗)𝐹𝐹×𝑁𝑁𝑇𝑇 ∙ (𝑄𝑄𝑎𝑎𝑓𝑓𝑁𝑁×𝐹𝐹 ∙ �⃗�𝐹𝑎𝑎𝑓𝑓𝑎𝑎𝐹𝐹×1) (8) where 𝑁𝑁 and 𝐹𝐹 are the number of generalized coordinates and the independent coordinates respectively. For this study, 𝑁𝑁 = 15 and 𝐹𝐹 = 4. �⃗�𝐹𝑎𝑎𝑓𝑓𝑎𝑎𝐹𝐹×1 are the forces belonging to the actuators on https://doi.org/10.4995/muse.2020.13352 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 120 the PKM. It is worth mentioning that the right-side term (𝑅𝑅∗)𝐹𝐹×𝑁𝑁𝑇𝑇 ∙ 𝑄𝑄�⃗ 𝑎𝑎𝑓𝑓𝑁𝑁×𝐹𝐹 of Eq. (8) is the identity matrix. The equation of motion can be further developed by considering friction force only in the prismatic actuators, thus only affecting the active generalized coordinates, hence: (𝑅𝑅∗)𝐹𝐹×𝑁𝑁𝑇𝑇 ∙ �𝑀𝑀𝑁𝑁×𝑁𝑁 ∙ �⃗̈�𝑞𝑁𝑁×1 + 𝑄𝑄�⃗ 𝑓𝑓𝑓𝑓𝑁𝑁×1 + 𝑄𝑄�⃗ 𝑔𝑔𝑔𝑔𝑎𝑎𝑔𝑔𝑁𝑁×1 + 𝑄𝑄 �⃗ 𝑒𝑒𝑖𝑖𝑎𝑎𝑁𝑁×1� + �⃗�𝐹𝑓𝑓𝑔𝑔𝑖𝑖𝑓𝑓𝐹𝐹×1 = �⃗�𝐹𝑎𝑎𝑓𝑓𝑎𝑎𝐹𝐹×1 (9) in which the friction force assigned to the generalized active coordinates is represented as: �⃗�𝐹𝑓𝑓𝑔𝑔𝑖𝑖𝑓𝑓 = ⎣ ⎢ ⎢ ⎡ −𝑑𝑑𝑖𝑖𝑠𝑠𝑆𝑆(�̇�𝑞13) ∙ (𝜇𝜇𝑓𝑓 + 𝜇𝜇𝑔𝑔 ∙ |�̇�𝑞13|) −𝑑𝑑𝑖𝑖𝑠𝑠𝑆𝑆(�̇�𝑞23) ∙ (𝜇𝜇𝑓𝑓 + 𝜇𝜇𝑔𝑔 ∙ |�̇�𝑞23|) −𝑑𝑑𝑖𝑖𝑠𝑠𝑆𝑆(�̇�𝑞33) ∙ (𝜇𝜇𝑓𝑓 + 𝜇𝜇𝑔𝑔 ∙ |�̇�𝑞33|) −𝑑𝑑𝑖𝑖𝑠𝑠𝑆𝑆(�̇�𝑞42) ∙ (𝜇𝜇𝑓𝑓 + 𝜇𝜇𝑔𝑔 ∙ |�̇�𝑞42|)⎦ ⎥ ⎥ ⎤ (10) where µv and µc are the viscous and Coulomb coefficients, respectively. 2.3. Objective function and optimization constraints The reconfigurations process, based on previous works (Araujo-Gómez et al., 2019; Vallés et al., 2018), looks for the optimal set of geometric parameters of the PKM for a specific mobile platform trajectory. The reconfiguration of the 3UPS+RPU (i) prevents Forward singularities inside the workspace (determinant of the Φ𝑥𝑥 different from zero), and (ii) avoids large control actions in the vicinity of the singular configurations. The physical bounds of the seven design variables of the PKM (R, βFD, βFI, Rm, βMD, βMI and ds) showed in Fig. 1 are: ⎩ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎧ 0.30 𝑚𝑚 ≤ 𝑅𝑅 ≤ 0.50 𝑚𝑚 0.10 𝑚𝑚 ≤ 𝑅𝑅𝑚𝑚 ≤ 0.30 𝑚𝑚 −0.15 𝑚𝑚 ≤ 𝑆𝑆𝑑𝑑 ≤ 0.15 𝑚𝑚 0.10 𝑆𝑆𝑆𝑆𝑆𝑆 ≤ 𝛽𝛽𝐹𝐹𝐹𝐹 ≤ 𝜋𝜋 2 𝑆𝑆𝑆𝑆𝑆𝑆 0.10 𝑆𝑆𝑆𝑆𝑆𝑆 ≤ 𝛽𝛽𝐹𝐹𝐹𝐹 ≤ 𝜋𝜋 2 𝑆𝑆𝑆𝑆𝑆𝑆 0.10 𝑆𝑆𝑆𝑆𝑆𝑆 ≤ 𝛽𝛽𝑀𝑀𝐹𝐹 ≤ 𝜋𝜋 2 𝑆𝑆𝑆𝑆𝑆𝑆 0.10 𝑆𝑆𝑆𝑆𝑆𝑆 ≤ 𝛽𝛽𝑀𝑀𝐹𝐹 ≤ 𝜋𝜋 2 𝑆𝑆𝑆𝑆𝑆𝑆 (11) https://doi.org/10.4995/muse.2020.13352 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 121 The set of rehabilitation trajectories are discretized into a n number of passing through points. At these points we solve the inverse dynamics of the 3UPS+RPU PKM, then we define the objective function as the sum of the square of the active generalized forces (�⃗�𝐹𝑎𝑎𝑓𝑓𝑎𝑎): 𝑓𝑓(𝑅𝑅, 𝑅𝑅𝑚𝑚, 𝑆𝑆𝑑𝑑, 𝛽𝛽𝐹𝐹𝐹𝐹 , 𝛽𝛽𝐹𝐹𝐹𝐹, 𝛽𝛽𝑀𝑀𝐹𝐹, 𝛽𝛽𝑀𝑀𝐹𝐹) = ∑ ∑ �𝐹𝐹𝑖𝑖𝑖𝑖� 24 𝑖𝑖=1 𝑖𝑖 𝑖𝑖=1 (12) To ensure that the ‖Φ𝑥𝑥‖ ≠ 0 for all configurations part of the rehabilitation trajectory, the next constraints must be met: �‖Φ𝑥𝑥‖𝑆𝑆𝑆𝑆𝑓𝑓 − ‖Φ𝑥𝑥‖𝑖𝑖� < �‖Φ𝑥𝑥‖𝑆𝑆𝑆𝑆𝑓𝑓�; 𝑖𝑖 = 1,2 … , 𝑆𝑆 (13) with: ‖Φ𝑥𝑥‖𝑔𝑔𝑒𝑒𝑓𝑓 = 𝑚𝑚𝑆𝑆𝑥𝑥(‖Φ𝑥𝑥‖𝑖𝑖); 𝑖𝑖 = 1,2 … , 𝑆𝑆 (14) If both sides of the constraint (13) are squared, it can be rewritten as: 2 ∙ ‖Φ𝑥𝑥‖𝑆𝑆𝑆𝑆𝑓𝑓 ∙ ‖Φ𝑥𝑥‖𝑖𝑖 − ‖Φ𝑥𝑥‖2𝑖𝑖 > 0; 𝑖𝑖 = 1,2 … , 𝑆𝑆 (15) The final optimization constraint is referring to the length of each actuator. The length of the actuated joints must be between the minimum (𝑙𝑙𝑚𝑚𝑖𝑖𝑖𝑖) and maximum (𝑙𝑙𝑚𝑚𝑎𝑎𝑥𝑥) length of each limb. 𝑙𝑙𝑚𝑚𝑖𝑖𝑖𝑖 ≤ 𝑞𝑞𝑖𝑖3 ≤ 𝑙𝑙𝑚𝑚𝑎𝑎𝑥𝑥; 𝑖𝑖 = 1,2,3 𝑙𝑙𝑚𝑚𝑖𝑖𝑖𝑖 ≤ 𝑞𝑞𝑖𝑖2 ≤ 𝑙𝑙𝑚𝑚𝑎𝑎𝑥𝑥; 𝑖𝑖 = 4 (16) The minimization of the penalty function (12) subjected to non-linear constraints (15) and (16) represents a non-linear optimization problem. In this study, the optimization problem is solved by several approaches, which covers evolutionary algorithms, heuristics optimizers, multi-strategy algorithms and gradient-based optimizers. 2.4. Optimization approaches comparison Optimization techniques can be classified as either local (commonly gradient-based) or global (commonly non-gradient based or evolutionary) algorithms. However, it is worth mentioning the difficulties in comparing the performance of several optimization algorithms (Beiranvand et al., https://doi.org/10.4995/muse.2020.13352 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 122 2017). Therefore, we have carried out the optimization algorithm comparison following the recommendations of those authors. Our research team used these optimization algorithms: a) Evolutionary algorithms (EA), which use mechanisms inspired by biological evolution. b) Heuristic methods use a heuristic function to solve the problem. c) Multi-strategy algorithms combine the strengths of different approaches. d) Gradient-Based are iterative methods using the gradient information. Using the model FRONTIER framework (www.esteco.com) all these optimization approaches are compared. There is an exhaustive explanation about this optimization algorithm in (Yang, 2017). 3. Case studies A set of 8 trajectories have been tested for knee rehabilitation. All of them are non-feasible in terms of forward singularities and actuators out of range, so they require a reconfiguration. In Table 2, the characteristics of those trajectories are featured, regarding the motion of the mobile platform as well as the difficulties found during the execution. Table 2. Test trajectories. (1) Forward singularities, (2) Actuators out of range. Trajectory Horizontal Vertical Inclined straight line Ellipse Constant Orientation Tr1 (1) Tr3 (2) Tr5 (2) Tr7 (1) and (2) Variable Orientation Tr2 (1) Tr4 (1) Tr6 (1) and (2) Tr8 (1) and (2) The reconfiguration involves 7 design variables, but only 4 are optimized (𝑅𝑅, 𝑆𝑆𝑑𝑑, 𝛽𝛽𝐹𝐹𝐹𝐹, 𝛽𝛽𝐹𝐹𝐹𝐹), while the other 3 are kept constant (𝑅𝑅𝑚𝑚, 𝛽𝛽𝑀𝑀𝐹𝐹, 𝛽𝛽𝑀𝑀𝐹𝐹). The initial parameters of the manipulator are defined in Eq. (17) and are intended to avoid a trivial singular configuration. The physical bounds of the optimized design variables are those presented in Eq. (11). Moreover, the actuator angles must be less than 0.7854 rad and their lengths must lie between 0.575 and 0.775 m. https://doi.org/10.4995/muse.2020.13352 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 123 ⎩ ⎪⎪ ⎨ ⎪⎪ ⎧ 𝑅𝑅 = 43 𝑆𝑆𝑚𝑚 𝑅𝑅𝑚𝑚 = 23 𝑆𝑆𝑚𝑚 𝑆𝑆𝑑𝑑 = 5 𝑆𝑆𝑚𝑚 𝛽𝛽𝐹𝐹𝐹𝐹 = 45𝑜𝑜 𝛽𝛽𝐹𝐹𝐹𝐹 = 48𝑜𝑜 𝛽𝛽𝑀𝑀𝐹𝐹 = 90𝑜𝑜 𝛽𝛽𝑀𝑀𝐹𝐹 = 100𝑜𝑜 (17) Table 3 summarizes the results obtained when applying the different optimization strategies for trajectory 2. The optimized design variables avoid forward singularities, which is shown by the fact that the minimum value of Eq. (15) is greater than zero (Table 3). The PilOPT algorithm presents the best performance. However, results greatly depend on the tuning of the specific parameters of each algorithm, e.g., the stopping conditions, population size or step sizes (Beiranvand et al., 2017). In fact, the main reason why the PilOPT algorithm outperforms the rest is that it only requires one parameter, which is the number of design evaluations determining when the algorithm stops, occurring when no improvement in the Pareto efficiency is observed. Table 3. Optimized design variables for trajectory 2. Algorithm 𝜷𝜷𝑭𝑭𝑭𝑭 (º) 𝜷𝜷𝑭𝑭𝑭𝑭 (º) R (cm) ds (cm) Objective Function (N2) Minimum value of Eq. (15) Evolutionary algorithms NSGA-II 180 48 40 15 154,547.26 1.64·10-4 MOGA-II 174 60 42 15 149,220.00 2.22·10-4 ARMOGA 84 168 32 9 143,290.00 1.82·10-4 Evolution Strategies 180 48 32 -1 129,375.02 2.18·10-4 Heuristics optimizers MOSA 84 156 32 13 147,530.00 9.39·10-5 MOPSO 67 21 22 -15 106,449.01 3.21·10-4 Multi-strategy algorithms HYBRID 174 60 42 13 150,060.00 2.11·10-4 PilOPT 66 18 22 -15 104,010.00 1.99·10-4 FAST 177 173 40 15 193,527.55 1.32·10-4 MEGO 63 21 20 -15 110,761.44 1.55·10-4 Gradient-based optimizers MIPSQP 132 138 30 15 212,920.00 3.20·10-5 After solving the optimization problem using the PilOPT algorithm, several results are presented. Fig. 2 shows the geometrical robot reconfiguration from the original robot design for the second trajectory and for both the fixed base (left) and the mobile platform (right). https://doi.org/10.4995/muse.2020.13352 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 124 Figure 2. Geometrical robot reconfiguration from the original robot design for the second trajectory and for both the fixed base (left) and the mobile platform (right). The yellow dots correspond to the original configuration of the PKM, while the red lines lead to the final configuration. Bearing in mind that the PilOPT algorithm leads to the best results, the 8 non-feasible trajectories are solved using this optimization technique. Table 4 illustrates the optimal reconfiguration design variables of the robot using the PilOPT algorithm. The robot reconfiguration prevents high values of generalized forces and the problem of a direct singularity. Table 4. Optimized design variables for the 8 non-feasible trajectories. Trajectory 𝜷𝜷𝑭𝑭𝑭𝑭 (º) 𝜷𝜷𝑭𝑭𝑭𝑭 (º) R (cm) ds (cm) Objective Function (N2) 1 18 30 28 -7 101,130.00 2 66 18 22 -15 104,010.00 3 60 12 30 9 79,627.00 4 60 18 36 15 58,168.00 5 72 30 26 -9 109,410.00 6 48 6 30 1 65,622.00 7 90 25 35 15 83,526.00 8 48 114 32 15 248,780.00 Results show that there is not the best optimization for all types of optimization problems, because each algorithm has its advantages and disadvantages. In general, local algorithms are better when design variables are greater than 50, with high computational cost, with a little significance numerical noise, when local minima are not a problem and when gradients are easily available. Inversely, global algorithms are recommended with less than 50 design variables, with significance https://doi.org/10.4995/muse.2020.13352 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 125 numerical noise, where gradients do not exist, when global optimum is needed and when there are discontinuous objective or constraint functions. Eventually, global methods should be used only in cases where efficient local search is not feasible. 4. Conclusions In order to apply the required movements for diagnosis and rehabilitation tasks of anterior cruciate ligament of human knee, a PKM robot with 4 DoF comprised of 3UPS-RPU was designed, and the kinematics and dynamics modeling has been presented. During the execution of certain rehabilitation trajectories, the forward Jacobian becomes singular, so in order to prevent control problems a geometrical and kinematical reconfiguration of the manipulator has been considered. This leads to the achievement of the generalized coordinates that were initially outside range of prismatic actuators. As it is not possible to modify the rehabilitation trajectories because they are prescribed by the physical therapist, the robot reconfiguration raises as the only solution of such problem. Thus, it is needed to modify the points of insertion of the limbs on both the mobile and fixed robot platforms. A non-linear optimization solver has been proposed to approach the reconfiguration problem. The penalty function to be minimized sums the square of the active generalized forced. The constraints include the imposition of the robot actuated joints to lie within an admissible range, and the non-singularity of the forward Jacobian. Using D'Alembert's dynamics inverse model of the PKM and the Principle of Virtual Power the optimal redesign problem of the robot has been tackled. We have used different optimization strategies to solve it. The rehabilitation therapies cover a set of 8 non-feasible trajectories. The second non-feasible trajectory was optimized by using different optimization techniques to find the best one. Results clearly show that the PilOPT algorithm outperforms the other algorithms for the problem in hand. https://doi.org/10.4995/muse.2020.13352 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 126 The rest of non-feasible trajectories were optimized using PilOPT and the results show that the forces required to carry out these trajectories are much lower than those of the initial configuration of the robot and that the active generalized coordinates fall within the physical ranges of the actuators. Acknowledgements This work was supported by the Spanish Ministry of Education, Culture and Sports through the Project for Research and Technological Development with Ref. DPI2017-84201-R. References Arakelian, V., Briot, S., & Glazunov, V. (2008). Increase of singularity-free zones in the workspace of parallel manipulators using mechanisms of variable structure. Mechanism and Machine Theory, 43(9), 1129– 1140. https://doi.org/10.1016/J.MECHMACHTHEORY.2007.09.005 Araujo-Gómez, P., Díaz-Rodríguez, M., Mata, V., & González-Estrada, O. A. (2019). Kinematic analysis and dimensional optimization of a 2R2T parallel manipulator. Journal of the Brazilian Society of Mechanical Sciences and Engineering, 41(10), 425. https://doi.org/10.1007/s40430-019-1934-1 Araujo-Gómez, P., Mata, V., Díaz-Rodríguez, M., Valera, A., & Page, A. (2017). Design and kinematic analysis of a novel 3UPS/RPU parallel kinematic mechanism with 2T2R motion for knee diagnosis and rehabilitation tasks. Journal of Mechanisms and Robotics, 9(6), 061004. https://doi.org/10.1115/1.4037800 Beiranvand, V., Hare, W., & Lucet, Y. (2017). Best practices for comparing optimization algorithms. Optimization and Engineering, 18(4), 815–848. https://doi.org/10.1007/s11081-017-9366-1 Dash, A. K., Chen, I. M., Yeo, S. H., & Yang, G. (2005). Workspace generation and planning singularity-free path for parallel manipulators. Mechanism and Machine Theory, 40(7), 776–805. https://doi.org/10.1016/j.mechmachtheory.2005.01.001 Gosselin, C., & Angeles, J. (1990). Singularity Analysis of Closed-Loop Kinematic Chains. IEEE Transactions on Robotics and Automation, 6(3), 281–290. https://doi.org/10.1109/70.56660 https://doi.org/10.4995/muse.2020.13352 https://doi.org/10.1016/J.MECHMACHTHEORY.2007.09.005 https://doi.org/10.1007/s40430-019-1934-1 https://doi.org/10.1115/1.4037800 https://doi.org/10.1007/s11081-017-9366-1 https://doi.org/10.1016/j.mechmachtheory.2005.01.001 https://doi.org/10.1109/70.56660 Multidisciplinary Journal for Education, https://doi.org/10.4995/muse.2020.13352 Social and Technological Sciences ISSN: 2341-2593 Llopis-Albert et al. (2020) http://polipapers.upv.es/index.php/MUSE/ Mult. J. Edu. Soc & Tec. Sci. Vol. 7 Nº 2 (2020): 113-127 | 127 Llopis-Albert, C., Rubio, F., & Valero, F. (2018). Optimization approaches for robot trajectory planning. Multidisciplinary Journal for Education, Social and Technological Sciences, 5(1), 1. https://doi.org/10.4995/muse.2018.9867 Patel, Y. D., & George, P. M. (2012). Parallel Manipulators Applications—A Survey. Modern Mechanical Engineering, 02(03), 57–64. https://doi.org/10.4236/mme.2012.23008 Rubio, F., Llopis-Albert, C., Valero, F., & Suñer, J. L. (2016). Industrial robot efficient trajectory generation without collision through the evolution of the optimal trajectory. Robotics and Autonomous Systems, 86, 106–112. https://doi.org/10.1016/j.robot.2016.09.008 Rubio, F., Valero, F., & Llopis-Albert, C. (2019). A review of mobile robots: Concepts, methods, theoretical framework, and applications. International Journal of Advanced Robotic Systems, 16(2), 172988141983959. https://doi.org/10.1177/1729881419839596 Tsai, L.-W. (1999). Robot Analysis and Design. John Wiley & Sons, Inc. New York, NY, USA ©1999. Valero, F., Rubio, F., & Llopis-Albert, C. (2019). Assessment of the Effect of Energy Consumption on Trajectory Improvement for a Car-like Robot. Robotica, 37(11), 1998–2009. https://doi.org/10.1017/S0263574719000407 Vallés, M., Araujo-Gómez, P., Mata, V., Valera, A., Díaz-Rodríguez, M., Page, Á., & Farhat, N. M. (2018). Mechatronic design, experimental setup, and control architecture design of a novel 4 DoF parallel manipulator. Mechanics Based Design of Structures and Machines, 46(4), 425–439. https://doi.org/10.1080/15397734.2017.1355249 Wehage, K. T., Wehage, R. A., & Ravani, B. (2015). Generalized coordinate partitioning for complex mechanisms based on kinematic substructuring. Mechanism and Machine Theory, 92, 464–483. https://doi.org/10.1016/j.mechmachtheory.2015.06.006 www.esteco.com. (n.d.). Retrieved June 10, 2019, from https://www.esteco.com/ Xianwen Kong, B., & Gosselin, C. M. (2002). Kinematics and singularity analysis of a novel type of 3-CRR 3-DOF translational parallel manipulator. International Journal of Robotics Research, 21(9), 791–798. https://doi.org/10.1177/02783649020210090501 Yang, X. (2017). Optimization Algorithms Optimization and Metaheuristic Algorithms in Engineering. (March). https://doi.org/10.1007/978-3-642-20859-1 https://doi.org/10.4995/muse.2020.13352 https://doi.org/10.4995/muse.2018.9867 https://doi.org/10.4236/mme.2012.23008 https://doi.org/10.1016/j.robot.2016.09.008 https://doi.org/10.1177/1729881419839596 https://doi.org/10.1017/S0263574719000407 https://doi.org/10.1080/15397734.2017.1355249 https://doi.org/10.1016/j.mechmachtheory.2015.06.006 https://www.esteco.com/ https://doi.org/10.1177/02783649020210090501 https://doi.org/10.1007/978-3-642-20859-1