actuators

Article Design and Preliminary Testing of a Magnetic Spring as an Energy-Storing System for Reduced Power Consumption of a Humanoid Arm

Jhon F. Rodríguez-León 1 , Ilse Cervantes 1, Eduardo Castillo-Castañeda 1 , Giuseppe Carbone 2 and Daniele Cafolla 3,*

1 Instituto Politécnico Nacional-CICATA Querétaro, Querétaro 76090, Mexico; [email protected] (J.F.R.-L.); [email protected] (I.C.); [email protected] (E.C.-C.) 2 DIMEG, University of Calabria, 87036 Rende, Italy; [email protected] 3 Biomechatronics Laboratory, IRCCS Neuromed, 86077 Pozzilli, Italy * Correspondence: [email protected]

Abstract: The increasing use of robots in the industry, the growing energy prices, and higher envi- ronmental awareness have driven research to find new solutions for reducing energy consumption. In additional, in most robotic tasks, energy is used to overcome the of gravity, but in a few industrial applications, the of gravity is used as a source of energy. For this reason, the use of magnetic springs with actuators may reduce the energy consumption of robots performing trajecto-  ries due their high-hardness magnetic properties of energy storage. Accordingly, this paper proposes  a magnetic spring configuration as an energy-storing system for a two DoF humanoid arm. Thus, an Citation: Rodríguez-León, J.F.; integration of the magnetic spring system in the robot is described. A control strategy is proposed to Cervantes, I.; Castillo-Castañeda, E.; enable autonomous use. In this paper, the proposed device is modeled and analyzed with simula- Carbone, G.; Cafolla, D. Design and tions as: mechanical energy consumption and kinetic energy rotational and multibody dynamics. Preliminary Testing of a Magnetic Furthermore, a prototype was manufactured and validated experimentally. A preliminary test to Spring as an Energy-Storing System check the interaction between the magnetic spring system with the mechanism and the trajectory for Reduced Power Consumption of a performance was carried out. Finally, an energy consumption comparison with and without the Humanoid Arm. Actuators 2021, 10, magnetic spring is also presented. 136. https://doi.org/10.3390/ act10060136 Keywords: magnetic spring; energy consumption; humanoid arm; control strategy; energy-storing

Academic Editors: Jorge Muñoz and system; neurorehabilitation Concepción A. Monje

Received: 20 May 2021 Accepted: 18 June 2021 1. Introduction Published: 21 June 2021 Humanoid robots have been a source of study for at least two decades, with appli- cations in industry, medicine, and, especially, in the area of rehabilitation [1,2]. Many Publisher’s Note: MDPI stays neutral of these devices are based on robots of serial and parallel architectures [3]. However, with regard to jurisdictional claims in these robotic devices present several problems for their development, and one of them published maps and institutional affil- is a high energy consumption during rehabilitation tasks. One way to achieve an energy iations. consumption reduction is a correct balancing strategy. There have been many balancing methods developed over the years, all of them achieving their principal goal, which is balancing robots. These methods were designed according to the necessities of each robot. In reference [4], the author made a review of the mechanical gravity compensation and Copyright: © 2021 by the authors. balancing solutions. He divided the solutions into three general groups, which are: gravity Licensee MDPI, Basel, Switzerland. compensation by counterweights, by auxiliary actuators, and balancing by springs. The This article is an open access article main principle of the first technique is adding extra mass (counterweights) to the moving distributed under the terms and links to keep their center of mass balanced. An example of this type was developed in conditions of the Creative Commons reference [4]; the author harnessed the mass of the hydraulic robot system to balance Attribution (CC BY) license (https:// itself. Industrial robots KUKA R630 and PUMA 200 use a similar system but harness their creativecommons.org/licenses/by/ mass. The second type uses auxiliary links (a mechanical system between 4.0/).

Actuators 2021, 10, 136. https://doi.org/10.3390/act10060136 https://www.mdpi.com/journal/actuators Actuators 2021, 10, 136 2 of 17

the initial structure and the balancing element [5]) for balance. An example of this type was carried out in reference [6], where the authors applied a novel auxiliary linkage system to a five Degrees of Freedom (DoF) Penta-G robot. The next group of balancing solutions has several subtypes, because there are different types of auxiliary actuators. An example is the cable and pulley arrangement, which uses the simple principle of sliding a cable through a pulley to move a mass. In reference [7], the authors applied the current technique to a glove exoskeleton for obtaining and transmitting the data of the hand gestures to a mobile device. A pneumatic or hydraulic system can be used for balancing a robot. In reference [8], the authors developed a mechatronic concept using a gas spring; the gas exerted a quasi-constant force against the external force applied to it. This system achieved a balance into a human-operated load to reduce the human effort while operating it. The balancing by springs technique has been relevant in recent years, since it brings more benefits than the other strategies [6]. There are two types of springs, the zero free length and the non-zero free. The zero free length is a spring that exerts zero force at zero length, but this is mechanically complex, since a coil will never be a zero length. On the other hand, the non-zero free length exerts zero force at nonzero positions [6]. In reference [9], the authors used a novel gravity compensation system using springs for a four Degrees of Freedom (DoF) manipulator that had parallelogram links. They focused on reducing the gravity in the joints by adding springs. Furthermore, in reference [10], the authors proposed a system using nonlinear springs for gravity balancing. They were applied to a robotic arm with an elbow, achieving a reduction of the actuators . The work presented in reference [11] defined that an energy consumption reduction can be achieved by modifying the hardware and the software of a robot. The hardware is divided into three categories: robot type, hardware replacement, and hardware addition. This subclass refers to analyzing what kind of robot would be adequate for the required work tasks and for achieve energy savings. In reference [12], a study was carried out to find out which type of robot would be more efficient between parallel and serial structures. According to this study, the parallel one (horizontal position) achieved a better average performance than the other ones. The next hardware category is the hardware replacement; this type looks for a weight reduction in the robot by making its arms or joints as light as possible, so, in that way, the robot can move with less power [11]. An example is the DLR’s torque-controlled lightweight robot III, where the authors made an effort by improve their ultralight carbon-fiber arms in their robot, achieving less energy loss [13]. The last hardware type is the hardware addition. This is a relative novel technique. Its principal objective is to use additional hardware as energy-storing and recovery devices. It can be divided into two main groups, which are: Energy-Storing-Device Types and the Energy-Sharing Devices [11]. According to reference [14], the Energy-Storing-Device Types can be divided into four types of kinetic-energy recovery systems (KERS): mechanical KERS, electric KERS, hydraulic KERS, and hydroelectric KERS. Focusing on the mechanical KERS type: it uses mechanical devices for energy storage. In reference [15], these devices were defined as “mechanical energy capacitors. One type of this mechanical capacitors” is the elastic elements, and the famous elastic element is the springs. In reference [16], the authors designed an energy-saving system using springs for a DELTA robot focusing on pick-and-place operations. They used a multibody simulation to find out the optimal spring specs and the optimal trajectory to harness the robot’s natural dynamics. They collocated the springs in parallel with the electric motors; with this, the springs provided the required torque for moving the links, reducing the amount of the exerted torque from the actuators. Another system was developed in reference [17]; the authors made a hybrid system to harness the energy-storing devices and energy-recovering devices to get both benefits. In reference [18], the authors also used springs for energy consumption reduction in the pick-and-place applied to a Reconfigurable-Planar-Linkage (RePlaLink), obtaining an energy consumption reduction in contrast to a similar robot but without the springs. In reference [19], a highly efficient pick-and-place technique was developed by the authors for SCARA robots. They used a similar configuration as in Actuators 2021, 10, x FOR PEER REVIEW 3 of 16 Actuators 2021, 10, x FOR PEER REVIEW 3 of 16

