Conditional Generative Adversarial Network for Acoustic Metamaterial Inverse Design
MetaMaterialGAN solves the acoustic metamaterial inverse design problem: given a target absorption or transmission spectrum, it generates the unit cell geometry that produces it. The system combines a conditional GAN with a differentiable Transfer Matrix Method (TMM) forward solver to ensure physical consistency of generated designs.
Designing acoustic metamaterials for targeted noise control requires solving an inverse problem: what geometry produces a desired absorption spectrum? Traditional approaches (genetic algorithms, topology optimization) require thousands of forward simulations, taking hours to days. MetaMaterialGAN generates physically valid designs in milliseconds.
Target Spectrum ──┐
├──> Generator ──> Geometry Parameters ──> TMM Forward Check
Latent Noise ─────┘ │
v
Discriminator
(real vs. fake pairs)
The pipeline has three components:
-
Differentiable TMM Forward Solver: Computes absorption/transmission spectra from geometry parameters using the Transfer Matrix Method. Implements Helmholtz resonator, quarter-wavelength resonator, and micro-perforated panel impedance models with correct acoustic boundary conditions.
-
Conditional Generator: Maps (target spectrum + latent noise) to metamaterial geometry parameters. Multiple valid geometries can produce similar spectra (non-unique inverse), so the latent noise captures this design space diversity.
-
Physics-Augmented Discriminator: Evaluates (spectrum, geometry) pairs for realism, augmented with a forward-consistency loss that penalizes generated geometries whose TMM-computed spectra deviate from the conditioning target.
- Physically correct TMM solver: Implements the standard transfer matrix formulation (Allard & Atalla, 2009) with proper impedance matching, complex wavenumber propagation, and rigid-backed termination
- Three resonator types: Helmholtz resonators (Ingard, 1953), quarter-wavelength tubes, and micro-perforated panels (Maa, 1998) with frequency-dependent viscous/thermal losses
- Forward-consistency loss: Generated designs are validated against the TMM solver during training, ensuring physical realizability
- Design diversity: Latent space interpolation reveals multiple valid geometries for the same target, capturing the non-uniqueness of the inverse problem
- Interactive dashboard: Streamlit app for drawing target spectra and generating designs in real time
- Fabrication constraints: Generator outputs are bounded to manufacturable dimensions (minimum wall thickness, maximum aspect ratios)
For a stack of N acoustic layers, the total transfer matrix relates pressure and velocity at the input to those at the output:
[p_in ] [T11 T12] [p_out ]
[ ] = [ ] [ ]
[v_in ] [T21 T22] [v_out ]
Each layer contributes a 2x2 matrix based on its characteristic impedance Z_c = rho*c and propagation constant k = omega/c:
T_layer = [cos(k*d) j*Z_c*sin(k*d)]
[j*sin(k*d)/Z_c cos(k*d) ]
The absorption coefficient for a rigid-backed configuration is:
alpha(omega) = 1 - |R(omega)|^2
where R = (Z_surface - Z_0) / (Z_surface + Z_0)
Helmholtz Resonator (Ingard, 1953):
- Neck impedance accounts for viscous losses and end corrections
- Cavity modeled as lumped compliance
Quarter-Wavelength Resonator:
- Resonance at f = c/(4*L_eff) with end correction
- Thermo-viscous losses via complex wavenumber
Micro-Perforated Panel (Maa, 1998):
- Impedance from perforation ratio, hole diameter, and panel thickness
- Includes viscous and edge effects per Maa's analytical model
git clone https://github.com/yourusername/MetaMaterialGAN.git
cd MetaMaterialGAN
pip install -e .python data/generate_dataset.py --n_samples 10000 --output data/training_data.npzfrom metamaterialgan.training.trainer import MetaMaterialTrainer
from metamaterialgan.training.config import TrainingConfig
config = TrainingConfig(epochs=300, physics_weight=10.0)
trainer = MetaMaterialTrainer(config)
trainer.fit("data/training_data.npz")from metamaterialgan.models.generator import MetaMaterialGenerator
import torch
generator = MetaMaterialGenerator.load("checkpoints/generator.pt")
target_spectrum = torch.tensor([...]) # 128-point absorption spectrum
designs = generator.generate(target_spectrum, n_designs=5)streamlit run app/streamlit_app.pyTraining pairs (geometry, spectrum) are generated by:
- Sampling geometry parameters uniformly within fabrication bounds
- Computing absorption spectra via TMM at 128 frequency points (100-4000 Hz)
- Storing as (geometry_vector, spectrum_vector) pairs
No external data or COMSOL licenses required.
@software{biswas2025metamaterialgan,
author = {Biswas, Samarjith},
title = {MetaMaterialGAN: Conditional GAN for Acoustic Metamaterial Inverse Design},
year = {2025},
url = {https://github.com/yourusername/MetaMaterialGAN}
}- Allard, J.F. & Atalla, N. (2009). Propagation of Sound in Porous Media. Wiley.
- Ingard, U. (1953). On the theory and design of acoustic resonators. JASA, 25(6), 1037-1061.
- Maa, D.Y. (1998). Potential of microperforated panel absorber. JASA, 104(5), 2861-2866.
- Mirza, M. & Osindero, S. (2014). Conditional Generative Adversarial Nets. arXiv:1411.1784.
MIT License
Samarjith Biswas, Ph.D. Research Scientist III, University of Arizona, New Frontiers of Sound (NewFoS) Center samarjithbiswas.com | LinkedIn