The Development of a Novel Headspace O2 Concentration Measurement Sensor for Vials

In the process of manufacture and transportation, vials are prone to breakage and cracks. Oxygen (O2) in the air entering vials can lead to the deterioration of medicine and a reduction in pesticide effects, threatening the life of patients. Therefore, accurate measurement of the headspace O2 concentration for vials is crucial to ensure pharmaceutical quality. In this invited paper, a novel headspace oxygen concentration measurement (HOCM) sensor for vials was developed based on tunable diode laser absorption spectroscopy (TDLAS). First, a long–optical–path multi–pass cell was designed by optimizing the original system. Moreover, vials with different O2 concentrations (0%, 5%, 10%, 15%, 20%, and 25%) were measured with this optimized system in order to study the relationship between the leakage coefficient and O2 concentration; the root mean square error of the fitting was 0.13. Moreover, the measurement accuracy indicates that the novel HOCM sensor achieved an average percentage error of 1.9%. Sealed vials with different leakage holes (4, 6, 8, and 10 mm) were prepared to investigate the variation in the headspace O2 concentration with time. The results show that the novel HOCM sensor is non-invasive and has a fast response and high accuracy, with prospects in applications for online quality supervision and management of production lines.


Introduction
In recent years, the development of chemical and biosensors related to human and environmental health has become the hotspot of research [1]. For example, nanostructured material-based optical and electrochemical sensors were proposed to detect medicines in various biological and chemical samples [2][3][4][5]. In fact, the integrity of medicines' packaging, e.g., vials, seriously affects the quality of medicines.
In order to ensure the stability and sterility of the medicines in vials, a vacuum or nitrogen (N 2 ) gas environment is usually used in the pharmaceutical process to isolate the medicine from the environmental air [6,7]. However, vials are prone to breakage and cracks in the process of manufacture and transportation [8][9][10], leading to oxygen (O 2 ) in the air entering the vials and reacting chemically with the medicine, which causes a great threat to pharmaceutical quality and safety. Therefore, the accuracy of headspace oxygen concentration measurement (HOCM) for vials is crucial to ensure pharmaceutical quality.
In recent years, researchers have developed a variety of methods for leakage detection. For example, Song et al. [11] employed a non-destructive high-voltage technique to detect pinhole leaks in packages; however, it was shown that the package contact surface area, thickness, and electrical conductivity significantly affected the detection. Patel et al. [12] performed a leak test of a lyophilized product in a parenteral vial package system by vacuum decay method, but the detection could have been prevented since leaks located below the product fill level might clog the flow of leaking gas. Moghimi et al. [13] applied injecting and vacuum dye penetration methods for the assessment of the package integrity of restorable flexible pouches with various sizes of micro-channels; however, the method depends on Sensors 2023, 23, 2438 2 of 10 several physical parameters, including dye concentration, temperature, pressure differential, viscosity of the dye solution, and surface tension.
Tunable diode laser absorption spectroscopy (TDLAS) has attracted increasing attention for its high resolution, high sensitivity, and high stability and has been widely used in the field of gas detection [14][15][16][17][18][19]. Based on TDLAS, Cai et al. [20] developed a sensor for simultaneous measurements of the pressure and water vapor concentration in vials. This sensor does not require inert gas purges and calibration with a known gas. However, due to the water absorption of freeze-dried powder injections after low-temperature freeze drying, the leakage states of vials containing medicine cannot be accurately determined by this sensor in a short time after the leak. Luo et al. [21] established a signal reconstruction method based on discrete wavelet packet transform to effectively suppress stochastic noise and proposed a multiple linear regression-based oxygen concentration inversion scheme. However, the universality of this method for all signals needs to be further improved. Jenkins et al. [22] developed a sensor for detecting the headspace O 2 concentration of vials. They experimented with demonstrating the accuracy of the sensor by employing a cylindrical glass test tube to simulate a vial. However, whether the sensor can be used to detect vials containing freeze-dried powder injections is yet to be confirmed. Zhu et al. [23] used the area of the spectral peak at half-height inversion of the headspace O 2 concentration in vials. This method is tolerant to noise interference. Nevertheless, this work does not consider the nonlinear effects of vial rotation and real-time changes in the environment during the detection process. Lighthouse Instruments [24] provided a product for the HOCM of vials based on frequency modulation spectroscopy (FMS-760). However, due to the need for multiple rotational measurements to take the average value of the concentration and the complicated algorithm, the measurement time required for a single vial with this product is about 5 s, which is unable to meet the online rapid detection requirements of production lines.
Multi-pass optical cells provide the necessary long optical path to research weak tracegas absorption features and are widely used in environmental monitoring [25], combustion processes [26], and medical diagnostics [27]. Liu et al. [28] summarized the design theory and research results of some mainstream types of multi-pass cells based on two mirrors and more than two mirrors in recent years and briefly introduced the application of some processed products. Das et al. [29] designed a compact multi-pass cell that focuses on achieving very long optical paths and demonstrated an optical path length of 50.31 m in a cell with 40 mm diameter mirrors spaced 88.9 mm apart. On this basis, they performed a second-harmonic wavelength modulation spectroscopy (WMS) measurement on weak carbon monoxide via TDLAS. Liu et al. [30] reported a highly sensitive hydrogen fluoride sensor based on the light-induced thermoelastic spectroscopy technique, and a Herriott multi-pass cell with an optical length of 10.1 m was selected to enhance the laser absorption.
Krzempek et al. [31] developed a sensor for trace-gas detection of ethane (C 2 H 6 ), which is based on a compact optical multi-pass cell and TDLAS, and the minimum detection limit is 740 pptv. It was found that the innovative ultra-compact, spherical multi-pass cell was capable of 459 passes between two separated mirrors with a 57.60 m effective optical path length. This work indicates that the combination of TDLAS and long-optical-path multi-pass cells is suitable for the detection of trace gases. However, there have been no studies on the application of this method for detection in vials.
In our previous work [32,33], we developed a leakage detection system for vials based on two-line TDLAS and proposed an O 2 leakage coefficient K to judge the leakage states of the vials. However, the headspace O 2 concentration of the vials cannot be accurately determined by the system. This paper further extends our previous work to develop a novel HOCM sensor for vials. Firstly, a long-optical-path multi-pass cell is designed based on the optical path of the original system, where the optical path length is increased significantly. In the meantime, a certain inclination angle of the base to suppress the optical noise caused by the etalon effect is designed. Secondly, vials with different O 2 concentrations are measured by this optimized system to study the relationship between the leakage coefficient and O 2 concentration. In addition, the accuracy of the optimized system measurement is verified by using standard O 2 vials with known O 2 concentrations. At the end of this paper, sealed vials with different leakage holes are studied in order to investigate the variation in the headspace O 2 concentration in the vials with time.

