Integrating cavity based gas cells: a multibeam compensation scheme for pathlength variation

: We present a four beam ratiometric setup for an integrating sphere based gas cell, which can correct for changes in pathlength due to sphere wall contamination. This allows for the gas absorption coefficient to be determined continuously without needing to recalibrate the setup. We demonstrate the technique experimentally, measuring methane gas at 1651nm. For example, contamination covering 1.2% of the sphere wall resulted in an uncompensated error in gas absorption coefficient of ≈ 41%. With the ratiometric scheme, this error was reduced to ≈ 2%. Potential limitations of the technique, due to subsequent deviations from mathematical assumptions are discussed, including severe sphere window contamination.


Introduction
Stringent safety regulations and the need for environmental monitoring are driving a demand for robust and reliable sensing solutions in harsh and hazardous work environments. Optical absorption based gas sensors, with their fast response and high specificity to the gas of interest [1] have found application in these areas. Currently, optical sensors face the challenge of providing a cost effective, commercial product that is compatible with the desired industry and accessible to the end-user who may not have technical expertise in that type of sensor technology [2]. The optical technique applied in this research is based on tunable diode laser spectroscopy, where the laser diode wavelength is scanned across a gas absorption line to give a high resolution determination of the gas concentration. Quantitative absorption measurements are governed by the Beer-Lambert law, which describes the measurement of the gas absorption coefficient at a known concentration as [3] ( ) is the radiant flux transmitted through the cell in the presence of an absorbing medium, Φ i is the radiant flux incident on the gas cell, α is the absorption coefficient (cm −1 ), and L is the optical path length of the cavity (cm). The absorption coefficient is the product of C, the gas concentration (in atm of partial pressure for example) and ε, the specific absorptivity of the gas, (cm −1 atm −1 ). A is the absorbance, a dimensionless quantity defined as the logarithm of the ratio of incident to transmitted radiant power through a sample.
As seen in Eq. (2), the absorbance A is directly proportional to the absorption coefficient, α, and the pathlength L.
Thus sensitivity can be enhanced by increasing the pathlength L; one such way of achieving this is through use of multipass cells. Conventional multipass cell achieve greater sensitivity by using mirrors of various sizes, curvature and distance to produce multiple reflections of the incoming beam, giving a long pathlength in a relatively small volume. However, these mirrors may require precision manufacturing [4] and may be sensitive to degradation resulting from humidity or cleaning processes [5]. Additionally, conventional multipass cells can suffer from formation of etalons both within the cell and from the use of windows, with the consequence that the user may not fully achieve the desired improvement in signal to noise ratio resulting from the increased pathlength [6]. Minimising these effects, as well as avoiding beam overlap whilst achieving a long pathlength, usually requires time consuming alignment. There is also the potential for the system to degrade in environments subject to high levels of vibration, g-loading or thermal expansion / contraction.
Integrating cavities as multipass cells have been demonstrated to be a useful tool for absorption measurements [7][8][9][10]. An integrating cavity consists of an inner surface made from a material providing uniformly diffuse (Lambertian) reflection, such that beams make multiple passes throughout the cavity, providing a long, mean effective pathlength. Note that the term "mean effective pathlength" refers to the equivalent pathlength of a conventional, single pathlength cell that would be required to achieve a comparable absorbance from the same analyte as described by the Beer Lambert law. The resulting pathlength distribution helps to eliminate the periodicity of standing waves and thus also minimises the structured interference fringes often experienced in conventional multipass cells . Integrating spheres can introduce uncertainty resulting from random laser speckle, however this can be minimised through the use of suitably large detection apertures [11].
The Lambertian nature of the material eases alignment tolerances as small variations in the angle of incidence of the incoming beam will not affect the observed radiance at the detector. Furthermore, due to this scattering property of the cavity wall material, the effect of low levels of light scattering caused by particulates in the sample is limited and thus will not appreciably affect the absorption measurement [12,13].
However, the achievable effective optical pathlength is a sensitive function of the cavity wall reflectivity and the port fraction i.e. the fraction of sphere surface area occupied by port openings. (see section 2). While the port design is fixed, the pathlength may change with time if the reflectivity changes. For example, this research found that for a 5.04cm diameter sphere giving a mean effective pathlength of 127cm, covering only 0.44% of the inner surface of the sphere with a highly absorbing (black) film resulted in a reduction of effective pathlength to 100cm. This effect presents a challenge for ongoing in situ measurements, as any cavity wall contamination will cause a reduction in mean reflectivity and thus a decrease in the calibrated pathlength, resulting in erroneous absorption measurements.
Previous researchers have employed different strategies for pathlength calculation, each with their own advantages and limitations. One such strategy is to measure the absorption of a selected line of oxygen in air; the O 2 concentration is assumed constant, which allows the pathlength to be calculated [14]. Using this approach, an effective pathlength of 98.7cm was determined for a cubic cavity with an error of 1.7cm. For gas absorption applications, this method whilst having the advantage of not requiring a reference sample in situ, restricts the operating wavelength region to that of the oxygen absorption line, 764nm in this case. Another strategy that has been applied to absorption measurements of aqueous samples is to normalise the measured response using a dry sphere response [15]. Rather than requiring a pure sample of water for calibration, an in situ dry sphere response is compared with a previously calibrated dry sphere response and the difference between the two is used to normalise the measurement. This however is not done in real time and so does not account for potential contamination at the point of measurement. Furthermore to carry out inspection for potential pathlength changes, the sensor has to be removed from its location for cleaning and drying. Another approach worth noting is measurement of the temporal decay in a pulsed system [16]. Here the stability of measurement of the decay constant (101 ± 1ns) was demonstrated for a cylindrical diffuse cavity (5.72cm height and diameter).This technique, though it provides immunity to intensity fluctuations, requires high bandwidth (GHz) electronics which can limit the attainable precision.
In this paper, our technique aims to provide a real-time pathlength adjustment in the event of sphere wall contamination using a low-frequency ratiometric configuration. In this way, gas absorption measurements can continue to be made accurately, as long as increased contamination doesn't reduce the detection sensitivity to below an acceptable detection limit.

