Acoustic Structure Inverse Design and Optimization Using Deep Learning

From ancient to modern times, acoustic structures have been used to control the propagation of acoustic waves. However, the design of the acoustic structures has remained widely a time-consuming and computational resource-consuming iterative process. In recent years, Deep Learning has attracted unprecedented attention for its ability to tackle hard problems with huge datasets, which has achieved state-of-the-art results in various tasks. In this work, an acoustic structure design method is proposed based on deep learning. Taking the design of multi-order Helmholtz resonator for instance, we experimentally demonstrate the effectiveness of the proposed method. Our method is not only able to give a very accurate prediction of the geometry of the acoustic structures with multiple strong-coupling parameters, but also capable of improving the performance of evolutionary approaches in optimization for a desired property. Compared with the conventional numerical methods, our method is more efficient, universal and automatic, which has a wide range of potential applications, such as speech enhancement, sound absorption and insulation.


Introduction
Acoustic structures have been used for centuries to control acoustic waves in terms of amplitude and phase. With extensive achievements in fabrication technology, unprecedented functionalities can be obtained by designing and engineering artificial structures with more complex properties. Recently, many exotic functionalities, such as anomalous refraction/reflection 1,2 , invisibility 3,4 , and novel acoustic sensing 5 , have been realized with fantastic acoustic structures. However, the development of accurate and computationally efficient design and optimization approaches for the acoustic structures is still in the early stages. During the design process, the forward calculation, i.e., predicting the acoustic properties based on the acoustic structures, is well understood with analytical and numerical approaches, such as the lumped-parameter techniques (LPTs), transfer matrix method (TMM) and finite element method (FEM).
Nevertheless, the inverse problem, i.e., inferring acoustic structures from on-demand acoustic properties, is currently a prohibitive task even with the most advanced numerical tools. To search the formidably large design space efficiently, the inverse design procedure is usually guided by optimization algorithms, such as gradient-based 3 approaches and evolutionary approaches. As structural complexity grows, the above methods will take a prohibitive amount of time, which seriously limits the usefulness of such approaches. Therefore, it is of great significance to identify an efficient, universal and automatic acoustic structure design method.
In recent years, deep learning (DL) has emerged as a very powerful computational method. In light of its exceptional success in domains related to computer science and engineering [6][7][8][9][10] , DL has attracted increasing attention from researchers in other disciplines, including materials science 11 , chemistry 12 , physics [13][14][15] , computational imaging 16,17 and microscopy 18 . Moreover, DL has become a radically new approach in the context of photonic and electromagnetic design, such as approximation of light scattering from plasmonic nanostructures [19][20][21][22] and inverse design of the electromagnetic metasurface structure 23 , over the past few years. Recently, DL has also been used to solve the inverse problem of the variable cross-sectional acoustic structure 24 and twodimensional acoustic cloaking 25 . However, both the researches trained the deep neural networks (DNNs) for specific structures, which are hard to be extended to other acoustic structures.
In view of the current problems and previously reported designs, here we propose an efficient, universal and automatic acoustic structure design method to solve the inverse problem. In our method, we analyze acoustic structures by LPT and develop connections between geometric parameters (GPs) and equivalent electrical parameters (EEPs). Then, a DNN is set up and trained to determine the inner rules between the EEPs of the acoustic structures and their acoustic properties. To evaluate the 4 effectiveness of the proposed design method, a multiorder Helmholtz resonator (HR) is designed to realize acoustic insulation at specific frequencies (see Fig. 1). Once design requirements are input into the trained model, the EEPs of the structures will be generated quickly and automatically. Then, the GPs can be calculated through the LPT.
In this example, it has been proven that the trained DNN can not only solve the inverse design problems of acoustic structures more quickly than its numerical counterpart, but also improve the performance of evolutionary approaches in optimization for a desired property. Finally, we design an acoustic filter (AF) to decrease the line-spectrum noise using the proposed design method. This DL approach is an effective design tool for acoustic structure on-demand design and optimization. Considering that various acoustic structures can be analyzed by the LPT exactly in the low frequency range, the proposed approach has a strong versatility and scalability, which can be further extended to other acoustic structures.