The Novel HOCM Sensor
In this paper, a long-optical-path multi-pass cell was designed, as shown in Figure 1. It consists of a collimating lens, a pair of silver-coated concave mirrors (with reflectivity of more than 96%), and a base. Through optical design, it can achieve about a 55 cm effective optical path capable of 11 passes between two mirrors separated by 5 cm. concentrations are measured by this optimized system to study the relationship between the leakage coefficient and O2 concentration. In addition, the accuracy of the optimized system measurement is verified by using standard O2 vials with known O2 concentrations. At the end of this paper, sealed vials with different leakage holes are studied in order to investigate the variation in the headspace O2 concentration in the vials with time.

The Novel HOCM Sensor
In this paper, a long−optical−path multi−pass cell was designed, as shown in Figure  1. It consists of a collimating lens, a pair of silver−coated concave mirrors (with reflectivity of more than 96%), and a base. Through optical design, it can achieve about a 55 cm effective optical path capable of 11 passes between two mirrors separated by 5 cm. Because the reflected light from different surfaces (such as the collimating lens and vial walls) can interfere with the measurement, it can lead to a complex pattern intensity of the Fabry−Pérot fringes, leading to optical noise [34][35][36]. Therefore, in this paper, the angle of the base was set to 8°, with the light incident at an angle of about 8° relative to the wall of the vial in order to suppress the optical noise of the etalon effects. It should be noted that the whole long−optical−path multi−pass cell is nitrogen purged in order to eliminate the influence of O2 in the ambient air.
O2 has many absorption lines around 760 nm [37]. According to the HITRAN 2020 database [38], the absorption spectra of O2 and water vapor near 760 nm (13,125−13,142 cm −1 ) were simulated under particular conditions (Xo 2 = 0.2, X H 2 O = 0.01, T = 298 K, P =1 atm, L = 55 cm), as shown in Figure 2. It is clearly shown that the absorption line at 13,138.2 cm −1 is the strongest line of O2 in the range, and there was almost no absorption for water vapor. Therefore, a diode laser (Eagleyard, EYP−DFB−0760) emission at the center wavelength of 761.14 nm was chosen as the laser source in this paper. Because the reflected light from different surfaces (such as the collimating lens and vial walls) can interfere with the measurement, it can lead to a complex pattern intensity of the Fabry-Pérot fringes, leading to optical noise [34][35][36]. Therefore, in this paper, the angle of the base was set to 8 • , with the light incident at an angle of about 8 • relative to the wall of the vial in order to suppress the optical noise of the etalon effects. It should be noted that the whole long-optical-path multi-pass cell is nitrogen purged in order to eliminate the influence of O 2 in the ambient air. O 2 has many absorption lines around 760 nm [37]. According to the HITRAN 2020 database [38], the absorption spectra of O 2 and water vapor near 760 nm (13,125-13,142 cm −1 ) were simulated under particular conditions (Xo 2 = 0.2, X H 2 O = 0.01, T = 298 K, P = 1 atm, L = 55 cm), as shown in Figure 2. It is clearly shown that the absorption line at 13,138.2 cm −1 is the strongest line of O 2 in the range, and there was almost no absorption for water vapor. Therefore, a diode laser (Eagleyard, EYP-DFB-0760) emission at the center wavelength of 761.14 nm was chosen as the laser source in this paper.
The diagram of the novel HOCM sensor for vials is shown in Figure 3. The temperature and current drive module (Wavelength Electronics, LDTC 0520) set the operating temperature and current of the diode laser to 18.7 • C and 100 mA, respectively, and then the center wavelength of the diode laser emission could be precisely set to 761.14 nm. The graphical programming software LabVIEW was used to output a saw-tooth signal with a repetition rate of 1000 Hz to scan through the selected O 2 absorption lines repeatedly. After the laser passed through the multi-pass cell, the beams were reflected by a goldcoated spherical mirror (Edmund, 43-340) and further focused by a convex lens (Wuhan YouGuang, PCX-1801). The laser was finally detected by the photodetector (Thorlabs, PDA10CS) and converted into an electrical signal, which was transferred to the computer by the data acquisition card (NI, USB6361) for real-time acquisition and processing in LabVIEW. The measurement time required for a single vial is 0.2 s. The diagram of the novel HOCM sensor for vials is shown in Figure 3. The temperature and current drive module (Wavelength Electronics, LDTC 0520) set the operating temperature and current of the diode laser to 18.7 °C and 100 mA, respectively, and then the center wavelength of the diode laser emission could be precisely set to 761.14 nm. The graphical programming software LabVIEW was used to output a saw−tooth signal with a repetition rate of 1000 Hz to scan through the selected O2 absorption lines repeatedly. After the laser passed through the multi−pass cell, the beams were reflected by a gold−coated spherical mirror (Edmund, 43−340) and further focused by a convex lens (Wuhan YouGuang, PCX−1801). The laser was finally detected by the photodetector (Thorlabs, PDA10CS) and converted into an electrical signal, which was transferred to the computer by the data acquisition card (NI, USB6361) for real−time acquisition and processing in LabVIEW. The measurement time required for a single vial is 0.2 s.

