Full text
applied sciences Article Inverse Kinematics Data Adaptation to Non-Standard Modular Robotic Arm Consisting of Unique Rotational Modules Štefan Ondoˇcko 1, Jozef Svetlík1,* , Michal Šašala 1, Zdenko Bobovský2, Tomáš Stejskal 1, Jozef Dobránsky 3, Peter Demeˇc 1and Lukáš Hrivniak 1 Citation: Ondoˇcko, t.; Svetlík, J.; Šašala, M.; Bobovský, Z.; Stejskal, T.; Dobránsky, J.; Demeˇc, P.; Hrivniak, L. Inverse Kinematics Data Adaptation to Non-Standard Modular Robotic Arm Consisting of Unique Rotational Modules. Appl. Sci. 2021,11, 1203. https://doi.org/10.3390/app11031203 Academic Editor: JoséLuis Guzmán Sánchez Received: 6 January 2021 Accepted: 25 January 2021 Published: 28 January 2021 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. Copyright: © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). 1Department of Manufacturing Machinery and Robotics, Faculty of Mechanical Engineering, The Technical University of Košice, Letná9, 04001 Košice, Slovakia; [email protected] (Š.O.); [email protected] (M.Š.); [email protected] (T.S.); peter[email protected] (P.D.); [email protected] (L.H.) 2Department of Robotics, Faculty of Mechanical Engineering, VSB—TU Ostrava, 17. listopadu 2172/15, 708 00 Ostrava-Poruba, Czech Republic; [email protected] 3 Department of Automotive and Manufacturing Technologies, Faculty of Manufacturing Technologies with a seat in Prešov, Technical University of Košice, Štúrova 31, 08001 Prešov, Slovakia; [email protected] *Correspondence: [email protected]; Tel.: +421-55-602-2195 Abstract: The paper describes the original robotic arm designed by our team kinematic design consisting of universal rotational modules (URM). The philosophy of modularity plays quite an important role when it comes to this mechanism since the individual modules will be the building blocks of the entire robotic arm. This is a serial kinematic chain with six degrees of freedom of unlimited rotation. It was modeled in three different environments to obtain the necessary visualizations, data, measurements, structural changes measurements and structural changes. In the environment of the CoppeliaSim Edu, it was constructed mainly to obtain the joints coordinates matching the description of a certain spatial trajectory with an option to test the software potential in future inverse task calculations. In Matlab, the model was constructed to check the mathematical equations in the area of kinematics, the model’s simulations of movements, and to test the numerical calculations of the inverse kinematics. Since the equipment at hand is subject to constant development, its model can also be found in SolidWorks. Thus, the model’s existence in those three environments has enabled us to compare the data and check the models’ structural designs. In Matlab and SolidWorks, we worked with the data imported on joints coordinates, necessitating overcoming certain problems related to calculations of the inverse kinematics. The objective was to compare the results, especially in terms of the position kinematics in Matlab and SolidWorks, provided the initial joint coordinate vector was the same. Keywords: Matlab; CoppeliaSim Edu; V-Rep; SolidWorks; kinematics; inverse kinematics (IK); manufacturing technology; modular robots; coordinate transformation 1. Introduction The paper addresses data processing (in particular those of joints coordinates, which are, in the case at hand, the angles of rotation) designated for a stationary robotic arm composed of the so-called URM modules, described in detail in [ 1 – 3 ]. We briefly mention their main attributes, which are unlimited rotation of the module around its own axis, availability of intrinsic power and modularity units. Thanks to the modularity and the advantages it represents [ 4 – 7 ], individual modules can be used for building various configurations and thus to adjust the arm to a function required of it, to create machines with different mobility capabilities, several degrees of freedom. In general, modular and reconfigurable robots offer great versatility, robustness and—thanks to their series production—low costs, which is mentioned by many authors addressing this issue [ 8 – 10 ]. Those modular, reconfigurable robots that consist of many modules (the number of their degrees of freedom is usually Appl. Sci. 2021,11, 1203. https://doi.org/10.3390/app11031203 https://www.mdpi.com/journal/applsci
Appl. Sci. 2021,11, 1203 2 of 15 much greater than 6) have the ability to reconfigure themselves into a large number of shapes. If this is the case, the robot can change its shape to meet the requirements of different tasks. Modular robotic systems are systems composed of modules that can be disconnected and reconnected in various configurations, subject to maintaining the precision and rigidity parameters, which can thus create a new system enabling new or value-added functions [ 11 ]. The concept of the URM system has been conceived in accordance with the total productive maintenance principal implementation rules [ 12 , 13 ]. Individual rotation positions are the result of the inverse kinematics of the mentioned robot’s arm. When it comes to kinematics of an inverse position, we look for such joint coordinate vectors of the open kinematic chain (assuming that the mechanism’s size is known) as would suit the required position and the orientation of the end effector’s coordinate system. Unlike the forward task, where the position vector is a function of the joint coordinate vector, the inverse task is substantially more complex because it necessitates solving a set of strongly nonlinear algebraic equations. These problems were first postulated by Paden B. [14] and Kahan W [15] . In most cases, these systems cannot be solved analytically. Thus, various types of iterative numerical methods are used, most often employing the Jacobian [16–21] . In calculating the inverse function, the inability to solve the task stems from the (configuration) workspace limitation, delimited by the configuration itself and the mechanism’s physical properties. If we are located outside this workspace, there is, of course, no solution. Several solutions may exist since the end effector’s defined position may be obtained in several manners. The situation can be even more varied in the case of the so-called redundant manipulators, where the joint coordinate vector’s number of elements is greater than the degree of freedom in the given workspace or plane. This results in an infinite number of configurations through which the defined position and orientation can be reached. We do not deal directly with the inverse function in this paper. The respective joint coordinates are obtained from the model’s CoppeliaSim Edu simulation (Coppelia Robotics AG, 8049 Zürich, Switzerland). The software calculating the inverse kinematics uses the pseudoinverse computational method, also called the Moore–Penrose method and the method of dampened least squares (DLS), also called the Levenberg–Marquardt method. More information about these and other methods can be found in [ 16 , 22 – 24 ]. Since other URM module configurations are contemplated for the future, or the redundant manipulator creation will be requested, it was mandatory to search for flexible solutions. To this end, the inverse kinematics is addressed in the CoppeliaSim Edu software. When the model is created in this environment, it enables the simulation of many types of movements and also the design of a working trajectory taking into account hurdles in the robotic arm’s configuration space. Joint coordinate vector coordinates are obtained from the model created in the CoppeliaSim Edu. Thus, we have the individual joints coordinates available, which is necessary for their subsequent implementation into the models, this time in Matlab (MathWorks, 1 Apple Hill Drive, Natick, MA 01760, USA) and in SolidWorks (Dassault Systèmes, 10 rue Marcel Dassault, CS 40501, 78946 Vélizy-Villacoublay CEDEX, France). These data are subsequently compared to check the models’ designs in the respective software environments. Should the designer’s work show ideal precision, these results should be, especially for the position kinematics, identical. This should hold regardless of the fact that two different software environments are used. 2. Model Creation and Data Processing Relations describing the position kinematics by means of position vectors pi , where i <1;7> at individual open kinematic chain segments have also been derived in [ 25 , 26 ]. This is the case of the robotic arm’s forward kinematics. The relations serve the purpose of calculating the position of a point that would enable the attachment of either an effector or another device. Thus, the position of a point [p xi ,p yi ,p zi ] on the module will be defined by the function of the rotation positions ϕi , ϑi and the segment size of the structure at hand—| ri |; pi = f( ϕi , ϑi , ri ). The basis of the arm [ 1 , 2 ] is an autonomous, cylinder-shaped
Appl. Sci. 2021,11, 1203 3 of 15 module. Such modules have a single degree of freedom, namely the rotational one. The rotation happens around the module’s main axis and is not limited in the interval under consideration ranging from 0 to 360 degrees. The rotation may occur continuously in either direction of rotation without limitation. The modules and joints are contemplated to be perfectly solid bodies. The individual modules’ axes of rotation cross each other at the point where they are joined by passive joints, Figure 1. The distances of section points in space are quantified by the ri vector (a kinematic chain segment), and this vector has its own Cartesian system of S i {O i ,x i ,y i ,z i }. The segment’s rotation around the z i axis is defined by the rotation matrix Rzi ( ϕi ) [ 3 – 5 ]. The segment’s rotation around the y i axis is defined by the rotation matrix Ryi(ϑi). Appl. Sci. 2021, 11, x FOR PEER REVIEW 3 of 15 or another device. Thus, the position of a point [p xi , p yi , p zi ] on the module will be defined by the function of the rotation positions φ i , ϑ i and the segment size of the structure at hand—|r i |; p i = f(φ i , ϑ i , r i ). The basis of the arm [1,2] is an autonomous, cylinder-shaped module. Such modules have a single degree of freedom, namely the rotational one. The rotation happens around the module’s main axis and is not limited in the interval under consideration ranging from 0 to 360 degrees. The rotation may occur continuously in either direction of rotation without limitation. The modules and joints are contemplated to be perfectly solid bodies. The individual modules’ axes of rotation cross each other at the point where they are joined by passive joints, Figure 1. The distances of section points in space are quantified by the r i vector (a kinematic chain segment), and this vector has its own Cartesian system of S i {O i , x i , y i , z i }. The segment’s rotation around the z i axis is defined by the rotation matrix R zi (φ i ) [3–5]. The segment’s rotation around the y i axis is defined by the rotation matrix R yi (ϑ i ). Figure 1. Robotic arm vector model composed of the universal rotational modules (URM) modules. Thus, we can write the following for R zi (φ i ): 𝑹(𝜑)=cos (𝜑)−sin (𝜑 )0 sin (𝜑) cos (𝜑)0 001 (1) Moreover, the following for R yi (ϑ i ): 𝑹(𝜗)=cos (𝜗)0sin (𝜗 ) 010 −sin (𝜗) 0 cos (𝜗) (2) The r 1 vector is connected to the base perpendicularly to the plane with the x 1 , y 1 axes. p 1 ≡ r 1 , because the coordinate system is orthogonal. According to Figure 1, the following applies to the position vector p 1 : 𝒑=𝑹(𝜑)×𝒓 (3) According to Figure 1, the following applies to the position vectors p 2 , p 3 , p 4 , to p i : Figure 1. Robotic arm vector model composed of the universal rotational modules (URM) modules. Thus, we can write the following for Rzi(ϕi): Rzi(ϕi)= cos(ϕi)−sin(ϕi)0 sin(ϕi)cos(ϕi)0 0 0 1 (1) Moreover, the following for Ryi(ϑi): Ryi(ϑi)= cos(ϑi)0 sin(ϑi) 0 1 0 −sin(ϑi)0 cos(ϑi) (2) The r1 vector is connected to the base perpendicularly to the plane with the x 1 ,y 1 axes. p1≡r1 , because the coordinate system is orthogonal. According to Figure 1, the following applies to the position vector p1: p1=Rz1(ϕ1)×r1(3) According to Figure 1, the following applies to the position vectors p2,p3,p4, to pi: p2=p1+Rz1(ϕ1)×Ry2(ϑ2)×Rz2(ϕ2)×r2(4) p3=p2+Rz1(ϕ1)×Ry2(ϑ2)×Rz2(ϕ2)×Ry3(ϑ3)×Rz3(ϕ3)×r3(5) p4=p3+Rz1(ϕ1)×Ry2(ϑ2)×Rz2(ϕ2)×Ry3(ϑ3)×Rz3(ϕ3)×Ry4(ϑ4)×Rz4(ϕ4)×r4(6)
Appl. Sci. 2021,11, 1203 4 of 15 A general position vector formula of this pistructure will thus be: pi+1=Rz1(ϕ1)×"r1+ i ∑ k=1"k ∏ j=1Ry(j+1)ϑj+1×Rz(j+1)ϕj+1#×rk+1#(7) The resulting orientation of the ri vector defined by the Euler’s angle can be seen in [ 27 ] according to the Rz ( γ ) Ry ( β ) Rx ( α ) option will be determined from the relation below based on the final arm rotation: RZYX(i+1)=Rz1(ϕ1)× i ∏ j=1Ry(j+1)ϑj+1×Rz(j+1)ϕj+1(8) Generally speaking, the final shape of the RZYX(i+1) in terms of its i-segment will look as follows: RZYX(i+1)= a11 a12 a13 a21 a22 a23 a31 a32 a33 (9) where a ij for i= 1, 2, 3, j= 1, 2, 3 are the matrix elements. Considering the Rz ( γ ) Ry ( β ) Rx ( α ) option, the Euler’s angles will then be as follows: α=arctana32 a33 (10) β=arcsin(−a31)(11) or also: β=arctan −a31 qa2 32 +a2 33 (12) γ=arctana21 a11 (13) Thus, for example, in the case of an arm with 3 active degrees of freedom, i.e., for the r4vector, the final rotation according to Equation (8) will be as follows: RZYX4=Rz1(ϕ1)×Ry2(ϑ2)×Rz2(ϕ2)×Ry3(ϑ3)×Rz3(ϕ3)×Ry4(ϑ4)(14) Our case involves 6 degrees of freedom. 2.1. Modeling in CoppeliaSim Edu An open kinematic chain model was created in CoppeliaSim Edu, in Figure 2, composed of modules featuring 6 degrees of freedom. Appl. Sci. 2021, 11, x FOR PEER REVIEW 5 of 15 Figure 2. A model created in CoppeliaSim Edu. The purpose of this model was especially calculating the inverse task from an arbitrary spatial trajectory the effector is to travel under 37 s. Joint coordinate vector data φ = [ φ1, φ2,…, φ6] T are obtained using a sampling period of Tsp each 0.005 s. The only (software-imposed) limitation is the degree of freedom itself, namely the possibility of rotation in the <−π, +π> interval. This problem had to be subsequently addressed since it was causing a discontinuity in the simulation’s operation as per the condition (18) and was thus disrupting the continuity of the trajectory on the models in the environments into which data were imported., i.e., Matlab, SolidWorks, but the same would have been the case in other environments, too. 2.2. Modeling in Matlab The kinematic model in Figure 3 was created in Matlab using the Simscape/Multibody toolbox, the dimensions of which reflect the reality and are given in Table 1. The module diameter or volume need not be of interest when making a kinematic assessment, as it has no effect on kinematic parameters. Figure 3. Model created in Matlab-Simulink using the Simscape/Multibody toolbox. Figure 2. A model created in CoppeliaSim Edu.
Appl. Sci. 2021,11, 1203 5 of 15 The purpose of this model was especially calculating the inverse task from an arbitrary spatial trajectory the effector is to travel under 37 s. Joint coordinate vector data ϕ= [ϕ1,ϕ2, . . . , ϕ6]T are obtained using a sampling period of T sp each 0.005 s. The only (software-imposed) limitation is the degree of freedom itself, namely the possibility of rotation in the < −π , + π > interval. This problem had to be subsequently addressed since it was causing a discontinuity in the simulation’s operation as per the condition (18) and was thus disrupting the continuity of the trajectory on the models in the environments into which data were imported., i.e., Matlab, SolidWorks, but the same would have been the case in other environments, too. 2.2. Modeling in Matlab The kinematic model in Figure 3was created in Matlab using the Simscape/Multibody toolbox, the dimensions of which reflect the reality and are given in Table 1. The module diameter or volume need not be of interest when making a kinematic assessment, as it has no effect on kinematic parameters. Appl. Sci. 2021, 11, x FOR PEER REVIEW 5 of 15 Figure 2. A model created in CoppeliaSim Edu. The purpose of this model was especially calculating the inverse task from an arbitrary spatial trajectory the effector is to travel under 37 s. Joint coordinate vector data φ = [ φ1, φ2,…, φ6] T are obtained using a sampling period of Tsp each 0.005 s. The only (software-imposed) limitation is the degree of freedom itself, namely the possibility of rotation in the <−π, +π> interval. This problem had to be subsequently addressed since it was causing a discontinuity in the simulation’s operation as per the condition (18) and was thus disrupting the continuity of the trajectory on the models in the environments into which data were imported., i.e., Matlab, SolidWorks, but the same would have been the case in other environments, too. 2.2. Modeling in Matlab The kinematic model in Figure 3 was created in Matlab using the Simscape/Multibody toolbox, the dimensions of which reflect the reality and are given in Table 1. The module diameter or volume need not be of interest when making a kinematic assessment, as it has no effect on kinematic parameters. Figure 3. Model created in Matlab-Simulink using the Simscape/Multibody toolbox. Figure 3. Model created in Matlab-Simulink using the Simscape/Multibody toolbox. The model is composed of individual blocks that define its parts. In a nutshell, the model consists of a base identical to the “base” of the reference system and the individual blocks representing the r i vector (a kinematic chain segment). As we can see in Figure 1, the “vector r I ” block then consists of the “URM“ module and a passive joint part. The modules are connected in places where each joint represents its own Cartesian system of the module, starting in point O i . In this experiment, the last part of the passive joint, vector r 7 , was considered to be an effector. A measuring device (sensor 7) is connected to the effector r 7 , checking physical quantities (position, velocity, acceleration). Such measuring devices can be mounted on other modules, too. The Euler’s angles’ values are also available in three consecutive rotations around the axes, often marked ZYX. The values apply to the effector and are the result of the final product of the individual spatial transformations
Appl. Sci. 2021,11, 1203 6 of 15 (8), as is usually the case with the open kinematic chain [ 27 ]. A model constructed in this way is then visualized in the Mechanics explorer window and appears in the form as seen in Figure 4. Table 1. Dimensions table of the robotic arm of Figure 2and also Figure 3, Figure 4, respectively. Diameters (mm) Diameters (mm) Diameters (mm) r1 243.215 a1 73 b1 128 r2 212.430 a2 42.215 b2 128 r3 212.430 a3 42.215 b3 128 r4 212.430 a4 42.215 b4 128 r5 212.430 a5 42.215 b5 128 r6 212.430 a6 42.215 b6 128 r7 42.215 1 1Effector (last part of the passive joint). Appl. Sci. 2021, 11, x FOR PEER REVIEW 6 of 15 Table 1. Dimensions table of the robotic arm of Figure 2 and also Figure 3, Figure 4, respectively. Diameters (mm) Diameters (mm) Diameters (mm) r1 243.215 a1 73 b1 128 r2 212.430 a2 42.215 b2 128 r3 212.430 a3 42.215 b3 128 r4 212.430 a4 42.215 b4 128 r5 212.430 a5 42.215 b5 128 r6 212.430 a6 42.215 b6 128 r7 42.215 1 1 Effector (last part of the passive joint). (a) (b) Figure 4. (a) Model visualization with hints of dimensions in Matlab-Simulink using the Simscape/Multibody toolbox. (b) Detail URM with a passive joint. The model is composed of individual blocks that define its parts. In a nutshell, the model consists of a base identical to the “base” of the reference system and the individual blocks representing the r i vector (a kinematic chain segment). As we can see in Figure 1, the “vector r I ” block then consists of the “URM“ module and a passive joint part. The modules are connected in places where each joint represents its own Cartesian system of the module, starting in point O i . In this experiment, the last part of the passive joint, vector r 7 , was considered to be an effector. A measuring device (sensor 7) is connected to the effector r 7 , checking physical quantities (position, velocity, acceleration). Such measuring devices can be mounted on other modules, too. The Euler’s angles’ values are also available in three consecutive rotations around the axes, often marked ZYX. The values apply to the effector and are the result of the final product of the individual spatial transformations (8), as is usually the case with the open kinematic chain [27]. A model constructed in this way is then visualized in the Mechanics explorer window and appears in the form as seen in Figure 4. Figure 4. ( a ) Model visualization with hints of dimensions in Matlab-Simulink using the Simscape/Multibody toolbox. (b) Detail URM with a passive joint. 2.3. The Problem of a Sudden Change in Data Continuity and Its Solution in Matlab The task was to use the computational core of CoppeliaSim Edu and apply it to the inverse kinematic task, to calculate the joint coordinates of ϕ = [ ϕ1 , ϕ2 , . . . , ϕ6 ] T for the entered trajectory. When the joint coordinates data were imported, in some cases, the above-mentioned problem with value repolarization emerged as a result of the softwareimposed limitation on the joint rotation. In other words, in the case of a requirement arising from the calculation, the range of the degree of freedom upon exceeding the rotation values in the < −π , + π > interval must be switched to the value with the opposite sign to remain in the defined working interval. The values above the upper limit + π will rise again, but this time starting with the lower value of −π . Moreover, the opposite values below the lower limit −π will fall again, this time starting from the upper value of + π . This sudden change causes deformation or even computational instability of the p 7 trajectory of the effector, see
Appl. Sci. 2021,11, 1203 7 of 15 Figure 5. With time derivations of the position, the characteristics of instantaneous velocity and accelerations are deformed even more. Appl. Sci. 2021, 11, x FOR PEER REVIEW 7 of 15 2.3. The Problem of a Sudden Change in Data Continuity and Its Solution in Matlab The task was to use the computational core of CoppeliaSim Edu and apply it to the inverse kinematic task, to calculate the joint coordinates of φ = [φ1, φ2, …, φ6] T for the entered trajectory. When the joint coordinates data were imported, in some cases, the above-mentioned problem with value repolarization emerged as a result of the softwareimposed limitation on the joint rotation. In other words, in the case of a requirement arising from the calculation, the range of the degree of freedom upon exceeding the rotation values in the <−π, +π> interval must be switched to the value with the opposite sign to remain in the defined working interval. The values above the upper limit +π will rise again, but this time starting with the lower value of −π. Moreover, the opposite values below the lower limit −π will fall again, this time starting from the upper value of +π. This sudden change causes deformation or even computational instability of the p7 trajectory of the effector, see Figure 5. With time derivations of the position, the characteristics of instantaneous velocity and accelerations are deformed even more. (a) (b) (c) (d) (e) (f) Figure 5. Illustration of the p7 = [p7x, p7y, p7z] T position vector (effector) depending on the joint coordinate vector φ = [φ1, φ2, φ3, φ4, φ5, φ6] T and its effect on the trajectory: (a) before repolarization; (b) after repolarization; the value of the joint coordinate Figure 5. Illustration of the p7 = [p 7x ,p 7y ,p 7z ] T position vector (effector) depending on the joint coordinate vector ϕ= [ϕ1,ϕ2,ϕ3,ϕ4,ϕ5,ϕ6]T and its effect on the trajectory: ( a ) before repolarization; ( b ) after repolarization; the value of the joint coordinate vector depending on time ϕ = [ ϕ1 , ϕ2 , ϕ3 , ϕ4 , ϕ5 , ϕ6 ] T ; ( c ) before repolarization; ( d ) after repolarization; effect on the trajectory; (e) before repolarization; (f) after repolarization. Since the precision of the trajectory traveled by any manipulator is critical in practical applications, it was necessary to somehow address this problem. Either through a laborintensive rewriting of the imported data upon each change in the defined trajectory subject to the presence of those repolarizations in the joints or through a suitable solution. One such solution is the so-called repolarize, described below. 2.4. Composing a Repolarize The search for a suitable and undemanding solution to this situation rested on the following conditions:
Appl. Sci. 2021,11, 1203 8 of 15 • To maintain the original trajectory, the initial values should not be skewed, i.e., if possible, they should not be averaged or approximated; •There should be no phase shift of the initial values, as is the case with many filters. For these reasons, we were trying to apply different approaches in the simulation, starting with a change in the initial data ϕ = [ ϕ1 , ϕ2 , ϕ3 , ϕ4 , ϕ5 , ϕ6 ] T , which was very labor-intensive. The rate limiter has not met the expectations either [ 28 ] in switching the data flow at the moment of reaching the limits of the angles of rotation +/ −π , because the characteristics of the p 7 trajectory were undulated anyway. Rate limiter is a marginalized derivation of an infinitely small difference to a difference of finite size. Or similar approaches based on a sequential omission of the undesired sample, such as in [ 29 ]. Or through averaging the values [ 30 , 31 ]. Neither of the approaches mentioned in this case has met our expectations. The best, if not ideal, results were finally achieved by the system working on this principle Figure 6and explained in Figure 7. Joint coordinate data were measured in the sampling period Tsp every 0.005 s. Appl. Sci. 2021, 11, x FOR PEER REVIEW 8 of 15 vector depending on time φ = [φ 1 , φ 2 , φ 3 , φ 4 , φ 5 , φ 6 ] T ; (c) before repolarization; (d) after repolarization; effect on the trajectory; (e) before repolarization; (f) after repolarization. Since the precision of the trajectory traveled by any manipulator is critical in practical applications, it was necessary to somehow address this problem. Either through a laborintensive rewriting of the imported data upon each change in the defined trajectory subject to the presence of those repolarizations in the joints or through a suitable solution. One such solution is the so-called repolarize, described below. 2.4. Composing a Repolarize The search for a suitable and undemanding solution to this situation rested on the following conditions: • To maintain the original trajectory, the initial values should not be skewed, i.e., if possible, they should not be averaged or approximated; • There should be no phase shift of the initial values, as is the case with many filters. For these reasons, we were trying to apply different approaches in the simulation, starting with a change in the initial data φ = [φ 1 , φ 2 , φ 3 , φ 4 , φ 5 , φ 6 ] T , which was very laborintensive. The rate limiter has not met the expectations either [28] in switching the data flow at the moment of reaching the limits of the angles of rotation +/−π, because the characteristics of the p 7 trajectory were undulated anyway. Rate limiter is a marginalized derivation of an infinitely small difference to a difference of finite size. Or similar approaches based on a sequential omission of the undesired sample, such as in [29]. Or through averaging the values [30,31]. Neither of the approaches mentioned in this case has met our expectations. The best, if not ideal, results were finally achieved by the system working on this principle Figure 6 and explained in Figure 7. Joint coordinate data were measured in the sampling period T sp every 0.005 s. Figure 6. Constructed repolarizer. Figure 6. Constructed repolarizer. When the data were uploaded, it was first necessary to establish the moment of repolarization t r with the precision of δ = +/ − 0.0025 s when the variable ϕ (t) = 0, i.e., cuts through the time axis. Under the assumption of reaching the upper or the lower working interval limit < −π , + π > of the joint coordinate. The variable at the output from the repolarize is ϕout(t). It was necessary to meet the following conditions: t≤t1|ϕout(t)=ϕ(t)(15) t1<t2(16)
Appl. Sci. 2021,11, 1203 9 of 15 Appl. Sci. 2021, 11, x FOR PEER REVIEW 9 of 15 Figure 7. Plotted repolarization of rotation in the joint. When the data were uploaded, it was first necessary to establish the moment of repolarization tr with the precision of δ = +/−0.0025 s when the variable φ(t) = 0, i.e., cuts through the time axis. Under the assumption of reaching the upper or the lower working interval limit <−π, +π> of the joint coordinate. The variable at the output from the repolarize is φout(t). It was necessary to meet the following conditions: t≤𝑡|𝜑(𝑡)=𝜑(𝑡) (15) 𝑡<𝑡 (16) Conditions for identification of the sign and carrying out repolarization over time tr: 𝑡≥𝑡𝜑(𝑡)=2𝜋−𝜑(𝑡),𝜑(𝑡)<0 𝜑(𝑡)−2𝜋,𝜑(𝑡)>0 (17) For the condition that can be considered discontinuation in the angle variable data φ(t), the following applies: 𝜑𝑡+𝑇−𝜑(𝑡) 𝑇 =2𝜋 𝑇 (18) The model was thus “excited” by the values of the joint coordinate vector φ(t) = [ φ1(t), φ2(t), …, φn(t)] T obtained from the model created in CoppeliaSim Edu in the period of time Tsp. Under the condition of the prescribed maximum permissible deviation [Δmax x, Δmax y, Δmax z] = +/−0.0035 m between the real trajectory and the one calculated on the basis of inverse kinematics. The data of joint coordinates φ(t) correspond to the effectors of the trajectory traveled. The trajectory is made of a system of fixed points As{xAs, yAs, zAs}, where the sample sϵ<1; 7383> in Cartesian space Figure 8. Its real shape is shown in Figure 2. Figure 8. A vector difference Δ between the calculated position of the position vector of the p7 effector and the position of the As points. Figure 7. Plotted repolarization of rotation in the joint. Conditions for identification of the sign and carrying out repolarization over time tr: t≥t2 ϕout(t)=2π−ϕ(t),ϕ(t)<0 ϕ(t)−2π,ϕ(t)>0(17) For the condition that can be considered discontinuation in the angle variable data ϕ(t), the following applies: ϕt+Tsp−ϕ(t) Tsp =2π Tsp (18) The model was thus “excited” by the values of the joint coordinate vector ϕ(t)=[ϕ1(t), ϕ2(t), . . . , ϕn(t)]T obtained from the model created in CoppeliaSim Edu in the period of time T sp . Under the condition of the prescribed maximum permissible deviation [ ∆max x , ∆max y , ∆max z ] = +/ − 0.0035 m between the real trajectory and the one calculated on the basis of inverse kinematics. The data of joint coordinates ϕ (t) correspond to the effectors of the trajectory traveled. The trajectory is made of a system of fixed points As{xAs,yAs,zAs}, where the sample s <1; 7383> in Cartesian space Figure 8. Its real shape is shown in Figure 2. Appl. Sci. 2021, 11, x FOR PEER REVIEW 9 of 15 Figure 7. Plotted repolarization of rotation in the joint. When the data were uploaded, it was first necessary to establish the moment of repolarization tr with the precision of δ = +/−0.0025 s when the variable φ(t) = 0, i.e., cuts through the time axis. Under the assumption of reaching the upper or the lower working interval limit <−π, +π> of the joint coordinate. The variable at the output from the repolarize is φout(t). It was necessary to meet the following conditions: t≤𝑡|𝜑(𝑡)=𝜑(𝑡) (15) 𝑡<𝑡 (16) Conditions for identification of the sign and carrying out repolarization over time tr: 𝑡≥𝑡𝜑(𝑡)=2𝜋−𝜑(𝑡),𝜑(𝑡)<0 𝜑(𝑡)−2𝜋,𝜑(𝑡)>0 (17) For the condition that can be considered discontinuation in the angle variable data φ(t), the following applies: 𝜑𝑡+𝑇−𝜑(𝑡) 𝑇 =2𝜋 𝑇 (18) The model was thus “excited” by the values of the joint coordinate vector φ(t) = [ φ1(t), φ2(t), …, φn(t)] T obtained from the model created in CoppeliaSim Edu in the period of time Tsp. Under the condition of the prescribed maximum permissible deviation [Δmax x, Δmax y, Δmax z] = +/−0.0035 m between the real trajectory and the one calculated on the basis of inverse kinematics. The data of joint coordinates φ(t) correspond to the effectors of the trajectory traveled. The trajectory is made of a system of fixed points As{xAs, yAs, zAs}, where the sample sϵ<1; 7383> in Cartesian space Figure 8. Its real shape is shown in Figure 2. Figure 8. A vector difference Δ between the calculated position of the position vector of the p7 effector and the position of the As points. Figure 8. A vector difference ∆ between the calculated position of the position vector of the p7 effector and the position of the Aspoints. The mutual calibration of the models was done for the initial position of the robotic arm effector over time t= 0 s, ϕ (0) = [0, π , 0, π , 0, π ] T radians see position in Figure 4 , p 7 = [0.167397, 0, 1.102644] T meters. In order to check the models’ correctness, the vector difference ∆ = [ ∆x , ∆y , ∆z ] T between the position of the position vector effector p7= [p7x,p7y,p7z]T and the position of the A s points, composing the trajectory, shown in the graph of Figure 9(Matlab), Figure 12 (SolidWorks) over the period of time T sp . This