## Introduction

Green energy demand inspires the development of hydrogen technologies, which allow for efficient, sustainable and zero-emission energy management1. This also creates a need for hydrogen monitoring with the hydrogen detectors and analyzers being the key elements. While the most common are resistive gas sensors based on thin films of metal oxides, they have working temperatures from 100 to 400 °C and limited selectivity2,3,4,5. To avoid the necessity of heating, optical sensors based on gasochromic properties of metal oxides (WO3, NiO, etc.) adjacent to a catalyst (Pd, Pt)6,7,8 are elaborated. These sensors use the property of materials to change the extinction coefficient and/or refractive index as a result of reaction with a gas9. Optical gas sensors of H2 and other gases demonstrate a detection limit of tens and hundreds of ppm10, which is enough for most applications.

Tungsten trioxide has a pronounced response to hydrogen that makes it one of the most promising platforms for optical H2 detection11,12,13,14. One of the main challenges for developing efficient hydrogen sensors based on metal oxides is substantial decrease in sensor response in oxygen-containing atmosphere. This is caused by the reverse reaction with oxygen, which influences performance of both optical and resistive hydrogen sensors15,16,17. To overcome this problem, a higher sensitivity is necessary. Various approaches, including doping and nanostructuring, were used to enhance gasochromic response of WO3-based sensors to hydrogen7,18,19. One of the main goals of nanostructuring is the increase of the optical response while keeping the building layers thin to provide a rapid response. Also, the optical path along the surface of the nanostructure should be large enough to make the integral response strong enough. For this reason, the structure supporting the guided-mode resonance seems to be well suitable. Guided-mode resonance is widely used for the development of various sensors thanks to tunability of a resonant wavelength and high sensitivity20,21,22,23,24,25.

Essential part of any sensor is an algorithm for processing the sensor data. In many cases, the sensitivity may be enhanced by a proper processing procedure26,27. In the case of optical sensors, the data processing is of particular importance because of a complex spectral response of this class of sensors28,29.

In the present work, an optical guided-mode resonance hydrogen sensor based on a 1D Al2O3/WO3/Pd nanostructure working in an oxygen-containing atmosphere was proposed and studied. The catalytic Pd film was as thin as 1 nm to avoid significant optical losses. We experimentally demonstrated an existence of absorption resonances in the nanostructure and showed that the ultrathin catalytic film was enough for an effective function of the sensor: a high sensitivity and a fast response. The sensor resolution of 40 ppm was demonstrated with the sensor data processing by the principal component analysis (PCA). Selectivity to hydrogen was proved by PCA when changing humidity of the exposing atmosphere and heating the sensor. It was found that the sensor retained its function after several months of intensive use, although the response became somewhat weaker and slower.

## Sample preparation and characterization

The functionality of the proposed nanostructure was provided by a gasochromic $${\text{WO}}_{3}$$ film with Pd catalyst. This choice was governed by a strong response of $${\text{WO}}_{3}$$ to hydrogen and by its low optical absorption in the absence of hydrogen, which makes possible an achievement of a high-Q optical response and a high sensitivity. The absorption inherent to Pd was minimized by the use of an ultrathin (1 nm) coating.

A nanostructure comprising an Al2O3 grating, $${\text{WO}}_{3}$$ film, and ultrathin Pd coating on a quartz substrate (Fig. 1a) was optimized with respect to the geometric parameters. The optimization procedure maximized a sensor sensitivity $$\left| {\delta T/\left( {\delta n + i\,\delta k} \right)} \right|$$, where $$\delta T$$—a change in the transmittance at a resonance wavelength resulting from a change $$\delta n + i\,\delta k$$ in the complex refractive index of WO3, (i.e., the simultaneous change in the real (n) and imaginary (k) parts). Electromagnetic simulations were carried out in COMSOL Multiphysics. The result of optimization strongly depended on the ratio of $$\delta n$$ and $$\delta k$$, because $$\delta n$$ influences mostly spectral shift of the resonance, whereas $$\delta k$$ defines its magnitude. One can find that under exposure to hydrogen a change in k of WO3 at $$\lambda$$ near 700 nm is twice as one in n30,31,32,33,34, $$\delta k\sim 2\,\delta n$$. The permittivities of the constituent materials were found from preliminary experiments (ellipsometry and transmittance spectra of nonstructured layers and bilayers samples, see Ref.35 for details). The optimized structure was a 1D grating of 85 × 220-nm (height × width) sized Al2O3 ridges deposited with a 460 nm pitch on a UV-grade quartz substrate. The grating was then covered by 110-nm thick WO3 and 1-nm thick Pd layers. For such design, a standing wave is formed in the 1D structure at the resonance wavelength (Fig. 1a).

