A MATLAB-Based Framework for Designing 3D Topology Optimized Soft Robotic Grippers

Soft robotic grippers are widely used in diﬀerent industrial applications since they show great advantages in the adaptable grasping of objects with irregular shapes. However, as many soft grippers have a monolithic structure and gain their motion from the elastic deformation, it is diﬃcult to use the conventional rigid-body mechanism theory to synthesize the shape of the soft grippers. To cope with this problem, the topology optimization is frequently employed as synthesis method since it can achieve automatic design of continuum-structure mechanisms. In this paper, we propose a novel 3D topology optimization framework in MATLAB to achieve automatic design of soft robotic grippers. Two design examples are also presented to illustrate the automatic synthesis process. Experimental tests have shown that the 3D topology optimized grippers in the example can successfully grasp objects with diﬀerent shapes. In future work, the proposed framework can be further developed to synthesize soft robotic grippers with diﬀerent actuation mechanisms and task-speciﬁc grasping behaviors.


I. INTRODUCTION
Soft robotic grippers, different from the conventional rigidlink grippers, are usually made of a flexible continuum structure and gain their motion from the elastic deformation [1].Benefiting from their high flexibility, different kinds of soft grippers are designed to solve complicated grasping tasks.For example, pneumatically actuated silicone grippers were developed to achieve adaptable grasping of objects with irregular shapes [2], [3].Other research studies tried to use the granular jamming mechanism to realize adaptable grasping [4], [5].Besides, the origami-inspired mechanism is also a popular approach for designing universal soft grippers [6], [7].
However, since the continuum-structure mechanisms are quite different from the rigid-link mechanisms, it is inefficient to use the conventional rigid-body mechanism theory to design the soft grippers.To accelerate the design process, the topology optimization is often used as an automatic design method because its bio-inspired algorithm is able to synthesize animal-joint-like flexible mechanisms which are suitable for the design of soft grippers [8].In [9], the authors have developed a passively adaptive soft gripper using a 2D topology optimization method.Another 2D topology optimized gripper was presented in [10] whose mechanical advantage was maximized.Other studies also This work was supported by the Munich School of Robotics and Machine Intelligence (MSRM), Technical University of Munich, Munich, Germany.
The authors are with the Institute of Micro Technology and Medical Device Technology, Technical University of Munich, Munich, Germany (e-mail: yilun.sun@tum.de;yuqing.liu@tum.de;nandi.zhou@tum.de;tim.lueth@tum.de).Several soft robotic grippers synthesized by the proposed 3D topology optimization framework.F indicates the actuation force.Four feet of each gripper are to be fixed.
tried to incorporate different actuation mechanisms into the topology optimization algorithm, as the authors in [11], [12] successfully synthesized cable-driven soft grippers.A pneumatically actuated multi-material soft gripper was also designed in [13] using topology optimization method.However, despite all these research efforts, most of the topology optimized soft grippers are based on 2D algorithms, and only a few work [13], [14] are conducted to explore the potential of 3D topology optimization in the design of soft grippers.On the other hand, in most of the previous work, the optimization based design framework is usually a halfclosed black box, as the finite element analysis (FEA) is usually performed using commercial software and the FEAcode cannot be modified [11], [13].Although some opensource 3D topology optimization code [15], [16] are also available, they are still not focused on the design of soft grippers.To improve the design efficiency of 3D topology optimized soft grippers, an easy-to-use design framework based on a single developing environment is highly desirable.
In this paper, we present a novel 3D topology optimization based framework to achieve automatic design of soft robotic grippers.The entire framework is implemented in our automated design toolbox in MATLAB, the Solid Geometry (SG) Library [17]- [20].Fig. 1 shows several examples of soft robotic grippers synthesized by our design framework.The developed grippers can be quickly 3D-printed using stereolithography (SLA) printer (Formlabs Form2).
The remainder of the paper is organized as follows.Section II provides an overview of the proposed design framework and illustrates the methods used in the 3D topology op- timization and post-processing process.Section III presents the synthesis process of two soft grippers and evaluates their grasping performance by conducting experimental tests on the fabricated prototypes.The performance and efficiency of the proposed framework are discussed in Section IV, where the future work is also outlined.

II. METHODOLOGY
A. Overview of the Design Framework Fig. 2 presents the workflow of using our design framework.Firstly, the user defines the size of the 3D design domain and provides the boundary conditions, such as loading forces and grasping directions, to describe the design objective of the expected grasping mechanism.Then, the shape synthesis process begins by performing the 3D topology optimization.During the optimization process, 3D FEA is performed in each step to calculate the predefined objective function.The distribution of the material density in the design domain is then iteratively modified according to an updating scheme.After the optimization process converges, post-processing techniques are performed to obtain a 3Dprintable and functional soft gripper.