Actuators 2021, 10, 136 3 of 17

was developed by the authors for SCARA robots. They used a similar configuration as in was developed by the authors for SCARA robots. They used a similar configuration as in reference [17] for the springs. The authors set arbitrary initial and end positions for the reference [17] for the springs. The authors set arbitrary initial and end positions for the study,reference because [17] the for robot the springs. was not The fixed authors in one setposition. arbitrary The initialtechnique and uses end positions instead for the study, because the robot was not fixed in one position. The technique uses magnets instead ofstudy, springs, because gears, the pneumatics, robot was notor another fixed in kind one position. of auxiliary The system. technique Usually, uses magnets it is compared instead of springs, gears, pneumatics, or another kind of auxiliary system. Usually, it is compared withof springs, springs gears, since pneumatics,it brings a similar or another performa kindnce of auxiliarybut with some system. advantages Usually, itover is compared springs, withwith springs springs since since it itbrings brings a asimilar similar performa performancence but but with with some some advantages advantages over over springs, springs, like noncontact, zero vibrations, zero noises, etc. likelike noncontact, noncontact, zero zero vibrations, vibrations, zero zero noises, noises, etc. etc. In this paper, a novel magnetic spring strategy is proposed and added to a two Degrees InIn this this paper, paper, a novel a novel magnetic magnetic spring spring strategy strategy is proposed is proposed and added and to added a two Degrees to a two of Freedom (DoF) serial robot model. A novel configuration and experimental characteriza- ofDegrees Freedom of (DoF) Freedom serial (DoF) robot serialmodel. robot A nove model.l configuration A novel configuration and experimental and characteriza- experimental tion of the novel magnetic spring configuration is introduced. In addition, to identify the tioncharacterization of the novel magnetic of the novel spring magnetic configuratio springn configurationis introduced. is In introduced. addition, to In identify addition, the to initial position of the end effector (EE) at the startup in the robot, the control algorithm is initialidentify position the initial of the position end effector of the (EE) end at effector the startup (EE) atin thethe startuprobot, the in thecontrol robot, algorithm the control is improved. Finally, an energy consumption comparison, with and without a magnetic improved.algorithm Finally, is improved. an energy Finally, consumption an energy consumption comparison, comparison,with and without with and a magnetic without a spring, is described. spring,magnetic is described. spring, is described. 2. Conceptual Design and Dynamic Model of a Two DoF Humanoid Arm 2.2. Conceptual Conceptual Design Design and and Dynamic Dynamic Model Model of of a aTwo Two DoF DoF Humanoid Humanoid Arm Arm The dynamic model of a serial robot with two Degrees of Freedom (DoF) (Double TheThe dynamic dynamic model model of of a aserial serial robot robot with with two two Degrees Degrees of of Freedom Freedom (DoF) (DoF) (Double (Double Pendulum) is presented, which simulates the action of the human arm, composed of two Pendulum)Pendulum) is ispresented, presented, which which simulates simulates the theaction action of the of human the human arm, arm,composed composed of two of joints variables (q and q ). Figure 1 shows the motion ranges of each joint. The model jointstwo jointsvariables variables (q and (q q1 and). Figureq2). Figure1 shows1 shows the motion the motion ranges rangesof each of joint. each The joint. model The allows calculating the necessary torque value during the different trajectories, in addition allowsmodel calculating allows calculating the necessary the necessary torque value torque during value the during different the trajectories, different trajectories, in addition in to modifying the distance of each of its links, masses, angles of rotation, speeds, and ac- toaddition modifying to modifying the distance the of distance each of ofits each links of, masses, its links, angles masses, of anglesrotation, of speeds, rotation, and speeds, ac- celerations (see Figure 2a). The humanoid arm can be used as a prosthetic and neuroreha- celerationsand accelerations (see Figure (see 2a). Figure The 2humanoida). The humanoid arm can be arm used can as bea prosthetic used as a and prosthetic neuroreha- and bilitation; in Figure 2b, the CAD model is shown. bilitation;neurorehabilitation; in Figure 2b, in the Figure CAD2b, model the CAD is shown. model is shown.

FigureFigure 1. 1. ModelModel of of the the human human arm arm and and elbow elbow joints joints during during flexio flexionn and and extension extension movements. movements. Figure 1. Model of the human arm and elbow joints during flexion and extension movements.

(a) (b) (a) (b) Figure 2. Proposed model: (a) mechanism(b) CAD model. Figure 2. Proposed model: (a) mechanism(b) CAD model. Figure 2. Proposed model: (a) mechanism (b) CAD model.

Actuators 2021, 10, 136 4 of 17

The mechanism is composed of two active joints, q1 and q2, that represent the shoulder and elbow joint, respectively, as well as a series of variables to control. The data for an average human arm [20,21] are presented in Table1 below.

Table 1. Data from an average human arm [22].

Mass m1 = 2.13 kg m2 = 1.49 kg Links L1 = 0.316 m L2 = 0.265 m Distance between the axes of rotation L = 0.162 m L = 0.127 m and the centers of mass c1 c2 2 2 Moments of inertia Y-axis I1 = 1.66 kgm I2 = 1.66 kgm Friction constant K1 = −1 N K2 = −1 N

The direct and inverse kinematics of the two DoF mechanism were programed to carry out two trajectories: a circle and a lemniscate; these trajectories were tested to evaluate their feasibility and to assist the training exercises for the human arms in references [21,22]. The equations that allow to generate each of the desired trajectories, x0 and y0, are presented by considering their origin and radius as

xc = 0.2 m; yc = 0.2 m; r = 0.1 m (1)

x0 = xc + rsin(n); y0 = yc + rcos(n) (2)

x0 = xc + rsin(2n); y0 = yc + rcos(n) (3) ◦ ◦ where xc and yc are the center of the trajectory, r is the radius, and n varies from 0 to 360 . Equations (2) and (3) are used to perform a circle and the lemniscate, respectively. The kinematic equations are programmed and simulated in MATLAB R2020b to find the angles of the joints and the positions of the end effector (EE) that allow generating the two previously defined trajectories.

Torque, Energy Consumption, and Electrical Power

The total mechanical energy ET of the system is a function of the kinetic energy ECT and the potential energy UT; then, the equations that allow obtaining the value of the total energy of the system are ET = ECT + UT (4)

ECT = K1 + K2 (5)

UT = U1 + U2 (6) 1 . 1 . K = m L 2q 2 + I q 2 (7) 1 2 1 c1 1 2 1 1 .  . . .   .  m m . . . 1 . . 2 K = 2 I 2q 2 + 2 L 2 q 2 + 2q 2q + q 2 + m L L q 2 + q q cos(q ) + I [q + q ] (8) 2 2 1 1 2 c2 1 1 1 2 2 1 c2 1 1 2 2 2 2 1 2

U1 = −m1Lc1 cos(q1) (9)

U2 = −m2L1gcos(q1) − m2Lc2 gcos(q1 + q2) (10)

The total electrical power PT is calculated as a function of the consumed torques T1 and T2 and the speed of each of the links: . P1 = T1q1 (11) . P2 = T2q2 (12)

PT = P1 + P2 (13) Actuators 2021, 10, x FOR PEER REVIEW 5 of 16 Actuators 2021, 10, 136 5 of 17