A 10 kW e-beam evaporator (Angstrom Engineering, Canada) with a base pressure lower than 3 × 10−8 Torr was applied to fabricate all the thin films37,38. First, 85 nm thick alumina films (Fig. 1c) were deposited on 25 mm × 25 mm quartz substrates at a rate of 0.25 nm/s. The thicknesses of alumina films were retrieved from an ellipsometer measurements (Sentech Instruments GmbH, Germany).

For the patterning of the alumina film, a 150 nm tungsten (W) film hard masks were deposited at a rate of 0.10 nm/s. Next, thin film of e-beam resist polymethyl methacrylate (PMMA) A4 (MicroChem, Westborough, MA, USA) was spin-coated at a rate of 1500 rpm for 60 s, and baked at 150 °C for 1 min. Its thickness was near 300 nm as estimated from measurements by a reflectometer. The 1D grating topologies were fabricated by 50 keV electron beam lithography (EBL). The EBL exposure dose was 850 µC/cm2. The samples were developed in the methyl isobutyl ketone (MIBK) for 60 s. Following reactive ion etching process consisted of two steps. First, the tungsten hard masks were selectively etched using mixture of fluorine gases. After the first step, the e-beam resist masks were removed. On the second step, Al2O3 layers etching was carried out using chlorine gases (BCl3 and Cl2 mixture) plasma39 with the following tungsten mask removal in a fluorine gases plasma. After that, the Al2O3 gratings were covered by an e-beam evaporation with 110 nm thick tungsten oxide (WO3) layer at a rate of 0.50 nm/s and oxygen partial pressure of $$5 \times 10^{ - 5}$$ Torr and 1 nm palladium (Pd) layer at a rate of 0.025 nm/s. The thicknesses of tungsten oxide films were retrieved from the ellipsometer measurements of a control sample. The thicknesses of palladium films were controlled by quartz crystal monitoring system. The fabricated nanostructure (hereafter, sample) is shown in Fig. 1b, and its elemental analysis is given in Supplementary (Fig. S2).

Transmission spectra of the sample were measured at normal incidence using the setup shown in Fig. 1d. Collimated polarized beam from a white light source (XWS-65, TRDC, Russia) passed through an aperture and the sample placed in a gas cell with quartz windows, heater and thermocouple to control both chemical composition of the atmosphere and temperature. Transmitted light was collected with a 10X objective (NA = 0.28) and analyzed by a thermo-electric cooled fiber optic spectrometer (AvaSpec-ULS, Avantes). Visualization of the sample orientation was realized with a CCD camera. Nitrogen, oxygen and hydrogen gas mixture was prepared with mass flow controllers (Bronkhorst). Humidity was controlled with an evaporation mixer together with mass flow controllers, and pressure controllers were combined in an automated gas flow and humidity control system. A commercial humidity sensor was used for monitoring of humidity. Measurement of transmission spectra of the sensor was performed under a constant gas mixture flow of 100 ml/min at atmospheric pressure.

To perform the sample characterization, transmission spectra of the sensing element were measured in both polarizations, parallel (E||) and perpendicular (E) to the Al2O3 stripes. The results revealed the presence of a resonance dip (guided-mode resonance40,41), in accordance with the preliminary calculations, which were in a good agreement with the calculated spectra (Fig. 2). The resonance dip in the E-polarized transmission spectrum was characterized by a smaller FWHM if compared to that in the E||-polarized spectrum. This was due to the lower scattering and, consequently, lower radiative losses of the E-polarized guided mode compared to the E|| one. The transmission dip is associated with the first-order diffraction condition of 1D grating, λ = neff D, where neff is the effective index of the guided mode and D is the grating period. One can see that the difference between the experimental and calculated spectra was larger for the E|| polarization, which was a consequence of a larger effect of fabrication imperfections causing parasitic light scattering.