Calibration of O2 Concentration
In our previous work [32,33], we developed a leakage detection system for vials based on two−line TDLAS and proposed an O2 leakage coefficient to judge the leakage states of the vials. Nevertheless, the headspace O2 concentration of the vials cannot be accurately determined by the system. In the method of gas concentration detection based  The diagram of the novel HOCM sensor for vials is shown in Figure 3. The tem ture and current drive module (Wavelength Electronics, LDTC 0520) set the ope temperature and current of the diode laser to 18.7 °C and 100 mA, respectively, an the center wavelength of the diode laser emission could be precisely set to 761.14 nm graphical programming software LabVIEW was used to output a saw−tooth signal repetition rate of 1000 Hz to scan through the selected O2 absorption lines repeated ter the laser passed through the multi−pass cell, the beams were reflected by a gold− spherical mirror (Edmund, 43−340) and further focused by a convex lens (W YouGuang, PCX−1801). The laser was finally detected by the photodetector (Th PDA10CS) and converted into an electrical signal, which was transferred to the com by the data acquisition card (NI, USB6361) for real−time acquisition and process LabVIEW. The measurement time required for a single vial is 0.2 s.

Calibration of O2 Concentration
In our previous work [32,33], we developed a leakage detection system fo based on two−line TDLAS and proposed an O2 leakage coefficient to judge the le states of the vials. Nevertheless, the headspace O2 concentration of the vials can accurately determined by the system. In the method of gas concentration detection

