1 Introduction

Modified atmosphere packaging (MAP) is a standard procedure in the food industry applied mainly in order to increase the product shelf life. Food packages are filled before closure with a mixture of gases whose purpose is to reduce as much as possible the natural decay of the freshness/nutritional/organoleptic proprieties of the food [15].

Depending on the food, the gases in the mixture can vary. The most used gases are nitrogen and carbon dioxide. The former is a low-cost inert gas, while the latter has an antimicrobial effect. In most cases, the residual quantity of oxygen is kept at minimum, typically below 2 %, as oxygen is a very active oxidant of many organic components. Notable exception is the packaging of red meat where a large percentage of oxygen is required in order to maintain the redness of the meat [6].

Measuring the residual content of oxygen in MAP is an important step in quality and food safety procedures. Presently, the most used methods are invasive, since a minute amount of the gas to be analyzed is extracted from the package by piercing it with a suitable syringe, then the analysis of the oxygen quantity is performed with a polarimetric sensor, as the case of the widely diffused instruments produced by Dansensor, Denmark. Another available method is based on measuring the fluorescence of a target that has been previously put inside the package and interrogated in a noninvasive way by short-wavelength light, as the case of the instruments produced by Nomacorc, Belgium. On a similar line are used specific targets put inside the package and/or integrated with the covering films that have the property of changing color when exposed to a given amount of oxygen for a given time. However, none of these devices are totally non-intrusive because they require some intervention on the package. Indeed, there is then the need to have a completely non-intrusive way of measuring the oxygen content in the packages.

Spectroscopic techniques for trace gas measurement are inherently noninvasive because the measure is done by shining light to the target. A number of techniques have been developed for gas detection. The traditional one has been non-dispersive infrared (NDIR) where the transmission is measured at two different wavelength regions, one over an absorbing and the other at non-absorbing bands. More recently, other techniques have emerged such as Fourier transform infrared (FTIR), differential optical absorption spectroscopy (DOAS), laser-induced fluorescence (LIF) and tunable diode laser absorption spectroscopy (TDLAS). An overview of these techniques is given in [79].

The purpose of this work is to present a method based on TDLAS to measure the oxygen content in any package independently of its shape or the material used, the only requirement being that the package has to be at least partially transparent to the laser light at 760-nm wavelength. A prototype instrument has been realized to demonstrate the suitability of the technique. The present version of the instrument is particularly suited for packages of the tray type with the bottom opaque and the top film at least partially transparent. The laser beam is sent to the package from the top film, and the light scattered by the package is collected and measured in order to derive the oxygen content. The same arrangement can be applied also for an in-line version of the instrument, applied after the packaging machine, for testing 100 % of the production.

2 Oxygen detection with TDLAS

TDLAS is a well-known method to measure gas absorption with great sensitivity and accuracy and has been extensively described in the literature [1013]. Absorption spectroscopy is based on the Beer–Lambert law which states that the transmission decays exponentially as exp (−σ(λ)NL) where σ(λ) is the line cross section, N is the concentration of absorbing molecules and L is the optical path length. The principle is shown in Fig. 1. The beam emitted by a single-mode tunable diode laser passes through an absorption cell containing the gas of interest. The wavelength of the laser can be tuned either by changing the temperature and/or the driving current, in resonance with the rotovibrational lines of the molecules of the gas to be probed. Wavelength tuning is generally accomplished with a linear modulation of the current, as this is realized with short reacting time, while temperature modulation, much slower, is used for setting the wavelength region of interest. The absorption is measured with reference to the quasi-linear varying background. The line cross section σ(λ) is in general known and may be derived by the molecular HITRAN database [14]. If the length L is known then N is derived by the measurement of the absorbed light. Alternately, σ(λ) could be determined by calibration, by measuring on the cell precisely known gas concentrations.

Fig. 1
figure 1

