SPADA: A Toolbox of Designing Soft Pneumatic Actuators for Shape Matching based on Surrogate Modeling

Soft pneumatic actuators (SPAs) produce motions for soft robots with simple pressure input, however they require to be appropriately designed to fit the target application. Available design methods employ kinematic models and optimization to estimate the actuator response and the optimal design parameters, to achieve a target actuator's shape. Within SPAs, Bellow-SPAs excel in rapid prototyping and large deformation, yet their kinematic models often lack accuracy due to the geometry complexity and the material nonlinearity. Furthermore, existing shape-matching algorithms are not providing an end-to-end solution from the desired shape to the actuator. In addition, despite the availability of computational design pipelines, an accessible and user-friendly toolbox for direct application remains elusive. This paper addresses these challenges, offering an end-to-end shape-matching design framework for bellow-SPAs to streamline the design process, and the open-source toolbox SPADA (Soft Pneumatic Actuator Design frAmework) implementing the framework with a GUI for easy access. It provides a kinematic model grounded on a modular design to improve accuracy, Finite Element Method (FEM) simulations, and piecewise constant curvature (PCC) approximation. An Artificial Neural Network-trained surrogate model, based on FEM simulation data, is trained for fast computation in optimization. A shape-matching algorithm, merging 3D PCC segmentation and a surrogate model-based genetic algorithm, identifies optimal actuator design parameters for desired shapes. The toolbox, implementing the proposed design framework, has proven its end-to-end capability in designing actuators to precisely match 2D shapes with root-mean-square errors of 4.16, 2.70, and 2.51mm, and demonstrating its potential by designing a 3D deformable actuator.


Introduction
Soft pneumatic actuators (SPAs) have a significant impact on the soft robotics field by enabling a variety of applications of soft robotics, such as grasping, 1, 2 locomotion, 3,4 and manipulation. 5,6 1][12][13] This trait has been widely employed in designing soft robots, especially those that draw inspiration from biological entities, as the desired actuator shape can be derived from creatures' movement.For instance, the locomotion pattern of inchworms has been replicated by designing actuators to recursively crawl, 4 while the grasping profile of an elephant trunk has been emulated by actuators with helical configurations to achieve versatile and secure holds. 6spite considerable advancements in discov-YAO ET AL ering suitable soft actuator structures and materials to mimic biological motions, the design process is impeded by complexities tied to the dynamic, contact, and multimodal modeling of these actuators. 8,9 ddressing these challenges remains difficult, given the limitation of current modeling and computational approaches in managing large geometric deformation and material nonlinearity. 1417] Fiber-reinforced SPAs, recognized for their versatile applications, 4,18,19 leverage fiber arrangements for varied 2D and 3D motion. 10Connolly et al. 16 presented an analytical model for these SPAs, comprising distinct modules for bending, twisting, elongating, and expanding.They took a predefined kinematic trajectory for each module and applied optimization to identify optimal actuator design parameters for matching shapes along the trajectory.Singh and Krishnan, 17 concentrating on bending modules, proposed a method that segments 2D curves into piecewise constant curvature (PCC) sections, with design parameters derived from their analytical model.However, the complex manufacturing of fiberreinforced SPAs, especially the fiber routing process, faces challenges such as extended production time, inconsistency issues, and design limitations.
PneuNets actuators, formed of interconnected, pleated channels within an elastomer, deform when pressurized. 20Their behavior is defined by altering channel geometry or material distribution. 11Advances in 3D printing allow these actuators to be crafted either via 3D-printed molds and silicon casting 15 or direct 3D printing with flexible materials. 21Following Connolly et al.'s strategy, 16 Jiang et al. 15 modeled PneuNets, which include bending, twisting, and helical modules.Their design process starts with manual 3D curve segmentation, followed by their analytical model and optimization to determine the actuator design for the target shape.
Transitioning to bellow-SPAs, replacing Pne-uNets' sharp channels with bellow-shaped con-volutions, leads to an unfolding structure under pressure. 22,23 his feature enables transferring material strain into structural deformation, making bellow-SPAs particularly suitable for 3D printing materials like Agilus30™due to their lower elongation-at-break compared to silicon elastomers , 24 ensuring precision in production.Kan et al. 12 proposed an analytical model for modularized bellow-SPA designs, using interconnected channels to achieve varied deformation curves.They employed a sampling-based optimization to design channels for a desired end-tip trajectory.
Analytical models, although widely used for forward kinematics, often struggle to accurately predict substantial deformations due to their reliance on geometric simplifications coupled with material nonlinearity.The Finite Element Method (FEM) is known for its accurate predictions 25 but is computationally expensive, making it unsuited for repeated optimization. 26,27 ecent advances use machine learning, particularly supervised artificial neural networks (ANNs) trained with FEM data, to create efficient surrogate models for bellow-SPAs. 28However, these models have covered limited actuator design spaces. 29rthermore, current shape-matching optimization methods for SPAs are limited by the need for human intervention in segmenting 3D shapes and in converting optimal parameters into a manufacturable design.This results in a lack of an end-to-end solution for seamlessly connecting the desired shape to a ready-to-print actuator design file.Furthermore, the inherent complexities of implementing design frameworks emphasize the need for an open-source, user-friendly design toolbox to enhance accessibility and efficiency. 302][33] On the other hand, some permit optimization but lack a specific focus on shapematching. 33,34 refore, to address the above challenges, this article provides an end-to-end shapematching design framework for bellow-SPAs, and an open-source toolbox named SPADA (Soft Pneumatic Actuator Design frAmework) that implements this framework through a user-friendly          It takes an input of a target shape and divides it into constant curvature segments with length and curvature parameters using a 3D piecewise constant curvature segmentation.Then, a genetic algorithm is employed to optimize the parameters in the design space of a bellow SPA.Finally, a CAD file of the bellow SPA based on the optimal design parameter for matching the target shape can be generated.
GUI. Fig. 1  The rest of this article is organized as fol-lows: Section 2 details the shape-matching design method, covering the bellow-SPA's kinematics, FEM simulation, surrogate modeling, and the shape-matching optimization for determining design parameters.Section 3 introduces the SPADA toolbox, implementing the discussed framework with a user-friendly GUI for kinematic analysis and shape-matching optimization.Section 4 applies the toolbox for precise 2D shape-matching designs, also exploring 3D actuator design potential.