Calibration of O 2 Concentration
In our previous work [32,33], we developed a leakage detection system for vials based on two-line TDLAS and proposed an O 2 leakage coefficient to judge the leakage states of the vials. Nevertheless, the headspace O 2 concentration of the vials cannot be accurately determined by the system. In the method of gas concentration detection based on TDLAS, the Voigt linear function is usually used for fitting in the direct absorption method, and the integral value of the spectral absorbance signal in the frequency domain is obtained from the linear fitting result; then, the gas concentration value is obtained. However, this method is not suitable for weak trace-gas detection. The wavelength modulation method can reduce the low-frequency noise of the system and improve the measurement sensitivity. However, it requires a lock-in amplifier to demodulate the harmonic signal, which makes the system complex, and the measurement is obtained as a relative value of the concentration change, which needs to be calibrated to obtain the gas concentration value. Therefore, this paper proposes calibrating the relationship between the leakage coefficient K and O 2 Sensors 2023, 23, 2438 5 of 10 concentration C through experiments so that the O 2 concentration in the headspace of vials can be determined quickly and conveniently without complicated calculations.
The calibration system consists of two main parts: gas preparation and optical laser detection. The gas distribution is mainly composed of mass flow controllers (Seven Stars, CS-200), a gas tank, and a gas mixer. The two mass flow controllers are connected to the steel O 2 and N 2 tanks (the gas purity of the source tanks is 99.999% or more) through gas conduits. Additionally, the flow rates of O 2 and N 2 are controlled separately by control software to prepare different concentrations of O 2 (0%, 5%, 10%, 15%, 20%, 25%) under ambient temperature and pressure conditions. While the gases are fully mixed in the gas mixer, the uniform gas mixture is then introduced into the vial through the gas conduit. After each experiment, the gas mixer is purged with pure N 2 for two minutes to remove the residual gas and prevent it from affecting the measurement results. The optical laser detection part is the novel HOCM sensor for vials developed in this paper.
The calibration system was used to measure the K value of the vials under different concentrations of O 2 . In order to reduce the measurement error, vials with different O 2 concentrations were each revolved 10 times, and the measurements were averaged. The average values of K obtained from the measurements were 0.00584, 0.00675, 0.00763, 0.0085, 0.00935, and 0.0102 for the vials with different O 2 concentrations of 0%, 5%, 10%, 15%, 20%, and 25%, and the root mean square error of the fitting was 0.13. Figure 4 shows the result of the linear fit between the average value of K and the known concentrations as The calculated R 2 = 0.9997 indicates that the leakage coefficient K has an excellent linear relationship with the known O 2 concentrations C. urement sensitivity. However, it requires a lock−in amplifier to demodulate the harmonic signal, which makes the system complex, and the measurement is obtained as a relative value of the concentration change, which needs to be calibrated to obtain the gas concentration value. Therefore, this paper proposes calibrating the relationship between the leakage coefficient K and O2 concentration C through experiments so that the O2 concentration in the headspace of vials can be determined quickly and conveniently without complicated calculations.
The calibration system consists of two main parts: gas preparation and optical laser detection. The gas distribution is mainly composed of mass flow controllers (Seven Stars, CS−200), a gas tank, and a gas mixer. The two mass flow controllers are connected to the steel O2 and N2 tanks (the gas purity of the source tanks is 99.999% or more) through gas conduits. Additionally, the flow rates of O2 and N2 are controlled separately by control software to prepare different concentrations of O2 (0%, 5%, 10%, 15%, 20%, 25%) under ambient temperature and pressure conditions. While the gases are fully mixed in the gas mixer, the uniform gas mixture is then introduced into the vial through the gas conduit. After each experiment, the gas mixer is purged with pure N2 for two minutes to remove the residual gas and prevent it from affecting the measurement results. The optical laser detection part is the novel HOCM sensor for vials developed in this paper.
The calibration system was used to measure the K value of the vials under different concentrations of O2. In order to reduce the measurement error, vials with different O2 concentrations were each revolved 10 times, and the measurements were averaged. The average values of K obtained from the measurements were 0.00584, 0.00675, 0.00763, 0.0085, 0.00935, and 0.0102 for the vials with different O2 concentrations of 0%, 5%, 10%, 15%, 20%, and 25%, and the root mean square error of the fitting was 0.13. Figure 4 shows the result of the linear fit between the average value of K and the known concentrations as The calculated R 2 = 0.9997 indicates that the leakage coefficient K has an excellent linear relationship with the known O2 concentrations C.

