Reprogrammable, in-materia matrix-vector multiplication with floppy modes
Abstract
Matrix-vector multiplications are a fundamental building block of artificial intelligence; this essential role has motivated their implementation in a variety of physical substrates, from memristor crossbar arrays to photonic integrated circuits. Yet their realization in soft-matter intelligent systems remains elusive. Here, we experimentally demonstrate a reprogrammable elastic metamaterial that computes matrix-vector multiplications using floppy modes—deformations with near-zero stored elastic energy. Floppy modes allow us to program complex deformations without being hindered by the natural stiffness of the material; but their practical application is challenging, as their existence depends on global topological properties of the system. To overcome this challenge, we introduce a continuously parameterized unit cell design with well-defined compatibility characteristics. This unit cell is then combined to form arbitrary matrix-vector multiplications that can even be reprogrammed after fabrication. Our results demonstrate that floppy modes can act as key enablers for embodied intelligence, smart MEMS devices and in-sensor edge computing.
I Introduction
Linear transformations, encoded in matrix-vector products, are ubiquitous in modern computing; with applications spanning from deep learning to 3D graphics [1] and data compression [2]. In fact, universality theorems prove that any function can be approximated by a network of programmable linear transformations, interconnected by fixed nonlinear activation functions [3]. This widespread applicability has motivated the development of specialized hardware to compute matrix-vector products, ranging from the well-established Graphics Processing Unit (GPU), to emergent physical computing approaches such as photonic integrated circuits [4] and memristor crossbar arrays [5].
Within the paradigm of physical computing, mechanics has gathered considerable excitement for a range of special-purpose but highly relevant applications [6]: Mechanics offers the capability to directly process signals such as speech [7] or gait [8] without transduction into the electrical domain—facilitating zero-power, in-sensor information processing; it forms the basis for embodied intelligence in soft robotic structures—enabling such robots to mimic the agility and dexterity of living organisms [9, 10, 11], and, when scaled down to microscopic dimensions [12, 13], can perform computations with ultra-low energy consumption [14, 15]—enabling intelligent devices that can operate under extreme power constraints. The overarching challenge in achieving mechanical computation lies in mapping relevant information-processing operations, such as matrix-vector multiplications, into the natural responses of mechanical systems.
In this work, we experimentally demonstrate a soft mechanical metamaterial that computes a matrix-vector multiplication using floppy modes (zero modes). The paper is structured as follows: We start by decomposing the matrix-vector product into a network of elementary operations, each of which will be computed by a single metamaterial unit cell (Fig. 1). Then, we implement this unit cell in a planar network of point masses subject to ideal constraints. The resulting unit cell presents two zero modes that branch and cross—as required by the matrix-vector multiplication, and preserves deformation compatibility when tiled. Afterwards, we investigate, using Finite Element Method (FEM) simulations, how a real metamaterial geometry deviates from the ideal point-mass model model. We use automatic differentiation [16] to adjust the design and preserve accuracy in the presence of nonzero bending stiffness and finite compliance, and discuss the limitations of the metamaterial arising from such real-world effects. Finally, we experimentally realize the metamaterial using water-jet cut rubber, and characterize its displacement using optical flow. We experimentally characterize the metamaterial unit cell, a 2x2 matrix-vector product, and a tunable unit cell that can be reversibly switched between multiple matrix coefficients. We observe that the metamaterial can compute the desired matrix-vector product with remarkable accuracy, even in the presence of fabrication tolerances and material non-idealities. These results demonstrate that floppy modes can be harnessed to implement intelligent responses in elastic systems.
II Design
Among the deformation responses of mechanical systems, floppy modes, or zero-modes, are unique in the fact that they are associated to a vanishingly low amount of stored elastic energy, i.e., they require small forces to actuate. Thus, they are a prime candidate for computation in passive elastic systems where deformations must be driven by the enegy available in the signal. Floppy modes originate in a rank deficiency of the rigidity matrix, caused by either an insufficient number of constraints [17, 18, 19, 20], or by the topological properties of the system [21]. Their global nature and topological connections point towards exciting research questions, but also pose a challenging design problem for applications that require a large number of on-demand floppy modes, such as matrix-vector multiplication (a matrix-vector product requires a number of modes equal to the dimension of the input space). Several approaches towards on-demand floppy modes have been introduced: Combinatorial methods draw from a small set of unit cells with well-defined compatibility characteristics [22, 23, 17]. They can be highly efficient, but are limited by the small number of unit cells and large design space. Techniques based on iterative addition of constraints can accurately produce designs with a few desirable modes, but introduce additional unwanted modes as a by-product [24]. Finally, machine learning methods can identify the number of modes corresponding to a particular unit cell [25], but they do not yet possess the capability to solve inverse design problems. While progress has been made in the particular case of line modes [26, 27, 28, 29, 23], branches and crossings—necessary for the realization of mechanical information-processing circuits—still pose a challenge for these methods. We will tackle the challenge of designing a material with a large set of complex floppy modes by introducing a unit cell with well-defined compatibility characteristics, that can be combined to achieve the desired response.
In this section, we introduce a metamaterial design that performs a matrix-vector multiplication . The input vector is presented to the system by prescribing the displacement of a set of input degrees of freedom, and the output result is read out by measuring the displacement of a different set of degrees of freedom. Since the system should be able to respond to any (small) input vector with no resistance, the space of floppy modes should span all possible input displacement combinations. At the same time, we require the output displacement to be entirely prescribed by the input vector, meaning that the system should not present additional floppy modes. For large input spaces, this involves designing a large number of modes—beyond the limit of direct optimization methods. We can overcome this limitation by decomposing the matrix-vector multiplication as a planar network of computation tiles (Fig 1), whose outputs and are related to the inputs , as and . Each tile can be understood as individually implementing a small matrix-vector multiplication, with the form
(1) |
Each individual computational tile is physically implemented by a metamaterial unit cell. Since unit cells are only required to perform a 22 matrix-vector multiplication, they require only two floppy modes. This simplified requirement can be met with existing floppy mode design methods—here, we solve it by hand-designing the unit cell.
By construction, the tiling in Fig. 1 exhibits the correct number of global floppy modes: Each individual row added to the system will add floppy modes, but will also incorporate constraints ( constraining the input with the output of the upper row, and intra-row constraints). This will increase the number of floppy modes by one, reflecting the fact that the extended system contains an extra input. Adding an additional column will add floppy modes, but also constraints ( constraining the input of each site with the output of the previous column, intra-column constraints plus an extra constraint setting the input of the topmost site to zero, as shown in Figure 1). Since the constraints always connect an output (by definition prescribed) with an input (by definition free), and the directed computation graph presents no cycles, the constraints will neither neither be redundant nor introduce frustration. Such designer compatibility relation is reminiscent of traditional combinatorial design approaches for floppy mode systems [22]. However, here the site is continuously parameterized by , thus, the same design can encode a variety of matrices by designing the individual building blocks. This is a key to our ability to design and re-program the metamaterial.
The unit cell design consists of nine sites (Fig. 2a,b) that can move on a plane. Before introducing any constraints, the sites are free to move along both and axes, and thus the constraint-free unit cell has 18 floppy modes. As a consequence of the Maxwell-Calladine theorem, restricting the unit cell to the two prescriptive modes requires incorporating 16 linearly-independent constraints. To produce an initial guess for the metamaterial design, we start by modelling the constraints as ideal rods, for which bending stiffness is zero; and we consider the displacements infinitesimal, so as not to alter the length of the rods. We incorporate two classes of constraints: Local constraints (Fig. 2a)—represented by a pair of rods connected to a fixed boundary conditions, which restrict the site motion to a specific line along the and axes—introducing a rank-1 condition of the form ; and pairwise constraints, which are realized by rods connecting two sites, resulting in a rank-1 condition of the form between the displacements of the two sites.
The proposed unit cell design is introduced in Fig. 2b. The two floppy modes (Fig. 2c), spanning the two-dimensional input space, can be unterstood as follows: When the input is displaced, the rank-1 conditions introduced by the couplings between sites 2-3, 3-4 and 4-5 cause the output degree of freedom (horizontal displacement of site 5) to follow the input degree of freedom (satisfying the condition required by Eq. 1). At the same time, the condition introduced by the local constraints in site 3 couple its vertical displacement to its horizontal displacement, with a proportionality factor given by . This vertical displacement is then transferred to site 6, and converted to a horizontal displacement, scaled by the factor , and transferred to the horizontal displacement of site 7. Similarly, the displacement is scaled by and , and then transferred through sites 1-4 and 4-7 to the vertical displacement of site 7. The diagonal coupling between sites 7 and 8 ensures that the displacement along the diagonal direction of site 8 matches the diagonal displacement of site 7. This diagonal displacement the projection on (, ), where is scaled displacement of input , and is the scaled displacement of input . This projection amounts to adding the horizontal and vertical displacements together. A local constraint on site 8 prevents the output site to move in the tangent direction to the 7-8 couplings. The output vertical displacement amounts to the projection of the diagonal displacement into the y-axis, introducing a total scaling of . By setting the angles and to compensate for the factor of , and setting the angles and to implement a coefficient , the resulting system satisfies the required input-output characteristics.
The final system retains two floppy after the addition of the 16 constraints (7 local constraints plus 9 coupling constraints). These two resulting floppy modes are plotted in Fig. 2c. Since any prescribed input displacement can be expressed as a combination of these modes, in the ideal rod approximation, this (idealized) matrix-vector product requires no energy to be actuated. The floppy modes in our system are reminiscent to line-modes [26, 27, 28, 29, 23] observed in two-dimensional soft matter systems. However, in contrast with prior works, our unit cell design allows for line modes to branch and cross, as required for the realization of the matrix-vector product.
III Numerical validation
Until now, we have considered a design composed of ideal rods (zero bending stiffness) under infinitesimal displacements. However, these assumptions do not accurately describe the dynamics of experimental samples. To capture the effect of the finite bending stiffness of the rods, we construct a three-dimensional finite element simulation of the metamaterial (see Appendix A). Using automatic differentiation, it is also possible to compensate for some of these errors by fine-tuning the geometry.
Attempting to compensate for real-beam effects by adjusting the beam angles illustrates the limitations of the system (Fig. 3a): For small matrices, we can approximate the objective transformation with arbitrarily high accuracy. However, as the matrix size grows beyond , the optimization algorithm cannot decrease the loss function below a given floor value. The origin of this error can be found in the relation between beam angle and matrix coefficients (Fig. 3c). While systems composed of ideal rods (infinite aspect ratio/zero bending stiffness) can approximate any matrix coefficient, rods with finite aspect ratio can only achieve a maximum matrix coefficient. This limitation arises from the ratio between longitudinal and bending stiffness in finite aspect ratio rods: Increasing rod angles has the effect of stiffening the input of the unit cell. Beyond a specific angle, the decrease in input displacement due to the finite longitudinal stiffness of the preceding rods exceeds the increase in output displacement due to the increase in angle. At this point, the matrix coefficient has reached saturation. We quantify this effect by determining the maximum matrix size that can be represented using a given aspect ratio. To do so, we consider 5 random matrices of each size, and perform an optimization to determine the minimum aspect ratio at which it is possible to achieve arbitrary accuracy. The results are plotted in Fig. 3b)—highlighting a linear relation between aspect ratio and maximum matrix size. Given that MEMS resonators with aspect ratios up to 1000:1 [30] are possible, we anticipate that our results can lead to matrix-vector products with dimensions above 64x64.
IV Experiments
We fabricate and optimize the design on a rubber sheet with a thickness of , using water-jet cutting. The input displacement is prescribed using stepper motors, and the output displacement is measured with a camera and processed using an optical flow algorithm. The experiments on a single unit cell reveal that, in the linear regime (where input displacements remain below a few mm), the displacement transfer matrix coefficients between input and output are within 20% of the target value from the ideal unit. Beyond the linear regime (around 2 mm—for a unit of 250x275mm), the output displacement saturates. Interestingly, the saturation function resembles a sigmoid function. In neural networks, sigmoid functions are one of the most commonly used nonlinear activation functions—thus, the saturation characteristics of the material present an exciting prospect for the realization of full machine learning models in elastic systems. In addition to the sigmoidal-like saturation, the experimental results present two deviations from the ideal response: First, we observe that the response presents some hysteresis—which we attribute to the visoelastic response of the polymer material and non-idealities in the actuator-sample couplings. Second, the linear region is asymmetric—saturation occurs earlier under compressive loads than under tensile loads. Experiments on a metamaterial consisting of two unit cells reveal a similar response—with error between the objective matrix and the measured linear transformation, and similar hysteresis and saturation characteristics.
We now proceed to demonstrate a programmable metamaterial that can be re-configured to implement different matrix-vector products. Reconfigurable floppy modes are an timely area of research, with existing results focusing on controlling the number of modes [31, 32]. The requirements for a programmable matrix-vector product are different, as the number of modes shall remain constant while the mode shape is altered. To allow for multiple possible values for the transformation coefficients, we incorporate additional rods in the site 3, the site that defines , the coordinate transformation. Increasing the number of constraining rods causes the system to be over-constrained—thus eliminating the zero modes. To achieve programmability, only a sub-set of the rods is active in each configuration. We accomplish this by incorporating bi-stable elements into the metamaterial [33]. In particular, we use a variable stiffness compliant mechanism [34], connected to the base of each of the support rods (Fig. 6a). When the compliant mechanism is in the low-stiffness configuration, the rods are free to move, and the constraint does not act into the system. By switching the compliant mechanisms between different configurations, the unit cell coefficient can be switched between three different values (Fig. 6b)—although only two of them present the correct number of floppy modes. The programmable unit cell shows an increased hysteresis due to slack in the fabricated compliant mechanism. There are several avenues to increase the resolution in the matrix coefficients, including using more than four switchable support rods, or cascading multiple unit cells by cascading programmable units.
V Discussion
The present work demonstrated a mechanical metamaterial capable of re-programmable matrix-vector multiplication. The results can be interpreted in the light of the in-materia computing paradigm, where non-traditional material responses—here, floppy modes—are harnessed to perform computations—in this case, matrix-vector products. The key factor limiting the matrix size is the aspect ratio of the supporting beams, with matrix sizes above 64x64 attainable within present technology. Since, relevant machine learning such as phoneme recognition can be efficiently encoded in classifiers acting on a as little as 39 features [35], the proposed passive matrix-vector multiplier can have an enabling role towards passive speech-recognizing MEMS [7]. We have also shown a reprogrammable unit cell where every weight can be adjusted from a pair of values while preserving the number of zero modes. This level of programmability—that can be expanded using more complex designs—has the potential to be applied to relevant problems, as machine learning models are known to be resilient to extreme weight quantization, down to 3 values per weight [36].
References
- Alexa [2002] M. Alexa, Linear combination of transformations, ACM Trans. Graph. 21, 380–387 (2002).
- Kambhatla and Leen [1997] N. Kambhatla and T. K. Leen, Dimension Reduction by Local Principal Component Analysis, Neural Computation 9, 1493 (1997), https://direct.mit.edu/neco/article-pdf/9/7/1493/813763/neco.1997.9.7.1493.pdf .
- Hornik et al. [1989] K. Hornik, M. Stinchcombe, and H. White, Multilayer feedforward networks are universal approximators, Neural Networks 2, 359 (1989).
- Ashtiani et al. [2022] F. Ashtiani, A. J. Geers, and F. Aflatouni, An on-chip photonic deep neural network for image classification, Nature 606, 501 (2022).
- Yao et al. [2020] P. Yao, H. Wu, B. Gao, J. Tang, Q. Zhang, W. Zhang, J. J. Yang, and H. Qian, Fully hardware-implemented memristor convolutional neural network, Nature 577, 641 (2020).
- Yasuda et al. [2021] H. Yasuda, P. R. Buskohl, A. Gillman, T. D. Murphey, S. Stepney, R. A. Vaia, and J. R. Raney, Mechanical computing, Nature 598, 39 (2021).
- Dubček et al. [2024] T. Dubček, D. Moreno-Garcia, T. Haag, P. Omidvar, H. R. Thomsen, T. S. Becker, L. Gebraad, C. Bärlocher, F. Andersson, S. D. Huber, D.-J. van Manen, L. G. Villanueva, J. O. Robertsson, and M. Serra-Garcia, In-sensor passive speech classification with phononic metamaterials, Advanced Functional Materials 34, 2311877 (2024).
- Dion et al. [2024] G. Dion, A. Tessier-Poirier, L. Chiasson-Poirier, J.-F. Morissette, G. Brassard, A. Haman, K. Turcot, and J. Sylvestre, In-sensor human gait analysis with machine learning in a wearable microfabricated accelerometer, Communications Engineering 3, 48 (2024).
- Rafsanjani et al. [2018] A. Rafsanjani, Y. Zhang, B. Liu, S. M. Rubinstein, and K. Bertoldi, Kirigami skins make a simple soft actuator crawl, Science Robotics 3, eaar7555 (2018).
- Hu et al. [2018] W. Hu, G. Z. Lum, M. Mastrangeli, and M. Sitti, Small-scale soft-bodied robot with multimodal locomotion, Nature 554, 81 (2018).
- Yasuda et al. [2017] H. Yasuda, T. Tachi, M. Lee, and J. Yang, Origami-based tunable truss structures for non-volatile mechanical memory operation, Nature Communications 8, 962 (2017).
- Ghadimi et al. [2018] A. H. Ghadimi, S. A. Fedorov, N. J. Engelsen, M. J. Bereyhi, R. Schilling, D. J. Wilson, and T. J. Kippenberg, Elastic strain engineering for ultralow mechanical dissipation, Science 360, 764 (2018).
- Beccari et al. [2022] A. Beccari, D. A. Visani, S. A. Fedorov, M. J. Bereyhi, V. Boureau, N. J. Engelsen, and T. J. Kippenberg, Strained crystalline nanomechanical resonators with quality factors above 10 billion, Nature Physics 18, 436 (2022).
- Masmanidis et al. [2007] S. C. Masmanidis, R. B. Karabalin, I. D. Vlaminck, G. Borghs, M. R. Freeman, and M. L. Roukes, Multifunctional nanomechanical systems via tunably coupled piezoelectric actuation, Science 317, 780 (2007).
- Serra-Garcia [2019] M. Serra-Garcia, Turing-complete mechanical processor via automated nonlinear system design, Physical Review E 100, 042202 (2019).
- Bordiga et al. [2024] G. Bordiga, E. Medina, S. Jafarzadeh, C. Bösch, R. P. Adams, V. Tournat, and K. Bertoldi, Automated discovery of reprogrammable nonlinear dynamic metamaterials, Nature Materials 10.1038/s41563-024-02008-6 (2024).
- Hu et al. [2023] Z. Hu, Z. Wei, K. Wang, Y. Chen, R. Zhu, G. Huang, and G. Hu, Engineering zero modes in transformable mechanical metamaterials, Nature Communications 14, 1266 (2023).
- Czajkowski and Rocklin [2024] M. Czajkowski and D. Z. Rocklin, Duality and sheared analytic response in mechanism-based metamaterials, Phys. Rev. Lett. 132, 068201 (2024).
- Maxwell [1864] J. C. Maxwell, L. on the calculation of the equilibrium and stiffness of frames, The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science 27, 294 (1864).
- Calladine [1978] C. Calladine, Buckminster fuller’s “tensegrity” structures and clerk maxwell’s rules for the construction of stiff frames, International Journal of Solids and Structures 14, 161 (1978).
- Kane and Lubensky [2014] C. L. Kane and T. C. Lubensky, Topological boundary modes in isostatic lattices, Nature Physics 10, 39 (2014).
- Coulais et al. [2016] C. Coulais, E. Teomy, K. de Reus, Y. Shokef, and M. van Hecke, Combinatorial design of textured mechanical metamaterials, Nature 535, 529 (2016).
- Bossart et al. [2021] A. Bossart, D. M. J. Dykstra, J. van der Laan, and C. Coulais, Oligomodal metamaterials with multifunctional mechanics, Proceedings of the National Academy of Sciences 118, e2018610118 (2021).
- Dykstra and Coulais [2023] D. M. J. Dykstra and C. Coulais, Inverse design of multishape metamaterials (2023), arXiv:2304.12124 [cond-mat.soft] .
- van Mastrigt et al. [2022] R. van Mastrigt, M. Dijkstra, M. van Hecke, and C. Coulais, Machine learning of implicit combinatorial rules in mechanical metamaterials, Phys. Rev. Lett. 129, 198003 (2022).
- Lubensky et al. [2015] T. C. Lubensky, C. L. Kane, X. Mao, A. Souslov, and K. Sun, Phonons and elasticity in critically coordinated lattices, Reports on Progress in Physics 78, 073901 (2015).
- Guest and Hutchinson [2003] S. Guest and J. Hutchinson, On the determinacy of repetitive structures, Journal of the Mechanics and Physics of Solids 51, 383 (2003).
- Papka and Kyriakides [1998a] S. D. Papka and S. Kyriakides, In-plane crushing of a polycarbonate honeycomb, International Journal of Solids and Structures 35, 239 (1998a).
- Papka and Kyriakides [1998b] S. Papka and S. Kyriakides, Experiments and full-scale numerical simulations of in-plane crushing of a honeycomb, Acta Materialia 46, 2765 (1998b).
- Glauvitz et al. [2014] N. E. Glauvitz, R. A. Coutu, M. Kistler, I. R. Medvedev, and D. T. Petkie, Mems cantilever sensor for photoacoustic detection of terahertz radiation, in MEMS and Nanotechnology, Volume 5: Proceedings of the 2013 Annual Conference on Experimental and Applied Mechanics (Springer, 2014) pp. 73–79.
- Wu and Pasini [2023] L. Wu and D. Pasini, Topological transformation with emerging zero modes in multistable metamaterials for reprogrammable flexural stiffness, Phys. Rev. Appl. 19, L061001 (2023).
- Wu and Pasini [2024] L. Wu and D. Pasini, Zero modes activation to reconcile floppiness, rigidity, and multistability into an all-in-one class of reprogrammable metamaterials, Nature Communications 15, 3087 (2024).
- Chen et al. [2021] T. Chen, M. Pauly, and P. M. Reis, A reprogrammable mechanical metamaterial with stable memory, Nature 589, 386 (2021).
- Kuppens et al. [2021] P. R. Kuppens, M. A. Bessa, J. L. Herder, and J. B. Hopkins, Compliant Mechanisms That Use Static Balancing to Achieve Dramatically Different States of Stiffness, Journal of Mechanisms and Robotics 13, 021010 (2021).
- Salomon [2001] J. Salomon, Support vector machines for phoneme classification, Master of Science, School of Artificial Intelligence, Division of Informatics, University of Edinburgh (2001).
- Ma et al. [2024] S. Ma, H. Wang, L. Ma, L. Wang, W. Wang, S. Huang, L. Dong, R. Wang, J. Xue, and F. Wei, The era of 1-bit llms: All large language models are in 1.58 bits, arXiv preprint arXiv:2402.17764 (2024).
- Bertoldi et al. [2017] K. Bertoldi, V. Vitelli, J. Christensen, and M. van Hecke, Flexible mechanical metamaterials, Nature Reviews Materials 2, 17066 (2017).
- Czajkowski et al. [2022] M. Czajkowski, C. Coulais, M. van Hecke, and D. Z. Rocklin, Conformal elasticity of mechanism-based metamaterials, Nature Communications 13, 211 (2022).
- Bertoldi et al. [2010] K. Bertoldi, P. M. Reis, S. Willshaw, and T. Mullin, Negative poisson’s ratio behavior induced by an elastic instability, Advanced Materials 22, 361 (2010).
- Paulose et al. [2015] J. Paulose, B. G.-g. Chen, and V. Vitelli, Topological modes bound to dislocations in mechanical metamaterials, Nature Physics 11, 153 (2015).
- Silverberg et al. [2014] J. L. Silverberg, A. A. Evans, L. McLeod, R. C. Hayward, T. Hull, C. D. Santangelo, and I. Cohen, Using origami design principles to fold reprogrammable mechanical metamaterials, Science 345, 647 (2014).
- Zhang et al. [2021] M. Zhang, J. Yang, and R. Zhu, Origami-Based Bistable Metastructures for Low-Frequency Vibration Control, Journal of Applied Mechanics 88, 051009 (2021).
- Fang et al. [2018] H. Fang, S.-C. A. Chu, Y. Xia, and K.-W. Wang, Programmable self-locking origami mechanical metamaterials, Advanced Materials 30, 1706311 (2018).
- Liu et al. [2024] C. Liu, X. Zhang, J. Chang, Y. Lyu, J. Zhao, and S. Qiu, Programmable mechanical metamaterials: basic concepts, types, construction strategies—a review, Frontiers in Materials 11, 10.3389/fmats.2024.1361408 (2024).
- GUYAN [1965] R. J. GUYAN, Reduction of stiffness and mass matrices, AIAA Journal 3, 380 (1965), 10.2514/3.2874 .
- Lee et al. [2022] R. H. Lee, E. A. B. Mulder, and J. B. Hopkins, Mechanical neural networks: Architected materials that learn behaviors, Science Robotics 7, eabq7278 (2022).
- Pishvar and Harne [2020] M. Pishvar and R. L. Harne, Foundations for soft, smart matter by active mechanical metamaterials, Advanced Science 7, 2001384 (2020).
- Melik et al. [2009] R. Melik, E. Unal, N. K. Perkgoz, C. Puttlitz, and H. V. Demir, Metamaterial-based wireless strain sensors, Applied Physics Letters 95, 011106 (2009).
- Baratta et al. [2023a] I. A. Baratta, J. P. Dean, J. S. Dokken, M. Habera, J. S. Hale, C. N. Richardson, M. E. Rognes, M. W. Scroggs, N. Sime, and G. N. Wells, DOLFINx: the next generation FEniCS problem solving environment, preprint (2023a).
- Algamili et al. [2021] A. S. Algamili, M. H. M. Khir, J. O. Dennis, A. Y. Ahmed, S. S. Alabsi, S. S. Ba Hashwan, and M. M. Junaid, A review of actuation and sensing mechanisms in mems-based sensor devices, Nanoscale Research Letters 16, 16 (2021).
- Ham et al. [2019] D. A. Ham, L. Mitchell, A. Paganini, and F. Wechsung, Automated shape differentiation in the unified form language, Structural and Multidisciplinary Optimization 60, 1813 (2019).
- Truesdell et al. [2004] C. Truesdell, W. Noll, C. Truesdell, and W. Noll, The non-linear field theories of mechanics (Springer, 2004).
- Rocks et al. [2017] J. W. Rocks, N. Pashine, I. Bischofberger, C. P. Goodrich, A. J. Liu, and S. R. Nagel, Designing allostery-inspired response in mechanical networks, Proceedings of the National Academy of Sciences 114, 2520 (2017).
- Bilal et al. [2017] O. R. Bilal, A. Foehr, and C. Daraio, Bistable metamaterial for switching and cascading elastic vibrations, Proceedings of the National Academy of Sciences 114, 4603 (2017).
- Lien et al. [1987] S.-L. Lien, M. Shantz, and V. Pratt, Adaptive forward differencing for rendering curves and surfaces, SIGGRAPH Comput. Graph. 21, 111–118 (1987).
- Alnæs et al. [2014] M. S. Alnæs, A. Logg, K. B. Ølgaard, M. E. Rognes, and G. N. Wells, Unified form language: A domain-specific language for weak formulations of partial differential equations, ACM Trans. Math. Softw. 40, 10.1145/2566630 (2014).
- Scroggs et al. [2022a] M. W. Scroggs, I. A. Baratta, C. N. Richardson, and G. N. Wells, Basix: a runtime finite element basis evaluation library, Journal of Open Source Software 7, 3982 (2022a).
- Baratta et al. [2023b] I. A. Baratta, J. P. Dean, J. S. Dokken, M. Habera, J. S. Hale, C. N. Richardson, M. E. Rognes, M. W. Scroggs, N. Sime, and G. N. Wells, DOLFINx: The next generation FEniCS problem solving environment (2023b).
- Scroggs et al. [2022b] M. W. Scroggs, J. S. Dokken, C. N. Richardson, and G. N. Wells, Construction of arbitrary order finite element degree-of-freedom maps on polygonal and polyhedral cell meshes, ACM Trans. Math. Softw. 48, 10.1145/3524456 (2022b).
VI Appendix
VI.1 Simulation and optimization
We simulate and optimize the metamaterial using the finite element package FEniCSx [57, 56, 58, 59]. To do so, we partition the structure into sub-components 7. Each sub-component is obtained by extruding a two-dimensional geometry, composed of lines and circle arcs. The lines and arcs are generated using Python functions, from a set of high-level parameters, such as centers, angles, radiuses and thicknesses. We use JAX to map the high-level parameters into the elementary features (arcs and lines) to allow for automatic differentiation. Automatic differentiation is used to assemble the geometry from a graph of interconnected components. The graph specifies the topological characteristics of the system—i.e., which component is connected to which. Then, by computing the Jacobian of the distances between component boundary contact point with respect to the high-level parameters, , a distance minimization algorithm is capable of automatically constructing the full metamaterial geometry—enforcing continuity between components.
To simulate the system, we extract the stiffness matrix for every component using second-order Lagrange elements and a linear elastic energy function. Since we are only interested in the degrees of freedom located on boundaries; we use the Guyan reduction [45]. This computation allows us to determine the exact, statically condensed component stiffness matrix, that contains only a few hundred rows and columns. The determination of the statically condensed stiffness matrix, requiring a matrix inversion, is performed on the GPU—we found out that, given the relatively small size of each component (a few thousands of degrees of freedom), GPU-based dense linear algebra achieved the highest performance. The matrices for each component can be calculated fully in parallel.
To be able to assemble a full system matrix from the reduced component matrices, we make sure that all connecting boundaries are meshed with identical, regular grids. Then, we assemble the statically condensed stiffness matrix from every component into a global stiffness matrix. This global stiffness matrix can also be decomposed in inner degrees of freedom (corresponding to components that are connected to each other (not accessible from outside the metamaterial), and external boundaries (that correspond to the system inputs and outputs). Since we are interested in the response of the metamaterial to displacements in the external boundaries, we apply a second Guyan reduction. This second Guyan reduction can be very expensive for large systems. Thus, it is performed recursively, assembling intermediate structures with a larger and larger number of components until the full system is assembled.
Once the global stiffness matrix has been statically condensed to remove internal boundaries, we divide its degrees of freedom into input and output displacements,
(2) |
where is the vector of high-level geometric parameters.
The transfer function between input and output displacements can be calculated as . Once this transfer matrix has been calculated, we prescribe the inputs to move along a specified direction—given by the displacement direction of the actuators, and project the resulting output into the direction of measurement. The projection , where and are the input and output projectors, provides the effective implemented matrix . In our case, should match the objective matrix of the design, . The agreement between the implemented and objective matrices can be quantified by defining a loss function of the form
(3) |
The entire evaluation tree, from the component stiffness matrices to the loss function can be automatically differentiated using JAX. Once the change in misfit with respect to the component stiffness matrices has been determined, the gradient with respect to the finite element mesh can be calculated in FEniCSx using the built-in automatic differentiation capabilities in the UFL library [51]. This produces a gradient of the misfit with respect to the mesh coordinates (Fig. 7d), indicating how the mesh should be deformed to improve the matrix-vector multiplication accuracy. This mesh gradient can be projected into a gradient of the boundary coordinates with respect to the high-level parameters (Fig. 7d), producing the gradient of the misfit with respect to the high-level parameters. It should be noted that not all parameter updates are valid; some changes to the geometry will result in disconnected components. To prevent this, we project the gradient into the nullspace of the contact point distances with respect to the high-level parameters, and perform an additional boundary distance minimization optimization to preserve the well-connectedness of the metamaterial.