Integrating sphere relations
For an integrating sphere, the surface radiance, B s is given by [17] where Φ i is the incident flux and A s is the total inner area of the sphere. M is a dimensionless quantity known as the sphere multiplier [17] which accounts for the increase in radiance due to multiple reflections and is described as where ρ is the surface reflectivity, and f is the port fraction, i.e. the fraction of sphere surface area occupied by port openings. It has been shown for an integrating sphere that the average distance for each beam pass is equal to two thirds of the diameter [18]. The mean effective pathlength, L eff is then calculated as where D is the diameter of the sphere and M is the multiplier as described in Eq. (4). The inclusion of the multiplier in Eq. (5) demonstrates the direct dependence of the achievable pathlength on the reflectivity of the sphere wall.
In principle, Eqs. (4) and (5) allow the calculation of the starting pathlength using knowledge of the port fraction f used in the instrument design and the manufacturer-specified reflectivity ρ for the material used (which for our work was 98.7%). However, for bulk material reflectors such as the PTFE used in this work, the precise value of ρ depends on the material's thickness, with the manufacturer's value being specified at a standard thickness (typically 10mm). Constraints exist on integrating sphere design, especially around the numerous ports, which are often designed for flexibility and which may or may not be used in experiments, and being covered by "port adapters", made of thinner sections of PTFE, when not in use. Around these entry points, the reflective material of the sphere itself can be tapered to a thin (2-3mm) section, which was indeed the case for the sphere used here. The result of both these design constraints is that the mean value of ρ over the sphere is unknown, even for a new, factory-set integrating sphere. Consequently, the starting conditions must invariably be calibrated, typically using a known absorber to determine the pathlength L eff .
For measurements with a photodetector, the total exit flux at the photodetector, Φ d is defined as [16]: where B s is the radiance as defined in Eq. (3), A d is the detector active area and Ω is the projected solid angle (sr) of the detector field of view. Ω is approximated as πsin 2 θ, where θ is the angle subtended by the exit pupil of the system. Combining Eqs. (3) and (6) gives the exit flux at the photodetector for diffuse reflections.
As the values of A d , A s are fixed and known, a constant, k, can be used to represent these. Thus, the throughput of the sphere, T is given by For practical implementation, previous work has shown that a small additional pathlength needs to be added to account for launch or delaunch conditions [19]. For an incident collimated beam and a detector with a wide field of view, the additional pathlength is approximately equal to a single pass across the sphere. Thus, for an integrating sphere, Eq.
(1), which describes the radiant flux transmitted through the cell in the presence of an absorbing medium Φ e (α) can be expressed as