Scheme of absorption with a tunable diode laser. The gas is contained in a cell of length L, and the injection current of the laser is varied linearly in order to scan a line of the molecule

In the case of oxygen, the only absorption lines are in the 760-nm band. However, these lines are very weak resulting in a very low absorbance for the normal percentage concentration in MAPs and absorption path length of few centimeters. As an example, for a typical package being at atmospheric pressure with 5-cm pathlength and 2 % oxygen concentration, the expected absorbance is 1.3 × 10−4.

A method to increase sensitivity is the wavelength modulation spectroscopy (WMS) that has been also deeply described in the literature [1517]. The laser is modulated by a ramp current and a much higher frequency sine wave. The instantaneous laser frequency is then varying as f(t) = f 0 + m γ sin(2πf m t), where f 0 is the laser central frequency, m is the frequency modulation index, γ is the half width at half maximum of the absorption line and f m is the modulation frequency (f m ≪ γ⇒). Harmonic components are selected for the measurement by using a lock-in amplifier. The amplitudes of the harmonic components decrease for increasing harmonics, indicating that first-harmonic detection might be the best choice. However, since the laser output power (in addition to the laser frequency) is modulated with the injection current, there is a residual amplitude modulation (RAM) signal even with no absorption. For an ideal laser, having the output power linear with the injection current, the RAM signal is almost zero for second- and higher-harmonic detection, as discussed in [18]. This is the main reason why second-harmonic detection is generally preferred over first-harmonic detection. One recent way to realize synchronous modulation and demodulation is with the use of an all digital modulation–demodulation technique [19]. An additional advantage of digital detection is the fact that an arbitrary narrow filter can be added in the frequency domain centered around the given harmonic. This filter can be very effective in almost suppressing the noise associated with the detection channel. Figure 2 shows the case with second-harmonic detection as applied in the present device. Note that the experimental signal has a contribution of different sources of noises (laser noise, detector and electronic noise, background noise due to fluctuation of the laser slope and, most important in practice, etalon noise), that become more important in case of small absorption.

Fig. 2
figure 2

WMS for the line of oxygen at 760.8854 nm at atmospheric pressure. Blue experimental data for a 5 cm air filled cell. Red best fit with the model

The gas concentration is retrieved from the WMS signal by use of a calibration process: The signal is collected for different values of known concentration, e.g., filling the cell with pre-calibrated mixtures of the gas.

A process of fitting the experimental signal with a model signal is generally used to improve the accuracy and sensitivity of the instrument. We have developed a model for the signal used in the fitting process by implementing a computer code that exactly reproduces WMS, with all the parameters related to the laser as well to the molecular lines. The tuning and slope coefficients of the laser are initially determined by a best-fitting process on an experimental signal taken with high S/N on a gas cell with known conditions of temperature and pressure. In the case of oxygen in MAP, being the package at near atmospheric pressure, also the line width is kept fixed. Therefore, the experimental signal taken by the instrument can be fitted leaving two free parameters, namely the concentration N and the line center position. The fitting line is also shown in Fig. 2. Note that this model can work for any harmonic; however, in the present instrument, only the second harmonic is used.

Another important peculiarity related to the detection of oxygen through laser spectroscopy is the fact that in normal air, the oxygen concentration is much higher than that contained in many MAPs. This condition requires an effort to minimize the path external to the package and/or a precise knowledge of the residual external path length itself. As an example, an error of 0.1 % in the concentration of oxygen in a package of 5-cm pathlength is determined by an inaccuracy in measuring the external path length of only 0.25 mm, where the oxygen concentration is 20.9 %. This influences the instrument design.

3 The instrument

3.1 Optical/geometrical configuration

A typical food package is very different from the ideal cell as depicted in Fig. 1. First of all in many practical cases, the package is of the no “see trough” type, e.g., it has an opaque bottom. Secondly, the distance traveled by the laser beam inside the package is not known a priori and can be very variable. Finally, the closing films/surfaces are optically unfriendly and at least partially scattering. These characteristics impose some constraints on the opto/mechanical design. The present configuration is designed and optimized for packages of the tray type with a semirigid bottom shell and an at least partially transparent top film.