To interprete the transmission spectra of the sensor and determine the sensor response, we employed the principal component analysis, see Supplementary for more details. In our case, the first principal component $$PC_{1} \left( \lambda \right)$$ was enough to describe the observed spectral change in the transmission spectrum $$\Delta T\left( \lambda \right)$$ caused by interaction with hydrogen: $$\Delta T\left( \lambda \right) \approx a_{PC1} PC_{1} \left( \lambda \right)$$, the amplitude of the principal component $$a_{PC1}$$ being considered as the sensor response. The sensor response defined in such manner demonstrates a good stability against spectral noise compared to analysis of $$\Delta T$$ at a single wavelength because PCA uses a spectral range involving the resonance, $$\lambda_{1} \le \lambda \le \lambda_{2}$$. We have chosen $$\lambda_{1} = 667.9$$ nm and $$\lambda_{2} = 682.7$$ nm by minimizing a standard error (see “Concentration dependence of the sensor response“, particularly, Fig. 4d). On the other hand, the value of $$a_{PC1}$$ has a clear interpretation—it is proportional to an average change in the transmission spectra due to the presence of hydrogen, $$\sqrt {\left\langle {\Delta T^{2} } \right\rangle } = \left[ {\int\limits_{{\lambda_{1} }}^{{\lambda_{2} }} {\left( {T\left( {{\text{air}} + {\text{H}}_{2} } \right) - T\left( {{\text{air}}} \right)} \right)^{2} d\lambda /\left( {\lambda_{2} - \lambda_{1} } \right)} } \right]^{1/2}$$ [see Eq. (S5) in Supplementary]. For this reason, the sensor response is hereafter given both in terms of $$a_{PC1}$$ and, more clearly, in terms of $$\sqrt {\left\langle {\Delta T^{2} } \right\rangle }$$.

## Sensor response in oxygen-free and oxygen-containing atmospheres

The sensor response to hydrogen results from the hydrogen dissociation by the Pd catalyst, $${\text{H}}_{2} \to 2{\text{H}}^{ + } + 2e^{ - }$$, and subsequent reduction of the tungsten ions, $${\text{W}}^{6 + } \mathop\rightarrow ^{{{\text{H}}^{ + } }} {\text{W}}^{5 + }$$7. The sensor recovery is carried out by oxygen, $${\text{W}}^{5 + } \mathop\rightarrow ^{{{\text{O}}_{2} }} {\text{W}}^{6 + }$$, which oxidizes the tungsten ions reduced at the previous step. One of the main challenges in the development of efficient metal oxide hydrogen sensors is substantial decrease in the sensor response in oxygen-containing atmosphere16 since the oxygen concentration (near 20%) is much higher than that of hydrogen (not exceeding 0.12% in our experiments). As a result, the oxidation reaction shifts the equilibrium closely to the initial state.

In our experiments, the sensor performance was studied both in nitrogen and in a synthetic air (≈ 80% N2 and 20% O2, hereafter, air). These cases differ principally because the recovery process is absent in the oxygen-free atmosphere, where the sensor saturates and gives a maximal response, whereas in the presence of oxygen, a dynamic equilibrium between the reduction–oxidation reactions is observed. The presence of hydrogen resulted in a complex spectral response (Fig. 3a), which consisted in an increase in transmission at the resonance wavelength and in a blueshift of the resonance. These are due to changes in the real and imaginary parts of the refractive index of WO3 produced by the gasochromic coloration process. Each spectrum was processed to find the amplitude of the first principal component, $$a_{PC1}$$ (see “Sample preparation and characterization” and Supplementary). As a result, a dynamic sensor response, $$a_{PC1}$$ vs time, was obtained (Fig. 3b). Sensor response to 200 ppm of hydrogen was 6–7 times lower in air than in nitrogen. The experimental dependence was fitted with an exponential function, $$a_{PC1} = a_{0} - a_{1} \exp \left( { - t/\tau } \right)$$. The sensor response time $$\tau$$ was found to decrease from $$7.5 \pm 0.4$$ min in nitrogen to $$4.3 \pm 0.3$$ min in air. Corresponding values of the response amplitude $$a_{1}$$ were $$48.4 \pm 1.2$$ and $$7.23 \pm 0.2$$ ($$9.28 \pm 0.23$$% and $$1.39 \pm 0.04$$% in terms of $$\sqrt {\left\langle {\Delta T^{2} } \right\rangle }$$, respectively). Thus, in the presence of oxygen, somewhat faster but considerably weaker response was observed.