Four beam ratiometric scheme
The proposed technique incorporates an adaptation of a four beam configuration that is used in the water industry to provide an accurate measurement of fluid turbidity [20], and which has also been applied to optical absorption [21]. The advantages of this technique include minimization of errors due to signal offset and gain differences of the various electronic components, as well as the ability to measure over a wide range of fluid turbidity levels by adjustment of gain controls [22]. The final advantage is that the system compensates for variation in the received light intensity, e.g. due to source intensity fluctuation, changes in detector responsivity, aging and degradation of components, and window contamination due to scratching or fouling (either biological or chemical). The typical configuration comprises two light sources and two detectors, spaced at 90° intervals around the sample chamber, as in Fig. 1. The two light sources are alternately switched on and off, as seen in Fig. 1(a) and 1(b) while both detectors make a separate flux measurement for each light source, giving four independent measurements. The direct pass, e.g. from source 1 to detector 1, measures the level of transmitted light while the indirect / diffuse pass e.g. from source 1 to detector 2, measures the level of scattered light. For turbidity measurements, the magnitude of the latter is determined by the composition of the sample. Relating the transmitted light flux to the scattered light for each source provides a means of ascertaining the level of turbidity. In the four beam configuration, a ratiometric algorithm is constructed from these values giving an expression of the form: 12 21 where Φ 12 and Φ 21 correspond to the scattered flux from source 1 to detector 2, and source 2 to detector 1 respectively. Φ 11 and Φ 22 correspond to the directly transmitted flux from source 1 to detector 1, and source 2 to detector 2 respectively. By using this ratiometric form, rather than the direct output from each detector, the system is normalised for variations in light flux that are independent of the sample, and errors due to cell contamination and/or component variation are thus eliminated. For example, if light source 1 experiences a reduction in light output, this will affect the measured flux at detector 2, i.e. Φ 12 and detector 1, i.e. Φ 11 proportionally and so the ratio Φ 12 / Φ 11 remains constant. As a result the value of Q in Eq. (10) is unaffected by changes in source power or detector responsivity, whether caused by component fluctuation or cell/window contamination The technology has been used in a number of industries, including milk fat monitoring in the food industry [23]. In this case the fat concentration is determined, using appropriate signal processing where the light absorption in the direct path and the scattered light in the diagonal path allows for quantitative measurements of milk fat while compensating for scattering effects.
Where an absorption measurement is being made, the expressions for the transmitted fluxes take the following form the L ab are the optical pathlengths from source a to detector b. S 1 and S 2 are factors that scale with the fluxes from sources 1 and 2 respectively, and R 1 and R 2 represent the responsivities of detector 1 and 2 respectively. Φ iab and Φ dab represent the incident flux for the direct and indirect/diffuse measurement respectively. Note that, so long as the beams from sources 1 and 2 are suitably configured, and the sphere throughput is low (a typical figure would be 0.1%) it is possible to measure the direct path contributions to Φ 11 and Φ 22 without also including contributions from the corresponding diffuse path contributions to Φ 11 and Φ 22 , because the latter are typically orders of magnitude smaller and exert a negligible influence on the direct measurement.
These quantities take account of the (fixed) proportions of light entering the respective straight and diagonal paths, plus potential reductions in flux resulting from transmission through the cell windows. Forming the Q ratio then allows these factors, which can potentially change as a result of window fouling for example, to cancel, thus: ( ) 12 For practical implementations, there are a number of design considerations that can influence achievable sensitivity and accuracy of the system. For example, the resolution of this configuration can be improved by increasing the difference between the transmitted and scattered paths [21]. However this has consequences for alignment as wider source divergence and detector acceptance angle are required. Furthermore the compensation scheme works on the assumption that the transmitted flux of the straight-through and diagonal paths (Φ 11 and Φ 12 for example) for each source remain proportional. In practice this is not completely preserved as, depending on the sampling environment, the system may be subjected to contamination that will not be identically distributed for each path, whether as a result of geometrical effects or structure of the fouling material [21]. In particular, the level of attenuation for each path differs as each is subject to different layer thickness, depending on the incident angle of the beam, as seen in Fig. 2. This divergence from proportionality would increase with increased fouling. The uniformity of the contamination layer as well as its particulate nature could also affect the proportionality between the transmitted intensities. If the layer is not uniform or the particulates are of the same order of magnitude as the beam diameter, the two paths can experience different levels of attenuation or scattering. However this has not prevented the technique from being used successfully where the application can tolerate sizeable errors e.g. up to 15% [21]. With these considerations in mind, an adaptation of this technique will be introduced, using an integrating sphere.