We have adopted a configuration in which we illuminate the inside of the package with a narrow collimated laser beam and detect the light back diffused by the package on the same direction as the illuminating beam. The light can be diffused by the bottom of the package itself or, if the latter is not optically accessible, by a portion of the food contained in it. Figure 3 shows the schematic of the measuring head.

Fig. 3
figure 3

Schematic of the measuring device: I front view; II side view. a laser collimating lens; b VCSEL tunable laser; c oxygen scavenger; d mirror with aperture; e scattered light collecting lens; f detector; g wedged window; h container; i food tray; j illuminated target; k CCD sensor; l lens for the triangulation system

The laser beam generated by a low-power (<0.5 mW) laser operating at 760 nm is collimated by a short focal length lens a and illuminates a portion of the target that in turn diffuses the light. A portion of the diffused light, reflected by the annular mirror d, is collected by lens e (f/# = 1) and imaged on the detector f. The output widow is 20 mm in diameter and is of edge type and with AR coating to minimize the etalon. Note that the optical scheme is very similar to a LIDAR but with the target at a finite and close position.

In order to minimize the content of oxygen within the light path outside the package, the device is contained in an oxygen-free enclosure, that is realized with a gas-tight container with an oxygen scavenger. The container carries a nose with a window that can go very near and/or in touch with the top film of the package. The latter is the optimal solution to cancel completely the contribution of the external oxygen. However, we have preferred to get some short distance from the film, even if this requires a precise evaluation of the distance in air, to avoid any damaging of the surfaces being kept in contact (window and/or film). In addition, the contact should be avoided in real-time in-line installations.

When measuring a given package, the position of the spot on the target and consequently the distance L traveled by the beam in and out is highly variable and generally unknown. In the present setup, it can vary from L min = 10 mm, that is determined mainly by the absorption length affecting the ultimate detection limit, and L max = 60 mm, that is determined mainly by the decrease in the flux collected by the lens. In order to minimize the variation of the flux reaching the detector at different distances L, the lens is positioned such as to focus on the detector the target at the median distance of 30 mm. The detector is a photodiode with 3 mm diameter, such as to collect all the light received by the lens for any position of the target within the above range.

The true distance L from the top film to the illuminated spot, i.e., the total absorption length 2L, as well as the distance from the outside of the window to the film, is measured with optical triangulation. This method, well known and widely used [20, 21], is based on measuring the position of the image formed by a suitable optical system from a known feature (e.g., a spot on the object). As the object changes its distance from the optical system, the position of the image varies and can be related by simple geometrical relations with the position of the spot. In the present case, this is achieved using a small CCD camera put inside the container and with its optical axis slightly inclined with respect to the laser beam direction as shown in Fig. 3II.

The CCD has 1/3″ format with 744 × 480 pixels, 6 µm pixel side; the imaging lens is a f/# = 1/30 and 12-mm focal length. Such small f/# assures that the image is always in good focus irrespective of the distance of the target. The triangulation measuring system is calibrated by measuring diffusing targets at known distances.

An estimate of the robustness of this method was obtained by measuring the distance of pieces of different film and target combinations placed at known distances thanks to a translation stage.

In a typical package with low oxygen content, e.g., 2 % O2, the accuracy of the determination of the distances is required to be high for the window-film distance, namely 0.1–0.2 mm, while is more relaxed for the internal film-target distance, about 1 mm, due to the ratio of the O2 concentrations present outside and inside the package. Tests on a range of different materials showed that those requirements are usually matched with the only exception of dirty or partially occluded films. However, the whole CCD image is available and used by the instrument’s software to extract other data (such as the spot profile and intensity) in order to detect those issues and to help the user making a correct sample placement.

For the scope of this work, the comparison between this gas sensing method with a traditional (invasive) one was used in order to evaluate the accuracy taking into account the whole error budget of this measurement technique.

A typical calibration of the triangulation system is shown in Fig. 4. It appears that the system is capable of a resolution well suitable for the purpose.

Fig. 4
figure 4

A typical calibration of the triangulation system for distance measurements

3.2 Diffused light and etalon effects

The detector senses the light coming back from the target that has traveled the path 2L through the gas inside the package, but in addition to this there are also contributions coming from the top film that in many cases can be either partially reflecting and/or diffusing. This contribution, reaching the detector, gives an error in the measurement since it is light that has not undergone absorption and disturbs the normalization process. In order to minimize this effect, the illumination of the package is performed at a suitable inclined angle with respect to the surface of the package itself, as shown in Fig. 3. A 15° angle has been found sufficient in the great majority of the cases to get rid not only of the reflected components but also of most of the diffused light.

Another serious effect is represented by the presence of etalons [22] that are the result of interferences of the highly coherent laser light that happen when portion of the light is reflected/diffused by surfaces or scattering entities encountered during the propagation of the beam. The etalon produces spurious modulations of the recorded intensity of the laser beam that have intensities dependent on the amount of the light reflected/diffused at the interfaces and have wavelengths that are related to the mutual optical distances traveled by the interfering beams. If we assume small value for the reflection coefficient of the surfaces r ≪ 1, the interfering reflected beam has an average intensity relative to the incoming beam of about 2r and is 100 % modulated. If we recall that the absorbances to be measured are typically in the range 10−4–10−5, it becomes clear that the etalon effect is the ultimate limiting factor for the sensitivity/accuracy.

A relatively simple and effective way to reduce etalon effects is to induce vibrations and/or random small motions in the system during the time of the measurement. In this way, the motion effectively smooths the integrated coherence of the beams. Two types of vibrations have been introduced in the instrument:

  1. 1.

    The collimating lens of the laser beam is made to vibrate in such a way as to scan the beam along the plane of the target.

  2. 2.

    The package tray is put on a stand that can oscillate a small amount (0.5 mm) up and down, in order to vary the relative distance between the target and the film.

The signal as resulting with/without the fringe-rejection method is shown in Fig. 5. Both the two movements reduce quite effectively the disturbance from the etalon in the great majority of the cases.

Fig. 5
figure 5

An example of fringe rejection through mechanical dithering of the optical system

4 The realized instrument and its performances

The realized instrument is shown in Fig. 6. The measuring station includes a stand where the package and the measuring head are positioned. The head-to-stand distance can be varied to accommodate different types of packages.

Fig. 6
figure 6

The instrument. A tray with meat inside is put on the stand

The system calibration is done through a calibration cell, consisting of a container carrying targets located at four different distances. The calibration container can be filled with different mixtures containing oxygen in varying percentages from 0.5 to 100 %. A typical calibration set of data for the most interesting range 0–5 % are shown in Fig. 7.

Fig. 7
figure 7

Calibration data. The recorded absorption values: vertical axis in arbitrary units, are plotted versus distances of four targets, put in a calibration cell filled with different oxygen percentages: 1.25, 2.5 and 5 % volume. Data in red are for an orange target; data in green for a green target. With circles average data; triangles ±1 std

Here are reported the measures taken at four distances L = 11, 21, 40 and 60 mm for oxygen concentrations of 1.25, 2.5 and 5 %. The quantity plotted is the absorption signal versus distance. Targets with different albedos, i.e., orange or green, have been tested, to assess the sensitivity of the instrument versus the target albedo, that in the case tested was about a factor 2. In the ideal case, when the measurement is independent from the target albedo, red and green lines should overlap, and the slope of the lines should be proportional to the concentration. The deviations from this ideal case is an indication of the residual systematic errors, that in the case here discussed are anyway lower than the measuring errors.

Results of measurements performed on a typical tray brought from a local market are shown in Fig. 8. The tray contains frayed meat and is with a white quite shining bottom and a top film transparent in several points not covered by inscriptions. The measurements have been performed illuminating the white rigid bottom of the tray, at a distance L = 60 mm. Initially, the oxygen content was less than 1 %. A small hole, about 0.25 mm in diameter, has been produced in the film in order to get the package slowly going to atmospheric concentration. The instrument was configured to keep measuring with an integration time of 5 s. The slow and regular rise curve is fitted with a polynomial curve that simulates the behavior of the oxygen concentration increase, the average residual demonstrates the precision of the measurement. The standard deviation is very good, about 0.075 % in the whole interval. Given that the measurement point is fixed, this value does not include the uncertainty related to the measure of the distance nor the fluctuations of the measurements when the point of illumination in the package is changed.

Fig. 8
figure 8

Evolution of the oxygen concentration in a pierced package. Initially, the package had a very little oxygen concentration <0.2 %. Then, a hole of about 250 micron diameter was pierced in the top film of the tray

The instrument performances have been compared with the CheckPoint 300 (Dansensor, Denmark) that, albeit invasive, is accepted as quasi-standard in the packaging industry. The results of measurements performed on a tray of meat at a distance of operation of 40 mm are shown in Table 1. Initially, the package had practically negligible oxygen content; several measurements had been performed with the present instrument both repeated on the same position and also changing position: The average value found and its standard deviation are shown in the first line of Table 1. The corresponding single destructive measurement taken with Dansensor is on the right, and the indicated error is the one given by Dansensor specifications as its stated precision. Then we injected some air with a syringe in order to probe a wider span of values for oxygen concentrations. These measures are shown in the following lines in Table 1 with the corresponding standard deviations. Assuming the Dansensor to be correctly calibrated, our accuracy (i.e., the correspondence between the values measured by the present prototype and the ones performed by the standard Dansensor) appears quite good with possibly a slight calibration error. The precision i.e., the reproducibility of the results appears also satisfactory.

Table 1 Comparison of measurements of the present instrument and the Dansensor

Several measurements had been performed on different types of food packages brought on local supermarkets. Since there is a variety of MAP packages, we tried to test various samples that had the required characteristics for being accepted by the instrument i.e., tray type, an at least partially transparent top film and either the bottom reachable by the laser beam or a content of food that allowed a measuring distance >10 mm. Table 2 reports a selection of the results of measurements taken on different packages at distances between 25 and 45 mm. Further testing with the Dansensor showed no significant systematic error to be related with the path length evaluation, even in the case of packages with high oxygen content (air filled containers).

Table 2 Measurements on different types of packages

From these several tests, we have found that the precision of the measurements depends primarily on the nature of the target: It is higher for a well-diffusing target, like the bottoms of many trays and diminishes if the target is somewhat reflective and/or the laser is illuminating the food. Wet and/or spongy targets usually show the worst precision.

5 Conclusions

We have developed a novel type of instrument capable of measuring in a totally non-intrusive way the oxygen content in a package. The instrument is based on Tunable diode laser absorption spectroscopy, and the present configuration has been developed for testing particularly tray types of food packaged in modified atmosphere. The optical concept adopted is similar to a small range LIDAR with the laser illuminating through the top film the bottom of the tray or the food here contained and measuring the scattered light. The realized model is capable of performing the measurement without coming in physical contact with the package. This property can be exploited mostly for an application in an automatic packaging line inspection system.

The performances of the instrument are good with a precision of the measurement of the oxygen content that varies between 0.2 and 0.6 % depending mostly on the nature of the target that the laser illuminates; it is superior when the target has good diffusive property, worst in the case of partially glossy targets and/or wet food. The accuracy of the measurement in one case has been verified by comparisons with the industry quasi-standard and ranges between 0.1 to 0.5 %.