B. Definition of the 3D Design Problem
As is shown in Fig. 3a), the design domain is a cuboid defined in a Cartesian coordinate system which can be divided into n x × n y × n z cubic elements with adjustable edge length l e .The white cubes in Fig. 3a) are an example representing the user-defined geometrical constraints that should be kept void throughout the entire design process.The user can define the geometrical constraints by using a 3D surface model created by the SG Library that has a overlapping region with the prescribed design domain [21].Fig. 3b) is a schematic diagram illustrating the general design problem for synthesizing a soft gripper.Since some soft grippers have symmetric structures, our design framework allows the user to specify the top or side surface of the design domain as symmetric surface so that the computational cost for synthesizing the entire gripper structure can be greatly reduced.The user can define the actuation mechanism by specifying the actuation force F a and the fixation area on the design domain, as is shown in Fig. 3b).In order to realize the grasping movement of the soft gripper, a grasping point P out should also be chosen from the nodes of the design domain whose displacement u out is to be maximized in the optimization process.

C. 3D Topology Optimization Algorithm
The aim of the proposed 3D topology optimization method is to find an almost solid-void (1-0) density distribution x (a voxel model) of the elements in the 3D design domain to achieve the maximum u out .x is implemented as a MATLAB array whose size is n x × n y × n z .The design objective can be formulated mathematically as: where U is the displacement vector of the (n x + 1) × (n y + 1) × (n z + 1) nodes in the design domain and L is a sparse vector to select u out from U. U can be calculated by solving the equation system KU = F (3D linear FEA), where K and F are the global stiffness matrix and the global load vector respectively.K can be obtained by assembling the elementary stiffness matrix K e .Currently, the linearly elastic material model is implemented in our framework.Since the design variables x are not directly involved in the FEA process, we use the Solid Isotropic Material with Penalization (SIMP) method [22] to correlate the elementary Young's modulus E e to its density x e .E 0 is the Young's modulus of the solid material.To control the volume of the synthesized gripper, we have set a volume constraint c which limits the ratio of the optimized and original volume V (x)/V 0 .v e represents the elementary volume.
In the proposed framework, we solve the 3D optimization problem in (1) by using the Optimality-Criteria (OC) method from [15].The OC updating scheme of x can be formulated as: x − e = max(x min , x e − m) x + e = min(1, where x new e and x 0 e are the updated and initial design variable respectively.To maintain the stability of the optimization process, we have set a move limit m = 0.1 in each step and also a damping factor η = 0.3.The Lagrangian multiplier λ 1 in ( 4) is obtained using a bisection method.The sensitivity analysis ∂uout ∂xe can be determined by: D. Post-Processing x reach an almost solid-void (1-0) distribution when the optimization process converges.After that, we duplicate x symmetrically according to the symmetric planes to get the entire voxel model x f ull of the gripper structure.To generate a 3D-printable surface model (STL file) of the synthesized soft gripper, the marching cubes algorithm proposed in [23] is used to extract an isosurface (x iso = 0.8) from x f ull .As can be seen in Fig. 4a) and Fig. 4b), the extracted 3D surface model is sometimes split into several independent objects after using the marching cubes method.However, the broken parts should be treated as thin flexure hinges in the real design of soft grippers.The reason of this problem is that some neighboring solid elements in x f ull are only connected by one single-shared edge (see Fig. 4a) and the marching cubes algorithm considers those elements as unconnected when generating a surface model (see Fig. 4b).To cope with this problem, we have developed an algorithm (see Algorithm 1) in our framework to repair the voxel model so that the missed flexure hinges can be regenerated in the extracted 3D surface model.The basic idea of the repair algorithm is to go through all connecting edges in the provided voxel model x f ull using the neighborhood-element matrix M and detect all singleshared edges.The two void elements (x e < x iso ) beside x f ull (k + 1, j, i) ← x iso + 0.01; x f ull (k, j + 1, i) ← x iso + 0.01; x f ull (k, j, i) ← x iso + 0.01; the detected single-shared edge are then thickened so that a thin flexure hinge will be generated at the detected place in the surface model.Fig. 4c) shows that the unconnected parts of the extracted surface model can be successfully reunited using the proposed repair algorithm.Finally, the repaired gripper model can be mounted on a fixation base model and then 3D-printed.

