# Even Dispersion Design for a Compact Linear Loudspeaker Array with Adaptive Genetic Algorithm
## 2 Excitation Parameters Optimization in Narrowband Case
### Proposed Approaches  
To obtain constant SPL in line AB as shown in Figure 1, the generated SPL should compensate the attenuation in sound propagation because of the varying distance between the array and points in line AB. Since the SPL produced by a point sound source is defined as [39]  
\[L=L_{W}-20\text{log}_{10}(r)-11, \tag{10}\]  
where \(L_{W}\) is determined by the power of the source and \(r\) is distance from the source to the measured point. If the SPL at point A is chosen as the reference, the SPL at the point C in Figure 1 can be given by  
\[R_{ref}(\theta,k)=R_{ref}(45^{\circ},k)+20\text{log}_{10}\frac{OC}{OA}=R_{ref} (45^{\circ},k)+20\text{log}_{10}\frac{1}{\sqrt{2}\text{cos}(\theta)}. \tag{11}\]  
To generate such sound field, an adaptive GA-based approach is proposed for array excitation parameters optimization. The GA is a search algorithm motivated by the [PERSON]'s natural selection theories. Unlike the above mentioned traditional methods, GA can search parallelly for the global optimal solutions among the possible spaces such as the excitation parameters in this paper. Promoted by the crossover and the mutation operators, the individuals that satisfy a predefined goal will survive in the evolution of a population which is similar to the notions of natural evolution. The GA is chosen because the aim is to get the best parameters in the search spaces within a relatively short time. Moreover, it can be handled easily to maintain multiple targets: (1) The target SPL distribution in the audience area. (2) The SPL constraint in unconcerned area (sidelobe of the array pattern). It is a nonlinear problem when the sidelobe is required to be lower than a threshold which can not be solved by the above mentioned traditional methods generally. The sidelobe control is important for practical applications due to that the SPL distribution in sidelobe should be low enough to avoid interference with others. Note should be given that, although the low speed convergence problem is not a big problem for offline excitation parameters optimization, the premature convergence problem could degrade the performance a lot for practical applications. As mentioned above, when extending the adaptive GA to online excitation parameters optimization, the adaptive GA is expected to solve all the two problems of the traditional GA.  
To describe the GA procedure, it is necessary to define the chromosome and the fitness function. The chromosomes, also known as individuals, represent the possible solutions in the search spaces. For simplicity, only the phases \(\alpha(x_{0},k)\) are optimized in the following. The phases for loudspeaker array, range from \(0^{\circ}\) to \(360^{\circ}\), can be encoded and spliced into a binary string. Quantitative accuracy is a parameter for the chromosome binary encoding. For example, if the phases are \(\{\alpha(x_{0,0},k)\ \alpha(x_{0,1},k)\...\ \alpha(x_{0,N-2},k)\ \alpha(x_{0,N-1},k)\}\), where \(N\) is the number of loudspeakers, a chromosome for these parameters can be encoded as \(\{01000\ 0101\...\ 01011\ 11001\}\). New individuals can be decoded into phases for fitness calculation in the selection operator. To obtain a more precise representation of the directivity pattern, the objective function is defined as [40]  
\[O(\theta,k)=a_{1}\sum_{0^{\circ}<\theta<45^{\circ}}\left[\left|R(\theta,k) \right|-R_{ref}(\theta,k)\right]^{b_{1}}+a_{2}\left[\right|\max_{-90^{\circ}< \theta<0^{\circ}}\left(R\left(\theta,k\right)\right)\left|\right|^{b_{2}}, \tag{12}\]  
where \(a_{1}\), \(a_{2}\), \(b_{1}\), and \(b_{2}\) refer to the controlled coefficients. This function requests an optimized individual that should maintain (a) minimum differences between the objective distribution defined in Equation (12) and the optimized distribution defined in Equation (5) with decoded phases, (b) minimum SPL distribution in the sidelobe. Unlike the traditional methods, an exact objective sidelobe distribution is not well considered in the sidelobe control.