DESIGN AND METHOD
This section describes the methodologies employed for designing, analyzing, and optimizing bellow-SPAs for shape-matching.We present a modular design, describe its kinematics, discuss FEM simulations and ANN training and introduce a shape-matching optimization algorithm for desired actuator shapes.

A. bellow-SPAs Design and Kinematics
1][12][13] This approach has been uniformly adopted in prior design methodologies for shape-matching, owing to its capability to accelerate kinematics prediction and optimization.
As shown in Fig. 2, a bellow-SPA (Fig. 2A) can be built by stacking modules, whose deformation is determined by the deformation of each module along with the rotation angle between two adjacent modules.Each module consists of a Ushaped bellow ring and a π 2 fan-shaped constraint (Fig. 2B), parameterized by the geometric parameters in Table 1.
Essentially, the geometry of the bellow-SPA module is governed by four parameters r in , t, R and l, bounded by their non-negativity, The constraint restricts the expansion of the module, allowing it to unfold only in opposite directions during pressurization, resulting in a bending deformation of angle θ under the applied pres-sure P .Assuming the deformed module remains its original length along an axis on the side of constraint, offset by a distance of r in + t 2 from the central axis, and the deformation follows the CC approximation, it can be represented by an associate arc (indicated by a line) with the length l ′ and curvature θ l ′ ( Fig. 2C), where l ′ = θ( l θ + r in + t 2 ).As shown in Fig. 2D, by having a clockwise rotation angle ∆ϕ between two adjacent modules (from upper to lower), the designed actuator can achieve spatial deformation, where the inner line indicates its deformed shape (Fig. 2E).To further simplify the design, all stacking modules share the same inner radius r in , wall thickness t, actuation pressure P and the manufacturing material.To this end, the kinematics model of bellow-SPAs can be derived using the transformation matrix T i+1 i mapping from the arc base frame {S i } to the tip frame {S i+1 } of the i-th module, where , in which c and s represent cos and sin.

B. Surrogate Model based on the FEM dataset and ANN training
The above kinematics model for bellow-SPAs maps arc parameters to actuator position but doesn't define the transformation from design space to arc parameters.Hence, a model connecting the design parameters (geometry and material properties) of a module to its deformation is needed.Fig. 3 illustrates the surrogate modeling process using a FEM model for dataset generation, subsequently training an ANN to expedite computation for optimization.