III. APPLICATIONS TO GRIPPER DESIGN
In this section, we demonstrated the performance of the proposed design framework by synthesizing two soft grippers with different jaw shapes.All the calculations were performed on a computer with an Intel Core i7 CPU at 2.9 GHz.

A. Soft Gripper With Flat Gripping Jaws
The first design example is to synthesize a soft gripper with flat gripping jaws.As is shown in Fig. 5a), the design domain was comprised of 80 × 20 × 20 cubic elements with l e = 0.5mm.The flat jaw shape was defined by a geometrical constraint (white region in Fig. 5a), which remained void during the entire synthesis process.Fig. 5b) shows the loading cases and optimization objective in the first design problem.Since the gripper is supposed to have a symmetric structure, we defined the surface on the x-y plane and the x-z plane as symmetric surfaces and all the boundary conditions were also mirrored.A pulling force F a of 0.2 N was applied on the design domain to actuate the soft gripper while the design objective was to maximize the displacement of P out .The distance between P out and the bottom of the design domain was 4 mm.Since the soft gripper is SLA-printed with the Durable Resin [24], a linearly elastic material, the Young's modulus E 0 and Poisson's ratio ν were set to 1000 MPa and 0.3 for K e .c was set to 0.15 to constrain the volume of the synthesized gripper.The automatic synthesis process is presented in Fig. 6.As is shown in Fig. 6a), the objective function u out converged at the 98 th iteration, reaching its maximum of 3.92 mm.The evolution process of x during some iterations is also graphically illustrated in Fig. 6b).It can be noticed that the most changes of u out and x have already taken place in the first 20 iterations while the rest calculations were performed to achieve convergence.be seen that the obtained model is a combination of a 2D topology optimized gripper structure (from the z-axis view) and an optimized statically stable structure (from the y-axis view), which is advantageous over the purely 2D topology optimized grippers.The entire design process took 450.76 seconds.

B. Soft Gripper With 3D Concave Gripping Jaws
In the second design example, we have defined another kind of geometrical constraint in the design domain (see Fig. 7a) in order to achieve 3D concave gripper jaws in the synthesis result.The concave shape of the gripper jaw is intended to solve the slipping problem when grasping smooth convex objects.The corresponding design problem is illustrated in Fig. 7a).Similar to the first example, the design domain was also based on a 80 × 20 × 20 voxel model with the element length of l e = 0.5mm.The distance between the objective point P out and the bottom of the design domain was 3 mm while the volume constraint c was set to 0.12.All the other design settings, such as the material properties and the actuation force, were the same as in the first example.All the boundary conditions were also mirrored according to the symmetric surfaces.Fig. 7b) shows the trend of u out during the optimization process.It can be seen that synthesis process converged at the 94 th iteration, reaching a maximum u out of 4.05 mm.From the trend of u out and the evolution process of the design variable x (see Fig. 7c), we can see that the main structure of the gripper has already emerged in the 30 th iteration.Fig. 7d) presents the full model of the soft gripper after post-processing.It can be noticed that the 3D concave gripping jaws and the statically stable structure (from the yaxis view) are successfully incorporated into the final design.The entire design process, including the optimization and post-processing, took 464.18seconds.

C. Evaluation of the Grasping Performance
In this section, experimental tests were conducted to evaluate the adaptable grasping performance of the two synthesized soft grippers.The experimental setup is presented in Fig. 8.The soft grippers and the fixation base were both SLA-printed, using the Durable Resin [24] and the White Resin [25] respectively.A servo motor (Fischertechnik Micro Servo) [26], controlled by a microcontroller (Arduino UNO), was used to actuate the gripper.The generated pulling force was 1 N at zero speed, which is sufficient to achieve the full closure of the gripper jaws.In the experiment, rigid objects of different shapes (sphere, cube, tetrahedron, cylinder) were grasped by the two soft grippers.
Experiment results are presented in Fig. 9.We can see that, in all grasping tests, the gripping jaws were deformed adaptively so that the objects with different shapes can be held  tightly.It can also be noticed that the gripper from the second synthesis example can enclose the convex objects better than the first one due to the wrapping effect of the incorporated 3D concave jaws.On the other hand, as can be observed in Fig. 9, some fatigue cracks have emerged in the branchlike thin structures during the experiment.After performing FE-analysis on the two soft grippers (see Fig. 10), we can see that an important cause of the cracks is the large stress concentrated in the thin structure.However, as these cracks had little influence on the adaptable grasping performance of the soft grippers, the branch-like thin structures in Fig. 9 could be considered as auxiliary structures that emerged in the optimization result but contributed little to the design objective.