3. A Magnetic Spring as an Energy-Storing System 3. A Magnetic Spring as an Energy-Storing System The magnetic spring system is composed of two identical well-shaped cylindrical The magnetic spring system is composed of two identical well-shaped cylindrical magnets, as in Table 2 [23], which shows the proprieties. To calculate the force magnets, as in Table2[ 23], which shows the magnet proprieties. To calculate the force generatedgenerated in in the the magnetic magnetic spring, spring, several several equa equationstions were were developed. developed. First, First, there there was was the the Coulomb’sCoulomb’s law, law, which which focused focused on on the the magnet’s magnet’s charges charges and and the the distance distance between between them them to to obtainobtain the the magnetic magnetic force force [24–27]. [24–27]. Additionally Additionally,, therethere waswas thethe equation equation that that uses uses low low order or- derpolynomials polynomials to calculateto calculate it [it28 [28,29].,29]. Another Another equation equation was was developed developed in in reference reference [30 [30],], in inwhich which the the authors authors defined defined their their formula formula as as the the sum sum of of the the forces forces due due to to the the four four pairs pairs of ofthe the surface. surface. The proposed experimental characterization used two magnet (fixed and float) and aTable gram 2. scaleProperties balance of the OHAUS N45 magnet model used CS2000. for the U( magnetics) is the spring distance system between [23]. the magnets, and Y(s) is the repulsive force calculated using the data of the balance and multiplied to reach a gravity forceMaterial of 9.81m/s2. The interaction of displacement–force NdFeB between the mag- Exterior diameter 3/4” (19 mm) nets in the functionInterior to the diameter time is shown in Figure 3. 1/4” (6.35 mm) Thickness 1/8” (3.175 mm) Table 2. Properties ofTolerance the N45 magnet used for the magnetic spring system +/−0.1 [23]. mm Mass 4.7 g Material NdFeB Grade N35 ExteriorSubjection diameter force 3/4” 3.3 (19mm) kg MagnetizationInterior diameter type 1/4” Axial(6.35 mm) Thickness 1/8” (3.175 mm) Tolerance +/−0.1 mm The proposed experimentalMass characterization used two magnet4.7 (fixed g and float) and a gram scale balance OHAUSGrade model CS2000. U(s) is the distance betweenN35 the magnets, and Y(s) is the repulsiveSubjection force force calculated using the data of the balance3.3 and kg multiplied to reach a 2 gravity force ofMagnetization 9.81 m/s . Thetype interaction of displacement–forceAxial between the magnets in the function to the time is shown in Figure3.

FigureFigure 3. 3. InteractionInteraction of of displacement–force displacement–force between between magnets. magnets.

TheThe System System Identification Identification toolboxtoolbox fromfrom MATLAB MATLAB was was used used to estimateto estimate the the coefficients coeffi- cientsand the and order the order of a transfer of a transfer function, function, a third-order a third-order system system with zero,with aszero, as Y(s) −4.727 × 10−1s + 5.397 × 210−2 ( ) =𝑌(𝑠) = −4.727 × 10 𝑠 + 5.397 × 210 GG(ss) = = 3 −1 2 −6 (14)(14) 𝑈(𝑠)U(s) 𝑠s++5.9045.904 ×× 10 s𝑠++0.01121 0.01121s 𝑠+ 1.794 + 1.794××1010

Actuators 2021, 10, 136 6 of 17

Actuators 2021, 10, x FOR PEER REVIEW 6 of 16

4. Integration of the Magnetic Spring System in the Robot 4. IntegrationAccording of the to the Magnetic previous Spring information, System ain configuration the Robot that integrated the magnetic springAccording system to with the theprevious mechanism information, was proposed,a configuration as in that Figure integrated4a,b. In the addition, magnetic the springparameters system that with define the mechanism this configuration was proposed are presented, as in Figure in Table4a,b. 3In. Theaddition, objective the pa- is to rametersprovide that energy define to the this actuation configuration system are based presented on the in Table magnetic 3. The field objective principle. is to provide energy to the actuation system based on the principle.

(a) (b)

FigureFigure 4. 4. Displacement–forceDisplacement–force scheme scheme between between magnets magnets in a mechanism: in a mechanism: (a) diagram, (a) diagram, (b) conceptual (b) concep- sketch. tual sketch.

where τe and τe are the external torques generated by the magnetic spring system, Ms where 𝜏 and1 𝜏 are2 the external torques generated by the magnetic spring system, M and 𝑀 1 and M are the fixed magnets, M and M are the float magnets, d and d are the are the fixeds2 magnets, 𝑀 and 𝑀 arem1 the floatm 2magnets, 𝑑 and 𝑑 are mthe1 distancesm2 be- tweendistances magnets between fixed and magnets float, respectively, fixed and float, 𝐹 and respectively, 𝐹 are the repulsiveF1 and F forces2 are thebetween repulsive the mag- forces nets, 𝐿 and 𝐿 are the positions of the fixed magnets around 𝐿 and 𝐿 , and 𝐿 is the max dis- between the magnets, Lx1 and Lx2 are the positions of the fixed magnets around L1 and L2, tanceand betweenLt is the articulations max distance to the between fixed magnet articulations. to the fixed magnet.

TableTable 3. 3. DesignDesign parameters parameters by by integration integration of ofthe the magnetic magnetic spring spring system system in the in the robot. robot. Variable Min Value Max Value Variable Min Value Max Value 𝑑 0.003 m 0.028 m d 0.003 m 0.028 m 𝑑m1 0.003 m 0.028 m d 𝐹m 2 0.1300.003 N m 5 0.028 N m F 0.130 N 5 N 𝐹1 0.130 N 5 N F2 0.130 N 5 N 𝐿 0.010 m 𝐿 Lx1 0.010 m L1 𝐿 0.010 m 𝐿 Lx2 0.010 m L2

Figure 4a,b allows describing 𝜏 and 𝜏 when interacting with the mechanism, and

Table 3 shows the parameters of the system. Therefore, the equations to calculate 𝜏 and Figure4a,b allows describing τe1 and τe2 when interacting with the mechanism, and 𝜏 generated by the magnetic spring system, can be expressed as Table3 shows the parameters of the system. Therefore, the equations to calculate τe1 and τe2 generated by the magnetic spring system, can be expressed as 𝑑 = |𝑀 −𝑀 | +|𝑀 −𝑀 | (15) r 2 2 d = M − M𝑓 𝑀𝑠 𝑀+𝑚 M − M (15) mi syi myi 𝑖 𝑖 sxi mxi 𝐹𝑖 = 2 (16) 𝑑𝑚 f M 𝑖 M = si mi Fi 𝑑2 (16) d 𝑚𝑖 𝑞 =𝑠𝑖𝑛−1 m i (17) 𝑖 𝐿  𝑥𝑖  −1 dmi qi = sin (17) 𝜏 =𝐹𝐿 𝑖L =x {1,2}i 𝑒𝑖 𝑖 𝑥𝑖 (18)

τei = Fi Lxi i = {1, 2} (18)

Actuators 2021, 10, x FOR PEER REVIEW 7 of 16

𝜏 =𝐹𝐿 𝑖={1,2} Actuators 2021, 10, 136 𝑒𝑖 𝑖 𝑥𝑖 7(18) of 17

