Optimization of elastic wave propagation in a reconfigurable medium by genetic algorithms with adaptive mutation probability

We introduce a reconfigurable medium for the manipulation of elastic propagation properties of Lamb waves. It is based on a shape memory polymer (SMP) with temperature-dependent Young’s modulus. Waves are excited by a laser pulse and detected by a laser vibrometer. A two-dimensional temperature field is controlled by a scanning heating laser. We use genetic algorithms to determine optimal distributions of mechanical properties for the following criteria: the wave amplitude has to be maximized at a given location and at the same time minimized at one or two other locations. Due to the reconfigurability of the medium, the optimization process is performed directly on the object of optimization, and not on a numerical or analytical representative, based on a direct measurement of the fitness. The optimized configuration makes the waves propagate away from (or around) the point of minimization towards the point of maximization. We improve the genetic algorithm by adapting the mutation probability of individual genes according to specific criteria, which depend on the surrounding genes (distributed in two dimensions). This provides the advantages: concentrating the mutations in the areas of genetic inconsistencies and counterbalancing the error of the fitness measurement. The method is applicable for the intelligent design of wave energy harvesters, ultrasonic transducers, and analogue wave computing devices.

Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence.Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.

Introduction
Searching for an optimal solution for a given problem is a fundamental engineering challenge.The majority of optimization processes rely on repeatedly iterating two steps: identifying a potential solution and testing it.Their performance depends on the quality of generation of new solutions candidates and on how efficiently the feedback about the fitness of a given solution can be determined.
An assumption made in any iterative optimization is that the parameters to be optimized are reconfigurable in the relevant range.Typically, the optimization is performed on a model whose properties can be changed.In this case, there is an additional assumption of existence of a model that describes the problem with sufficient accuracy.This is unfortunately not the case for many real-case scenarios, given that the computational times to estimate the fitness values increase together with the complexity of models.In this work, we show an alternativean experimental measurement of the fitness value directly on the object of optimization-which must be reconfigurable to meet the above-mentioned assumption.The optimization is performed directly on the real problem, and not on a model.
Among the important optimization problems one encounters in wave engineering, wavefront shaping is certainly one of the most important [1].Shaped wavefronts are used in adaptive optics and elastics to compensate for dynamic aberrations [2][3][4], or focus energy in disordered media at a point of interest [5,6].They are often determined from complex scattering matrix measurements, or other calibration steps, that rely on assumptions such as linearity or time-reversal symmetry, and cannot accommodate arbitrarily complex fitness functions.Here, we demonstrate the direct optimization of a function with 150 binary variables, representing 15 vertical × 10 horizontal positions where the wave medium can be modulated.This modulation corresponds to the change of the propagation and attenuation constants by a local temperature increase (heater state at a specific position represented by a binary value).The output of the function is the fitness value-taken as the difference between the amplitude at the position where it should be maximized and the amplitudes at the positions where it should be minimized.Because of the non-controlled geometry and unknown medium properties, the function to be optimized is not possible to model.
Among the derivative-free optimization algorithms [7], gradient descend and coordinate descend optimizations were less efficient for our application, because of reasons described in the following section (The gradient of the optimized function can be experimentally measured instead of determined analytically).We instead focused on genetic algorithms, which are inspired by the natural evolution process and based on the operators of mutation, crossover and selection applied on a population of solution candidates containing a set of properties (genome) [8][9][10].Each iteration is providing a new generation evolving toward better solutions.
Mutations are essential since they enable exploring a new space of solutions.However, they contribute to increasing the disorder in the population of solutions.Through the generations, the probability that genes (or gene combinations) already in the optimal state are mutated is increased.The fitness of solutions therefore reaches a limit without a chance of approaching its maximal value (at the close-to-optimal solution).The difference between this limit and the optimal value is higher for more complex solutions and for higher noise of fitness measurements.
In this work, we describe a possibility to exceed this limit by providing a specific criterion defining the probability that a specific gene is mutated.This stabilizes and accelerates the optimization process by reducing the chance that ordered/structured parts of the genome are changed, for example, in the case when the fitness value is overestimated for a specific solution.Using the adaptive mutation probability, the interventions in the structured parts of the genome are possible but more methodical.