I FEM Simulation and Dataset Collection
To generate a viable surrogate model of the bellow-SPA, a dataset should be obtained by sampling its feasible feature space.Four attribute geometry parameters and the actuation pressure are chosen as input to obtain a dataset (Fig. 3).The ranges and intervals of the selected input are set as shown Table 2.
Considering the limitation of the material customizability, the dataset is material specified.Therefore, a new set of collection is required for a new material.The incompressible Neo-Hookean hyperelastic material model is applied to the material (Fig. 3B).
where µ = E/2(1 + ν) is the shear modulus, I 1 is the first invariant of the right Cauchy-Green deformation tensor, E is Young's modulus and ν is the Poisson's ratio.Agilus30™ is used as the default material as it is a commonly used material for designing soft robots. 35Material properties are obtained from a characterization work 36 and an official datasheet. 24 MATLAB ® script is written to automatically create FEM simulations in COMSOL MultiPhysics ® based on the input, and extract simulation results as output.Thanks to the symmetry of the bellow geometry, the FEM simulation is performed on the half bellow module as a stationary study of the 3D solid mechanics model (top of Fig. 3C).The top end is fixed, and the other is connected to a cylinder to smooth the element deformation.A uniformly distributed load is applied to the surface colored in blue.
From the nonlinear simulation, deformation of the half bellow module and its von Mises stress distribution can be obtained (bottom of Fig. 3C).By using the displacement of a group of points at the end of the cylinder, the angular deflection θ of the bellow module can be calculated (see details of the FEM and material model in Supplementary Data A).