where 𝑀 , 𝑀 , 𝑀 , and 𝑀 are the coordinates x and y of the magnets, and f is the magnetic field constant. whereTheM analysis, M ,ofM the, andmechanicalM are energy the coordinates and electricalx and ypowerof the consumption magnets, and fofis the the syi myi sxi mxi dynamicmagnetic model field constant.of the robot is based on the implementation of the Proportional Derivative (PD) controlThe analysis with Desired of the mechanical Gravity Compensation energy and electrical(PD-DGC) power [31,32]. consumption of the dy- namic model of the robot is based on the implementation of the Proportional Derivative 5.(PD) Control control Strategy with Desired and Simulations Gravity Compensation (PD-DGC) [31,32]. The aim of the pure position control of manipulative robots whose dynamic models 5. Control Strategy and Simulations include the gravitational torque term 𝑔(𝑞𝑑 ) is solved by the PD-DGD [31]. The PD-DGD The aim of the pure position control of𝑖 manipulative robots whose dynamic models control law is represented as ( ) include the gravitational torque term g qdi is solved by the PD-DGD [31]. The PD-DGD control law is represented as 𝜏𝑖 =𝑘𝑝 𝑞 + 𝑘𝑣 𝑞 +𝑔𝑞 𝑖 = {1, 2} (19) 𝑖 𝑒𝑖 𝑖 𝑒𝑖 𝑑𝑖 . = + +  = { } τi kpi qei kvi qei g qdi i 1, 2 (19) where 𝜏 and 𝜏 are the joints torques; 𝑘 = 120, 𝑘 =81, 𝑘 =35, and 𝑘 =15 are the proportional and derivative constants, respectively, and are the positive-definite where τ1 and τ2 are the joints torques; kp1 = 120, kp2 = 81, kv1 = 35, and kv2 = 15 are the matrix, 𝑞 and 𝑞 are the trajectories errors, as in Equation (20), and 𝑔(𝑞 ) and proportional𝑒1 and derivative𝑒2 constants, respectively, and are the positive-definite matrix, qe   1 𝑔(𝑞and q)e areare the the torques trajectories due errors, to theas gravity in Equation forces (20), in positions and g q 𝑞 and andg q𝑞 [32].are the The torques only 2 d1 𝑑1 d𝑑22 differencedue to the with gravity the forces gravity-compensa in positions qtedd1 and PDq dcontroller2 [32]. The is only that difference the term with𝑔𝑞 thereplaces gravity-  compensated PD controller is that the term g qd replaces g(qi). The practical convenience 𝑔(𝑞). The practical convenience of this controlleri is evident when the desired position 𝑞 of this controller is evident when the desired position q is periodic or constant. Indeed,𝑑 𝑔(𝑞 ) d 𝑞 𝑞 is periodic or constant. Indeed, the vector , which depends on 𝑑 and not on , the vector g qd , which depends on qd and not on qi, can be evaluated “offline” once qd can be evaluatedi “offline” once 𝑞 has been defined and, therefore, it is no longer has been defined and, therefore, it is𝑑 no longer necessary to evaluate g(qi) in real time. necessary to evaluate 𝑔(𝑞) in real time. = −  = { } qei qdi qi i 1, 2 (20) 𝑞 =( 𝑞 − 𝑞𝑖 ) 𝑖 = {1, 2} (20) 𝑒𝑖 𝑑𝑖 Figure5 shows the two trajectories generated by the mechanism by means of a PD- Figure 5 shows the two trajectories generated by the mechanism by means of a PD- DGD-type control algorithm with the desired gravity compensation; in addition, the start DGD-type control algorithm with the desired◦ gravity compensation;◦ in addition, the start and end of the trajectory located at q1 = 0 and q2 = 0 are presented. and end of the trajectory located at q =0° and q =0° are presented.

(a) (b)

FigureFigure 5. 5. SimulationSimulation of of the the trajectories trajectories by by implemen implementingting the the PD-DGD-type PD-DGD-type control control algorithm algorithm with with compensation of the desired gravity: (a) circle, (b) lemniscate. compensation of the desired gravity: (a) circle, (b) lemniscate.

TheThe block diagramdiagram in in Figure Figure6 describes 6 describes the elementsthe elements to implement to implement the control the strategycontrol strategyof the two of the DoF two robot DoF arm, robot including arm, including the magnetic the magnetic springs. springs. The torque generated by the magnetic springs are added to the torque generated

by the robot arm actuators by the control algorithm τci , and the torque generated by the

magnetic spring system τei is added and enters the dynamic model of the robot to follow the trajectory (position and velocity). In addition, through this control diagram, it is possible to know when the torque generated by the magnetic spring system acts on the system, which indicates when the system provides energy to the control.

Actuators 2021, 10, x FOR PEER ActuatorsREVIEW2021 , 10, 136 88 ofof 17 16

Figure 6. Control diagram,Figure 6. includingControl diagram, the magnetic including the spring magnetic system. spring system. 5.1. Mechanical Energy Consumption Simulation The torque generatedTo analyze by the the powermagnetic consumption springs of theare robot added arm withto the the torque magnetic generated spring system by the robot arm actuatorsduring theby trajectory,the control a mechanical algorithm energy τ consumption, and the simulation torque generated was carried out.by Inthe Figure7a–c, three states are observed: initial position, trajectory generation, and return magnetic spring systemto the initialτ is or added final position. and enters In addition, the dynami the totalc model mechanical of the energy robot consumption to follow the trajectory (positionEc (J) and of the velocity). system is shown In addi fortion, each ofthrough the mentioned this control states. The diagram, generation it ofis thepos- circular trajectory is programmed by implementing a PD-DGD-type control algorithm with sible to know whengravity the torque compensation. generated by the magnetic spring system acts on the sys- tem, which indicates whenFigure 8the shows system the required provides mechanical energy energy to the in the control. robot during the circular trajec- tory from the starting to the 400-sample time. The red line corresponds to a mechanical 5.1. Mechanical Energyenergy Consumption consumption withoutSimulation the magnetic spring system, and the blue line corresponds to a mechanical energy consumption with the magnetic spring. To analyze the powerThe results consumption in Figure8 showof the a significantrobot arm reduction with the on themagnetic mechanical spring energy system that during the trajectory,the controla mechanical must apply energy to the robot. co Thensumption estimation ofsimulation the energy consumption was carried during out. the In circle trajectory is reduced by 71.47% with the magnetic spring system. Figure 7a–c, three states are observed: initial position, trajectory generation, and return to 5.2. Kinetic Energy Rotational Simulation the initial or final position. In addition, the total mechanical energy consumption E (J) of the system is shownTo for validate each the of power the consumption, mentioned a kineticstates. energy The rotational generation simulation of the is proposed; circular the simulation was developed in Working Model (version 5.1.2.53, San Mateo, CA, USA). ◦ trajectory is programmedThe objective by implementing was to measure the a kineticPD-DGD-type energy rotational control from algorithmq2 = 0 to q 2with= 15 withgrav- ity compensation. and without the magnetic force. In the scenario with the magnetic force applied the Figure 8 showsactuator, the required torque was mechanical input as 20 Nm, ener andgy a in 5-N the force robot along during the x-axis the was circular applied fortra- 0.5 s, simulating the magnetic field. In the scenario without the magnetic force, only the jectory from the startingactuator to torque the 400-sample was input as 25 time. Nm. Both The simulation red line scenarios corresponds lasted 1 to s.The a mechanical frictionless energy consumptionmotion without of L2 was the programmed, magnetic andspri theng gravitational system, and force the was blue included. line The corresponds simulation to a mechanical energyparameters consumption of the mechanism with arethe shown magnetic in Table spring.1. Figure 9 a and b shows a scheme of both the simulated scenarios. The results in Figure 8 show a significant reduction on the mechanical energy that the control must apply to the robot. The estimation of the energy consumption during the circle trajectory is reduced by 71.47% with the magnetic spring system.

(a)

Actuators 2021, 10, x FOR PEER REVIEW 8 of 16

Figure 6. Control diagram, including the magnetic spring system.

The torque generated by the magnetic springs are added to the torque generated by

the robot arm actuators by the control algorithm τ, and the torque generated by the

magnetic spring system τ is added and enters the dynamic model of the robot to follow the trajectory (position and velocity). In addition, through this control diagram, it is pos- sible to know when the torque generated by the magnetic spring system acts on the sys- tem, which indicates when the system provides energy to the control.