Adaptation to an integrating sphere -principle of operation
It is proposed that the cited advantages of the four beam configuration can be exploited for an integrating cavity using an adaptation of this arrangement. For adaptation of this technique to an integrating sphere, four beam paths must be created, as shown in Fig. 3. Port openings for the detectors are introduced in the sphere directly opposite the light source openings, i.e. detector 1 sits within the first strike spot for source 1 and similarly for detector 2 and source 2. A proportion of the light makes a single pass through the sphere, of length equal to the sphere diameter, providing the direct (short) path. The remaining proportion of the light encounters the sphere wall at the first strike spot, and is diffusely scattered around the sphere. After multiple random passes, of different lengths, a proportion of the scattered light is detected by the detector perpendicular to the source and this provides the diffuse (long) path. The divergence of each beam is controlled such that a significant portion of the incoming beam is directed into the direct (short) path. In this way the contributions from the long diffuse paths are negligible and the four beam paths operate independently of each other.
To account for the pathlength change due to cavity wall contamination, two Q expressions of the form of Eq. (10) are formed simultaneously, one accounting for the presence of the sample of interest and the other with zero analyte present. In this way the changes in throughput (for the diffuse (long) paths in particular) due to absorption by the sample of interest can be differentiated from other causes of throughput changes, i.e. cavity wall contamination. This allows for the pathlength to be adjusted accordingly and thus the gas absorption coefficient can be determined continuously without needing to recalibrate the sphere in situ.
It should be noted that the requirement for two additional port openings to accommodate an additional source and detector increases the port fraction f and therefore may impose a disadvantage by reducing the achievable pathlength of the instrument. Using our experimentally determined value of ρ = 97.5% and a port fraction of f = 0.077 (see section 3.3), we can estimate the increase in pathlength that might be achieved if the additional ports were no longer present. Table 1 shows that for a sphere with the design used in our experiments, the additional ports have reduced the pathlength from approximately 112cm to 100cm. Fig. 3. Adapted four beam ratiometric scheme; where for example, with source 1, a single path through the sphere provides a direct (short) path with flux Φ 11 . The diffusely reflected light measured from each detector orthogonal to the light source provides the diffuse (long) path, with flux Φ 12 . The same principle applies to source 2.