State of the art: optimization algorithms for wave control
In our review of the state, we focus on the previous works using optimization algorithms for wave propagation control.We divide them to the domains of optics, microwaves, audible sound and ultrasound.
1.1.1.Wave propagation optimization in optics.Spatial light modulators [11][12][13][14][15][16][17] and digital micromirror devices [5,18] opened a broad field of wavefront shaping of light for the purpose of focusing in scattering media.Due to their efficiency and broad field of possible applications, the domain of optics is pioneering the research of optimization algorithms for wave propagation control.
Frequently, the stepwise sequential algorithms [13,14] were used for the optimization as an equivalent of a gradient descent method.Instead of calculating the gradient of the function to be optimized, it was measured by sequentially changing each degree of freedom separately.For the next iteration step, only the changes that provided better feedback value were applied for all parameters at once.Continuous sequential algorithms [13] were regularly used as well, and were an equivalent of a coordinate descent method.In this case, each dimension was sequentially changed and kept in the new state only if an improvement of the feedback value was provided.At iterative partitioning algorithm [11,13], half of the dimensions were randomly changed and kept in this state if improvement was provided.
The key disadvantage of the above mentioned methods was that they require a good repeatability of the measured feedback value.If the function to be optimized was exposed to noise, certain changes could falsely be identified as providing the advantage and thus kept for the next iteration.
Genetic algorithms [5,[15][16][17][18] are more efficient in this situation, where a single iteration represents the measurements on the whole population of solutions at one generation.Surely, certain individual solutions can randomly be overrated.
However, the new generation will compose of multiple different solutions of previous generations, which provides us a certain degree of averaging and a smoother convergence towards the optimal solution.

Spatial
microwave modulators [19][20][21] were used to perform wave field optimization in microwave cavities.Spots of high or low energy at single or multiple frequency bands were achieved using a stepwise sequential algorithm.

Optimization of airborne sound propagation in the
audible frequency range.Being inspired by the previously mentioned works, spatial sound modulators were used to shape sound fields in the audible frequency range.In order to achieve high influence on the sound field by small perimeter variations, the active elements of the reconfigurable devices consisted of membrane or hollow cavity resonators.They were modulated by electromagnetic actuators [22], slider displacements [23][24][25][26], or liquid level height control [27] for the purpose of sound focusing or redirecting.Majority of the previous studies do not describe a systematic iterative optimization, except for two works, where iterative angular spectrum approach [24] and continuous sequential algorithm [22] were used.
1.1.4.Optimization of ultrasound propagation.All the previous works in the domain of ultrasound, describing optimization of the sound field, were addressing modulation of the source (ultrasonic array) and not the propagation medium itself, as it is the case for this work.Optimal transducer placements and optimal excitation forms of ultrasound fields were typically estimated by simulations using numerical or analytical models.Experiments were performed on the optimal configuration.In [28], thickness and diameter of a piezoelectric element, together with acoustic impedance of a backing material were variable parameters addressed by the particle swarm optimization applied on a numerical model in order to archive the desired center frequency and to maximize the echo amplitude of a transducer.The following methods were using genetic optimization algorithms.Element sizes and positions of an one-dimensional piezoelectric transducer array were optimized to achieve maximal ratio between the main and the side loops of the ultrasound field [29].Ultrasonic transducer array configuration and process parameters were optimized to improve focused ultrasonic therapy [30,31].Placements of transducers and the time delays were optimized to achieve specific directivity of the emitted Lamb waves [32].Placement of piezoelectric transducers for a plate with specific geometry for optimal damage detection was estimated [33].
Genetic algorithms have also been used to numerically design the shapes of an acoustic amplifier [34] and a piezoelectric energy harvester [35].Topology of a microstructural material was numerically optimized to control directivity of elastic waves [36].

Knowledge gap
In contrary to all the previous studies addressing the wave field optimization, we obtain the feedback about the quality of an individual solution (fitness value) by performing a measurement at each of the optimizing iteration.As we are able to physically manipulate the propagation medium on demand, our realization do not require a numerical or an analytical model of the system, which are generally not available for complex practical situations.Previous studies in the ultrasound or the domain of elastic wave manipulated only the excitation properties (typically the phase delay and the amplitude).In the audible or ultrasound frequency range, there were previously no realizations of the sound field optimization where the medium itself was modulated.Our method does not require an electroacoustic reconfigurable device included in the medium.As the section to be optimized is separated from the wave source and sensor, our work demonstrates for the first time an equivalent of spatial modulators for the ultrasonic domain and for the Lamb elastic waves.
The suitability of genetic algorithms has not yet been researched for the situation of mechanical waves (for audible and ultrasonic frequency range), where the fitness value is experimentally obtained and therefore subject of higher noise levels.Furthermore, the nature of our method is that it does not base on resonant behavior and is therefore not limited to a narrow frequency range, what was not the case for the previous realizations [19-21, 24, 25, 27].

Genetic algorithms-adaptive mutation probability
Mutation is an important element of genetic optimization processes since it provides new components to the population genome and allows exploring new space of possible solutions.If the mutation level is decreased (low number of mutants and/or low number of mutated genes), there is a high chance that the optimization blocks at a given solution where any small (gene) change would not provide a significant advantage.A bigger change, which might provide an advantage, is inaccessible in this situation.However, if the mutation level is too high, the algorithm becomes unstable and does not converge towards better solutions.It is advantageous to vary the mutation level and provide access to new solutions with both bigger and smaller changes.If the mutations are random (random gene mutations of randomly chosen solutions), the optimization process requires high number of generations to achieve the convergence.Approaching the optimal solution, lower is the chance that a certain mutation will provide advantage without destructing parts of the genome, which are already close to the optimal state.The convergence will stop at a certain level of the fitness value, without reaching the close-to-optimal solution.This effect is more pronounced for larger genome sizes (higher numbers of parameters to be optimized).
In this work, we suggest an adaptive probability of gene mutations.This approach evaluates the consistency of each gene of the solution, according to the previously defined The probability to mutate was calculated by the weighted sum of these two values (d).This approach improved the convergence capability of the optimization process by giving the mutation priority to the inconsistent genes.criteria, which depend on the remaining genome of the solution (neighboring genes).Our approach fundamentally differs to the one described in [37], where the probability is defined for each solution (and not for each gene) and depended on the fitness level.
In the case of wave propagation optimization, we expect a certain degree of consistency.In the optimal state, larger parts of the medium will have similar properties with clear boundaries in-between.We can therefore assume that a gene that is more different from its neighbors has higher chance to have the wrong state and assign it a higher chance to be selected for the mutation.
Figure 1 shows how the probability for the gene mutation was determined.For each gene of a given solution, we counted the number of surrounding genes (in two dimensions) that were different from a central gene (figure 1(b)) S. In order to differentiate between the case where the surrounding genes with the same state lay next to each other (horizontal position 4, vertical position 6 in figure 1(a)) and the case where they were scattered around the central gene (horizontal position 4, vertical position 3 in figure 1(a)), we counted the number of (binary) transition at the circle around the central gene as well (figure 1(c)).Probability of mutation before the normalization p(m, n) for g m,n (gene at the position (m, n)) was calculated from the sum of both numbers, which had both the maximal value of 8: went for all the 8 genes surrounding the.S i had a value of 1 if the gene at the position i was different from the central g m,n , otherwise it was 0. T j had a value of 1 if the two neighboring genes (surrounding the central ) at the transition j were different from each other, otherwise it was 0. The genes at the boundary of the two-dimensional genome space were threated in a way that the bias for the probability estimation was omitted: 5 (or 3 for the corner gene) surrounding genes were considered instead of 8.A factor number k was defined in order to specify the ratio of significance between the number of differed surrounding genes and the number of surrounding transitions.We designated lower significance of the latter with the ratio set to k = 0.25.This provided better convergence of the optimization process comparing to the cases where k = 0.5 or k = 0.In the case described in this work, we considered only the eight neighboring genes closely surrounding the given gene.For the applications with higher genome sizes, we expect that it is advantageous to consider more remote genes as well.Probability of mutation p(m,n) (figure 1(d)) was normalized with the sum of p(m, n) over the whole genome It represented the probability that the will be mutated (its state switched).Please note that the total number of mutated genes was chosen randomly in a specified range.
As it is time-demanding to experimentally obtain the fitness value, we firstly developed the genetic algorithm by a simulation, where the fitness value was determined analytically.Total processing time of one generation was 0.5 s instead of 4.3 min, as it was the case for the experimental study.In order to make the optimization problem similar to the experiment, the solutions consisted of two dimensional arrays of binary values (0 and 1), representing the heating laser turned on or off at a specific two-dimensional position (represented by integer values m and n).For the purpose of simulation, we defined a twodimensional 2nd degree polynomial: The fitness value was defined as: with g m,n being the gene at the integer position m,n.The higher values of this polynomial, closer to its maximal value at (m, n) = (5, 11), delivered higher chance that g m,n would have the value 1, and vice versa.Please note that the parameters of the 2nd degree polynomial and the locations of the two outliers could be chosen differently in a reasonable range, which would, however, provide similar results.Figure 2(b) shows the optimal solution of the optimization problem with the fitness function defined by equation (3).The defined 2nd degree polynomial was negative in the black area and positive in the Sufficient convergence towards the optimal solution was achieved only if the mutation probability of each gene was estimated as described by figure 1.Maximal (dotted line) and mean values (full line) of the fitness value are shown (a) for each generation of solutions using random mutations (red) and adaptive mutation probability (blue).In the latter case, the final solution after 70 generations (d) is very close to the optimal solution (b).This is not the case if the genes are mutated randomly (c) (with other optimization parameters kept identical).The adaptive mutation probability gives advantage to the genes, which have a higher chance to provide advantage in the case of mutation.Consequently, the higher incidence of mutations is in the transition areas of the gene states (e).
white area.The gray area had no contribution to the fitness value because the polynomial had the value 0 at this integer values.For the points (m, n) = (1, 6) and (m, n) = (2, 7) we defined the value 0.1 of the q(m, n), because we wanted to test the efficiency of our optimization algorithms to find the solution with outliers, which might be decreased because of the adaptive mutation probability.
In the simulation part, only the fitness function was changed (defined analytically instead of a measurement), while the other parameters of the genetic algorithm were the same as for the experimental part described in section 2.3.We ran it twice-with randomly selected genes for mutation and with the adaptive mutation probability (as described in figure 1).The maximum and mean value of the fitness function (equation ( 4)) for each generation of solution is presented in figure 2(a).If mutations were selected randomly, the convergence was limited and the algorithm provided the solution, which was far from the optimal solution (figure 2(c)) with the fitness value of not more than −4.86.In contrary, a close-to-optimal solution with the fitness value of 0.92 was reached after 30 generations using adaptive mutation probability (figure 2(d)), which was very close to its maximal value of 0.94.There is a very low chance that same result is achieved at an adequate number of iterations by the random mutations, as it is increasingly more difficult to target the last remaining genes, the change of which would provide an increase of the fitness value.
For the case of adaptive mutation probability, the cumulative number of repeated mutations during 70 generations is represented for each gene in figure 2(e).The adaptive mutation probability caused that more mutations occurred at the areas around the transitions of the gene state.This accelerated the optimization process since more of the fine tuning was required there.The adaptive mutation probability is also advantageous for other optimization problems with the consistent interdependency of the optimization parameters.

Experimental setup
The Lamb elastic waves were excited at a single chosen location by a laser pulse with the wavelength of 532 nm, energy of 10 mJ, duration of 5 ns (full width at half-maximum), and repetition rate of 20 Hz using a Surelite SL I-20 pump laser (figure 3(b)).Pulse energy, shape, and diameter of the laser beam were randomly varying for up to 20%.Waves were detected at two or three chosen locations using PSV-F-500-HV laser vibrometer (manufacturer: Polytec) with 80 signal averaging (figure 3(c)).
The key element of the specimen was a foil with a 0.4 mm thickness made of an SMP, (manufacturer: SMP Technologies Inc, Tokyo), with a glass transition temperature in the range between 25 • C and 90 • C. Its Young's modulus continuously fell by at least a factor of 20 by increasing its temperature a few 10 • C above the room temperature [38].The advantage exploited in this study was that the wave propagation properties were easily reconfigurable by changing the temperature field of the SMP foil.The SMP foil was mounted on a metal frame (figure 3(a)) with the size of the opening 3 cm × 3 cm.The lasers for wave excitation and detection were illuminating the opposite sides of the SMP foils in order to prevent disturbances.A third laser (FL-1064-CW, manufacturer: Changchun New Industries Optoelectronics Technology) used in our experiment was a continuous laser with power of 15 W and wavelength of 1064 nm illuminating the SMP foil on the side of the wave excitation (figure 3(d)).A XG210 twoaxis galvanometer scan head (manufacturer: Mecco) was used to continuously repeat scans on the rectangular surface of 20 mm × 13 mm (figure 3(e)).The scanning pattern consisted of 10 vertical lines.Each line was divided to 15 parts for which the laser shutter state could individually be controlled.In contrary to [39], where the heater shape was unchangeable, this gave us 10 × 15 individually controlled pixels where specimen can either be heated or not.The scan duration of 0.9 s was independent from the laser shutter state.
The Lamb waves were excited in the middle of the longer (vertical) side of the heated area at −1 horizontal position.Its location was constant for all the experiments in this work, while the location of wave detection was varied.
The heated area of the SMP foil was cooled by a roomtemperature air flow, achieved by two nozzles directed to the specimen surface on the side of wave excitation.This delivered us increased spatial temperature gradients.The thermal steady state was achieved approximately after 4 s when heating up and after 6 s when cooling down.

Parameters of the genetic algorithm
The goal of the optimization was to find an optimal binary configuration for 10 × 15 heated positions in order to achieve specific wave propagation properties.The solutions were therefore consisting of 150 binary genes.We chose a relatively small population size of 10, because of the long measurement duration of the fitness value for a single solution, which took approximately 26 s.The flow chart of the genetic algorithm used in the experimental optimization is shown in figure 4. The minimum fitness value of the whole generation was subtracted from each of the measured fitness values.These were subsequently divided by their total sum over the whole corresponding generation.This delivered us the probability that the specific solution was picked as one of the two parents.
The new generation was generated by the random crossover operation-each of the genes for the new genome was randomly picked either from the first or the second parent.
Five of these solutions of new generation were mutated at each generation by flipping the binary gene value.The number of mutated genes was for each mutation chosen randomly in the range between 1 and 6.The mutated genes were chosen using adaptive mutation probability described in section 2.1.The two optimization criteria are described in sections 3.1 and 3.2.

Wave guiding
The goal of the first optimization task was to maximize the Lamb wave amplitude at one point on the SMP foil and at the same time to minimize the wave amplitude at two other points.As a criterion of the wave amplitude level, we chose the maximal signal level in the time domain (at any time, absolute value, and not peak-to-peak), previously filtered to the frequency range between 200 Hz and 40 kHz.This frequency range contained a majority of the ultrasound energy transmitted between the ultrasound excitation and detection points via zero-order antisymmetric Lamb wave mode, which was considered in our study.The points were located on the larger side of the heated area opposite to the wave excitation.The point in the middle was located at the same horizontal line opposite to the wave excitation.The top and bottom points for wave detection were located 8.5 mm higher and 8.8 mm lower, respectively, at the same horizontal position, outside of the area illuminated with the heating laser (14.9 mm horizontally from the wave excitation point).
Three optimization processes were performed.At the first optimization, the wave amplitude at the top point was maximized and the amplitudes at the middle and bottom points were minimized (first row in figure 5).At the second optimization, the amplitude was maximized at the middle point and minimized at the remaining two points (second row in figure 5), and similarly for the last combination maximizing the amplitude at the bottom point and minimizing the amplitude at the middle and top points (third row in figure 5).The fitness value was always defined as where A Max is the maximal signal amplitude at the maximization point.A Min,1 and A Min,2 are the maximal signal amplitudes at the minimization points.The first column in figure 5 shows the mean (full line) and maximal (dashed line) fitness values for the population of each generation during the optimization.The second column in figure 5 represents the gene configuration with the highest fitness value (the optimal configuration of the heated positions) when the optimization process was terminated.The third column in figure 5 shows the infrared image of the SMP specimen at the corresponding configuration of the heated positions.One can observe that the temperature gradients were high enough to distinguish the individual heated positions (pixels).Higher density of the heated positions provided a higher temperature levels and vice versa.
The fourth column in figure 5 shows the elastic wave signal captured at top, middle, and bottom points marked with the letters D. The broadband laser excitation generated multiple modes of the Lamb waves.The first symmetric mode had relatively small amplitude (approximately 0.1 mm s −1 ) and arrived at the time of 0.52 ms.In this work, we focused on the first asymmetric Lamb wave mode arriving later, with the largest amplitude.
The average fitness value of the first generations was close to zero if the heated positions were distributed randomly.In this case, the amplitudes detected at the letters D Min and D Max had approximately the same values.The measurement of the fitness value had a poor repeatability (average standard deviation of 0.09) causing certain solutions being over-or undervalued, which made the optimization more difficult.This was visible by high fluctuations of mean and maximal fitness values of individual generations.However, an improvement was observed on average over the range of several tens of generations.At the current setup and the specific number of generations, the maximal amplitudes at the maximization point were achieved to be approximately three times larger than the maximal amplitudes at the minimization points.This ratio was lower in the case of the wave amplitude maximization at the middle position.In this case the maximum achieved fitness value (defined by equation ( 5)) was 0.8, while it reached the value of 1 for the remaining two cases.The reason for this was that it was easier to minimize the wave amplitude at two neighboring positions (first and third row in figure 5), comparing to the case, where the maximization point was between the two minimization points (second row in figure 5).
It is challenging to interpret the configuration of the heated position suggested by the optimization algorithm (please refer to the following paragraphs), which is due to the irregular sample shape (the foil thickness can vary up to 10%, its mounting to the metal frame could be irregular).These irregularities are included in the optimization loop and influence the final heater configuration, which remain optimal as long as they are kept constant.The increase of the fitness value proves the advantage of the optimal solution.No higher fitness values have been achieved by any manually suggested configuration of the heated positions.
The areas with assorted states (alternating black-white areas in the second column of figure 5) were the areas where it was chosen by the algorithm to increase the temperature to a certain extent only-and not to heat up to the maximum (fully white areas in the second column of figure 5) or to keep the specimen at the room temperature (fully black areas in the second column of figure 5).These transitions were possible because the heat of a single heating position distributed over approximately two neighboring pixels in both directions at the current cooling properties.This explains why it was in certain cases advantageous to keep the state of certain heated positions different from the states of their neighboring heated positions.Please note that these points were object to a higher chance for mutation as described in section 2.1.
There are two characteristics that can be extracted from the optimal configurations of the heated positions.The first characteristic is the corridor of the heated area which guides the Lamb wave towards the maximization point.This is visible as a white horizontal band in the middle vertical positions of the heated area in the second row of figure 5 and a white diagonal band (heading towards the right down corner of the heated area) in the third row of figure 5.This effect is less pronounced in the first row of figure 5.In this case, the optimization appears to use another strategy-the lensing effect.The wave is firstly traveling in the medium of room temperature until reaching the heated area, which focuses the wave energy towards the point of maximization.In this case-at the focusing of the waves at the top position-the maximized peak amplitude arrives earlier in time comparing to the remaining two cases.
The second characteristic is the opposite of the previously mentioned effect.At certain places (e.g. at the vertical position 2 in the second row of figure 5), the areas beside the direct path between the source point and the detecting point are heated, which, by reducing the propagation speed at these areas, causes the maximized wave deflection and guiding of waves away from the point where its amplitude is to be minimized.

Wave detouring for a broadband cloaking effect
In order to test the performance of the optimization algorithm and the experimental setup for wave manipulation, we changed the optimization goal for the fourth time.Previously, the maximization points D Max and the minimization points D Min were at the same horizontal distance from the wave source.The wave amplitudes had therefore approximately the same values before the optimization.During the fourth experimental optimization process, we chose the minimization point to lie at the distance of 9.7 mm from the source, and the maximization After 72 generations, the maximal fitness values (a) (defined as the amplitude difference at these two points) stabilized at 0.1.An optimal solution candidate and its infrared image are shown in (b) and (c), respectively.It provided a reverse of the amplitude levels after the optimization-at this heater configuration, the wave amplitude at the point further from the source had almost twice higher amplitude than at the point closer to the source (e).Before the optimization, the wave amplitude at the point closer to the source was five times larger (d).
point at the distance of 14.8 mm from the source.Both points and the wave source (marked with the letters D Min, D Max , and S in figure 6) lay on the same horizontal line at the vertical position of 8 (10 mm for the infrared image).The initial wave amplitudes before the optimization were around 0.45 mm s −1 for the point lying closer to the source (where amplitude was minimized) and around 0.1 mm s −1 for the point lying at the higher distance to the source (where amplitude was maximized).The fitness value was defined as a difference between these two points, which forced the wave to propagate against its nature and-at least in a certain direction-provided higher amplitudes at a further distance from the source.The goal of this optimization was to guide the wave energy around the minimization point towards the maximization point.
At the initial state before the optimization (at the random configuration of the heated positions) the wave amplitude at the minimization point was approximately five times larger than the amplitude at the maximization point (figure 6(d)).The average fitness value of the first generation of solutions was therefore negative (−0.33).First 10 generations provided a steep improvement.At around the 35th generation, the wave amplitudes at both points had approximately the same amplitude (fitness values around 0).As it was the case also for the previous three optimizations, the measurement of the fitness value had a poor repeatability, which was visible as fluctuations of its maximal and average values over generations.In average, the fitness value was increasing until the 49th generation.
After the optimization process, the amplitude at the maximization point was close to two times higher than at the minimization point, which was lying on the path between the wave source and the maximization point (0.13 mm s −1 vs 0.23 mm s −1 ) (figure 6(e)).The fitness reached the value of 0.1 (figure 6(a)).
An optimal configuration of the heating positions together with the infrared image of the heated area is shown in figures 6(b) and (c), respectively.We can observe an arch around the minimization point D Min (white area of increased temperature above the vertical position 8).The temperature gradient, and consequently a gradient in the wave propagation velocity, guided the wave, bypassing the minimization point on the side with the higher vertical positions.The arch was thinner at the area closer to the source and thicker where the wave was forced to change its propagation direction towards the maximization point D Max .
In the area below the heater vertical position 8 and horizontal position 6 (10 mm vertical direction and 8 mm horizontal direction for the infrared image), one can observe a large heated area.Its purpose was to deflect a large amount of the wave energy away from the minimization point (and partly also from the maximization point).In our case, this strategy appears advantageous in comparison of having two arches on the both sides of the minimization points.
There are multiple possible reasons why the heat arch was guiding the wave around the minimization point on the side with higher vertical position values.The chosen side might depend on the initial random configuration of the heated positions.Certain solutions could randomly be evaluated with higher fitness values due to the high noise levels of the fitness measurement providing certain bias.Alternatively, the preference for a certain final optimal solution could depend on the imprecision of aligning the wave source and the two detecting points on the same line (tolerances below 0.5 mm) or asymmetry of the laser beam profile for wave generation.

Conclusions
We demonstrated a reconfigurable medium, which is capable of local adaptations of Lamb wave propagation velocities.This was achieved by projecting a heating-laser pattern on the surface of the SMP foil with temperature-dependent Young's modulus.The Lamb waves were excited at a static position by a laser pulse and detected at two or three static positions by a laser vibrometer.
We developed a genetic algorithm to optimize the heating-laser pattern in order to achieve the defined propagation properties.In contrary to previous studies, we manipulated the wave propagation medium and not its excitation form.The optimization was performed directly on the physical object by experimentally measuring the fitness value at each iteration.
We simulated our experimental optimization problem using a predefined fitness function, which accelerated the iteration steps and allowed us to improve the genetic algorithm.Our results show that if the gene mutations are applied randomly (random number of randomly picked genes of random solutions), the convergence ability of genetic algorithms is limited.At higher generation number, the chance is increased that close-to-optimal parts of genome are deconstructed by mutations and probability for advantageous mutations is decreased.This problem is especially pronounced in the case of high measurement error of the fitness function.No convergence was achieved if random mutations were used for our experimental optimization task.
We proposed a solution to this problem, which is proven advantageous at least for our specific problem-optimization of binary parameters in two dimensions.Radically improved convergence ability is achieved if the mutation probability is specified for each individual gene according to specific criteria.For our optimization problem, higher mutation probability is set to the outlier genes, which have a different binary state from their neighboring genes or have in their immediate vicinity a higher number of binary transitions.This provides an advantage of keeping (in the later stage of optimization process) larger areas of the same gene state intact, as well as causing mutations to concentrate around the areas of gene state transitions where fine tuning is more necessary.The numerical simulation of the optimization shows that a close-to-optimal solution is reached in more than four times lower number of integrations in the case of adaptive mutation probability.
Furthermore, the adaptive mutation probability is essential for the experimental optimization task, were the fitness value is a subject to a high measurement error.While this error is to a specific extend advantageous for exploring a new space of possible solutions, it can cause certain solutions to have unjustified priority to be used as parents for the subsequent generation.In this aspect, the error of the fitness measurement can have a similar effect as too high number of mutants: volatility of the fitness value without the ability of approaching its optimum.The error of the fitness measurement can be counterbalanced by the adaptive mutation probability in a more efficient way as decreasing the number or mutants.It structures the procedure of exploring new spaces, by increasing the chance that the new mutations occur close to the previous mutation (possibly suggested by the previous overestimation of the fitness value).The fitness function was defined as a difference between the wave amplitude at the point of maximization and the (one or two) points of minimization.A function with 150 binary input variables and a single output parameter (fitness value), which was obtainable only by the experiment, was optimized.This was possible because the binary variables (heater states at 15 × 10 positions) could be modulated in the physical system.We show that the optimization can also be performed if the fitness value measurement has poor repeatability (fluctuations above 30%) using genetic algorithms with adaptive mutation probability.After the optimization process finished, the mechanical properties were achieved to guide the Lamb waves towards the points of maximization (we demonstrate three different configurations of a single SMP film) and to deflect it from the points of minimization.
The forth configuration of the optimization criteria was defined as following: the point of minimization was lying between the source and the maximization point.The solution provided by the genetic algorithm forced the wave to propagate around the point of minimization towards the point of maximization.Comparing these two points, at the optimal configuration of the mechanical properties for this criterion, the Lamb wave at the point further from the source had twice higher amplitude.Before the optimization, this ratio (between the amplitudes at the points of minimization and maximization) was only 0.2.
The optimization method described in this work does not necessitate an understanding of wave propagation properties and is therefore transferable to specimens of different (unknown) properties.The only condition is their reconfigurability.
We expect that the improved genetic algorithms described in this work can be used for other optimization problems with two-dimensional binary optimization parameters as well.Furthermore, the adaptive mutation probability approach is transferable to optimization problems of different nature, if the method to calculate the mutation probability is appropriately adapted.
The described method is applicable for efficient energy harvesting and energy transport with reduced loss, where a reconfigurable wave-guiding device is installed on a source of distributed (ultrasonic) vibrations (various types of machines).Its properties are optimized in a way to concentrate the energy at a certain position where it can be exploited-also in the case if the frequencies of the vibrations or the system properties change.Furthermore, the method can be used for the intelligent design of air-coupled and contact ultrasonic transducers.A reconfigurable medium can be used to optimize material, shape, and excitation form to achieve specific properties of the emitted soundfield-e.g. in order to achieve efficient focusing effect, reduce side loops, or maximize the sound transmission at an impedance-mismatching interface in order to improve performance of the method for a specific imaging purpose.Finally, the property of long-term memory delivered by the reconfigurable medium can be used to perform analogue computing based on mechanical waves.The information carried by the waves could be processed and extracted directly by the wave propagation through an artificially engineered medium using the principles of machine learning [40].

Data availability statement
All data that support the findings of this study are included within the article (and any supplementary files).

Figure 1 .
Figure 1.For each gene of a given solution (a), we estimated the number of surrounding genes, which differed from the central gene (b) and the number of binary transition around the central gene (c).The probability to mutate was calculated by the weighted sum of these two values (d).This approach improved the convergence capability of the optimization process by giving the mutation priority to the inconsistent genes.

Figure 2 .
Figure 2.Sufficient convergence towards the optimal solution was achieved only if the mutation probability of each gene was estimated as described by figure1.Maximal (dotted line) and mean values (full line) of the fitness value are shown (a) for each generation of solutions using random mutations (red) and adaptive mutation probability (blue).In the latter case, the final solution after 70 generations (d) is very close to the optimal solution (b).This is not the case if the genes are mutated randomly (c) (with other optimization parameters kept identical).The adaptive mutation probability gives advantage to the genes, which have a higher chance to provide advantage in the case of mutation.Consequently, the higher incidence of mutations is in the transition areas of the gene states (e).

Figure 3 .
Figure 3. Lamb waves were excited on a shape memory polymer (SMP) mounted in a metallic frame (a) by a pulsed laser (b) and detected by a laser vibrometer (c).Heating laser (d) was projected on the specimen surface by a galvanometer scan head (e) to quasi-simultaneously manipulate its mechanical properties at 15 × 10 binary heated positions, which were the object of the optimization.The temperature field of the specimen was controlled by an infrared camera (f).

Figure 4 .
Figure 4.A flow chart of the genetic algorithm used in the experimental optimization.The fitness value was calculated according to given optimization criteria using the ultrasound signal, which was measured directly on the reconfigurable specimen.

Figure 5 .
Figure 5.The configuration of the heated positions illuminating the same area of the SMP foil was optimized to achieve the given criteria: maximization of the peak wave amplitude at a position marked with the letter D Max and minimization of wave amplitude at the remaining two positions marked with the letters D Min .The three combinations are shown in the three rows.The columns from the left to the right: increase of the fitness value during the optimization process, optimal configurations of the heated positions together with their infrared images, and the corresponding signals captured at the positions marked with the letters D Min and D Max .The position of the ultrasound excitation is marked with the black letter S. The captured signals at a random hater configuration (before the optimization) are shown in the bottom right-hand corner.

Figure 6 .
Figure 6.The wave energy at the point marked with D Min was minimized and at the same time maximized at the point marked with D Max .After 72 generations, the maximal fitness values (a) (defined as the amplitude difference at these two points) stabilized at 0.1.An optimal solution candidate and its infrared image are shown in (b) and (c), respectively.It provided a reverse of the amplitude levels after the optimization-at this heater configuration, the wave amplitude at the point further from the source had almost twice higher amplitude than at the point closer to the source (e).Before the optimization, the wave amplitude at the point closer to the source was five times larger (d).