II Surrogate Model Trained via an ANN
To generate the surrogate model, a feedforward ANN (top of Fig. 3D) was constructed with an input layer of five neurons for the input data (con- The pre-collected FEM simulation dataset is randomly divided into training and test sets (80% and 20%, respectively) and trained until 1000 epochs have been reached.After training, the MSE reaches below 10 −6 for both training and test data (bottom of Fig. 3D).This pre-trained network will be then used as the surrogate model in the form of θ = f (r in , t, R, l, P ) to quickly predict the angular deflection of the bellow-SPA module for a given set of design parameters, allowing for efficient design exploration and optimization.

C. Shape-Matching Optimization
Given a curve represented by a set of 3D ordered points {p k } m k=0 , we aim to design a bellow-SPA to deform from an unactuated straight line to a desired shape upon pressurization.Fig. 4 outlines our shape-matching process.Initially, A 3D PCC segmentation algorithm discretizes the curve into CC segments (Fig. 4A-C).Next, the actuator's design involves determining the optimal module parameters to match each CC segment (Fig. 4D-E).Notably, "segment" pertains to the desired shape's divided part, while "module" refers to the bellow-SPA's building block.Each segment's shape is approximated using one or multiple identical modules.
PCC requires the curve to follow G 1 continuity, meaning two adjacent CC segments share an endpoint with aligned tangent vectors.The biarc method, frequently used for this, 37 requires two endpoints P i , P e and their tangents T i , T e (Fig. 4C).The challenge is determining the connection point P c between two CC segments., with projected point P k and its tangent vector T k ; then discretized into constant curvature segments using the biarc approximation by interpolating between two end points P i , P e and their tangent vectors T i , T e , based on the control points Q i , Q e and the connection point P c ; the rotation angle ∆ϕ between two segments is ∠C i P c C e .D) shows that for each CC segment represented by shape parameters (L j , κ j ), a module will be designed to match its shape by stacking one or more identical modules.E) shows the output actuator is designed by stacking the previous modules in order with rotation angles ∆ϕ j between segments.
circle centers.If a segment is straight, it has no rotation with adjacent segments.The biarc approximation samples data points, starting from the initial point, seeking the longest biarc that approximates data within a preset tolerance.This process is iteratively repeated until all data are approximated. 38Tangent vectors are derived using a 3rd-order B-spline curve fitted to the original 3D data (Fig. 4B), enabling the calculation of projection points and their tangent vectors.This B-spline curve is defined by n + 1 control points {q i } n i=0 , where d = 3 − 1 is the degree of curve, 3 is the order of curve, t is a sequence of non-decreasing uniform knots that t i = i−d n+1−d for d + 1 ≤ i ≤ n, and there is d + 1 number of 0 and 1 at the begin-ning and end of the knot sequence, respectively.B is the basis function that is defined recursively, Assuming that the sample sequence of the input data points is t k = k m , the matrix q, composed of the control points of the B-spline that fits the data can be obtained using the least-squares fitting, q = (( where A = [B i,d (t k )] and p is the matrix composed of all data points, and the number of control points n + 1 can be determined by minimising the error from input data points to the B-spline curve. 39,40 hen, all data points are projected to the B-spline curve to get the projected points {P k } m k=0 and their tangent vectors {T k } m k=0 .A number of CC segments are obtained after the PCC segmentation (Fig. 4D).If a segment curvature is below 10 −3 , These segments are designed by stacking modules filled with internal constraints.For arc segments, a genetic algorithm determines the bellow-SPA module design parameters for matching shapes by stacking identical modules.The selection of the genetic algorithm is informed by our previous work 41 thanks to its compatibility with surrogate modeling and its capacity to effectively handle a large number of design variables.The objective is to minimize the difference in arc parameters (arc length and curvature) between the deformed segment shape (composed of designed modules and predicted by a surrogate model) and the desired segment shape (see details in Supplementary Data B).The final actuator is constructed by orderly stacking these modules, considering rotation angles between segments (Fig. 4E).

The Toolbox Implementation
To amplify the efficiency and user accessibility of our design framework, we've developed SPADA -an open-source design toolbox with a user-friendly GUI (see Fig. 5) -built on MATLAB ® and COMSOL MultiPhysics ® .Compared to our previously published bellow-SPA design toolbox -designed solely for simulating bending actuator behaviors and taking approximately 74 minutes per simulation 31 -SPADA stands out by facilitating simulations for diverse deformations in just a few minutes and offering efficient end-to-end shape-matching optimization.Here, "end-to-end" refers to the process from the desired shape to the STL files of the designed actuator for 3D printing.
The simulation component allows for the design of bellow SPAs by adjusting the modular geometric parameters, customizing assemblies, and modifying material properties.It utilizes background FEM simulation to analyze the behavior of modules and predict the actuator's configuration through forward kinematics.Additionally, it can generate material-specified datasets.
The optimization component can train a selected dataset into an ANN to serve as a surrogate model.It takes as input a file containing the desired shape of the actuator, represented as a series of ordered 3D points.The 3D PCC segmentation algorithm segments the desired shape into CC segments, and an optimization algorithm based on a genetic algorithm and the surrogate model is used to find the optimal actuator design parameters that approximate the desired shape.It can also generate CAD files of the designed actuator, ready for direct 3D printing.
See Supplementary Data C for detailed instructions on how to use SPADA.The source code is available on a GitHub repository, 42 and a demonstration of the toolbox is provided in the Supplementary Video.

Results
In this section, SPADA was used to design three actuators that accurately match the predefined 2D shapes with root-mean-squared-errors (RMSEs) of 4.16, 2.70, and 2.51mm, respectively, hence validating the accuracy of the kinematics model, illustrating the efficacy of the shapematching algorithm, and demonstrating its ability in achieving end-to-end from desired shapes to designed actuators for direct 3D printing.Furthermore, we harnessed the toolbox's potential in the design of 3D deformable actuators, specifically by designing an actuator according to an elephanttrunk-inspired helical shape.

A. 2D Shape Matching: Letter Writing
In the 2D case of validating the shapematching algorithm along with the kinematics model, and also demonstrating the ability of endto-end from the desired shapes to 3D printed actuators, SPADA was used to design three actuators that match the shape of the letters "S", "R", and "L", which is the acronym of Soft Robotics Lab.
The shape for each letter is represented by a series of ordered 3D coordinates, imported into SPADA as a ".mat" file.The segmentation results for each letter are highlighted in Fig. 6A-C.The letter "S" is segmented into two arc segments with the same length and curvature.The letter "R" is segmented into two straight segments and three different arc segments.The letter "L" is segmented into two straight segments and one arc segment.All the lower bound values of the outer radius were set to be 9mm for three actuator optimization for ease of manufacturing.After optimization, the optimal design parameters are labeled on the schematics of actuators designed by those parameters in Fig. 6D-E.The surrogate model used was provided with the toolbox, that was trained by a provided FEM dataset of the default material Agilus30™ (see information of the FEM and material parameters in Supplementary Data A).The prototypes were 3D printed on a Stratasys J735™ using the CAD files generated by SPADA.
The shape of the actuated prototypes was compared to the initial desired shape in Fig. 6G by overlapping them in the x-y plane.The respective RMSEs between the desired shapes and actuators' real shapes are 4.16, 2.70, and 2.51mm, validating and demonstrating our shape-matching algorithm (refer to Supplementary Data D.I for details of the experiments, and see the prototypes taking the defined shapes in the Supplementary Video available on the project's GitHub page 42 ).

B. 3D Shape Matching: Elephant Trunk-Inspired Shape
The previous 2D case of shape-matching validates the efficacy of our end-to-end design framework, given its independence from gravitational effects.Yet, in the 3D scenario, gravity is un-avoidable.Furthermore, gravity acts unidirectionally while the deformation of actuators significantly varies in space, making it exceedingly challenging to incorporate gravity's impact into the modeling process, particularly in modular approaches.This complexity explains why nearly all shape-matching design frameworks sidestep considering gravitational effects. 12,16,17 Wile Jiang et al. 15 did incorporate gravity into their analytical model, they were only able to roughly approximate its influence for two types of segments and didn't evaluate it in the real world.
We recognize that shape-matching, on its own, can't offer a comprehensive solution for tasks involving gravity and contact.Yet, our design framework and toolbox still provide valuable insights for actuator design, even without considering these factors, thanks to the adaptability of soft actuators.The design of actuators to assume a helical shape, emulating the versatile and secure grasping behavior of an elephant's trunk, is a prime example among the research community. 6,21,43 Hnce, to both demonstrate the potential of the toolbox for employing 3D shapematching in guiding actuator design, and to quantitatively assess gravity's impact on the 3D shapematching scenario, we delve into an end-to-end example of designing a helical actuator, inspired by the structure of an elephant's trunk, for the purpose of grasping irregular objects, as shown in Fig. 7.
A right-handed helix, with x, y, z coordinates represented by the mathematical expression (a cos t, a sin t, ht) where t is evenly spaced between 0 and 2π, is utilized to embody the helical configuration inspired by the grasping movement of an elephant's trunk.By presuming that the object targeted for grasping fits within a cylindrical dimension of 16mm diameter and 120mm height, and further constraining the actuator's outer radius to be approximately 10mm, the helix parameters a = 18mm and h = 60mm can be derived for a power grasp.
The helical shape, consisting of a sequential of ordered 3D points, is imported into SPADA.An actuator is then designed to match this shape using the toolbox framework while disregarding gravitational effects.Fig. 7B showcases the design parameters of the actuator, and the toolbox estimates the actuation pressure to be 9.85kPa (which is approximated to 10kPa in experiments due to the hardware limitations).To assess the discrepancy between the desired shape and the actual shape of the pressurized actuator under the effect of gravity, we executed a series of experiments.The top end of the actuator is fixed to a connector with an angle of 62 degrees (Fig. 7A).This angle corresponds to the divergence between the tangent vector at the helix's top end and the gravity axis.
We first pressurized the actuator to 10kPa, a value estimated by the toolbox as optimal for achieving the helical shape.Fig. 7C illustrates the deviation between the desired helical shape and the actual configuration of the actuator at this pressure.The root-mean-squared error is calculated to be 25.64mm.Subsequently, we escalated the actuation pressure to 13kPa, 15kPa, and 20kPa.Fig. 7D compares the desired shape and the actuator's actual shapes under these increased pressure values.The calculated root-mean-square errors for these pressures were 19.08mm, 18.69mm, and 23.77mm, respectively.Moreover, as observed from the XY and XZ perspectives in Fig. 7C and D, it's evident that as pressure increases, the central point of the actual shape (XY view) approaches that of the targeted shape.Concurrently, the number of convolutions in the actual shape (XZ view) increases, while the height of the actual shape along the z-axis decreases.This phenomenon can be attributed to the escalating pressure that not only counteracts gravitational effects but also en-hances the curvature perpendicular to the direction of gravity.This, in turn, induces an increase in the number of helical turns.
However, despite the error caused by gravity, it is still possible to exploit behaviors arising from the design and interaction with the object to achieve a successful grasp.The grasping experiments were performed to explore the potential of the designed actuator for handling various objects, as shown in Fig. 7E.Refer to Supplementary Data D.II for details of the grasping experiments and watch the prototype grasping objects in the Supplementary Video.

Conclusion
In this work, an end-to-end design framework for the shape-matching of bellow-SPAs is proposed and implemented as an open-source design toolbox, SPADA.A model leverages FEMsimulated module deformation and PCC approximation to predict the kinematics of actuators.Surrogate modeling involving ANN training on a FEM dataset is applied to speed up computation.A 3D PCC segmentation algorithm approximates the desired curve by dividing it into CC segments.An optimization algorithm, grounded on a genetic algorithm and a surrogate model, determines the optimal design parameters of the actuator to align with the shape of these segments.The toolbox, based on the proposed design framework, has proven its end-to-end capability in designing actuators to accurately match 2D shapes, while also demonstrating its potential to design deformable actuators in 3D space.
Overall, this design framework can be generalized to other soft actuators, such as tendon-driven soft actuators.Users can also specify more material properties for the actuator and use the toolbox FEM simulation function to create a data set for training.A GitHub repository has been created with the toolbox and locations for users to upload self-acquired datasets for co-design.In the future, the authors will maintain and update the toolbox with consideration of the gravity effect and environmental parameters (such as underwater conditions).Add-ons for protocols to design soft actuators for specific tasks will also be investigated, such as soft grippers, soft actuators for surgical operations, and soft crawlers for locomotion.In the FEM model, the cylinder used to smooth its element deformation has a radius of r in + t 2 and a length of l connected to the smaller end of the half bellow using the same material model.The pressure is modeled as the uniformly distributed load on the inner surface of the half bellow, ramped by intervals of 0.5 KPa.The mesh is set as the default element size of "Finer".To allow for large deformation of elements, the geometric nonlinearity is included, with "Constant Newton" and "Anderson acceleration" set as the nonlinear simulation method.
Assuming the plane where the cylinder is connected to the bellow is parallel to the plane at the other end of the cylinder, the angular deflection of the half bellow is the angle between this plane and the plane at the fixed end of the half bellow.Therefore, the angle can be calculated by the displacement of the top point E 1 and the bottom point E 2 in the plane at the free end of the cylinder (as shown in Fig. S2(A).If the coordinate of E 1 , E 2 are (x 1 , y 1 , z 1 ) and (x 2 , y 2 , z 2 ), respectively.Then the angular deflection of the module can be calculated by Additionally, the FEM simulated stress distribution, angular deflection and the strain distribution of the bellow SPA model with default design parameters in relation to the change of pressure are shown in Fig. S2.
(2) The "Material Properties" section allows for defining the material of the actuator by its Young's modulus, Poisson's ratio and density.
(3) The "FEM Simulation" section takes the input of the actuation pressure; the "Simulation" button launches COMSOL MultiPhysics ® in the background and analyzes the designed actuator using FEM.It simulates the behavior of each unique module and predicts the configuration of the whole actuator with forward kinematics (examples are shown in the first and second yellow boxes on the right side, respectively).
(4) The "Generate Dataset" button uses FEM to collect a dataset as explained in the paper's Section 2.B.I based on the input material properties.A dataset of Agilus30™ is already collected and provided to users.The interface of the optimization component is shown in Fig. S5.

II The Optimization Component
(1) In the "Dataset Input" section, the "Select Dataset" button trains a selected dataset into a surrogate model via an ANN as described in the paper's Section 2.B.II.The dataset can be obtained by executing step 4 in the toolbox's simulation component, with user-defined material properties.Alternatively, users can create their own datasets, ensuring matching the format of our provided dataset for Agilus30™ , available on our toolbox's GitHub repository [42].
(2) In the "Shape Input" section, the desired curve file, consisting of sequential 3D coordinates of points, can be input with the "Load Shape File" button.
The "Segmentation" button helps divide the 3D shape into straight and circular arc segments by the 3D PCC segmentation algorithm according to the input tolerance value.
(3) The "Shape Matching" section uses a genetic algorithm to find and output the optimal design parameters of the actuator that matches the shape upon pressurization based on the input upper and lower bounds of the actuator's outer radius and the applied pressure.
(4) If the algorithm can find a set of feasible design variables, the "Generate CAD" button can generate a .stlformat file of the designed actuator for direct 3D printing.

D Experimental Setup
I The 2D Shape-Matching The setup of the experiment in Sec 4.1 is shown in Fig. S6.Three actuators, "S", "R", "L" were driven with respective optimal pressures 8.11, 6.97 and 6.94kPa (which were approximated to 8, 7 and 7kPa in experiments due to the hardware limitations), determined along with their design parameters by the shape-matching design framework implemented on SPADA.A pneumatic system consisting of a 12V DC stepper motor driving a 60mL air syringe, a microcontroller (Arduino Uno), a pressure sensor (ADP51A11, pressure range 0-40 kPa, Panasonic, Japan) and a PI controller was used to control the input pressure.Lubricant was applied beneath the actuators to remove frictional effects.After taking photos from actuators' upward direction, the MATLAB Image Processing Toolbox™ was used to identify their real shapes by getting the central pixel coordinates of each module and using the steel square as reference.The original letter curves were sampled with the same intervals to compare with the real shapes.The root-mean-squared-errors for three actuators are 4.16, 2.70, and 2.51mm, respectively.

II The 3D Shape-Matching
The setup of the experiment in the paper's Section 4.B is shown in Fig. S7.The top end of the actuator is fixed to a connector (as shown in Fig. 7A), which is connected to the top center of a 780×700×563 mm aluminum alloy frame.In order to get the deformed shape of the actuator, we 3D printed five rings, each featuring three evenly spaced rods connected to small reflective tape-coated spheres acting as markers for the OptiTrack™ system.Apart from the actuator's two ends, these rings are situated between every pair of adjacent segments.By identifying the position and orientation of these rings, and presuming a constant curvature between each pair, the real shape of the pressurized actuator can be obtained.The space coordinates of the markers were captured by a motion tracking system (OptiTrack™ with 4 Flex 3 cameras) and can be used to create a rigid body to represent the real-time positions of the free end.
A pneumatic system consisting of a 12V DC stepper motor driving a 60mL air syringe, a micro-controller (Arduino Uno), a pressure sensor (ADP51A11, pressure range 0-40 kPa, Panasonic, Japan) and a PI controller was also used to control the input pressure.We repeated the experiment 3 times for each trial.To analyze the data, we (1) calculated the average positions and orientations of all rings, which were treated as rigid bodies in the OptiTrack™ system, (2) determined arc planes and centers adjacent rings using their positions and tangent vectors, based on the constant curvature assumption, (3) aligned the position and orientation of the top ring with the uppermost point of the desired helical shape, (4) resampled the desired helical shape at the same interval as the sampled arcs' coordinates to derive RMSEs, comparing the desired and real shapes.To exploit grasping behaviors arising from the actuator design and interaction with the object, we performed grasping experiments on a series of objects.The object 1 in Fig. 7E -a pen with a diameter of 16mm and length of 120mm, was the motivation for determining the helical shape's radius a = 16 2 + r ou = 8 + 10 = 18mm, h = 60mm ensuring a power grasp.The experiment shows that the designed actuator can achieve a successful grasp for this object, which demonstrates the efficiency of our design pipeline.Subsequently, as shown in Fig. S8(A), we attached a 60mL syringe beneath the object and progressively increased its weight by filling it with water to explore the actuator's maximum grasping capacity.We discovered that when the syringe draws in water exceeding 30mL, equivalent to 73g (including the object), the grasp becomes unsuccessful.This is because grasping a heavier object requires higher pressure, which the designed actuator cannot handle for weights above 73g.Next, we evaluated the actuator's capability using another pen with smaller diameter shown in Fig. 7E to assess its ability in grasping objects of reduced diameter.Following a successful grasp, we further tested its capability with even finer objects, confirming its ability to securely grasp items as slender as a zip tie shown in Fig. S8(B).Aside from power grasping, we also Figure S8: The supplemental objects for the grasping experiments: A) The object 1 in Fig. 7 carrying a syringe with water.B) A zip tie with a width of 7.6mm.C) Plastic strawberry with a diameter of 44mm and cherry with a handle of 5mm width.
explored the actuator's other grasping modes with object 3 and 4, as well as those shown in Fig. S8(C).Object 3 -a plastic banana represents a grasping mode where only a small part of the object, having a diameter within the preset range, is grasped.Despite the successful grasp of object 3, our attempt with a plastic cherry that has a slimmer handle, as seen in Fig. S8(C), was unsuccessful.This suggests that this grasping mode of the designed actuator has a diameter requirement for the object's contact region.Object 4 -a tape, represents another grasping mode where the object's geometry is not in the preset range as outlined in Fig. 7A.However, the actuator, drawing inspiration from an elephant's trunk, coupled with the tape's mere 8mm thickness, could navigate through the tape's central hole and pinch it effectively.We attempted to use the pinch mode for grasping a plastic strawberry with diameter of 44mm but failed, indicating this grasping model of the designed actuator also has a requirement for objects' size.
In general, an actuator's grasping capability is influenced by its shape, material, and actuation pressure.Utilizing our toolbox necessitates a user-guided method to determine these aspects.By conducting grasping experiments and progressive refinements, users can achieve specific grasping performances.This iterative approach is also adaptable to various other applications.

