Simultaneous Noise and Impedance Fitting to Transition-Edge Sensor Data using Differential Evolution

We discuss a robust method to simultaneously fit a complex model both to the complex impedance and the noise data for transition-edge sensors (TES). It is based on a differential evolution (DE) algorithm, providing accurate and repeatable results with only a small increase in computational cost compared to the standard least squares (LS) fitting method. Test fits are made using both DE and LS methods, and the results compared with previously determined best fits, with varying initial value deviations and limit ranges for the parameters. The robustness of DE is demonstrated with successful fits even when parameter limits up to a factor of 5 from the known values were used. It is shown that the least squares fitting becomes unreliable beyond a 10% deviation from the known values.


Introduction
Transition-edge sensor (TES) is a versatile, state-of-the-art radiation detector 1,2 , currently used in many applications, such as Particle Induced X-ray Emission spectroscopy 3,4 , and ground-and space-borne telescopes 5,6 . However, the modelling of transition-edge sensors and finding fits to data has sometimes proven quite challenging in practice, due to the complexities of the thermal circuit of the device 7,8,9,10,11,12 , as two and three block thermal models 13 need to be employed at times. Fitting these models by the standard least squares fitting or with certain initial guesses manually, as was done in references 7,8 , has proven to be tedious or even unreliable.
Here, we propose a different approach to fit TES thermal models, which is independent of the initial parameters given, and can fit both the complex impedance and the noise data simultaneously, even for three-block models,producing more reliable results than the least squares method. It is based on the differential evolution (DE) algorithm 14 , a branch of genetic algorithms. In this study, we fit previously measured data from Ref. 7 Fig. 1 The three-block thermal model used in this study, with additional intermediate, C 2 , and hanging, C 1 , heat capacities. Parameters g i describe the differential thermal conductances connecting the heat capacities, and T i are the steady state temperatures of the blocks. algorithm and with standard least squares 15 , and use the published manual fits in that paper as the control to evaluate the performance.

Three-block thermal model
In Ref. 7 , it was shown that for good fitting of the complex impedance and noise data, threeblock thermal models had to be employed. The model chosen for study here is the so called IH model of Ref. 13 , see Fig. 1. In the IH model, in addition to the heat capacity of the TES sensor element, C tes , there are two additional heat capacities, one intermediate, C 2 , and one hanging, C 1 . The full equations for the complex impedance and for all the noise terms are lengthy, and can be found in full detail from Ref. 13 .
3 Genetic algorithm and differential evolution Differential Evolution (DE) is a high performance, yet simple, optimizer algorithm based on mutation and crossover of the trial argument vectors of the optimized function. 14 DE is initialized by selecting a number of initial population entities (typically D-dimensional vectors x i ) that are evaluated with the cost function. In each step, trial vectors are randomly mutated is the mutation factor, and a crossover is performed by randomly mixing the vector elements (y i ) k → (y j ) k of two distinct entities y i and y j . The cost function is then re-evaluated for the decision whether the trial is kept or discarded from the population.
Three different functions are simultaneously fitted to the measured data. The complex impedance is broken down to its real and imaginary parts and used as the first two fit functions. The third function comes from the total TES current noise, including a constant (4 pA/ √ Hz) 2 SQUID noise component. The cost function to be minimized for both the DE and LS fitting methods is the sum of squares of the errors of absolute values |fit value -data|, summed over the real and imaginary parts of the complex impedance and the noise. For the noise data and fit, and additional log 10 is taken prior to the subtraction. All the calculations are done with Python 3.7, NumPy version 1.15.1, SciPy version 1.1.0 and both of the optimization algorithms are from the package scipy.optimize: least squares and differential evolution. The least squares fits are done with the trust region reflecting method 16 . The DE strategy was "best2bin", and following parameters were used for the algorithm: population size 15, mutation 1.8, recombination 0.1, tolerance 10 −7 , and absolute tolerance 0. No seed was was chosen, in order to see if the fit found is always the same. Polishing was used, which runs scipy.optimize.minimize with limited memory Broyden-Fletcher-Goldfarb-Shanno algorithm and initial population was determined by "latinhypercube".