Adaptation to an integrating sphere -theory
To form the Q ratio for an integrating sphere, an expression for each path is created, as detailed in Eq. (13).
Regarding the diffuse paths, unlike for a single pass where no contact is made with the wall, the observed incident flux has an additional dependence on the reflectivity of the sphere wall and detector field of view. And so, for diffuse paths in an integrating sphere, the incident flux term is expressed as Φ d , the flux incident on the detector, as detailed in Eq. (7). Here, Φ d12 and Φ d21 have been expressed in terms of the sphere throughput and incident flux, as derived in Eq. (8). The values of L 11 and L 22 are given by the diameter of the sphere, and L 12 and L 21 are the effective sphere pathlengths for multiply reflected beams. The value of Q, in the presence of an absorbing analyte (α) is then given by ( ) ( ) 12 This differs slightly from the conventional expression for absorption methods in Eq. (12) because of the additional launch pathlength required for integrating sphere in Eq. (13). We now suppose that we make an initial measurement of fluxes in the absence of analyte. i.e. where α = 0, as a calibration step when the sphere is in good condition and its effective pathlength can be determined. Measurements made at this time then take the subscript cal. Secondly, we make an in situ measurement, again in the absence of analyte, under potentially fouled conditions when, as a result, the sphere's effective pathlength is not known.
Measurements made at this time then take the subscript foul. The potential fractional change in Q(0) due to fouling can be expressed as 12 The zero measurement for each path can be obtained by measuring the radiant flux at one or a number of wavelengths where the analyte does not absorb light (a baseline measurement) and inferring the value of the measurement in the absence of the analyte at the absorbing wavelength(s). Substitution from Eq. (7) It is reasonably assumed that, following sphere wall contamination, changes to the direct short paths L 11 It is assumed that the sphere has uniform light diffusion, and that the paths have been set up symmetrically, i.e. L 12 = L 21 = L, and so the expression becomes Thus the value of L(0) foul can be calculated by rearranging this equation: Once the pathlength has been adjusted as detailed above, a general expression for the gas absorption measurement can be made as follows.
where the value of L foul is determined from Eq. (19). In this way, the gas concentration may be accurately determined in conditions where the sphere pathlength may have degraded. Furthermore the four beam configuration allows for measurement of that flux in a manner that is insensitive to changes in source intensity, average window degradation or detector responsivity. The above model assumes that the sphere pathlengths are configured symmetrically and that the detector measuring light in the direct path (Φ 11 , Φ 22 ) is unaffected by additional light entering from the diffuse path (Φ 21 , Φ 12 ). It is therefore necessary to control the divergence of the source beam so that the short and long paths operate as independently of each other as possible. This is achieved by using a narrowly diverging beam such that a considerable proportion of the light (30-40%) is directed to the short path detector. As a result, changes to the sphere wall that reduce the diffuse long path flux will have a negligible effect on the detected short path flux. Simultaneously, a sufficient proportion of the light encounters the sphere wall so that the radiant flux in the diffuse path is detectable, i.e. above the noise level of the corresponding detector. This should be true for both combinations of sources and detectors. In addition it is important that the two source/detector combinations are symmetrically aligned for accurate compensation as the mathematical derivation assumes equivalent mean effective pathlengths.