Figure 1 .
Figure 1.An overview of the bellow soft pneumatic actuators (SPAs) design toolbox, consisting of two main components: the simulation and the optimization components.The simulation component (left) facilitates the design of bellow SPAs by allowing modification of material properties, such as Young's Modulus, Poisson's ratio and density, adjusting the modular geometric parameters, and customizing module assemblies.It utilizes the Finite Element Method (FEM) to simulate each module's angular deflection, mechanical stress, and strain based on the defined actuation pressure and predicts the actuator's configuration through forward kinematics.It also collects a dataset of the FEM model.The optimization component (right) uses an Artificial Neural Network (ANN) to train on the dataset to provide a surrogate model for optimization.It takes an input of a target shape and divides it into constant curvature segments with length and curvature parameters using a 3D piecewise constant curvature segmentation.Then, a genetic algorithm is employed to optimize the parameters in the design space of a bellow SPA.Finally, a CAD file of the bellow SPA based on the optimal design parameter for matching the target shape can be generated.

Figure 2 .
Figure 2. The design and kinematics of the bellow soft pneumatic actuators (SPAs).A) A bellow-SPA consists of modules.B) The parameterized 2D geometry of the module.C) The deformed module and its kinematics model represented by an arc with length and curvature.D) Rotation angle between adjacent modules.E) The deformed bellow-SPA upon pressurization with an inner line representing its deformed shape.