## Concentration dependence of the sensor response

For practical use, where a target gas concentration must be defined, it is necessary to measure a calibration dependence. To get this dependence, we carried out two series of measurements. In the first one, reduction was done at two hydrogen concentrations (100 ppm and 1000 ppm) in air during time intervals lasting from several minutes to some dozens of minutes, each interval following by oxidation in air (Fig. 4a). These data were used for generation of the first principal component; a wavelength dependence of $$PC_{1} \left( \lambda \right)$$ is shown in Supplementary (Fig. S3). In the second series, the sensor was exposed to a ladder of successively growing concentrations (Fig. 4b), each step was kept for ≈ 2 min. The measured spectra were processed with the use of the principal component $$PC_{1} \left( \lambda \right)$$ obtained from the first series. As a result, the calibration dependence was determined (Fig. 4c).

We observed such feature of hydrogen sensors as a growth of sensitivity (i.e., of a derivative of $$a_{PC1}$$ with respect to the hydrogen concentration) at low hydrogen concentrations. Particularly, one can see in Fig. 4a,b that the response to lower (100 and 200 ppm) hydrogen concentrations is disproportionaly strong. The reason for such a behaviour is the reversible hydrogen decomposition reaction catalysed by palladium, $$H_{2}$$ ↔ $$2H$$. The position of equilibrium is defined by the chemical equilibrium constant $$K = C\left( H \right)^{2} /C\left( {H_{2} } \right)$$, i.e., $$C\left( H \right)\sim \sqrt {C\left( {H_{2} } \right)}$$. Since the sensor response is determined by the concentration of hydrogen atoms, the following relation is predicted: $$a_{PC1} \sim \sqrt {C\left( {H_{2} } \right)}$$. This root dependence, known as Sievert’s law42, was observed in our experiments. To show this, we extracted the experimental spectra corresponding to stationary level of $$a_{PC1}$$ at each concentration (Fig. 4b) and averaged the sensor response found with PCA. Such $$\left\langle {a_{PC1} } \right\rangle$$ vs. $$C\left( {H_{2} } \right)$$ dependence appeared a straight line on the square root scale for $$C\left( {H_{2} } \right)$$ (Fig. 4c), confirming the predicted root dependence and meaning the sensor calibration curve. A sensor resolution defined as a standard error corresponding to the deviation of the known hydrogen concentration from the calibration curve was evaluated to be of 40 ppm. This value is illustrated by an error hystogram (Fig. 4d). The ‘root sensitivity’ makes the sensor successfully working with both low and high hydrogen concentrations, thereby increasing its working range.

Stable response of a sensing element over its lifetime is a vital parameter of any sensor and is one of the major requirements to the sensor operation. In order to study the sensor stability, we compared responses to 1000 ppm of hydrogen in air just after the deposition and after 4 months of intensive use (Fig. 5, green and red curves). One can see that functionality of the degraded sensor has remained, although the response has become slower and weaker. The response time was determined by fitting the time dependence of the response, $$a_{PC1} \left( t \right)$$, with the sum of two exponential functions: $$a_{PC1} \left( t \right) = a_{1} \exp \left( { - t/\tau_{1} } \right) + a_{2} \exp \left( { - t/\tau_{2} } \right)$$. In all our approximations, the second term was 5–10 times slower than the first one, therefore, we consider the first term as characterizing the sensor response time (Table 1). The degradation has led to 2 times increase in the $$\tau_{1}$$ response time.