Physical Model
Owing to the excellent characteristics of manipulating low-frequency sound waves with subwavelength dimensions, acoustic structures based on HRs have emerged as an attractive option in various fields such as sound proofing 26,27 , asymmetric sound transmission 28 , sound metadiffusers 29 , and acoustic superlens 30,31 et al. However, traditional HRs support only one monopolar resonant mode with a narrow bandwidth.
Therefore, the application of constructed functional devices has been restricted. In the latest research, the multiorder HR, which can generate multiorder resonances, was 5 presented to compensate for the above deficiencies 32 . Figure 1b shows a schematic view of a two-order Helmholtz resonator (THR). The acoustic properties of the THR can be analyzed by the LPT exactly. The relationship between GPs = [ 1 , 1 , 1 , ℎ 1 , 2 , 2 , 2 , ℎ 2 ] and EEPs = [ 1 , 1 , 1 , 2 , 2 , 2 ] is shown in Table 1. Therefore, the forward problem of the THR model can be solved satisfactorily through the LPT. The acoustic impedance of the THR can be written as follows: where = 2 is the angular frequency. From Eq. (1), the THR with two neck-andcavity substructures can induce two discrete resonant modes. Therefore, when the THR is placed as a side branch of a tube, there are two sound transmission loss (STL) peaks corresponding to the two resonant modes which are shown in Fig. 1b. In practical applications such as sound insulation, we usually design acoustic structures according to noise spectra. That is, we need to infer the EEPs of the THR from a measured or desired STL spectrum. However, solving this inverse problem is still a major challenge, because we must solve a six-degree equation of resonant frequency during the inverse design process (see Method). The classical Abel-Ruffini theorem states that the general univariate polynomial equation of degree is solvable by radicals if and only if is less than five 33 . Therefore, no analytical solution of the inverse design problem of THR is known, and numerical methods need to be used.
Considering that the inverse design problem of THR involves multiple strong-coupling parameters, DNN is suitable for avoiding time-consuming numerical methods in the design process. Table 1 Relationship between GPs and EEPs. Here, = 2 ℎ is the volume of the i th -order cavity ; 0 is the static air density; 0 is the sound speed; and is the viscosity of air. . The values of the physical constants can be seen in Table S2.

8
Our goal is to use a DNN to solve the inverse design problem of the STL spectrum.
The EEPs, that would most closely produce the target STL spectrum, can be determined based on the trained DNN. The GPs can be calculated based on the EEPs through the LPT (see Table 1). Here, we propose a fully-connected neural network as shown in Fig.   1c. A desired STL spectrum = [ 1 , 2 , 3 , … , ] is taken as the input. The STL spectrum is sampled from 101 Hz to 600 Hz with a step of 1 Hz. Thus, the number of inputs is n = 500. The outputs = [ 1 , 1 , 1 , 2 , 2 , 2 ] are the EEPs corresponding to the designed structure.
The datasets were generated using LPT. To generate a sample, first, we sampled randomly within the given ranges of the GPs and obtained a group of GPs. Next, the EEPs and the STL spectrum could be calculated through the LPT (see Method). To make the model training easier, the samples should have good performance in sound isolation and be distribute uniformly in the frequency range of interest. Therefore, the samples were selected during the process of data generation (see Method). Figure 2a shows the distribution of the filtered samples. The two resonant frequencies 1 and 2 of the samples in the datasets cover the frequency range of interest. The average value of the STL at the resonant frequency is over 10 dB.
The dataset, which contained 195000 samples, was split into training, validation and test sets (80%, 10% and 10%, respectively) to train the DNN. The inputs were normalized, shuffled and then fed into the network, which can accelerate convergence of the algorithm. The mean square error (MSE) was used to represent a loss function between the normalized and desired output. The train loss was used to generate the 9 gradients, and the network weights were updated by the Adam algorithm to minimize the discrepancy 34 . The hyperparameters (for example, number of hidden layers, neurons and learning rate) were set according to the performance on the validation set. We utilized the batch normalization technique to improve the convergence speed of the training 35 . In addition, the dropout regularization technique was employed to avoid overfitting 36 . Ultimately, a fully connected network with three hidden layers was selected. The numbers of neurons of each hidden layer are 450, 250 and 220 respectively. The learning rate is set as 0.001, and the batch size is set as 256. We stopped training when the validation loss stopped decreasing, and the learning curve of the DNN on the validation set is shown in Fig. 2b

