# A Feasibility Study for a Hand-Held Acoustic Imaging Camera
## 5 Array Optimization Methodology
### Cost Function Definition  
We recall the cost function formulated to allow optimizing the array layout and beamformer filters for directional acoustic imaging:  
\[J(\mathbf{w},\mathbf{r})=\alpha\iiint_{\Theta,\Phi,F}|B(\theta,\phi,f)-B_{0} (\theta,\phi,f)|^{2}\,d\theta\,d\phi\,df+(1-\alpha)\iiint_{\Theta,\Phi,F}|B( \theta,\phi,f)|^{2}\,d\theta\,d\phi\,df \tag{6}\]  
\(B_{0}(\theta,\phi,f)\) is the idealized beam pattern with unity gain at the main look direction and zero elsewhere. The first term drives the achieved response toward the desired spatial selectivity. The second term balances overall beamformer gain and robustness. \(\alpha\in[0,1]\) controls the trade-off. The integrals are approximated over discrete grids of angles and frequencies. This cost function steers the optimization toward arrays with high directionality for acoustic imaging. It encapsulates the desired balance of sharp focus, minimal artefacts, wide frequency coverage, and robustness within a single numerical  
Substituting into the beam pattern expression gives:  
\[B(\mathbf{w},\mathbf{r},u,v,f)=\sum_{n=1}^{N}\sum_{k=1}^{K}w_{n,k}e^{-j2\pi f(x_{n }\frac{u}{c}+y_{n}\frac{v}{c}+kT_{c})} \tag{13}\]  
This allows for defining a simplified cost function:  
\[J^{\text{tot}}(\mathbf{w},\mathbf{r})=\int\limits_{u_{\min}}^{u_{\max}}\int \limits_{v_{\min}}^{v_{\max}}\int\limits_{f_{\min}}^{f_{\max}}|B(\mathbf{w}, \mathbf{r},u,v,f)-1|^{2}+C|B(\mathbf{w},\mathbf{r},u,v,f)|^{2}\,df\,du\,dv \tag{14}\]  
The filter coefficients \(\mathbf{w}\) can then be analytically extracted into a quadratic form with a closed-form solution:  
\[J^{\text{tot}}(\mathbf{w},\mathbf{r})=\mathbf{w}^{\intercal}\mathbf{M}\mathbf{ w}-2\mathbf{w}^{\intercal}\mathbf{r}+s \tag{15}\]  
Further, the robustness integrals over \(A_{n}\) can be approximated in closed form. The microphone positions \(\mathbf{r}_{n}\) are then numerically optimized using simulated annealing to avoid local minima. Iterative stochastic perturbations escape suboptimal configurations based on the cost. This joint optimization determines robust array geometries and filters for directional imaging. Performance is evaluated using metrics such as directivity \(D(f)\) and white noise gain \(WNG(f)\). The expected beam pattern power \(E\{|B(\theta,\phi,f)|^{2}\}\) is also incorporated to account for microphone imperfections. Minimizing tolerance to errors improves reliability. This framework enables the designing of robust, compact arrays tailored for spatial acoustic imaging over desired bands. The new cost function is a good approximation of the original one, allowing the number of integrals to be reduced. The vector \(\mathbf{w}\) can be extracted from the multiple integrals in the robust cost function obtaining a quadratic form in \(\mathbf{w}\)[18]. With ideal filters derived analytically, the microphone locations \(\mathbf{r}_{n}\) are optimized stochastically. A simulated annealing approach is used to avoid poor local minima. Iterative perturbations to \(\mathbf{r}_{n}\) are accepted probabilistically based on the cost, allowing escape from local minima at high process \"temperatures\" that are gradually cooled. After sufficient iterations, the microphone layout converges toward a configuration with scattering tailored to enhance directional sensitivity and suppress off-target responses. The joint optimization determines array geometries and beamformers customized for compact acoustic imaging over specified bands. For a fixed microphone displacement, the global minimum of the robust cost function can be calculated in a closed form. Conversely, the presence of local minima with respect to the microphone position prevents the use of gradient-like iterative methods. The final solution is given by a hybrid strategy analytic and stochastic based on the Simulated Annealing algorithm [36; 45] (Figure 11). The steps are:  
* Iterative procedure aimed at minimizing an energy function \(f(y)\). * At each iteration, a random perturbation is induced in the current state \(y_{i}\).