Setup and working principle
A schematic of the setup is shown in Fig. 4. Two 1651nm distributed feedback single mode fibre pigtailed (DFB) lasers (NTT Electronics corp. NLK 1U5EAAA) with a typical output power of 20mW at 100mA were used, with the beam divergence for both controlled using aspheric lenses (Thorlabs C280TM-C). The interrogation system used was a simple form of direct absorption spectroscopy, in which the emitted wavelength from a tunable diode laser was scanned across a methane line at 1651nm. This was achieved by applying a sawtooth waveform produced by a function generator (Hewlett Packard HP33120A) to a driver (Laser 2000 LDC202), which resulted in a current varying between a minimum of 90mA and a maximum of 130mA (corresponding to a wavelength range of 0.28nm (31 GHz) as determined by using an optical spectrum analyser (Yokogawa AQ6370c). The integrating sphere (Thorlabs IS200-4, manufactured by Sphere Optics) was composed of Zenith material, with quoted reflectivity of 98.7% at 1650nm, and had an internal diameter of 5.08cm. The sphere was modified to contain six ports, two facilitated light entry for the sources (diameters 2.8mm), two facilitated light exit at the detectors (diameters 1.1 and 1.3mm), and two provided gas entry and exit points(1.0 and 0.45mm). These were spaced around the sphere so that each detector was positioned opposite one source and at 90° to the other source. Together, the ports accounted for a total surface area of 0.63cm 2 . The detectors were recessed from the sphere ports so that baffles were not required. Orientation of the final two ports, i.e. for gas entry and exit, was not important as long as they avoided first strike spots and areas opposite each detector. Further reduction of the size of our ports would have been possible in principle but this would have compromised flexibility of the design for research purposes and was not needed for a proof of principle demonstration of our technique.
Two variable gain amplified detectors were used (Thorlabs PDA10CS) at different gain settings for the direct and diffuse path measurments. This was necessary as the exit flux of each direct (short) path was three orders of magnitude greater than that of the diffuse (long) path. Triggering from the falling edge of the sawtooth waveform, the transmitted flux measurements were made at 0dB gain for measurements of Φ 11 and Φ 12 , and at 50dB gain for measurements of Φ 12 and Φ 21 .
Test gases were fed to the gas cell from three certified cylinders (Scott Specialty Gases), one containing hydrocarbon (HC) free air and the other two containing methane (1010ppm and 2.5% volume in hydrocarbon free air). Different gas concentrations from 0 to 6250ppm were achieved by controlled downstream mixing of air and the relevant methane cylinder using a bank of mass flow controllers (Brooks 0254 controller and GF40 series MFC's), with a total gas flow rate of 1000sccm for all measurements. Figure 5 shows an example of the raw data collected directly from the detector, for hydrocarbon free air and a methane concentration of 1010ppm for the long diffuse pathlength, and the corresponding normalized absorbance. In the absence of gas, a reference measurement showed a rising output intensity with current, as expected. In the presence of methane, a dip corresponding to a gas absorption line was observed. Zero readings were derived by making a baseline measurement at either end of the waveform (at non-absorbing wavelengths) and inferring the value of the measurement in the absence of gas at the gas line centre.

Initial calculation of long pathlengths
The initial pathlength of the sphere was determined experimentally as follows. Gas of a fixed concentration (1010ppm) was passed simultaneously into the integrating sphere and into a single pass gas cell with known pathlength (114.5 ± 0.1cm). Light from each laser was coupled into each gas cell in turn, as shown in Fig. 4(a). The standard cell used AR coated wedged windows (Thorlabs PS812-C) to avoid the presence of etalon-induced interference fringes, which may otherwise have affected calibration accuracy. Comparative measurements were repeated using each source in turn.
The transmitted signals were recorded with methane present (1010ppm concentration), corresponding to Φ(α), and with hydrocarbon free air, corresponding to Φ(0). Absorbances were determined at the line centre using the true baseline established using zero air and the flux measurement in the presence of gas. By rearranging Eq. (2), the effective sphere pathlengths, L sphere were calculated by relating the two absorbances, where A sphere is the measured absorbance in the sphere and A cell is the absorbance in the reference cell as defined by Eq. (2). The resultant mean effective sphere pathlengths, L sphere were thus calculated to be 99.2cm ± 0.4 for source 1 to detector 2 (L 12 ) and 100.4cm ± 0.4 for source 2 to detector 1 (L 21 ). Taking the average to be 99.8cm and and estimating the port fraction to be f = 0.0077, Eqs. (4) and (5) give the estimate for the mean reflectivity of our starting conditions to be ρ = 97.47%.

Source intensity
To simulate a reduction in source intensity, the laser current for source 1 was reduced from 110mA to 105mA. Simultaneously the laser temperature was adjusted from 14.53 to 14.58°C to ensure that the methane gas line at 1651nm remained centred as the wavelengths were scanned. Q(gas) expressions for a number of concentrations were compared with the calibrated Q(gas) expressions, where there was no reduction in intensity. With a reduction in laser current from 110mA to 105mA, a percentage reduction of approximately 4.5% in source intensity would be expected. As seen in Table 2, the errors as a result of component variation amount to less than 0.5% when the four beam compensation scheme is applied. In contrast, the single long path values, have an average error of 4.43%, which is close to the predicted error of 4.5%. There is some deviation from the predicted error but this is probably as a result of the temperature also being tuned to ensure the gas line is centred in the wavelength range being scanned.
It is well-known that standard gas absorption measurements are fully normalised for changes in source intensity because of their use of a baseline measurement, which allows a reference intensity for zero analyte to be inferred. This experiment therefore confirms that the 4-beam configuration is also able to maintain this normalisation without any appreciable increase in measurement error. A slight reduction in error is attributed to the new technique's use of multiple measurements, rather than any inherent advantage over standard normalisation in this respect.

Sphere wall contamination
To introduce contamination onto the sphere wall, black adhesive insulating tape was cut into approximately 7x5mm tabs, as seen in Fig. 6, and these were placed at different locations around the inner sphere wall. Small loops were added to aid subsequent removal of these fouling tabs without damaging the sphere wall.
Using Eq. (2), the absorbances of different methane concentrations were determined with no induced contamination on the sphere wall. These were taken to be the true absorbances and used for comparison, as well as to establish the sphere pathlength under calibration conditions, L cal . At the same time, the value of Q(0) cal in Eq. (14) was determined for the sphere in the absence of gas.
Fouling tabs, as shown in Fig. 6, were placed into the sphere, one at a time, taking flux measurements,Φ ij after each new tab placement. The value of Q(α) in Eq. (14) was calculated Fig. 6. An example of the black adhesive tabs used to simulate contamination of the sphere wall. from these measurements. Likewise Q(0) foul was calculated by inferring the zero measurements from the baseline as described in section 3.2. The new effective pathlength of the sphere was calculated from the ratio of Q(0) foul to Q(0) cal as described by Eq. (19), and used to calculate the gas absorption coefficient α according to Eq. (20) For each level of induced contamination (ie each number of fouling tabs placed within the sphere), the technique was repeated 3 times with the same tabs placed in different locations within the sphere. The entire process was repeated for up to 6 fouling tabs and at 3 separate gas concentrations.
As a comparison, for each gas concentration and fouling tab combination, the effective absorption coefficient was calculated using a single diffuse (long) path flux measurement, Φ 12 or Φ 21 , using Eq. (1) and making the (incorrect) assumption that the induced fouling had not altered the sphere pathlength. The resultant absorption coefficient for one level of contamination (i.e. 1.2% sphere wall coverage) is plotted below in Fig. 7. Random errors were calculated from the standard deviations of the 3 independent measurements made at each level of induced fouling (number of fouling tabs). Results have been displayed versus the estimated proportion of sphere wall area covered by black fouling tabs, 6 fouling tabs corresponding to 2.9% of the inner area.
As seen in Fig. 8, the percentage error in measured absorption coefficient was much greater for the uncompensated measurements and increased with increasing levels of fouling. For example, at a gas concentration of 1500ppm, with no pathlength adjustment, contamination representing 1.2% sphere wall coverage gave a reduced absorption coefficient which had a percentage error of 41% compared with the calibrated value. With the ratiometric scheme, this error was reduced to 2%. At the highest concentration of 6250ppm, with the most severe level of contamination tested, 2.9% sphere wall coverage, the resultant errors amounted to give 8.7 ± 1.9% compared to 57 ± 0.9% for the uncompensated scheme.  Figure 9 shows the residual error for each methane concentration when the measured absorption coefficient was compared with the calibrated absorption coefficient at varying levels of contamination. The errors in the compensated measurements, while acceptably small, increased both with increased levels of contamination and increasing concentrations of gas. This first effect is attributed to a breakdown of symmetry between the two diffuse (long) pathlengths. At high levels of light absorption by the fouling tabs, it is suggested that the sphere no longer diffuses the light uniformly and therefore the two geometries no longer have the same mean effective pathlength and the configuration is no longer symmetric. This was tested by calculating the mean effective pathlength for each diffuse path at each level of contamination, using the method for pathlength calculation as described in section 3.2. It was found for 2.89% sphere wall coverage the difference between the two diffuse paths was approximately 6cm, whereas for lower levels of contamination such as 1.2% the difference was approximately 1.5cm.
The second effect of error increasing with increased gas concentration, is attributed to the known effect of the effective pathlength changing as a result of light absorption by the sample [24]. For simplicity, this was not accounted for in the present theory however it is a predictable error and so it is envisaged that a further correction could be included to account for it.

Sphere window contamination
The effect of particlulate build-up on the windows was investigated. The setup was as in Fig.  4, using different detectors (Hamamatsu G11777-003P) and amplifiers (Femto DHPCA-100) instead. These detectors were used to facilitate greater gain control in the event of severe contamination causing very low throughput. The theoretical analysis shows that average window contamination may be compensated, i.e. contamination that is homogeneous across the full incoming laser beam. There is also an implicit assumption that light striking the window will not be deviated from its initial direct path towards the opposite detector and into the diffuse path, or vice versa. To investigate these assumptions, contamination on the window was simulated using modified microscope cover slips as shown in Fig. 10. The first was covered with a layer of crumpled polymer film Fig. 10(a) to represent particulate contamination much smaller than the incoming beam diameter and which would provide low levels of light scattering. The second Fig. 10.(b)) was lightly sprayed with grey paint to give millimetre sized spots, simulating heterogeneous particulate contamination on a scale similar to that of the beam diameter. Each cover slide was placed at the S1 input port position and the resultant transmitted flux for the pathlengths, S1 to D1 and S1 to D2 were measured, looking at the change in transmission for each path. The change in transmitted flux with window contamination was noted for Φ 11 and Φ 12 , and the results were expressed in terms of percentage change in transmission, as shown in Table 3. The experiment was repeated three times with a slightly different position of the cover slip in each case. It might be expected that the transmission of both paths would decrease with contamination build-up on the window. As seen in Table 3, for the particle sizes of the order of millimetres, there was a large reduction in transmission for the direct (short) path however the diffuse (long) path experienced an increase in transmission. This occurred because, as well as a large proportion of the light being absorbed by the particles, additional light was scattered out of the direct (short) path onto the sphere wall and so actually contributed to an increased flux measurement of the diffuse (long) path.
For the new compensation scheme, theory for pathlength adjustment assumes that changes in the short path fluxes are negligible. However as seen from the results in Table 3 this is not the case; the effect of window contamination is not predictable and heavily dependent on the particle size. When window contamination occured, it disproportionately affected the direct (short) and diffuse (long) paths. This violates the assumption of section 2.1 that the short and long path flux path measurements vary proportionally, and therefore that

Practical considerations
We have found that for successful implementation of the four beam compensation technique, the following elements must be in place: i) Symmetry of the orthogonal beams is required, such that the resulting effective pathlengths L 12 and L 21 are similar; in this work the initial difference between calibrated values was 1%.
ii) The beam divergence for each path needs to be controlled to ensure that the measurement of Φ 11 , for example, is unaffected by diffusely scattered light within the sphere, which can be tested by ensuring that Φ 11 >>Φ 12 and Φ 22 >>Φ 21 .
iii) It is important to maintain the relative alignment of source 1 to detector 1 and similarly of source 2 to detector 2 during service, or else the pathlength correction may be compromised. As the incident beams are significantly larger than the detector apertures, the instrument will have a low susceptibility to misalignment as a result of vibration. These considerations will also apply to conventional 4-beam instrumentation as used in water quality monitoring. Alignment itself is not complex. It is envisaged that appropriate diverging lenses can be secured with custom sphere adaptors and thus a "plug-and-play" system should be achievable.