5.1. Mechanical Energy Consumption Simulation To analyze the power consumption of the robot arm with the magnetic spring system during the trajectory, a mechanical energy consumption simulation was carried out. In Figure 7a–c, three states are observed: initial position, trajectory generation, and return to the initial or final position. In addition, the total mechanical energy consumption E (J) of the system is shown for each of the mentioned states. The generation of the circular trajectory is programmed by implementing a PD-DGD-type control algorithm with grav- ity compensation. Figure 8 shows the required mechanical energy in the robot during the circular tra- jectory from the starting to the 400-sample time. The red line corresponds to a mechanical energy consumption without the magnetic spring system, and the blue line corresponds to a mechanical energy consumption with the magnetic spring. Actuators 2021, 10, 136 The results in Figure 8 show a significant reduction on the mechanical energy that 9 of 17 the control must apply to the robot. The estimation of the energy consumption during the circle trajectory is reduced by 71.47% with the magnetic spring system.

Actuators 2021, 10, x FOR PEER REVIEW 9 of 16

(a)

(b)

(c)

FigureFigure 7. Simulation 7. Simulation of the of the3 states 3 states that that allow allow generating generating the thecirc circularular trajectory trajectory by implemen by implementingting the thePD-DGD-type PD-DGD-type control control algorithm algorithmwith gravity with compensation:gravity compensation: (a) startup, (a) startup, (b) trajectory, (b) trajectory, (c) return (c to) return startup. to startup.

Figure 8. Required mechanical energy in the robot during the circular trajectory with and without the magnetic spring system.

5.2. Kinetic Energy Rotational Simulation To validate the power consumption, a kinetic energy rotational simulation is pro- posed; the simulation was developed in Working Model (version 5.1.2.53, San Mateo, CA,

Actuators 2021, 10, x FOR PEER REVIEW 9 of 16

(b)

(c) Actuators 2021, 10, 136 10 of 17 Figure 7. Simulation of the 3 states that allow generating the circular trajectory by implementing the PD-DGD-type control algorithm with gravity compensation: (a) startup, (b) trajectory, (c) return to startup.

Actuators 2021, 10, x FOR PEER REVIEW 10 of 16

USA). The objective was to measure the kinetic energy rotational from q =0° to q = 15 with and without the magnetic force. In the scenario with the magnetic force applied the actuator, torque was input as 20 Nm, and a 5-N force along the x-axis was applied for 0.5 s, simulating the magnetic field. In the scenario without the magnetic force, only the actuator torque was input as 25 Nm. Both simulation scenarios lasted 1 s. The frictionless motion of L was programmed, and the gravitational force was included. The simulation FigureFigure 8. 8.Required Required mechanical mechanical energy energy in in the the robot robot during during the the circular circular trajectory trajectory with with and and without without parameters of the mechanism are shown in Table 1. Figure 9 a and b shows a scheme of thethe magnetic magnetic spring spring system. system. both the simulated scenarios. 5.2. Kinetic Energy Rotational Simulation To validate the power consumption, a kinetic energy rotational simulation is pro- posed; the simulation was developed in Working Model (version 5.1.2.53, San Mateo, CA,

(a) (b) Figure 9. Power consumption simulation scheme: (a) with magnetic force, (b) without magnetic Figureforce. 9. Power consumption simulation scheme: (a) with magnetic force, (b) without magnetic force. Figure 10a,b shows the power consumption with and without the magnetic force; Figure 10a,b shows the power consumption with and without the magnetic force; the the measure of the kinetic energy rotational with a magnetic force was 0.5 J, and the measure of the kinetic energy rotational with a magnetic force was 0.5 J, and the measure measure of the kinetic energy rotational without a magnetic force was 0.9 J. The results in of the kinetic energy rotational without a magnetic force was 0.9 J. The results in Figure Figure 10a,b show a significant reduction as 0.4 J on the kinetic energy rotational applied 10a,b show a significant reduction as 0.4 J on the kinetic energy rotational applied to the to the mechanism. Therefore, when the magnets of the system are employed, the motor mechanism. Therefore, when the magnets of the system are employed, the motor only only needs to overcome the dissipative forces, reducing the energy consumption. needs to overcome the dissipative forces, reducing the energy consumption.

(a) (b) Figure 10. Power consumption: (a) with magnetic force, (b) without magnetic force.

Actuators 2021, 10, x FOR PEER REVIEW 10 of 16

USA). The objective was to measure the kinetic energy rotational from q =0° to q = 15 with and without the magnetic force. In the scenario with the magnetic force applied the actuator, torque was input as 20 Nm, and a 5-N force along the x-axis was applied for 0.5 s, simulating the magnetic field. In the scenario without the magnetic force, only the actuator torque was input as 25 Nm. Both simulation scenarios lasted 1 s. The frictionless motion of L was programmed, and the gravitational force was included. The simulation parameters of the mechanism are shown in Table 1. Figure 9 a and b shows a scheme of both the simulated scenarios.

(a) (b) Figure 9. Power consumption simulation scheme: (a) with magnetic force, (b) without magnetic force.

Figure 10a,b shows the power consumption with and without the magnetic force; the measure of the kinetic energy rotational with a magnetic force was 0.5 J, and the measure of the kinetic energy rotational without a magnetic force was 0.9 J. The results in Figure Actuators 2021, 10, 136 10a,b show a significant reduction as 0.4 J on the kinetic energy rotational applied to11 ofthe 17 mechanism. Therefore, when the magnets of the system are employed, the motor only needs to overcome the dissipative forces, reducing the energy consumption.

Actuators 2021, 10, x FOR PEER REVIEW 11 of 16

5.3. Multibody Dynamic Simulation To analyze the interaction between the mechanisms with the magnetic spring system for the flexion and extension trajectories, a multibody dynamic analysis was carried out. For the simulation, a trajectory from q =0° to q = 15° ° was programmed for 5 s to (a) (b) move the mass of L = 1121.48 g and material PLA. An external force generated by the FigureFigure 10. 10.magnetic PowerPower consumption: consumption: spring system ( (aa)) with withof 5 magnetic magneticN was appliedforce, force, ( (bb )after) without without 3 s magneticfrom magnetic the force. force.start of the trajectory; this force was applied on top of the surface of the magnet in a direction normal to the surface of5.3. the Multibody magnet. Dynamic Simulation TheTo analyze torque theapplied interaction by the betweenmechanism the before mechanisms and after with interacting the magnetic with spring the external system forcefor the of flexion the magnetic and extension spring system trajectories, was aanal multibodyyzed, as dynamicshown in analysis Figure 11a. was The carried results out. ◦ ◦ ◦ showFor the that, simulation, at the beginning a trajectory of the from trajectory,q2 = 0 ato torqueq2 = of15 242.15was Nm programmed was needed, for which 5 s to increasedmove the until mass it of reachedL2 = 1121.48 349.65 Nmg and in material3 s; after the PLA. external An external force was force applied, generated the torque by the decreasedmagnetic springto 125.57 system Nm until of 5 Nit wasreached applied 48.06 after Nm 3in s 5 from s. Therefore, the start ofat the3 s, trajectory;the torque thisde- creasedforce was 224.08 applied Nm on due top to ofthe the interact surfaceion of of the the magnet magnetic in a spring direction system. normal to the surface of theIn magnet. Figure 11b, the analysis of the energy consumption is presented, and the data showsThe that, torque at the applied beginning by the of mechanismthe trajectory, before 0.0120 and W after was interactingconsumed, withwhich the increased external untilforce reaching of the magnetic 0.0190 W spring in 3 systems; then, waswhen analyzed, the magnetic as shown force in was Figure applied, 11a. Thethe energy results consumptionshow that, at went the beginning down to −0.0065 of the trajectory,W in 3 s. This a torque result indicates of 242.15 that Nm the was magnetic needed, system which causesincreased the untilmechanism it reached to 349.65behave Nm like in a 3gene s; afterrator the system, external since force it wasprovides applied, more the energy torque thandecreased it consumes. to 125.57 Therefore, Nm until this it result, reached due 48.06 to the Nm magnitude in 5 s. Therefore, of the external at 3 s, force the torquegener- ateddecreased by the 224.08 magnetic Nm system, due to theis higher interaction than ofthat the required magnetic by spring the mechanism. system.

