In Section 4.5 the difference between the results of the simulations and experiments was described, but no conclusion could be drawn as to what led the experiments to deviate from the simulations. The approach taken in this section is to alter each simulation parameter in turn to find what adjustments are necessary to explain the chamber results.
Automated fitting method One software package with automated fitting of com-
plex reactions is in the form of a Matlab toolbox called Potter’s Wheel.301 The only
observables in the chamber were the[Hg]t, jBr2, and[Br2]0. The parameters with no direct measurement and had to be fitted are[Br]0,[Hg]0, krec, kfox, kthm, kabs, kcpaand kcpm. Using Potter’s Wheel it became apparent that the only parameter that could be fitted with low uncertainty was the[Hg]0, which is not surprising as[Hg] was being measured. Without accurate concentration data for the intermediates or products, there is little constraint on the model. Even the[Br2] was constrained only by the experimental uncertainties, as without these limits the reactions rates could adjust to virtually any[Br2]. In fact the reaction scheme did not require any photolysis or Br2 in the chamber at all, as excellent fits could be obtained with just residual Br·and a faster oxidation. Including several experiments in one optimisation did not constrain the parameters better, as there are some reactions, according to the measured data, with near identical conditions but yet had different rates.
It became clear that a completely automated approach using Potter’s Wheel would not produce meaningful results. Instead a more methodical technique was developed whereby only one model parameter was optimised at a time. Rather finding a particular solution the goal of such a ‘sloppy model’304 is to find which parameters
Semi-automated fitting method Automatic fitting of all the parameters at once was ineffective due to the multitude of parameters and lack of constraint. The procedure for semi-automated fitting was to start with the default mechanism (Section 4.3) and alter only one parameter at a time to find the best fit. The initial parameters were the rates in Table 4.12 using the temperature measured in the chamber,[Br2]0 and[Hg]0 were as measured in each experiment. The initial[Br] was, in cases where the Br2 was photolysed before Hg injection, set to the [Br] expected after the elapsed time assuming the default jBr2 and krec. Otherwise it was
set arbitrarily to 108molec cm−3to account for the background photolysis (see next Section). The quality of fit was calculated for each simulation against the experiment, and the model was then run again with different values for one parameter spanning a range of several orders of magnitude. This was then repeated for nine parameters (seven rate coefficients and initial [Br] and [Br2]) each time beginning with the default values. This procedure was then repeated for every experiment.
The fit deviation was calculated as X t (modelt− exptt)2 P t (exptt− expt)2· n (4.11)
where modeltis each time point of the simulated decay, expttis each time point of the experimentally measured decay, and n is the number of points in the time series. This measure is effectively the total of the squared deviations of each point in the experiment, normalised to the total deviation of each experiment. This definition is similar to other measures of goodness-of-fit such as adjusted R2, but with the advantage that in these simulations it gave numbers that were easy to visualise when plotted over the many orders of magnitude studied, something which was important when quickly checking through thousands of fit qualities.
Figure 4.18(a) shows a typical experimental decay of[Hg] with three simulations. This particular example is at−9 °C with an initial [Br2] of 5×10
11molec cm−3. The
only parameter being varied is kthm. Figure 4.18(b) shows how the goodness-of-fit measure changes with the different values of kthm. At the presumed literature rate (red dashed line) the fit is very poor, and this is shown with a large fit deviation. At a much faster thermolysis (dark green line) the fit is better but the decay too slow. At the optimum value of kthm the fit deviation is lowest and the optimum fit achieved.
The value of the optimised parameter is not necessarily realistic, but nonetheless provides insight into the reaction. Neither is the optimum fit necessarily a good fit, but it is the best achievable by tuning this one parameter. For instance the optimum
0 5 10 15 20 25 30 0 50 100 150 200 250 300 350 [Hg] ( × 10 7 atoms/cm 3) time (s) 10-4 10-3 10-3 10-2 10-1 100 101 102 103 fit deviation kthm
FIGURE4.18: Demonstration of fitting procedure where kthmis optimised. In (a) the blue line is the experimental[Hg], the other lines are trial fits whose fit deviation are shown in (b). Lowest fit deviation, and the best fit, is in black.
fit in Figure 4.18(b) (black line) begins less steeply than the experimental decay line (blue). The fit deviation with the optimised parameter is therefore an important metric.
The optimisation could in principle be achieved by Levenburg-Marquardt fitting as used in the NO2 calibration earlier (Section 3.3.1), or indeed any optimisation technique,301 but in practice for learning about the system the trend had to be
visualised. In Figure 4.18(b) for example it can be seen that changes of a factor of 10 or even 100 to the default kthm have no effect on the fit quality, due to the
reaction being an insignificant pathway at lower rates. Each optimisation is based on sampling 200 parameter values, which, over the orders of magnitude studied yields a resolution no worse than 6%.