Calculations and results
A total of six fitting parameters were chosen to be free parameters for the fitting tests: All the three heat capacities of the model, the two steady state temperatures T 0 and T 2 , and one of the thermal conductances, g tes,2 . g tes,1 was kept fixed at the values determined in Ref. 7 , and g 2,b is not free anymore, if g tes,2 , T 0 and T 2 are set, as the overall dynamic conductance to the bath is known from the I-V measurements 13 .
For the estimation of initial values, the Corbino geometry of the devices of Ref. 7 allows for a reasonable estimation of the heat capacities C tes and C 1 , but very little is known beforehand on C 2 , the "excess" heat capacity. The TES (T 0 ) and the intermediate block (T 2 ) temperatures have certain limits that they follow, but are typically not exactly known. A good initial guess for the TES temperature can be calculated from the I-V curves, based on the bias point dissipated power P = IV and its measured bath temperature T bath dependence, n . The intermediate block temperature is somewhere between the TES temperature and the bath temperature, depending on the values of g tes,2 and g 2,b . Fig. 2 shows the obtained DE (red) and LS (blue) fits of complex impedance and noise at several bias points, with a 10 % deviation of the parameter limits from the manual control fit 7 (yellow). We see that both methods, in this case, give reasonable fits, with the DE method giving slightly better results. In Fig. 3, we show the effect of increasing the parameter limits significantly for the DE algorithm, in the case of noise data, to demonstrate its robustness. For the factor of five deviated DE fits, the results differ only from the manual control fit by slight changes in the Johnson and phonon noise components. Looking at each one individually, they both look as reasonable solutions, and both could be considered physical solutions. For the DE fits with factor of 100 deviated limits, the total noise fit is still reasonable, but the actual fitting values show that the TES temperature is pushed lower than the intermediate block temperature, hence rendering the solution unphysical. Thus, one should help the algorithm with all the intuition available. In this case, we could have limited the TES temperature to a small deviation from a calculated value, or in general, we could limit the fit parameters to below ∼ one order of magnitude from the known or estimated parameters. In this case, DE reproduces the "known" fit values to a very small margin (less than a percent), or gives another physically possible solution, as shown in Fig. 3. Finally, we compare both algorithms with the same lower and upper parameter limits in Fig. 4, with several different runs (initial conditions). For the least squares fit, the initial guess is randomized from the control fit parameters 7 by an additional factor of ±1%,±10%, or ±20% for the 1%,10%, and 50% deviated limits, respectively. As shown in Fig. 4, The DE algorithm is robust, but the least squares fitting does not provide reliable results for the 10 % and 50 % cases even with these "known" fitting parameters, as it gets easily stuck in a local minimum. This underlines the importance of the accuracy of the initial parameters for least squares, and conversely the robustness of the differential evolution algorithm.

Conclusions and Outlook
We have implemented a robust method for simultaneous fitting of complex impedance and noise data of TES detectors by a differential evolution (DE) algorithm. The three-block thermal model has already been shown to fit this TES data well manually, but with DE, the problem of choosing the initial parameters and the tediousness and unreliability of the fitting process is removed. When the number of fitting parameters is small and the limits are close to the initial or actual physical values, least squares fitting will be faster, finding the solution in a matter of seconds, whereas DE takes roughly a minute. However, a few extra minutes, in the case of less accurate initial estimates, is a small price to pay for the robustness and Fig. 4 (color online): a) Ten randomized DE fits with 1%,10% and 50% limits, b) ten randomized LS fits with 1%, c) 10%, and d) 50% deviation from the initial value, for the same data set. Black dots and lines represent the data for impedance and noise, respectively. The upper limit for the number of iterations for both LS and DE were 5000. For DE, the number of iterations for 1% and 10% limits were usually around 450 and 1400, respectively, for higher deviations the maximum limit was hit. reliability that DE offers. In addition, when running the calculations with larger deviations, multiple different solutions may arise as was shown in Fig. 3. This may require user intervention, in some cases, to drive the system towards a more physical solution. Nevertheless, DE based fitting algorithms can help avoid some of the caveats commonly encountered in multivariable non-linear fitting problems, and in particular, it is a reasonable tool for the data analysis of TES detectors.