Figure 3 .
Figure 3.The process of generating the surrogate model.A) The design parameters that are varied in dataset collection.B) The elastic properties of the material.C) Boundary conditions of the half bellow module in the Finite Element Method (FEM) simulation from the cross-section perspective (top) and the deformed stress plot after simulation (bottom).D) The Artificial Neural Network (ANN) that is used to train the surrogate model based on the dataset (top), and the mean square error (MSE) of both training and test data in relation to the change of epochs (bottom).

) where d 1 =Figure 4 .
Figure 4.The shape-matching optimization process, explained in Sec.C in detail.A)-C) shows the piecewise constant curvature segmentation algorithm, in which the input data {p k } mk=0 is first fitted by a 3rd-order B-spline curve controlled by light blue control points {q i } n i=0 , with projected point P k and its tangent vector T k ; then discretized into constant curvature segments using the biarc approximation by interpolating between two end points P i , P e and their tangent vectors T i , T e , based on the control points Q i , Q e and the connection point P c ; the rotation angle ∆ϕ between two segments is ∠C i P c C e .D) shows that for each CC segment represented by shape parameters (L j , κ j ), a module will be designed to match its shape by stacking one or more identical modules.E) shows the output actuator is designed by stacking the previous modules in order with rotation angles ∆ϕ j between segments.