Sensor System Measurement Accuracy Verification
In this paper, the measurement accuracy of the novel HOCM sensor was verified using four standard O 2 vials (volume, 10 mL; bottom diameter, 22 mm; height, 50 mm) with known O 2 concentrations. The four vials were evacuated and filled with a certified O 2 gas mixture with concentrations of 0%, 7%, 14%, and 21% (the maximum allowable error of the O 2 concentration was 1.6%), with N 2 as a balance gas, and then melt-sealed to ensure the stability of the gas concentration in the vials. It should be noted that the laser light of the HOCM sensor only transmits through the upper part of the vial, while medicines are in the lower part of the vial. Therefore, medicines will not affect the measurement accuracy.
The headspace O 2 concentrations of the standard vials were measured separately using the novel HOCM sensor, and the results are shown in Figure 5a. The average values Sensors 2023, 23, 2438 6 of 10 of 100 measurements for the four standard vials with different O 2 concentrations of 0%, 7%, 14%, and 21% were 0.66%, 6.76%, 14.18%, and 20.8%, with standard deviations of 0.08%, 0.18%, 0.21%, and 0.20%, respectively. Note that the fluctuation at the concentration of 0% was significantly weaker than the others, which is due to the fact that, at the O 2 concentration of 0%, the vial was filled with N 2 ; this meant that the O 2 concentration had less effect in the process of gas preparation, so the measurement results are better than those of the other vials. error of the O2 concentration was 1.6%), with N2 as a balance gas, and then melt−sealed to ensure the stability of the gas concentration in the vials. It should be noted that the laser light of the HOCM sensor only transmits through the upper part of the vial, while medicines are in the lower part of the vial. Therefore, medicines will not affect the measurement accuracy.
The headspace O2 concentrations of the standard vials were measured separately using the novel HOCM sensor, and the results are shown in Figure 5a. The average values of 100 measurements for the four standard vials with different O2 concentrations of 0%, 7%, 14%, and 21% were 0.66%, 6.76%, 14.18%, and 20.8%, with standard deviations of 0.08%, 0.18%, 0.21%, and 0.20%, respectively. Note that the fluctuation at the concentration of 0% was significantly weaker than the others, which is due to the fact that, at the O2 concentration of 0%, the vial was filled with N2; this meant that the O2 concentration had less effect in the process of gas preparation, so the measurement results are better than those of the other vials.  There are many factors contributing to the average percentage error, including the interference effect caused by different standard vials and the optical noise interference, which changes when the laser enters the same vial from a different incident direction. Moreover, subtle differences in the thickness and smoothness of the vial's surface can interfere with the measurement results to varying degrees [21].

