Structural and Gait Optimization of a Hexapod Robot with Particle ...

2 downloads 0 Views 817KB Size Report
Ervin Burkus*, János C. Fodor*, Péter Odry**. *Óbuda University ..... [13] P. Gonzalez de Santos, J.A. Cobano, E. Garcia, J. Estremera, M.A.. Armada: A ...
Structural and Gait Optimization of a Hexapod Robot with Particle Swarm Optimization Ervin Burkus*, János C. Fodor*, Péter Odry** *Óbuda University, Budapest, Hungary ** Subotica Tech, Subotica, Serbia [email protected], [email protected], [email protected] Abstract—The aim of this paper is to introduce a novel method for determining the structure and dimensions of a walking robot using an optimization method. With this solution the parameters of the robot’s gait algorithm can also be fine-tuned. Prior to the construction of the authors’ latest robot called Szabad(ka) II, a sophisticated modeling was carried out. With the help of this model, the functionality of the robot could be checked before the manufacturing process. Until recently modeling has been used mostly for the verification of the construction, but as the next step it will be used for defining the structure and dimensions. The definition of the optimal parameters can be solved with optimization methods. The Particle Swarm Optimization (PSO) meets the expectations.

I. INTRODUCTION During previous research and development carried out by the authors several hexapod walking robots were built. The latest model called Szabad(ka) II is a complex, servo motor driven, multiprocessor device made of aluminum and steel. The Szabad(ka) II robot (Fig. 1) is described in detail in [1], [2] and [3]. Prior to its construction a sophisticated modeling was carried out with special attention to the smallest physical, mechanical and electrical details. The robot model contains its dynamical description, ground contact, behavior of the gears and joints as well as the model of the motors and control electronics. For verification the motor currents, voltages, the real and theoretical joint angles as well as the body’s 3D accelerations were measured. With the help of this model, the functionality of the robot could be checked before the manufacturing process. The constructed robot was later used to verify and improve the model ([4], [5]). This improved model would be included in the total optimization of the mechanical structures of future robots. The mechanical structure of the robot was designed in SolidWorks. To create the SimMechanics model first the SolidWorks model had to be transferred to the Simscape/SimMechanics environment. Since the SolidWorks model was defined paying attention to the smallest details, the model imported into the SimMechanics had the accurate dimensions, masses, and inertias of the parts. The model also required adding the servo system’s electronic and mechanical modules, backlash of the joints, ground contacts, control and other modules. Similar modeling solutions but with less attention to the details were described in [7]. Some factors such as the combined behavior of the motors and planetary reductors or the damping parameters

of the feet could be achieved only after the robot had been constructed and concrete measurements performed. This model was perfectly suitable for the verification and walking simulation of Szabad(ka) II. The method could be applied in the process of designing the next robot. However, in the construction of a new device the modeling should be used not only for checking and simulating but also for defining the structure. In order to achieve this, the parameters must be easily modifiable and the simulation has to be fast. The previous model of Szabad(ka) II did not meet these requirements. Due to the high level of its details it is difficult to assign parameters to it and it requires substantial processing power. These reasons made it necessary to create a new model (Fig. 2) intended to be used for the optimization and entirely designed in SimMechanics. Instead of the First Generation, here the Second Generation of SimMechanics elements were used because these latter are clearer, optimized and faster [8]. The components of the robot are represented by simple primitives instead of complex parts. The parameters of these components (dimensions, density) can be set easily and the corresponding inertias are calculated by the software. In this simplified model it is not possible to create a realistic model, but for designing the structure this is not even required. The model used for optimization does not have electronic modules and the control is simpler however this will not affect the usefulness of the results (torque, power), because only their proportions are important. This does not mean that the final model will not be realistic, merely the design of the structure does not need precise results. After a detailed study of the literature there were only a few cases where the designing of the hexapod robot’s structure had been preceded by static modeling or planning. Dynamic modeling similar to the one used for Szabad(ka) II’s simulations was not found. A detailed description of the full kinematic and dynamic modeling of Szabad(ka) robot is presented in [6]. The [18] describes a learning system that uses the CMA-ES method from evolutionary computation to simultaneously optimize the morphology and the walking patterns for a complex legged robot. This paper introduces a complete solution for the structural and gait optimization of a hexapod robot with the use of a dynamic model and an optimization method.

Besides SwarmOps several other swarm optimization algorithms are available. SwarmOps was chosen because it is fast, and its parameters are easy to set. II.

SETTING THE PARAMETERS OF THE SWARMOPS ALGORITHM

Figure 1. The Szabad(ka) II robot

