# Multiparameter Analysis of the Ultrasonic Transducer Transfer Function Using a Genetic Algorithm
## 3 Selection of Matching Layers Using a Genetic Algorithm  
When designing ultrasonic transducers, a significant obstacle is to obtain materials with certain acoustic properties (i.e., mainly impedances), which may be used as matching layers. A solution to the above problem may be to treat the selection of matching layers as an optimization task. In such an approach, candidate materials for a matching layer should be selected from the available materials (with certain properties) in order to optimize a selected parameter that describes the quality of the transducer operation in a particular medium. This article discusses the issue of appropriately shaping the transducer's transfer function. In such a case, the selection of an acoustic matching layer consists of searching the state-space of possible solutions (in this case, various combinations of materials for the matching layer) in order to obtain a certain shape of the function (e.g., a certain bandwidth). When a transducer that has several matching layers is designed from a large number of available materials, the search space may be large, and, therefore, the task may become complex. Solutions to optimization tasks with large search spaces may involve methods based on artificial intelligence, e.g., genetic algorithms. The mechanism behind a classic genetic algorithm can be shown as a series of the following steps:  
1. _An initial population is generated randomly;_
2. _The population is evaluated (selection). Individuals displaying the best fitness take part in the reproduction process;_
3. _Gendtypes of the selected individuals are subjected to evolutionary operators_: 1. _crossover (recombination of the parent genotypes), 2. _mutation (introduction of minor, random changes to the genotypes)._
4. _Creation of a new generation (new population). If the solution is not satisfactory, return to step 2. Otherwise, a solution is obtained_. Publication [7] presents the application of a genetic algorithm in determining the matching layers for piezoceramic transducers, which are operated in air and in water, with  
Figure 2: Transfer functions for a transducer operated in air: (**a**) with one matching layer, (**b**) with two matching layers. a view to obtaining an optimal transmission coefficient value. The article also discusses some basic terminology related to the implementation of a genetic algorithm for the optimal selection of a transducer's matching layers. An important element of the genetic algorithm, which has a significant influence on its effectiveness, is its fitness function. It allows each individual in the population to be evaluated, with the results being used to select the fittest (closest to the optimal solution) individuals for the further steps of the algorithm. The term individual is used to denote a set of task parameters which represent a candidate solution to a problem, and which are encoded in the form of chromosomes. In the case of the problem discussed here, the solution comprises such a combination of k matching layers with defined impedances and thicknesses that allows the optimization of a particular criterion. In this research, the individuals should be evaluated on the basis of the transducer's transfer function. Therefore, it is crucial to select criteria which allow the evaluation of the transducer's transfer function. As the transfer function is used mainly in designing broadband transducers, the transmission bandwidth should be treated as the main criterion. Additionally, when designing a transducer, it is desirable to obtain the flattest possible characteristics within its operating frequency. In some cases, a compromise may be necessary: to increase the transmission bandwidth at the cost of increased unevenness of the characteristics. Here, the unevenness of the characteristics is understood as the difference between the maximum and the minimum value of the transducer's transfer function in the analyzed frequency range. Figure 3 shows the relationship between the transmission bandwidth and the unevenness of the characteristics.