The degradation may be associated with poisoning of the catalyst, deterioration of the WO3/Pd interface, or degradation of WO3 gasochromic properties. As for the first assumption, palladium operation could be recovered by annealing as reported in Ref.43. This is why in our experiments, the sensor was annealed at 200 °C for 1 h. However, we did not observe any substantial improvements (Fig. 5, blue line), except for a slight decrease in the response time. Presumably, a difference from Ref.43 was the use of the ultrathin catalyst film in our nanostructure. In our opinion, the most likely mechanism restricting the sensor functionality was degradation of the ultrathin palladium film adhesion due to multiple cycles of adsorption/desorption of hydrogen with the change of the palladium volume. This means that the most likely way to prolong the lifetime of the sensing element is using an adhesive sublayer under the catalyst or replacing pure palladium by its alloy44,45,46,47. One can also deposit a polymer coating above the palladium film, since the latter presumably has an island structure and will be “glued” to substrate. However, the polymer should be permeable to hydrogen. Another possible approach is a pretreatment of the $${\text{WO}}_{3}$$ surface before the palladium deposition (e.g., by plasma).

## Humidity and temperature effects on the sensor selectivity

Metal oxide-based gas sensors are known to be sensitive to humidity and temperature48,49,50. Therefore, a practical hydrogen sensor must differentiate its selective response that can be masked by other factors51,52,53,54. In this section, we show that the use of two principal components allows achieving the selectivity to hydrogen exposure.

In additional experiments, we have studied an influence of humidity and temperature on the sensor response and processed these results by PCA. As-deposited sensor sample was subsequently subjected to the following conditions: (i) dry air of the room temperature, (ii) wet air of a relative humidity (RH) of 30%, (iii) heating up to 60 °C, (iv) both humidity and heating simultaneously, and (v) 1000 ppm of hydrogen in dry air at room temperature (bars in Fig. 6a). By processing the obtained spectra, principal components were built (Fig. S5 in Supplementary material). Let us note that the principal components differ from those obtained in the previous section since they are built based on another experimental dataset.

The humidity and temperature (blue and red regions in Fig. 6a, respectively) caused changes of the first principal component, $$a_{PC1}$$, of different signs. The same was for the amplitude of the second principal component, $$a_{PC2}$$, although its response was much weaker. At changing both humidity and temperature, $$a_{PC1}$$ expectedly showed a differential response (pink region in Fig. 6a), whereas $$a_{PC2}$$ did not demonstrate any clear behavior due to its weak response. Therefore, the amplitude of $$a_{PC1}$$ was affected by each of steps i–v.

Interestingly, in the presence of hydrogen (orange region in Fig. 6a) $$a_{PC2}$$ showed a strong response. The same can be seen for $$a_{PC1}$$, although this can be confused with the effect of heating. As for $$a_{PC2}$$, it demonstrated better selectivity to hydrogen than $$a_{PC1}$$. However, this selectivity is not fully certain, and the best choice is a simultaneous analysis of the both components. Figure 6b illustrates an observation of a mutual change of the principal components to different impacts as a diagram of $$a_{PC1}$$ vs. $$a_{PC2}$$. On this diagram, the response to hydrogen exposure (orange dots) is markedly differed by its trend.

Why does the second principal component change significantly to hydrogen only, whereas all the impacts change the first principal component? Such behavior is observed because both humidity and temperature lead to significant spectral shifts of the resonance, whereas the changes in the resonance intensity are small. On the contrary, the second principal component (Fig. S5 in Supplementary material) describes a change of the resonance intensity—the main transformation in spectra caused by hydrogen.

## Conclusions

In this manuscript, a hydrogen sensor based on a 1D nanostructure comprising a dielectric grating (Al2O3), gasochromic oxide (WO3) and catalyst (Pd) is proposed. The Pd catalyst film was as thin as 1 nm that allowed to significantly decrease absorption in the nanostructure. As a result, a high-Q guided-mode resonance was observed at normal incidence. Transmission spectra were measured at 0–0.12% of hydrogen in air or in nitrogen. It was shown that, the sensitivity to hydrogen was 7 times lower in air than in nitrogen atmosphere. The detection limit of 100 ppm of H2 was demonstrated.

Sensor response was treated by the principal component analysis dealing with an integral spectral response and, thereby, carrying out noise averaging. A growth of sensitivity at small hydrogen concentrations was observed. It is shown that the reason for such a behavior is the hydrogen decomposition reaction catalyzed by palladium, which follows the root dependence known as Sievert’s law.

Selectivity to hydrogen was proved by PCA when changing humidity of the exposing atmosphere and heating the sensor.

Long term stability of the sensor was investigated. Although the changes in the response magnitude and time were observed after 4 months and dozens of the redox circles, the sensor retained its functionality.