Introduction

An artificially synthesized material with periodically varying acoustic properties is called PnC. Their properties are best described by a phononic band diagram which can have a frequency regime in which excitation is forbidden and called PnBGs. PnBGs are primary characteristics that can be used to engineer novel phononic devices. including filters, cavities, and sensors.

Calculating the PnBG via Finite element method (FEM), plane wave expansion, finite difference time domain method etc., is a computationally expensive task which depends upon numerous parameters and exploring each structural combination with wide parametric range is time consuming and challenging [1, 2].

A computationally inexpensive method is needed to speed up the optimized phononic crystal search process. Now a days the complex relationship between high dimensional output and input can easily be created using ML models, furnishing with enough dataset. In this work we proposed an active learning approach to enhance the prediction tendency and exploring the enlarged bandgap using ML model [3] with smaller dataset as compare to previous studies [4]. For instance, the quick prediction by ML model for enhancing thermal [5], mechanical [6] properties or designing on demand meta structures [7] have been presented successfully. Thus, developing a relationship between the spatial properties and bandgap via training ML model over sufficient large dataset [8] enables us to define the shape variables as a controlling knob to explore enlarged bandgap structures. Here the ML model acts as a surrogate for developing the relationship between cavity structure and bandgap. Our investigation is confined to resonator devices for exploring their potential of suppressing the sound via reflection and absorption, simultaneously. Firstly, we proposed the steps for obtaining the enlarged bandgap structure via active learning. Then comparison with non-gradient optimization is presented. Lastly the experimental realization and verification is discussed [4].

Simulation and experimental method

Data generation

In this study an optimized shaped single opening resonator is searched based on the open curve polygons to achieve the objective of enlarged PnBG. The length of the unit cell is fixed to \({a}_{1}=22 mm\), and the material used for cavity is polylactic acid (PLA). A total of 36 control points is generated inside the unit cell to construct variable thickness cavity which are reduced to 18 control points due to symmetry. Considering n-gon with radius as \(r=cos\left(A\right)/cos\left(B\right),\) where \(A=\uppi /n\) and \(B = \theta_{i} - \frac{2\pi }{n}*\left[ {\frac{{n\theta_{i} + \pi }}{2\pi }} \right]\) To get the maximum possible value of \({r}_{max}\left({\uptheta }_{i}\right)\) we use \({r}_{max}\left({\uptheta }_{i}\right)=r\left({\uptheta }_{i}\right)\cdot {a}_{1}/2sin\left(\uppi /4\right)-{a}_{1}/20\). Thus, the minimum distance of point is \({r}_{min}\left({\uptheta }_{i}\right)={a}_{1}/20\) and maximum distance is given by:

$$r_{max} \left( {\theta_{i} } \right) = \frac{{cos\left( {\frac{\pi }{n}} \right)\frac{{a_{1} }}{2}}}{{cos\left( {\theta_{i} - \frac{2\pi }{n}*\frac{{n\theta_{i} + \pi }}{2\pi }} \right)\sin \left( {\frac{{\uppi }}{4}} \right)}} - \frac{{a_{1} }}{20}$$
(1)

where n is the number of corners i.e., 4\(,{a}_{1}\) is the lattice constant and\({\theta }_{i}\in \left[\text{5,25,45,65,105,120,135}, \text{150,165}\right]\). The structural area can be minimized to circle and maximized to square as shown\*MERGEFORMAT Fig. 1a. Firstly, the shape is prepared in MATLAB then it is transferred to COMSOL for bandgap calculation via livelink. It is noteworthy to mention that with this configuration neck of the structure can also be obtained.

Fig. 1
figure 1

a Shapes of unit cell with minimum to maximum value of radius i.e., \({\text{r}}_{\text{min}}\) to \({\text{r}}_{\text{max}}\). b Workflow chart describing our active learning-based optimization. Here dotted rectangle is referred as single generation

Taguchi method (TM) enables us to generate the 1600 orthogonal combination of structural sample points whose eigenvalues are calculated by FEM using COMSOL having 40 levels. Then GPR model is trained by obtained data and employed to train the relationship between the cavity shape and bandgap. We applied 20 fold cross validation which results in a coefficient of determination (\({R}^{2}\)) equal to 0.96. For global search Genetic algorithm (GA) is applied to check if there is any further improvement possible or not. For predicting enlarged PnBG, BO technique is applied, instead of GA as their search domain is local and structure possessing mean bandgap of data set serve as the initial guess, which gradually shifts towards larger values with the expansion of data set [9]. Thus, the optimal structure is derived using BO aided by expedited inference of GPR algorithm. BO predicts 10 new structures whose ground truth are verified via COMSOL simulation and updates the dataset in order to retrain the ML algorithm. This process repeats five times, which results in the addition of 50 data points in each single iteration. To check the convergence (further improvement) GO is applied (as summarized in Fig. 1b and illustrated in Fig. 2).