IV. DISCUSSION AND FUTURE WORK
The work presented in this paper aims at creating a unified 3D topology optimization based framework to realize the automatic design of soft robotic grippers.The feasibility of the proposed framework has been successfully verified by the synthesis examples and the experimental tests in Section III.Compared to the 3D topology optimization framework in [13], [14], where multiple platforms (ANSYS and MATLAB) are employed to implement the numerical algorithms, our design framework is more efficient since it's implemented in a single developing environment (MATLAB) with modifiable code.Different from other open-source 3D topology optimization code [15], [16] which are developed for the theoretical study of optimization algorithms, our framework is more focused on the design of functional and 3D-printable soft robotic grippers.Moreover, the 3D topology optimized soft grippers presented in this work can be interpreted as a multi-dimensional combination of the 2D grasping mechanism and the 2D statically stable structure (see Fig. 6c) and Fig. 7d)), which are advantageous over the purely 2D topology optimized grippers in [10], [12].
Nevertheless, the proposed framework is our first step towards designing 3D topology optimized soft robotic grippers, and there are still some aspects that can be improved.For instance, other material models, such as the hyperelastic material, could be incorporated into the current design framework to explore the potential of synthesizing soft grippers with different material properties.On the other hand, since the latter part of the optimization process made little contribution to the final topology (see Fig. 6 and Fig. 7), we will refine the convergence criterion and the move limit m in the future so that the optimization process could converge faster to reduce the computational cost.Furthermore, to cope with the crack problem that emerged in Fig. 9, we plan to add stress constraints to the optimization algorithm to limit the generation of stress-concentrated thin structures.In future work, we will further analyze the relationship between the user-defined boundary conditions and the realized grasping behaviors, which could be useful for realizing the automatic design of soft grippers with different actuation mechanisms and task-specific grasping behaviors.

Fig. 1 .
Fig. 1.Several soft robotic grippers synthesized by the proposed 3D topology optimization framework.F indicates the actuation force.Four feet of each gripper are to be fixed.

Fig. 3 .
Fig. 3. Graphical illustration of the general 3D design problem for synthesizing a soft gripper: a) The design domain, b) Schematic representation of the boundary conditions and design objective in the design problem.In this case, an example is presented for illustration purpose.

Algorithm 1 : 6 M 7 Determine the number of the solid elements n solid in M; 8 if n solid = 2
Algorithm of Repairing the Unconnected Hinges in the Voxel Model 1 Initialization of x f ull and x iso .; 2 Determine the size of x f ull : {n x ,n y ,n z }; 3 for i = 1 : n z do 4 for j = 1 : n y − 1 do 5 for k = 1 : n x − 1 do ← x f ull (k : k + 1, j : j + 1, i); && | det(M)| > 0.5 then 9 if M(1, 1) > ρ iso then 10

14 xFig. 4 .
Fig. 4. The problem of unconnected hinges in the extracted 3D surface model: a) The optimized voxel model of x which contains single-shared edges, b) The extracted surface model with unconnected hinges, c) The repaired surface model.

Fig. 5 .
Fig. 5. Design problem of the soft gripper with flat gripping jaws: a) The design domain.The blue and white region represent the active and constrained design domain respectively, b) Schematic representation of the boundary conditions and design objective in the design problem.

Fig. 6 .
Fig. 6.Automatic synthesis of the soft gripper with flat gripping jaws: a) The value of uout in the optimization process.uout converged at the 98 th iteration, b) The distribution of x in some iterations.The elements with xe > 0.5 are plotted and the black color represents solid element, c) The post-processed 3D surface model of the synthesized soft gripper.

Fig. 7 .
Fig. 7. Automatic synthesis of the soft gripper with 3D concave gripping jaws: a) The design domain and the schematic representation of the design problem, b) The value of uout in the optimization process.uout converged at the 94 th iteration, c) The distribution of x in some iterations.The elements with xe > 0.5 are plotted and the black color represents solid element, d) The post-processed 3D surface model of the synthesized soft gripper.

Fig. 8 .
Fig. 8. Experimental setup.The SLA-printed soft gripper was pulled by a servo motor to grasp rigid objects of different shapes.

Fig. 9 .Fig. 10 .
Fig. 9. Experimental tests showing the adaptable grasping performance of the two soft grippers.The grasped objects from left to right: small sphere, small cube, tetrahedron, cylinder, big sphere, big cube.