Results and Discussions
The sensor was used to further investigate the variation in the O2 concentration in the headspace of the vials at different leakage degrees. For convenient processing, metal caps with leakage hole diameters of 4, 6, 8, and 10 mm were designed and processed. And they  There are many factors contributing to the average percentage error, including the interference effect caused by different standard vials and the optical noise interference, which changes when the laser enters the same vial from a different incident direction. Moreover, subtle differences in the thickness and smoothness of the vial's surface can interfere with the measurement results to varying degrees [21].

Results and Discussions
The sensor was used to further investigate the variation in the O 2 concentration in the headspace of the vials at different leakage degrees. For convenient processing, metal caps with leakage hole diameters of 4, 6, 8, and 10 mm were designed and processed. And they were sealed with sealant to prevent gas from escaping and causing measurement errors, as shown in Figure 6.
The sealed vial was placed on the base of the multi-pass cell with the gas inlet connected to the gas mixer through a gas conduit and the leakage hole sealed with a hemi-spherical nut. The mass flow controller passed N 2 with 99.999% purity into the gas mixer and introduced N 2 into the vial through the gas conduit. After the gas filled the vial, the inlet valve was closed and left to stand for one minute to prevent the flow of gas in the vial from causing measurement errors in the system. The headspace O 2 concentration of the vial was measured by the novel HOCM sensor. The time zero point is the moment when the system starts the measurement. Additionally, the headspace O 2 concentration of the vial was continuously measured to study the stability of the headspace O 2 concentration before the leakage hole was opened. After two minutes, the leakage hole was opened to analyze the variation in the headspace O 2 concentration in the vial with time until it was equal to the atmospheric O 2 concentration. Then, the O 2 concentration variation in the headspace of the vial with time was analyzed by using different leakage hole diameters. Figure 7 shows the variation in the were sealed with sealant to prevent gas from escaping and causing measurement errors, as shown in Figure 6. The sealed vial was placed on the base of the multi−pass cell with the gas inlet connected to the gas mixer through a gas conduit and the leakage hole sealed with a hemi−spherical nut. The mass flow controller passed N2 with 99.999% purity into the gas mixer and introduced N2 into the vial through the gas conduit. After the gas filled the vial, the inlet valve was closed and left to stand for one minute to prevent the flow of gas in the vial from causing measurement errors in the system. The headspace O2 concentration of the vial was measured by the novel HOCM sensor. The time zero point is the moment when the system starts the measurement. Additionally, the headspace O2 concentration of the vial was continuously measured to study the stability of the headspace O2 concentration before the leakage hole was opened. After two minutes, the leakage hole was opened to analyze the variation in the headspace O2 concentration in the vial with time until it was equal to the atmospheric O2 concentration. Then, the O2 concentration variation in the headspace of the vial with time was analyzed by using different leakage hole diameters. Figure 7 shows the variation in the O2 concentration in the vial with time for different leakage hole diameters every minute. The measurement error is also depicted.  The sealed vial was placed on the base of the multi−pass cell with the gas inlet connected to the gas mixer through a gas conduit and the leakage hole sealed with a hemi−spherical nut. The mass flow controller passed N2 with 99.999% purity into the gas mixer and introduced N2 into the vial through the gas conduit. After the gas filled the vial, the inlet valve was closed and left to stand for one minute to prevent the flow of gas in the vial from causing measurement errors in the system. The headspace O2 concentration of the vial was measured by the novel HOCM sensor. The time zero point is the moment when the system starts the measurement. Additionally, the headspace O2 concentration of the vial was continuously measured to study the stability of the headspace O2 concentration before the leakage hole was opened. After two minutes, the leakage hole was opened to analyze the variation in the headspace O2 concentration in the vial with time until it was equal to the atmospheric O2 concentration. Then, the O2 concentration variation in the headspace of the vial with time was analyzed by using different leakage hole diameters. Figure 7 shows the variation in the O2 concentration in the vial with time for different leakage hole diameters every minute. The measurement error is also depicted.  The results show that the headspace O2 concentrations measured for different leakage hole diameters (4, 6, 8, and 10 mm) before the leakage hole opened were 0.015%, 0.13%, 0.26%, and 0.05%. These results were mainly due to the uneven quality of the surface of different vials and the influence of the environment, which caused the O2 concentration values measured before the leakage hole was opened to deviate to some extent. After the leakage hole was opened, due to the differences in the O2 concentration inside and outside the vials, the O2 in the environment quickly entered the vial through free diffusion and fully exchanged with the gas inside the vial. The time for the O2 concentration inside the vial to reach equilibrium with the environment decreased with the increase in the leakage hole diameter, with times of 43, 31, 26, and 21 min for leakage hole diameters of 4, 6, 8, and 10 mm, respectively. At this time, the headspace O2 concentration was 20.95%, 20.87%, 20.97%, and 20.86% due to the fluctuation in the O2 concentration in the The results show that the headspace O 2 concentrations measured for different leakage hole diameters (4, 6, 8, and 10 mm) before the leakage hole opened were 0.015%, 0.13%, 0.26%, and 0.05%. These results were mainly due to the uneven quality of the surface of different vials and the influence of the environment, which caused the O 2 concentration values measured before the leakage hole was opened to deviate to some extent. After the leakage hole was opened, due to the differences in the O 2 concentration inside and outside the vials, the O 2 in the environment quickly entered the vial through free diffusion and fully exchanged with the gas inside the vial. The time for the O 2 concentration inside the vial to reach equilibrium with the environment decreased with the increase in the leakage hole diameter, with times of 43, 31, 26, and 21 min for leakage hole diameters of 4, 6, 8, and 10 mm, respectively. At this time, the headspace O 2 concentration was 20.95%, 20.87%, 20.97%, and 20.86% due to the fluctuation in the O 2 concentration in the environment, and the results for the measured concentration values also changed in a certain range, with the final concentration value tending to be the O 2 concentration in the environment. This indicates that the larger the leakage hole diameter, the shorter the time required for the O 2 concentration inside and outside the vial to reach equilibrium.

