## 2 Methodology
### Optimization  
A comparison between the measured data and the corresponding simulated data allows us to find the optimal values of the parameters to tune the simulations to the measurements. To this end, an optimization routine was used to approximate the constants, making the experimental data more consistent with the simulated ones, acting as a calibration. The radios used different crystal oscillators, so the phase measurements were affected by uncertainties. In addition, the phase of the simulated data needed adjustment, as it was difficult to calculate the exact electrical length of the path between the reference planes of Tx and Rx. A further adjustment needed to be made for the amplitudes. The genetic algorithm (GA) from MATLAB was used for performing this optimization, because of its capability of dealing with non-linear functions with mixed integer/rational parameters and because it is a global search algorithm [32]. As the function being evaluated is not critical in terms of computational cost, other algorithms may also perform well. Note that the cost function uses simulated data from a database generated in the parametric study, that is, a limited set of pre-processed scenarios. Due to this, it was not necessary to run new FEM simulations during the optimization. The default parameters were used in the GA, except those that are described in the Results section. In total, 10 parameters were to be optimized: the constants \(c^{\text{(config)}}\) for adjusting the magnitude; the initial index of the samples to be averaged \(i^{\text{(config)}}\); the distance \(d\) to adjust the phase \(d^{\text{(config)}}\), where the superscript \"config\" means \"AIR\", \"MUT\" or \"MET\"; and a weight parameter \(w\), which permits using a unique function to optimize both the magnitude and the phase in a multi-objective approach, as explained in detail later. The vector of the parameters to be optimized was \(x_{opt}=[c^{\text{(AIR)}},i^{\text{(AIR)}},d^{\text{(AIR)}},c^{\text{(MUT)}}, i^{\text{(MUT)}},c^{\text{(MUT)}},i^{\text{(MET)}},d^{\text{(MET)}},w]\). The defined bounds were: \(0.1\leq c^{\text{(config)}}\leq 10\); \(750\leq i^{\text{(config)}}\leq 1000\); \(1\leq d^{\text{(config)}}\leq 2\) and \(0.001\leq w\leq 0.999\). The bounds for \(w\) were not exactly 0 and 1, in order to avoid local solutions that ignored the idea of optimizing both magnitude and phase. The limits for \(c\) meant that the scale could be up to 10 times higher or lower. The limits for \(i\) in the objective function were multiplied by 2560, discarding the range that was more subject to errors. The limits for \(d\) were based on the dimensions of the setup. The wave travels about 0.2 m (in the coaxial cable after the transmitter), plus 2 times \(L_{\text{air}}=0.48\) m (in free space), plus about 0.01 m (MUT thickness), resulting in a total distance of 1.17 m. Considering a multipath reflecting on the floor, the path is about 0.2 m (coaxial cable) plus the distance in free air, which could be approximated by \(2\sqrt{(L_{\text{air}}^{2}+h^{2})}\) plus the thickness of the MUT, where \(L_{\text{air}}\) is the length of the free space path (antenna to MUT) and \(h\) is the height of the antenna above the floor. The result is about 1.54 m.  
However, it was expected that the apparent distances would be a few centimeters different due to a few reasons: (a) log-periodic antennas depend on the frequency [11], and the active elements for the frequencies under study are more to the back of the antenna; (b) the dielectric of the coaxial cable slows the wave, which could be interpreted as a longer path at the same velocity [10]; (c) there was an adapter on Rx matching the connectors (antenna and receiver) and the electrical insertion length is usually somewhat greater than the mechanical insertion length [10]; and (d) the relative permittivity of the MUT was greater than 1.