Fig. 3 Concept schematic of the design process.
Here, we show an example of designing the structure of THR using the trained DNN to realize acoustic insulation at specific frequencies. The concept schematic of the design process is shown in Fig. 3. First, we need to certificate the goal of the design.
Here, the target resonant frequencies are set as 1 target = 150Hz and 2 target = 250Hz, where the values of the STL are at least 10 dB. Therefore, we can generate a group of curves as the desired STL spectra according to the requirements, even though most of the spectra may not have a corresponding structure. We feed these spectra into the trained DNN and obtain the predictive RMC parameters. Then, the GPs can be calculated through the LPT. Finally, we can calculate the real STL spectra by the TMM (see S1 of the Supplementary Information) and select the most qualified structure.  Here, 1 ( ) and 2 ( ) are the real resonant frequencies of the structure whose GPs are denoted as .
In Fig. 4b, we show the AERF varying with the GPs. The resonant frequencies are more sensitive to changes in 1 and 2 . Then, we choose these two parameters to analyze the optimality of the solution provided by our DNN. In the analysis, the radii of the cylindrical necks 1 and 2 of the selected structure are changed within the range of ±10%, while other GPs are unchanged. Then, we obtained a group of new structures around the selected structure and calculated their AERFs of them. Figure 4c shows the AERFs, which can be regarded as a function of 1 and 2 . It is clear that the selected structure provided by the trained DNN is almost the optimal solution within the range of observations, which demonstrates the accuracy of the proposed design technology.

DNN aided optimization method
In section 2.2, we focus mainly on the design precision of the resonant frequencies of the structure, while the value of the STL at the resonant frequencies is just slightly higher than 10 dB. In practical applications, the sound insulation effects are usually expected to be as good as possible, and need to be realized through optimization methods 37 . One of the mainstream methods is through evolutionary algorithms such as genetic algorithm (GA) 38,39 and particle swarm optimization (PSO) 40 . However, evolutionary approaches always take a prohibitive amount of time, which greatly limits their usefulness. One of the reasons is that the initial condition of the algorithms is not good enough, so we often need to search the parameter space over dozens/hundreds of 13 generations to gradually approach the optimization target. Now that an arbitrary STL spectrum can be designed using the proposed DNN with little effort, we can further use it to provide a good initial condition for the evolutionary algorithms, i.e., the initial population would include a certain number of elitist individuals provided by DNN. This step can be regarded as providing a prior knowledge for optimization problems.
Here, we want to maximize the average value of the STL at the target resonant frequencies, which can be recast as  Fig. 5. A good initial condition can not only effectively accelerate convergence 14 velocity, but also improve the results of the optimization. Therefore, the DNN-aided optimization method is feasible and more efficient for optimizing the acoustic structure.
Details about the optimization can be found in S3 of the Supplementary Information.