Fig. 2
figure 2

Output prediction by ML model at different generations. Each generation possess 50 samples points. First row represents the model check via \({\text{R}}^{2}\) value. Only the results of 2 generations (or 100 points) addition in each successive column are shown

Experimental method

To verify the design experimentally PLA material was used to manufacture the model using 3D printing technique. The sound source is excited by a 100 Hz–12 kHz speaker. The signal is obtained via microphone and fed into the MATLAB program for processing. We can identify the bandgap via applying short time Fourier transform to the signal on complete and fundamental harmonic signal.

Results and discussion

The new candidate’s distribution at the large PnBG range compared to the initial data manifests the efficiency of the proposed method as given in Fig. 3a. There exist some structures having no bandgaps which decreases the performance of ML model as they are not captured fully, which can be seen at the tail end of sorted ranking curve of FEM prediction by ML model (see \* MERGEFORMAT Fig. 3b). In Fig. 3 b this weakness can be clearly seen, but it doesn’t affect since our search in confined to maximize the PnBGs. ML model manages to achieve convergence at \({11}^{th}\) generation, whereas GO algorithm continues its searching process at that point, hence superivority of ML model over direct search GO algorithm is evident from Fig. 4a, b, respectively. Structures possess two types of bandgaps: acoustic and Bragg PnBGs. Here irrespective of type, our objective is to enlarge PnBG size between \(n\) and \(n+1\) bands which can be formulated in terms relative bandgap size as follows:

$$\begin{array}{c}\text{Maximize}:f\left({x}_{BG}\right)=2\frac{\left(\text{min}{\upomega }_{n+1}\left(k\right)-\text{max}{\upomega }_{n}\left(k\right)\right)}{\left(\text{min}{\upomega }_{n+1}\left(k\right)+\text{max}{\upomega }_{n}\left(k\right)\right)}\\ \text{Subject to}:{r}_{min}\left({\uptheta }_{i}\right)\le r\left({\uptheta }_{i}\right)\le {r}_{max}\left({\uptheta }_{i}\right)\end{array}$$
(2)

where \(f\left({x}_{BG}\right)\) denotes the gap-midgap ratio between two consecutive bands, \(n\in \left[1-9\right]\) is the band number,\({\upomega }_{n},{\upomega }_{n+1}\) are eigenfrequencies at wavenumber (k) of target bands.

Fig. 3
figure 3

a Distribution of output at different generations. b The ranking sorted by FEA and ML model

Fig. 4
figure 4

a Maximum bandgap w.r.t to generations using two different approaches. b The band diagram of optimized

To find the bandgap of structure a logarithmic sine sweep technique known as Farina analysis, is used whose logarithmic sinusoidal chirp function is given by:

$$x\left(t\right)=\text{sin}\left(\frac{T{\omega }_{1}}{ln\left(\frac{{\omega }_{2}}{{\omega }_{1}}\right)}.\left({e}^{\frac{t}{T}ln\left(\frac{{\omega }_{2}}{{\omega }_{1}}\right)}-1\right)\right)$$
(3)

where t, T \({\upomega }_{1}\text{and }{\upomega }_{2}\) are the instantaneous time, total time, initial and final angular frequencies respectively. BG can be seen from 7000–10500 Hz with 55db dip occurring at 7900 Hz, which can be seen in complete and 1st harmonic simulation, respectively (see\*MERGEFORMAT Fig. 5a, b). The manufactured 3D printed structure and its model is shown in\*MERGEFORMAT Fig. 5c, d, respectively. By comparing the \*MERGEFORMAT Fig. 5 b, e it is found that numerical simulation and experiment has good agreement. The width of the bandgap is not perfectly same as numerical simulation, which results due to structural imperfection.

Fig. 5
figure 5

a, b Fourier transform of completed and fundamental (\({1}^{\text{st}}\text{ harmonic})\) signal. c, d 3D printed model front view and CAD. e Transmission curve simulation showing the BG in range 7000–10000 Hz

Conclusion

In this work we derived the optimal shape of cavity to enlarge the PnBGs using AI assisted optimization. 1600 different shapes structures were obtained via applying TM. The dimensional parameters were used as predictors for ML model training. BO is combined with ML model to predict the enlarged PnBG structure. ML model is retrained after obtaining 10 points and at the \({50}^{th}\) point the convergence is checked via GA routine. AI assisted resonator structure achieves the larger PnBG value earlier compared to GA. The results are validated using experiments.