Conclusions
A four-beam ratiometric scheme has been presented that has the potential to compensate for contamination of an integrating sphere wall, which would otherwise affect the effective pathlength of the sphere when used as a sample cell for optical absorption measurements. The technique has been applied to measurement of methane at 1651nm using tunable diode laser spectroscopy. The resulting error in measurement of the absorption coefficient was reduced from 57% for a gas concentration of 6250ppm to 8.7%, for levels of contamination that caused a reduction in the effective pathlength by ≈70%.
Potential sources of contamination include airborne dust particles that have not been captured by sampling line filters, or condensation of water or oils present in sample gas streams. Testing in this paper has made use of tabs made from black sticky tape, which had the practical advantages of being easy to handle and giving repeatable results. The results using these tabs represent changes in instrument accuracy that may be larger than would be encountered in a typical application, which served our purposes for demonstrating the technique's principles as well as limitations to the applicability of the integrating sphere relations for heterogeneous contamination.
Changes to the optical pathlength of the instrument would affect both its calibration accuracy, as investigated here, and its sensitivity. We would expect that 50% reduction in instrument pathlength would result in a two-fold worsening of instrument sensitivity. Clearly, having a correction for pathlength changes provides information about both calibration accuracy and the instrument's limit of detection, and it is for instrument designers to decide how to use this information in different applications, which may impose different demands on these two aspects of instrument performance.
The system is considered well-suited for use in situations where contamination affects the sphere sidewalls However, experiments confirmed that if contamination causes significant scattering at the source aperture windows, accuracy is compromised. In practice, as the direct (short) path flux is very sensitive to contamination on the window and should not be affected by sphere wall contamination, it is envisaged that monitoring of changes to the direct (short) path flux change over time would provide a warning to alert the user to appreciable contamination on the windows. Indeed a similar issue exists for more conventional four beam systems [21] and this has not prevented their use in analysis of aqueous phase samples, where the issue of window fouling is especially challenging.
A further element that is not compensated is contamination to the first strike spot, in this case an annulus around the detector opposite each entrance aperture. Contamination at this point would not affect the direct flux but would reduce the diffuse flux, giving an error that may not be compensated. However, the level of error is likely to be lower than the error that would result from similar levels of contamination present on the rest of the sphere sidewall, because after the first strike spot photons encounter the sidewall an average of M times before striking the detector. Thus, if contamination within the sphere is well distributed and not confined to the first strike spot, errors will still be reduced by use of the compensation scheme.