On-demand design of the acoustic filter
In practical applications, we need to filter out the multi-frequency line-spectrum noise in the background environment, and even achieve broadband sound insulation in a certain frequency range, requiring us to design a combined filter for specific noise frequencies. The traditional design method needs to perform the optimization for each noise frequency, so the efficiency is very low. In comparison, it takes only a few seconds to complete the design process using our design strategy. Here, we demonstrate an 15 example of designing an AF to decrease the line-spectrum noise at four frequencies: 150 Hz, 200 Hz, 250 Hz and 300 Hz. To realize four resonant frequencies, the AF is a combination of two THRs. The two THRs were designed using the DNN approach mentioned in section 2.2, with the photo and GPs shown in Fig. 6a. The STL spectrum of the AF, which is shown in Fig. 6b, is measured in a square standing wave tube (see Method). There are four transmission loss peaks at 150 Hz, 200 Hz, 250 Hz and 300 Hz, corresponding to the four resonant modes of the two THRs. These results confirm the design is very precise.
To evaluate the effectiveness of the AF, a pure voice mixed with noise at the above frequencies impinges from the left port of a square tube. A microphone is used to receive the signal at the right port of the waveguide. We performed the measurements with and without AF as a side branch of the tube. The time-domain waveform and the spectrogram of the signal filtered by the AF are shown in Fig. 6d and f, respectively.
For comparison, the time-domain waveform and the spectrogram of the unfiltered signal are shown in Fig. 6c and e, respectively. The proposed AF significantly decreases the line-spectrum noise and improves the speech clarity of the original signal (the sound before and after filtering can be heard in the Supplementary Video). The experimental results prove that our approach can achieve the on-demand design of AF for many applications, such as noise reduction of the engine, helicopter and UHV transformers.

Discussion
In this paper, we introduce a novel DL approach for acoustic structure design based solely on desired acoustic properties. We designed, trained and tested the proposed design method, which shows a very accurate prediction of the geometry of acoustic structures with multiple strong-coupling parameters. Moreover, the trained model can also be used to aid evolutionary algorithms in completing the optimization task more efficiently. Compared with the conventional method, the proposed DL approach shows a significant improvement in efficiency, an acceleration of the design process and an obvious reduction in both computational and man-powered resources.
where and are the real part and imaginary part of 2− , respectively; 0 = 0 0 is the acoustic impedance of the air; and is the cross section of the tube. Eq.
(3) shows that STL reaches its maximum value when the imaginary part = 0 .
Therefore, we let = 0 and simplify the equation. Then, a six-degree equation can be obtained: where 0 is the resonant angular frequency. No analytical solution of the Eq. (4) is known, and the parameters in Eq. (4) are strongly coupled.. Therefore, solving the inverse problem remains a major challenge, and DNNs are trained to assist in the design process.

Data preparation:
To generate a sample, first, we sampled randomly within the given ranges of GPs and obtained a group of GPs. Next, the EEPs and STL spectrum can be calculated through the LPT. If the EEPs is in the given ranges and the values of the STL at the resonant frequencies are over 10 dB, the sample is selected for the dataset.
Moreover, to ensure that the distribution of the samples is as uniform as possible, the samples were classified into several groups based on their resonant frequencies. Each group is guaranteed to contain 5000 samples. More details about the data distribution can be found in Table S1 of the Supporting Information.
Numerical simulations: In this paper, FEM simulations were performed to verify the feasibility of our design by using the pressure acoustic module and thermoviscous acoustic module of COMSOL Multiphysics. Plane wave radiation is set on the left side of the calculated fluid domain of the tube. The mesh type is the tetrahedral mesh, and the largest mesh element size was smaller than 1/6 of the shortest incident wavelength, and the further refined meshes were applied in the cylindrical necks.

Experimental measurements:
The experimental THR samples were fabricated using 3D printing technology with a wall thickness of 5 mm. The material used for the samples is Lasty-KS, a type of UV-curable resin, with density of 1.13 g/cm 3 . The acoustic impedance of the Lasty-KS is much larger than the acoustic impedance of air, so the wall of the THR can be regarded as rigid for the sound wave.
The layout of the measurement system is shown in Fig. 6. The two THRs were placed as a side branch of a square tube, where the connection was sealed by plasticene.
As shown in Fig. 6b, the STL spectrum was measured using four 1/4-inch microphones was placed at the right port of the tube to receive the signal, while an acoustic sponge was used as the anechoic boundary at the right port.