Optimization algorithms and SwarmOps Solutions to some problems are not simply correct or incorrect but are rated in terms of quality. Such problems are known as optimization problems because the goal is to find the candidate solution with the best, i.e. optimal quality. The optimization problems can be solved with optimization algorithms. Such an algorithm is SwarmOps, an implementation of the swarm optimizations. It contains source libraries which can be used in Matlab or GNU Octave. A detailed description about Swarm algorithms can be found in [9], [10] and [11]. A comparison of genetic, swarm and other algorithms, and their usage in robotic applications are shown in [9].

Before using the SwarmOps algorithm, it is necessary to adjust its parameters. The number of the search space dimensions defines the number of the fitness function’s input variables. The selected number of the inputs was two, therefore the problem remained relatively simple. The lower and upper bounds of the search space define the limits of the input variables. These were obtained from the robot’s mechanical limits. The nontrivial parameters are: s - swarm size, omega - inertia weight phiP - weights on the attraction towards the particle’s own best-known position phiG - weights on the attraction towards the swarm’s best-known position These parameters were determined by trial and error. The PSO algorithm was run several times on a designated test function while the parameter values were continuously changing. As the test function, the Matlab peaks() function was used which is relatively complex, and has multiple minima and maxima points. During the testing only one parameter was changed and determined at a time. The minima point of the function had to be found with the accuracy of two decimal places.

Figure 2. The SimMechanics model

For the results those parameter values were chosen with which the least amount of evaluations were required to reach the optimal results of the test function. The tests were run 100 times with each parameter and the mean of the results was considered. Table I. shows the parameter range used in finding the optimal results and the selected values. III.

SPECIFIC OPTIMIZATION USES

A. Mechanical optimization in the case of tripod walking Developing the structure and defining its dimensions is a very broad set of problems. To demonstrate the optimization method's legitimacy a concrete example was selected. However, this example has a specific benefit namely that its results can already be used in designing a new robot. In the case of the previous robot its symmetrical arrangement caused some problems while it was walking using the tripod gait [5]. At tripod gait different forces are applied to the legs. While on one side of the robot the front and rear legs are on the ground at the same time, on the other side only the middle foot contacts the ground. Because of this the motors are unevenly loaded and the motors driving the femur part (theta1 joint) of the middle legs have to be much stronger. This phenomenon can be seen in the simulation results (Fig. 4). This is the reason why the middle legs of Szabad(ka) II are different from the others. TABLE I.

PARAMETERS USED BY SWARMOPS

Parameter range Chosen param.

Swarm-size 1 – 200 40

Omega -1 – 1 0.2

Figure 4. Torques before optimization

Figure 7. Torques after optimization

phiP -1 – 3 0.5

phiG 0–4 1

Figure 3. Schematic representation of the robot

The fact that different legs are used makes the design, calculations and manufacturing more complex and of course, increases the costs. One solution to this problem is to change the placement of the legs, and the length of one part, for example the length of the femur. This requires a process which is able to determine the appropriate sizes. Swarm optimization is perfectly suited for this task. At rectangular hexapods it is not uncommon for the middle legs to be further out than the external legs. This solution was used for example at SILO6 [13], Cassino [14], Messor [16] and SpaceClimber [17]. The fitness function needed for the optimization runs the robot simulation in which the distance between the legs (alpha-alpha distance measured in the y direction) and the length of the femur can be set (Fig. 3). The algorithm can alter both the leg distance and femur length by +/- 50 millimeters. The simulation is about 10 seconds long during which the robot makes exactly two equal steps. The output of the simulation is the average of the torques needed to move the joints. From this the difference between the torques of the center and outer theta1 joints is calculated.

Figure 5. Optimization results

Figure 8. Optimization results

Figure 6. Mechanical structure before optimization

Figure 9. Mechanical structure after optimization

The optimization – based on experimental experience – required maximum 400 evaluations to find the best solution with evenly distributed loads. The results of the simulation can be seen in Fig. 5, 7 and 8. It can be concluded that if the outer leg pairs are closer to each other and if the femur parts are shorter than the load difference between the theta1 joints is smaller (Fig. 6 and 9). The optimization algorithm was repeated several times. The best solutions (where the difference between the torques was close to zero) were around -40, 40 millimeters (Table II). As it can be seen in Fig. 5 optimal results can be found with several parameters. The femur part significantly affects the walking speed therefore the optimization parameters have been refined. In the new cases the femur length limits varied between smaller domains. The algorithm successfully identified parameters resulting near zero torque differences when the femur was reduced with smaller values (with 30 and 20 millimeters). The results are summarized in Table II.