Conclusions
In this paper, a novel HOCM sensor for vials was developed, combining TDLAS and a long-optical-path multi-pass cell. Firstly, a long-optical-path multi-pass cell was designed based on the optical path of the original system, where a significant increase in the optical path length was achieved. Additionally, we selected a certain inclination angle of the base to suppress the optical noise caused by the etalon effect. Secondly, we proposed calibrating the relationship between K and the known O 2 concentration C through experiments so that the O 2 concentration in the headspace of the vial can be determined quickly and conveniently without complex calculations. Moreover, the measurement accuracy based on vials with known O 2 concentrations (0, 7, 14, and 21%) indicates that this novel sensor achieved an average percentage error of 1.9%. Thirdly, sealed vials with different leakage degrees were measured in real time, and the time taken for the O 2 concentrations both inside and outside the vials to reach equilibrium was investigated. It is also shown that the novel HOCM sensor developed in this paper has the advantages of a fast response and high accuracy and is also non-invasive, demonstrating prospects in applications for online quality supervision and for the management of production lines. However, the vials with other properties, such as shape, material, or color, will be investigated in our future work so that the developed sensor can be better applied to different actual situations. As an optical measurement method for sealed containers, this method can also be applied to other fields, such as foodstuffs and packaging.

Patents
This work has reported a patent, "A leak detection device for vials combining TDLAS and gas multi-pass cell (Patent number 202210270467.2)."