← All projects
General Robotics Lab · 2023-24 · Duke

Lattice of Springs to Model Waves

Dadmehr Ghasemfar and Boyuan Chen, General Robotics Lab

This work explores the use of simulated data to train convolutional neural networks (CNNs) for spatial understanding using acoustic vibrations, an approach analogous to biological echolocation. The focus is on artificially generating surface sound data using a custom multi-threaded wave propagation simulation based on lattices of spring-mass-dampers. It is tested across a wide range of parameters and characterized. It is also connected to real-world wave phenomenon through modal analysis of Chladni plates. This research earned Duke's Graduation with Distinction.

Amplitude of oscillations at all points for different driving frequencies
Amplitude of oscillations at all points for different driving frequencies.

Seeing With Sound

Numerous species have evolved to "see with sound". For instance, bats and dolphins use echolocation for obstacle avoidance and prey/predator detection. Both sound and light manifest as waves traversing through a medium, interacting with objects before being detected by sensors. Like light waves, sound carries information about the environment. The question that naturally arises is whether we can utilize sound data to infer spatial information in a similar manner.

In BoomBox: Visual Reconstruction from Acoustic Vibrations, Dr. Chen showcased the feasibility of accurately reconstructing visual and height data from surface vibrations, using a specific plastic container for training and testing. The objective of this work is to streamline the training process by incorporating artificial/simulated vibration data, thereby facilitating initial network training on simulated datasets followed by refinement with real-world data.

Diagram of training a network with simulated vibrations
Most of the training happens virtually between the simulation and the network. Real life testing refines the network, which will then be used for localization.

The Simulation

The simulation is based around modelling solutions to the wave equation as a set of connected spring-mass-damper systems. In other words, a collection of points connected to an arbitrary number of neighbors by linear springs (Hooke's law) and dampeners, each with a point mass. The goal was to capture the way individual molecules in a solid are held in equilibrium in a lattice. In this way, a vibration in one particle is propagated across the medium.

For the second simulation we switched to Python, specifically the Taichi package (to incorporate GPU multi-threading). This made computation an order of magnitude faster. It also needed to interface with a 3D physics and collision simulation, so that we could model two 3D objects colliding and then separately model the sound waves in each object based on the contact points and forces. The PyBullet library was perfect for this task.

A marble impacting a table and creating a propagated wave
Three consecutive snapshots of a simulation as a marble impacts a table and creates a propagated wave.

Testing non-rectilinear lattices revealed a flaw. Although the distance between two points is constrained by a spring, the angle between neighboring bonds is not. To remedy this, an angular spring, moment of inertia, and angular dampener are added to the system. The final version can successfully model any shape and is stable for a wide range of stiffness values (k = 40 - 40,000).

STL files of a hand and a cow with their point clouds
STL files of a hand and a cow, with their point clouds and bonds.
Waves propagating through a 3D lattice
Waves propagating through a 3D plate.

Testing and Evaluation

A simulation that does not reflect reality is not scientifically useful. The first test is a speed of sound measurement. A 100x5x5 cm rod with a rectilinear lattice of approximately 50x5x5 particles is created, an impulse is sent through one end, and the response time is measured at the other end. The results match intuition: a higher stiffness results in a faster wave and a higher mass results in a slower wave. From curve fitting, the relationship appears to be c = c1 √(k/m). Fascinatingly, the speed of sound in a solid is given by c = √(E/ρ) for Young's modulus E and density ρ.

For the next test we measured the frequency response of the same rod across several stiffness levels. As expected, each individual curve has a single peak, which can be thought of as the frequency of the natural mode of the rod. As the material becomes stiffer, this frequency increases.

Frequency response for varying stiffness
Output sound magnitude vs input frequency across several stiffnesses.

Chladni Plates

The final test of the simulation is the most fascinating. In the Chladni plate experiment, a thin metal sheet is connected by its center to an oscillator driver and sand is sprinkled uniformly across it. Certain driving frequencies result in 3D vibrational modes on the approximately 2D surface, and the sand quickly accumulates wherever the surface is not moving. Because the shape and boundary conditions are simple, the exact analytical solution can be derived from the wave equation and compared to the stationary points in simulation.

This test gave mixed results. All simulations either matched their corresponding Chladni pattern very well or did not at all.

Conclusion

This work has barely scratched the surface of this complex and powerful field of study. The idea of using a lattice of spring-mass-dampers started out as a trivial little 2D experiment, but every development brought more questions. The videos, photos, and sounds produced from this method are intriguing and promising, and the parameter testing and frequency testing showed overall trends similar to those seen in real solids. However, to really utilize this method we must be able to select material properties and have more confidence in the physical accuracy of the simulation.