Figure 5 .
Figure 5.The graphic user interfaces of the toolbox SPADA.

Figure 6 .
Figure 6.The 2D shape-matching case: the input shapes of letters "SRL" are segmented in A)-C).D)-F) are the actuator schematics that match the input shapes and are designed by optimal parameters.G) shows the deformed prototypes compared with the input shapes.

7 .
The 3D shape-matching case: A) depicts the process of inspiration drawing from an elephant trunk (edited image © Shutterstock, accessed on August 1, 2023), acquiring the helical shape, and subsequent design of the actuator using our toolbox SPADA.B) showcases a schematic of the actuator with optimal design parameters.C) provides a comparison between the desired helical shape and the actual shape of the actuator under the pressure estimated by the toolbox.D) compares the desired shape and the actual ones of the actuator under escalated pressure.E) demonstrates the actuator's versatility in handling and grasping various objects.

Figure S1 :
Figure S1: The comparison between the Ogden model data (from the work of Abayazid and Ghajari) and the Neo-Hookean model (using the linearly fitted Young's Modulus) for Agilus30™ in the strain range of 0-0.5.

Figure S5 :
Figure S5: The GUI and usage instructions of the optimization component in SPADA (information for each step is highlighted in the same color as the step number icon)

Figure
Figure S6: A) The setup for the 2D shape-matching experiment (top).B) The comparison between the original letter shapes and actuators' real shapes obtained through experiments (bottom).

Table 1 .
Geometric Parameters of the bellow-SPA Module.

Table 2 .
Range and interval of FEM simulation input data for dataset collection.