TABLE II. OPTIMIZATION RESULTS AlphaAlpha Limits

Femur Length Limits

Optimal parameters

Result

-5/5 -5/5 -5/5 -5/5 -5/5

-5/5 -5/5 -5/5 -3/3 -2/2

4.25, -3.93 2.93, -5 4.023, -5 4.69, -3 5, -2

~0 ~0 ~0 ~0 0.00128

Figure 10. Tripod original

Figure 13. Tripod optimized

B. Behavior in the case of other gaits The optimization of the mechanical structure for the tripod gait raises the question how is robot behaving with other gaits. To examine this problem the model was extended by a complex gait algorithm. The extension made it possible to examine the three common walking modes. These are the tripod (where 3 legs can be lifted at the same time) the ripple (where 2 legs can be lifted simultaneously) and the wave gait (where only one leg can be lifted at a time). To find out how the optimization influenced the torques of the new gaits the simulation optimized to the tripod gait was also tried with the other two gaits. A detailed study of the hexapod gaits can be found in [5]. The results of the simulation can be seen in Fig. 10-15. For the comparison of the different gaits a more complex model was used. The tripod walking with the new advanced gait algorithm behaves differently than with the previous algorithm and the model was extended to take into account the friction of the joints. Due to these reasons the tripod optimization had to be repeated. The new results can be seen in Fig 13. The results of the repeated optimization are slightly different from the previous ones. Despite this the positive results of the tripod optimization can be clearly seen in Fig. 10 and 13. The optimization used for the tripod gait did not have a negative effect on the results of the ripple gait moreover it even improved them (Fig. 11 and 14). The torque difference which was already negligible continued to decline. The situation is also positive at the wave gait (Fig. 12 and 15). In the case of negative results a global optimization could have been done whose fitness function could have taken into account all the gaits, however this was not necessary. As a conclusion, it can be said that the optimization of the tripod gait also had a positive effect on the other gaits.

Figure 11. Ripple original

Figure 14. Ripple optimized

Figure 12. Wave original

Figure 15. Wave optimized

Figure 16. Optimization results

Figure 17. Optimization results

C. Walking optimization instead of mechanical optimization Prior to the mechanical modifications of the design it has to be insured that the transformation of the structure is really unavoidable or maybe it is possible to solve the problem by other means for example with modifying the walking algorithm. To decide this, another optimization procedure was carried out. For the parameters which can be varied by the optimization the following were chosen: the difference between the distances measured between the feet ant body in the case of the middle and outer legs and the height of the body. Theoretically, these parameters have the most effect on the joint torques. By default the distance between the body and the feet is 80 mm. The optimization could change this by +/- 40 mm. The height of the body is 50 mm. This parameter could be changed by +/- 20 mm. Values outside these boundaries would have a negative impact on the robots behavior. The results of the optimization can be seen in Fig. 16, 17 and 18. The algorithm successfully found parameters at which the theta1 torque difference between the outer and middle joints was close to zero (Fig. 18). This result was achieved when the height of the body was lowered by 8.521 mm and the difference between the distances of the feet and the body was increased by 39.960 mm. However the results obtained were not satisfactory because the difference between the torques appeared at the other two joints (alpha and theta2). In conclusion it can be said that the optimization of the walking parameters does not solve the problem of the uneven loads, thus a mechanical modification is unavoidable.

Figure 19. Optimization results

Figure 18. Torques after optimization

D. Walking optimization to reduce power consumption After determining the optimal structural parameters of the robot, the walking can also be optimized. That may have several objectives, such as minimizing the movement of the legs, involved work, or uneven walking. In the current case, the goal was to minimize the energy consumption required for straight walking. This could be done by changing the parameters of the motion algorithm. Various external factors such as the complexity of the terrain may limit the possibilities but the optimization can be repeated with any boundary or gait. For the actual task as the most obvious variable parameters the distance of the feet from the body, the height of the body and the height of the step were selected. The first tests revealed that the height of the body does not affect the energy requirements. This is entirely logical since while walking the feet are performing the same motions regardless of the height of the body. The distance between the feet and the body, and the height of the steps remained as variable parameters to perform the optimization. The limits of these were obtained from the kinematic features of the robot. The distance of the feet from the body is 80 mm by default. The optimization can change this by +40/-20 mm. The step height is 20 mm. This parameter can be changed by +20/-10 mm. The optimization was performed using the tripod gait. These values were determined manually. Values outside these boundaries would result difficulties in the walking. The results can be seen in Fig. 19, 20 and 21. The fitness function returns the sum of the joints average torques. This is directly proportional to the energy input. In the un-optimized cases, this value reached even 3