(a) (b)

Figure 11. Multibody simulations: ( aa)) torque, torque, ( (b) power consumption.

6. PrototypeIn Figure Manufacturing 11b, the analysis and ofExperimental the energy consumptionTest is presented, and the data showsAfter that, the at design the beginning and simulation of the trajectory, of a magnetic 0.0120 spring W was as an consumed, energy-storing which system increased for auntil two reachingDoF humanoid 0.0190 arm, W in a 3 prototype s; then, when was produced the magnetic with force additive was manufacturing applied, the energy [33]. Theconsumption geometrical went parameters down to of− the0.0065 mechanism W in 3 with s. This the resultmagnetic indicates spring thatsystem the are magnetic shown in Table 4. Two magnet N45 used for the magnetic-spring system, two Dynamixel AX- 12A servomotors motors, were chosen for the actuation system of the prototype, as shown in Figure 12. The controller is composed of an Arduino Mega board that is connected to two motors, and this board allows speed and direction control of the motor at the same time. The power supply generates 5V DC to 12 VDC and a maximum current of 2 A. The prototype weight is 2.5 kg, and thanks to the additive manufacturing technology used, the manufacturing price of the prototype is less than $400.

Actuators 2021, 10, 136 12 of 17

system causes the mechanism to behave like a generator system, since it provides more energy than it consumes. Therefore, this result, due to the magnitude of the external force generated by the magnetic system, is higher than that required by the mechanism.

6. Prototype Manufacturing and Experimental Test After the design and simulation of a magnetic spring as an energy-storing system for a two DoF humanoid arm, a prototype was produced with additive manufacturing [33]. The geometrical parameters of the mechanism with the magnetic spring system are shown in Table4. Two magnet N45 used for the magnetic-spring system, two Dynamixel AX-12A servomotors motors, were chosen for the actuation system of the prototype, as shown in Figure 12. The controller is composed of an Arduino Mega board that is connected to two motors, and this board allows speed and direction control of the motor at the same time. The power supply generates 5 V DC to 12 V DC and a maximum current of 2 A. The Actuators 2021, 10, x FOR PEER REVIEW prototype weight is 2.5 kg, and thanks to the additive manufacturing technology12 of 16 used, the

manufacturing price of the prototype is less than $400.

Table 4. GeometricalTable 4. Geometrical parameters parameters of a magnetic of a spring magnetic as an spring energy-storing as an energy-storing system for systema two DoF for a two DoF humanoid humanoidarm. arm.

Dimension Value (mm) Dimension Value (mm) L 250 𝐿 1 250 L2 170 𝐿 170 Lx1 60 𝐿 60 Lx2 120 𝐿 120

c

(a) (b) (c)

Figure 12. Prototype with the magnFigureetic 12. springPrototype system: with (a) forearm the magnetic detail, ( springb) full arm system: detail, (a )(c forearm) arm detail. detail, (b) full arm detail, (c) arm detail. Preliminary tests were carried out to check the interaction between the magnetic spring system Preliminarywith the mechanism tests were and carried the tr outajectory to check performance. the interaction The between aim of the the exper- magnetic spring iment wassystem to measure with thethe mechanism ability of the and mech the trajectoryanism to generate performance. the flexion The aim and of theextension experiment was trajectoriesto in measure the end the effector ability (EE) of the defined mechanism by the to x generate1 and y1 theaxes. flexion Thus, and two extension poses were trajectories in programedthe to end test effector the reaction (EE) definedof the system by the. xThese1 and poses y1 axes. consisted Thus, two of a poses flexion were and programed exten- to test sion trajectorythe reaction defined of from the system. q =0°These to q poses = 90° consisted and q of= a 90° flexion to andq =0° extension, as shown trajectory in defined ◦ ◦ ◦ ◦ Figure 13a–c,from respectively.q2 = 0 to q2 = 90 and q2 = 90 to q2 = 0 , as shown in Figure 13a–c, respectively.

(a) (b) (c)

Actuators 2021, 10, x FOR PEER REVIEW 12 of 16

Table 4. Geometrical parameters of a magnetic spring as an energy-storing system for a two DoF humanoid arm.

Dimension Value (mm) 𝐿 250 𝐿 170

𝐿 60

𝐿 120

c

(a) (b) (c) Figure 12. Prototype with the magnetic spring system: (a) forearm detail, (b) full arm detail, (c) arm detail.

Preliminary tests were carried out to check the interaction between the magnetic spring system with the mechanism and the trajectory performance. The aim of the exper- iment was to measure the ability of the mechanism to generate the flexion and extension trajectories in the end effector (EE) defined by the x1 and y1 axes. Thus, two poses were Actuators 2021, 10, 136 programed to test the reaction of the system. These poses consisted of a flexion and exten-13 of 17 sion trajectory defined from q =0° to q = 90° and q = 90° to q =0°, as shown in Figure 13a–c, respectively.

(a) (b) (c) Actuators 2021, 10, x FOR PEER REVIEW 13 of 16

Figure 13. Flexion and extension trajectories: (a) capture at 0◦,(b) capture at 45◦,(c) cap- ture at 90◦. Figure 13. Flexion and extension trajectories: (a) capture at 0°, (b) capture at 45°, (c) capture at 90°. To validate the trajectory performance, a strategy on marker detection was used to identifyTo validate the EE the position trajectory through performance, image a processing;strategy on marker this strategy detection was was explained used to in referenceidentify the [34 ].EE Figure position 14a–c through shows image the EE processing; identification this instrategy green color,was explained and Figure in 15refer- shows theence comparison [34]. Figure between 14a–c shows the program the EE identification trajectory and in green the trajectory color, and generated Figure 15 by shows the EE, definedthe comparison by xi and between yi. the program trajectory and the trajectory generated by the EE, defined by x and y.

(a) (b)

(c)

FigureFigure 14. 14.Identification Identification of of the the trajectory: trajectory: ((a) capture at at 90°, 90◦ ,((bb) )capture capture at at 45°, 45 ◦(,(c) ccapture) capture at at0°. 0◦.

The results in Figure 15 show a significant error in the trajectory that the mechanism generated. The estimation of the trajectory error is 3%. To validate the low power consumption of the mechanism with and without the mag- netic spring system, an experiment was proposed to measure the current consumption. The current consumption was measured for a trajectory from q =0° to q = 15°. This trajectory was selected to function with the specifications of the magnetic system shown in Table 3. A T-RMS digital multimeter powered by Steren was used. The results obtained showed that the mechanism with the magnetic spring system consumed a current at the startup of the trajectory of 0.031 A and finished at 0.113 A. On the other hand, when the mechanism was without the magnetic spring system, the current consumption at the startup of the trajectory was 0.050 A and finished 0.140 A. Therefore, it can be validated that the current consumption in the startup was 0.019 A less by using the magnetic spring system. The results obtained are presented in Figure 16a,b. The average current consump- tion with and without the magnetic force was 11.46 A and 13.81 A, respectively. Consid- ering that the voltage was the same, this results in about a 17% power consumption re- duction when introducing the magnetic force; this magnetic force has a production cost of approximately $12.

ActuatorsActuators 20212021, 10, 10, x, 136FOR PEER REVIEW 14 14of of16 17

Actuators 2021, 10, x FOR PEER REVIEW 14 of 16

Figure 15. Compares between the program trajectory and the trajectory generated by the EE. Figure 15. Compares between the program trajectory and the trajectory generated by the EE.

AllThe in resultsall, the infocus Figure of this 15 showpaper awas significant on the design error in of the a magnetic trajectory spring that the as an mechanism energy- storinggenerated.Figure system, 15. Compares The integration estimation between of of the the programmagnetic trajectory trajectory spring error is withand 3%. the the trajectory humanoid generated arm, and by the prelimi- EE. nary testingTo validate for reduced the low power power consumption. consumption The of the advantages mechanism with with other and designs, without as the shownmagnetic inAll reference springin all, the system, [16], focus are an of thatexperimentthis theypaper use was was phys on proposed thicale designcontact, to measure of and a magnetic we the proposed current springconsumption. no as ancontact; energy- ◦ ◦ thisThestoring allowed current system, us consumption to integrationavoid mechanical was of measuredthe magnetic wear forbetween spring a trajectory thewith moving fromthe humanoidq 2parts= 0 ofto arm,theq2 =prototype. and15 prelimi-. This However,trajectorynary testing we was had selectedfor limitations, reduced to function power such as withconsumption. adding the specifications weight The to theadvantages of mechanism, the magnetic with as systemrepresentedother designs, shown by in as theTableshown magnetic3. A in T-RMS reference system. digital [16], multimeter are that they powered use phys byical Steren contact, was and used. we The proposed results obtainedno contact; showedthisThe allowed mechanical that the us mechanism to designavoid mechanicalof with q thethat magnetic usedwear thebetween spring additional the system moving supports consumed parts necessary of a currentthe prototype.for at the the magneticstartupHowever, ofsystem the we trajectoryhad allowed limitations, us of to 0.031 generate such A as and adding th finishede flexion weight atand 0.113 to extension the A. mechanism, On motions the other as of represented hand, the elbow when by withoutthethe mechanism magnetic limitations. system. was However, without the for magneticq it was spring not possible system, to the generate current the consumption motions of at the the shoulder,startupThe ofsince themechanical the trajectory mechanical design was 0.050 designof q A hadthat and one finishedused DoF. the 0.140 additional A. Therefore, supports it cannecessary be validated for the thatmagneticAs the for current future system consumption works, allowed the us proposed in to the generate startup design th wase canflexion 0.019 be adapted Aand less extension by to using generate motions the magnetic reference of the spring tra-elbow jectoriessystem.without for Thelimitations. three-dimensional results obtainedHowever, exercises. are for presented q itIn was addition, in not Figure possible there 16a,b. mayto generate The be averagealternative the motions current ways of con-to the bettersumptionshoulder, use a magnetic with since and the spring mechanical without as an the energy-stodesign magnetic hadring forceone system DoF. was 11.46for reduced A and power 13.81 A,consumption. respectively. ConsideringAs for thatfuture the works, voltage the was proposed the same, design this results can be in adapted about a 17%to generate power consumption reference tra- reductionjectories whenfor three-dimensional introducing the magneticexercises. force; In addition, this magnetic there forcemay hasbe alternative a production ways cost to ofbetter approximately use a magnetic $12. spring as an energy-storing system for reduced power consumption.

(a) (b) Figure 16. Current consumption: (a) with magnetic force, (b) without magnetic force.

(a) (b) Figure 16. Current consumption: (a) with magnetic force, (b) without magnetic force. Figure 16. Current consumption: (a) with magnetic force, (b) without magnetic force.

Actuators 2021, 10, 136 15 of 17

All in all, the focus of this paper was on the design of a magnetic spring as an energy-storing system, integration of the magnetic spring with the humanoid arm, and preliminary testing for reduced power consumption. The advantages with other designs, as shown in reference [16], are that they use physical contact, and we proposed no contact; this allowed us to avoid mechanical wear between the moving parts of the prototype. However, we had limitations, such as adding weight to the mechanism, as represented by the magnetic system. The mechanical design of q2 that used the additional supports necessary for the magnetic system allowed us to generate the flexion and extension motions of the elbow without limitations. However, for q1 it was not possible to generate the motions of the shoulder, since the mechanical design had one DoF. As for future works, the proposed design can be adapted to generate reference trajec- tories for three-dimensional exercises. In addition, there may be alternative ways to better use a magnetic spring as an energy-storing system for reduced power consumption.

7. Conclusions In this paper, a magnetic spring as an energy-storing system for a two DoF humanoid arm was proposed. The proposed design was based on the characteristics of the magnetic spring obtained through a displacement–force relationship. The new prototype is character- ized by a kinematic model, trajectory performance analysis, and simulations that include a mechanical energy consumption and kinetic energy rotational and multibody dynamics. Then, a low-cost prototype presented its manufacturing process through 3D printing and commercial components. The hardware and software for the control system were then detailed, and experimental tests validated the performance and low power consumption of the proposed mechanism design. In conclusion, a magnetic spring as an energy-storing system for a two DoF humanoid arm allowed to obtain low energy consumption through the phenomenon of attraction and repulsion of the magnetic field and the action force that compresses them. In future developments, the components of the magnetic spring system will be manufactured with an improved repulsion and attraction force through the electromagnetic models, improving the magnetic force and creating a high energy-efficiency potential.

Author Contributions: Conceptualization, J.F.R.-L., I.C. and E.C.-C.; methodology, G.C., I.C. and E.C.-C.; software, G.C., D.C. and I.C.; validation, J.F.R.-L., G.C. and E.C.-C.; formal analysis, D.C. and G.C.; investigation, J.F.R.-L., G.C., I.C. and E.C.-C.; resources, D.C. and E.C.-C.; data curation, G.C., I.C. and E.C.-C.; writing—original draft preparation, J.F.R.-L., G.C., E.C.-C. and D.C.; writing— review and editing, J.F.R.-L., G.C., E.C.-C. and D.C.; visualization, J.F.R.-L., I.C. and E.C.-C.; and supervision, G.C., I.C., E.C.-C. and D.C. All authors have read and agreed to the published version of the manuscript. Funding: This work was funded by a grant from Ministero della Salute (Ricerca Corrente 2021). Data Availability Statement: The data presented in this study are available on request at the discre- tion of the corresponding author. Acknowledgments: The first author would like to acknowledge CONACYT for the financial support during their Ph.D. program. Conflicts of Interest: The authors declare no conflict of interest.

References 1. Cafolla, D.; Ceccarelli, M. Design and FEM Analysis of a Novel Humanoid Torso. In Multibody Mechatronic Systems; Mechanisms and Machine Science; Ceccarelli, M., Hernández Martinez, E., Eds.; Springer: Berlin, Germany, 2015; Volume 25. [CrossRef] 2. Cafolla, D.; Marco, C. Design and Simulation of Humanoid Spine. In New Trends in Mechanism and Machine Science; Mechanisms and Machine Science; Flores, P., Viadero, F., Eds.; Springer: Berlin, Germany, 2015; Volume 24. [CrossRef] 3. Russo, M.; Cafolla, D.; Ceccarelli, M. Design and Experiments of a Novel Humanoid Robot with Parallel Architectures. Robotics 2018, 7, 79. [CrossRef] 4. Arakelian, V. Gravity compensation in robotics. Adv. Robot. 2015, 30, 79–96. [CrossRef] Actuators 2021, 10, 136 16 of 17

5. Bayer, A.; Merk, G. Industrial Robot with a Weight Balancing System. EP Patent 2301727, 24 August 2011. 6. Russo, A.; Sinatra, R.; Xi, F. Static balancing of parallel robots. Mech. Mach. Theory 2005, 40, 191–202. [CrossRef] 7. Ma, Z.; Ben-Tzvi, P. RML Glove—An Exoskeleton Glove Mechanism with Haptics Feedback. IEEE/ASME Trans. Mechatron. 2014, 20, 641–652. [CrossRef] 8. Yamamoto, R.; Hirakawa, A.; Horikawa, O. Load balancer with automatic lifting force compensation. In Proceedings of the ABCM Symposium in Mechatronics, Rio de Janeiro, Brazil, 15–20 November 2010; Volume 4, pp. 580–589. 9. Morita, T.; Kuribara, F.; Shiozawa, Y.; Sugano, S. A novel mechanism design for gravity compensation in three dimensional space. In Proceedings of the 2003 IEEE/ASME International Conference on Advanced Intelligent Mechatronics (AIM 2003), Kobe, Japan, 20–24 July 2003; Volume 1, pp. 163–168. [CrossRef] 10. Gatti, G.; Carbone, G. Gravity Compensation of Robotic Manipulators Using Non-linear Spring Configurations. In Advances in Italian Mechanism Science, Proceedings of the IFToMM Italy, Naples, Italy, 9–11 September 2020; Mechanisms and Machine Science; Niola, V., Gasparetto, A., Eds.; Springer: Berlin, Germany, 2020; Volume 91. [CrossRef] 11. Carabin, G.; Wehrle, E.; Vidoni, R. A Review on Energy-Saving Optimization Methods for Robotic and Automatic Systems. Robotics 2017, 6, 39. [CrossRef] 12. Li, Y.; Bone, G. Are parallel manipulators more energy efficient. In Proceedings of the IEEE International Symposium on Computational Intelligence in Robotics and Automation, Banff, AB, Canada, 29 July–1 August 2001; pp. 41–46. 13. Hirzinger, G.; Sporer, N.; Albu-Schäffer, A.; Hähnle, M.; Krenn, R.; Pascucci, A.; Schedl, M. DLR’s torque-controlled light weight robot III—Are we reaching the technological limits now. In Proceedings of the IEEE International Conference on Robotics and Automation, Washington, DC, USA, 11–15 May 2002; Volume 2, pp. 1710–1716. 14. Kapoor, R.; Parveen, C. Comparative study on various KERS. Lect. Notes Eng. Comput. Sci. 2013, 3, 1969–1973. 15. Seok, S.O.; Wang, A.D.; Chuah, M.Y.; Hyun, D.J.; Lee, J.; Otten, D.M.; Lang, J.H.; Kim, S. Design Principles for Energy-Efficient Legged Locomotion and Implementation on the MIT Cheetah Robot. IEEE/ASME Trans. Mechatron. 2015, 20, 1117–1129. [CrossRef] 16. Barreto, J.P.; Corves, B. Resonant Delta Robot for Pick-and-Place Operations. In Proceedings of the IFToMM World Congress on Mechanism and Machine Science 2019, Krakow, Poland, 15–18 July 2019; pp. 2309–2318. [CrossRef] 17. Carabin, G.; Palomba, I.; Wehrle, E.; Vidoni, R. Energy Expenditure Minimization for a Delta-2 Robot through a Mixed Approach. In Multibody Dynamics 2019, Proceedings of the ECCOMAS 2019 Thematic Conference on Multibody Dynamics, Duisburg, Germany, 15–18 July 2019; Computational Methods in Applied Sciences; Kecskeméthy, A., Geu Flores, F., Eds.; Springer: Berlin, Germany, 2020; Volume 53. [CrossRef] 18. Mirz, C.; Schöler, F.; Barreto, J.P.; Corves, B. Optimal Control Based Path Planning for Parallel Kinematic Manipulators Utilising Natural Motion. In Proceedings of the 2018 IEEE 14th International Conference on Automation Science and Engineering (CASE), Munich, Germany, 20–24 August 2018; pp. 223–228. [CrossRef] 19. Goya, H.; Matsusaka, K.; Uemura, M.; Nishioka, Y.; Kawamura, S. Realization of high-energy efficient pick-and-place tasks of SCARA robots by resonance. In Proceedings of the 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, Vilamoura, Portugal, 7–12 October 2012; pp. 2730–2735. [CrossRef] 20. Xu, Y.; Terekhov, A.V.; Latash, M.L.; Zatsiorsky, V.M. Forces and moments generated by the human arm: Variability and control. Exp. Brain Res. 2012, 223, 159–175. [CrossRef][PubMed] 21. Chaparro-Rico, B.; Cafolla, D.; Ceccarelli, M.; Castillo-Castaneda, E. Design and Simulation of an Assisting Mechanism for Arm Exercises. In Advances in Italian Mechanism Science; Mechanisms and Machine Science; Boschetti, G., Gasparetto, A., Eds.; Springer: Berlin, Germany, 2017; Volume 47. [CrossRef] 22. Chaparro-Rico, B.D.M.; Cafolla, D.; Castillo-Castaneda, E.; Ceccarelli, M. Design of arm exercises for rehabilitation assistance. J. Eng. Res. 2020, 8, 203–218. [CrossRef] 23. Innovatec. Available online: https://www.imanesdemexico.com/nr750/ (accessed on 15 April 2021). 24. Zhang, Q.; Wang, Y.; Kim, E.S. Power generation from human body motion through magnet and coil arrays with magnetic spring. J. Appl. Phys. 2014, 115, 064908. [CrossRef] 25. Zhang, Q.; Wang, Y.; Kim, E.S. Electromagnetic Energy Harvester with Flexible Coils and Magnetic Spring for 1–10 Hz Resonance. J. Microelectromech. Syst. 2015, 24, 1193–1206. [CrossRef] 26. Saha, C.; O’Donnell, T.; Wang, N.; McCloskey, P. Electromagnetic generator for harvesting energy from human motion. Sens. Actuators A Phys. 2008, 147, 248–253. [CrossRef] 27. Salauddin, M.; Halim, M.A.; Park, J.-Y. A magnetic-spring-based, low-frequency-vibration energy harvester comprising a dual Halbach array. Smart Mater. Struct. 2016, 25, 095017. [CrossRef] 28. Masoumi, M.; Wang, Y. Repulsive -based ocean wave energy harvester with variable resonance: Modeling, simulation and experiment. J. Sound Vib. 2016, 381, 192–205. [CrossRef] 29. Mann, B.; Sims, N. Energy harvesting from the nonlinear oscillations of magnetic levitation. J. Sound Vib. 2009, 319, 515–530. [CrossRef] 30. Zhao, L.; Kim, E.S. Analytical Dual-Charged Surface Model for Permanent Magnet and Its Application in Magnetic Spring. IEEE Trans. Magn. 2020, 56, 1–7. [CrossRef] 31. Zollo, L.; Siciliano, B.; de Luca, A.; Guglielmelli, E. PD control with on-line gravity compensation for robots with flexible links. In Proceedings of the 2007 European Control Conference (ECC), Island of Kos, Greece, 2–5 July 2007; pp. 4365–4370. [CrossRef] Actuators 2021, 10, 136 17 of 17

32. Kelly, R.; Santibáñez, V. Control de Movimiento de Robots Manipuladores; Pearson Educación, S.A.: Madrid, Spain, 2003; ISBN 84-205- 3831-0. 33. Ceccarelli, M.; Carbone, G.; Cafolla, D.; Wang, M. How to Use 3D Printing for Feasibility Check of Mechanism Design. Adv. Intell. Syst. Comput. 2015, 17, 307–315. 34. Rodríguez-León, J.F.; Chaparro-Rico, B.D.M.; Russo, M.; Cafolla, D. An Autotuning Cable-Driven Device for Home Rehabilitation. J. Health Eng. 2021, 2021, 6680762. [CrossRef][PubMed]