Figure 20. Optimization results

Figure 21. Walking after optimization

Nm, while after the optimization the result was a little more than 2 Nm. It should be noted that the optimized case uses about 30% less energy compared to the worst case. If a robot used a battery it would significantly increase the run time.

[6]

IV. CONCLUSION The previously presented tests have shown how a robot structure could be determined and its algorithm of motion improved using modeling and optimization. In the construction of the next robot these technologies will be definitely implemented. The presented model is not capable of performing the entire task but, as it had been mentioned in earlier papers, it is possible to create a model capable of realistically simulating the robot. In the case of building the complete realistic model, acceptable results could be achieved if the optimization is fine-tuned (parameters and limit values are appropriately specified).

[9]

ACKNOWLEDGMENT The authors gratefully acknowledge the financial support by the Óbuda University research fund. REFERENCES [1] [2] [3]

[4]

[5]

www.szabadka-robot.com Ervin Burkus, Peter Odry: Autonomous Hexapod Walker Robot “Szabad(ka) II”, SIP 2010, Subotica, Serbia. Ervin Burkus, Peter Odry: Autonomous Hexapod Walker Robot “Szabad(ka) II” – Software Modeling and Tools, ITRO 2011, Zrenjanin, Serbia Z. Pap, I. Kecskés, E. Burkus, F. Bazsó, P. Odry: Optimization of the Hexapod Robot Walking by Genetic Algorithm, SISY 2010, pp. 121-126, ISBN: 978-1-4244-7394-6 Ervin Burkus, Peter Odry: Autonomous Hexapod Walker Robot “Szabad(ka)”, Acta Polytechnica Hungarica, Vol 5, No 1, 2008, pp. 69-85, ISSN 1785-8860

[7] [8]

[10]

[11]

[12] [13]

[14]

[15]

[16]

[17]

[18]

István Kecskés, Péter Odry: Full Kinematic and Dynamic Modeling of “Szabad(ka)-Duna” Hexapod, SISY 2009, pp:215219, ISBN: 978-1-4244-5348-1 Ing. R. Woering: Simulating the "first steps" of a walking hexapod robot, Master’s thesis, Technische Universiteit Eindhoven, 2011 The MathWorks: Matlab and Simulink: SimMechanics User’s Guide István Kecskés, László Székács, Péter Odry: PSO and GA Optimization Methods Comparison on Simulation Model of a Real Hexapod Robot, ICCC 2013 Kennedy, J. and Eberhart, R. Perth, Australia: Particle Swarm Optimization. IEEE Internation Conference on Neural Networks, 1995. Shi, Y. and Eberhart, R. Anchorage, AK, USA: A Modified Particle Swarm Optimizer. IEEE International Conference on Evolutionary Computation, 1998. Magnus Erik Hvass Pedersen: SwarmOps for Matlab Numeric & Heuristic Optimizatiov Source-Code Library for Matlab The Manual, November 2010 P. Gonzalez de Santos, J.A. Cobano, E. Garcia, J. Estremera, M.A. Armada: A six-legged robot-based system for humanitarian demining missions, Elsevier, Mechatronics, Volume 17, Issue 8, pp. 417–430, October 2007 Carbone G., Yatsun A., Ceccarelli M., Yatsun S.: Design and Simulation of Cassino Hexapod Robot, Proceedings of the 13th WSEAS International Conference on SYSTEMS, pp. 301–307, ISBN: 978-960-474-097-0 Xilun Ding, Zhiying Wang, Alberto Rovetta and J.M. Zhu (2010). Locomotion Analysis of Hexapod Robot, Climbing and Walking Robots, Behnam Miripour (Ed.), ISBN: 978-953-307-030-8, InTech Dominik Belter, Piotr Skrzypczynski: Rough Terrain Mapping and Classification for Foothold Selection in a Walking Robot, Journal of Field Robotics 28(4), 2011, pp. 497–528 Sebastian Bartsch, Timo Birnschein, Malte Rommermann, Jens Hilljegerdes, and Daniel Kuhn: Development of the Six-Legged Walking and Climbing Robot SpaceClimber, Journal of Field Robotics 29(3), 2012, pp. 506–532 Rommerman M., Kuhn D., Kirchner F.: Robot design for space missions using evolutionary computation, Evolutionary Computation, CEC '09. IEEE Congress, 2009, pp. 2098 – 2105, EISBN: 978-1-4244-2959-2