Detection of trace metals in biogas using extractive electrospray ionization high-resolution mass spectrometry

Abstract On-line measurements of metal emissions in energy conversion systems at very low concentrations are difficult to perform using existing techniques. Metals are of high importance due to their detrimental impact on human health, the environment and various industrial processes and/or equipment. Herewith and for the first time, we report the real-time detection and characterization of metals and trace elements in a Swiss biogas production plant using a novel technology based on an extractive electrospray ionization (EESI) source coupled to a high-resolution time-of-flight mass spectrometer (TOF-MS). The deployment examines the ability of the EESI-TOF to resolve highly transient signals, while providing a relatively straightforward and well-characterized platform for in-field diagnostic measurements. The EESI-TOF-MS was operated in the negative ion production and detection mode, and qualitative and quantitative results for a range of trace metals (e.g. Fe, Cu, Zn, Cd, Pb, etc.) were obtained. On-site results showed fast responses (1 Hz) and detection limits below 3 ng/m3. In addition, the EESI-TOF-MS was used for the off-line analysis of condensable trace metals of biogas samples collected using a continuous liquid-quench sampling system in 2-propanol. The results of the offline and online methods were compared and show good agreement.


Introduction
Biomass energy is considered as one of the renewable energy sources that meets climate change goals and contributes to the circular economy. It refers to the conversion of biogenic waste such as agricultural, industrial and domestic waste into solid, liquid and biogas fuel. Bioenergy conversion processes include thermal (i.e., combustion, torrefaction, pyrolysis, gasification), biochemical (i.e. anaerobic digestion, fermentation, composting) and electrochemical procedures. One of the most common biogas production techniques is anaerobic digestion, during which specific groups of microorganisms promote a sequence of chemical processes and decompose biodegradable organic material (e.g. sewage, municipal waste, agricultural waste, manure, and food waste). The chemical composition of the feedstock, the bacterial substrate and the available nutrients have a direct effect throughout the whole process and determine the production efficiency and quality of the final biogas and side products [1]. Raw biogas is a complex mixture of output gases, primarily consisting of methane (50e75%), carbon dioxide (20e45%) and traces of other gases such as nitrogen, oxygen and hydrogen as well as volatile organic compounds, hydrocarbons, organohalogens, organosulfur compounds, or siloxanes [1e4].
Trace levels of metals have been found in biogas samples in various concentrations depending on the origin of the feedstock or the origin of the biogas itself. Representative elements include mercury, zinc, arsenic, tin, copper and vanadium. In addition, analysis of solid deposit samples from engines using biogas have shown the presence of trace levels of antimony, zinc, arsenic, tin, aluminum, and titanium [5e8]. In industrial facilities involving energetic gas-degrading treatment processes, metals can cause damage (e.g. corrosion, amalgamation, or deposit formation) to equipment and installations essential for the biogas synthesis, distribution and use (e.g., ppb levels of silicon and sulfur compounds can damage the anode's of solid oxide fuel cells) [8]. Even though there are recent regulations and measurement standards set-up for monitoring biogas composition (e.g. sulfur content, chloride and fluoride concentration, ammonia, amines, water, methane, carbon monoxide, dust impurities, etc.), currently there are not yet established regulations to determine the acceptable concentration levels of metals [5e10]. The only exception is for volatile silicon compounds, which according to the technical standard EN 16723 -Part 1 [9] should not exceed 0.3 (pure) to 1 (diluted) mg/m 3 and according to the EN 16723 e Part 2 [10], it should be 0.5 mg/m 3 . Metal traces in biomass feedstock or in combustion gas from sludge have also been investigated [11e13]. The Commission Implementing Decision (EU) 2019/2010 [14] established the best available techniques conclusions, under Directive 2010/75/EU of the European Parliament and of the Council, for waste incineration. For a municipal solid waste incineration plant, the sum of Sb, As, Pb, Cr, Co, Cu, Mn, Ni, V. Cd should have a value in the range 0.01e0.3 mg/Nm 3 . During combustion of wastewater treatment sludge, the inorganic components convert into ash, which contains a major fraction of heavy metals such as Hg, As, Cd, Cu, Pb, Cr, Ni and Zn and siloxanes [15]. According to the European legislation [16] (European Commission, Council Directive 86/278/EEC), the maximum acceptable total heavy metal concentration for Cd, Cr, Cu, Hg, Pb, Ni and Pb is 5, 800, 800, 5, 500, 200 and 2000 mg/kg of dry solids respectively. The Flemish VLAREA [17] for the same heavy metals gives the following upper limit thresholds: 6, 250, 375, 5, 300, 50, 900 2000 mg/kg of dry solids respectively. Recent works on pyrolysis of end-of-life tires [18] and polyurethane foam [19] indicate the impact of heavy metals on the environment and industrial processes.
A major technological challenge for highly standardized quality assurance of biogas production with low contaminants is the development of on-line process analytical technologies/solutions that will provide qualitative, quantitative and real-time chemical information about the metal content. Existing mainstream methodologies available in the scientific literature for the analysis of trace metals in biogas include mainly off-line techniques. Elementspecific techniques such as inductively coupled plasma coupled to mass spectrometry (ICP-MS) [20] or to optical emission spectroscopy (ICP-OES) [21] have been successfully applied for the identification and qualitative analysis of metals in natural gas, biomethane and biogas. Atomic absorption spectrometry (AAS) [5] has also been used for the analysis of the chemical composition of light and heavy metals in biogas reactors and those present in food waste and sewage sludge planned to be used as feedstock in biogas plants. These techniques are standard offline methodologies for trace and ultra-trace analysis of liquid samples, but despite their numerous advantageous analytical characteristics they are usually not used for real-time, in-situ chemical analysis purposes. Samples need to be firstly collected on filters, trapped in metal canisters or in tubes filled with absorptive materials, in gas collection bags (Tedlar bags) or pre-concentrated into organic solvents and then transported back to the lab, stored, pre-treated and then analyzed [22e24]. This implies lack of real-time, time-resolved chemical information, which can be crucial for dynamic industrial processes. Moreover, artifacts and errors may occur at the various stages due to sample handling, and potential cross-contamination or chemical instabilities within the sample matrix over long periods.
Since conversion of biomass to grid-quality biomethane is a major technological initiative throughout Europe for renewable energy providers [1], the optimization of the bioenergy systems requires versatile online analytical tools capable of measuring at different process units (to complement existing offline analytical methodologies). In general, online tools are needed to continuously monitor the performance of cleaning systems in order to control the gas quality and to protect the downstream equipment, whereas offline measurements can be used for validation of the online systems. The latter has a direct environmental impact if the trace elements are relatively high and no-adequate adsorbent materials are implemented during the processing of biogas. In addition, the role of trace metals (e.g. Fe, Zn, Mo and Se) is to maintain a stable and an efficient conversion process. These micro-nutrients act as microbial agents in the anaerobic digestion process. However, depending of the type of the substrate to be digested, some trace metals (especially heavy metals) can have toxic effects and an inhibitory impact on the digestion process at a certain concentration level. An online tool can monitor these metals, their presence or absence, and may help to determine the actual demand of the methane-forming bacteria for certain micro-nutrients [4e6]. Continuous online monitoring of metals is a non-trivial problem, requiring sampling systems capable of dynamically adjusting to a wide range of input gas/particle streams. For this purpose, an extractive electrospray ionization (EESI) source coupled to a field-deployable, high-resolution time-of-flight mass spectrometer (TOF-MS), initially developed for metal detection in ambient atmospheric aerosol particles [25], was installed and adapted in a biogas production plant in Switzerland to detect in-real time metals in the production and processing line. EESI is an ambient soft ionization scheme that allows a clear molecular identification and compositional characterization of compounds from various origins [25e32]. Its novelty lies on the combination of the selective gentle ionization of target compounds or groups of compounds with real-time analysis. The operating principle of the EESI is based on the interaction of a continuously sampled aerosol plume colliding with a highly charged (positively or negatively) spray of a solvent or mixture of solvents. Soluble components from a sample flow are extracted into the spray, ionized by the Coulomb explosion and then introduced into the mass analyzer for mass-tocharge separation and detection [25,27]. The combination of the EESI source with a transportable TOF-MS system fulfills the demanding analytical requirements for on-site chemical analysis, offering qualitative and quantitative information, high sensitivity (low limits of detection e LODs in the sub ng/m 3 ), fast response times (1 s or faster), compound selectivity (depending on the operating ionization mode and the selected reagent ions of the ESI solution), high mass-to-charge resolution (up to 14,000 Th/Th), repeatability, reliability (elimination of artifacts), robustness and user-friendliness [25].
This study presents for the first time the successful integration and application of an on-line EESI-TOF-MS to a dynamic industrial process. The capability of the EESI TOF-MS to adjust to new complex sampling environments is evaluated and its ability to perform real-time measurements, on-line and off-line, is assessed.

Motivation and objectives
The motivation for this work is to apply a recently developed high-throughput analytical technology for trace metal detection based on extractive electrospray ionization mass spectrometry in real-time and on-line bioenergy processes such as combustion and gasification of dry biomass or anaerobic digestion of wet biomass in a biogas production plant. For this first industrial field test, biogas was selected as the easiest case. The objectives are: a) to identify which metal elements are present in the raw biogas directly after its production from the anaerobic digestion of manure and mixed organic sources, b) to evaluate the quality of the biogas as it passes through a cleaning system, c) to determine quantitatively the main metals present along the entire production and processing line and d) to compare on-line analysis with off-line measurements of raw biogas samples collected by a continuous liquid-quench sampling (LQS) system.

Biogas production process and sampling procedure
Field measurements using the EESI-TOF-MS were conducted in a biogas production plant in Switzerland where biogenic waste (manure and mixed organic waste) undergo anaerobic digestion to produce biogas. Briefly, the plant consists of a thermophilic plugflow digester and two mesophilic continuously stirred tank reactor digesters. The plant receives pig manure from farmers and different kinds of organic waste from the regional food industry as well as biowaste from the source separated collection of municipal solid waste, which is treated in the thermophilic digester [33]. When biogenic waste reaches the plant, solids and liquids are stored in different storage areas and undergo separate fermentation processes. After an initial pre-separation and shredding process of the solid waste, the fermentable material is loaded into a dry fermenter operating at 55 C for thermophilic fermentation for around 20 days. Regular feed of substrate ensures the continuity of the raw biogas and solid by-products production process. Meanwhile, the liquid substrate undergoes mesophilic fermentation at 42 C generating CH 4 and CO 2 . In both fermentation cases, the fermentation residues are further digested to produce compost or liquid fertilizer for agricultural use. The raw biogas produced during the solid and wet fermentation process is stored and further processed (separation from CO 2 and H 2 S) to reach natural gas quality (with CH 4 content > 96%) using a catalytic direct methanation system including a bubbling fluidized bed [34] and after odorization is then fed into a gas distribution network system.
The EESI-TOF-MS system was installed in an analytical instrumentation-hosting container connected with the research pipeline system of the raw biogas (coming from the dry fermenter) and a two-step absorption-based biogas cleaning system (for the removal of H 2 S and other sulfur compounds, terpenes and siloxanes). The hosting container was equipped with various on-line analytical instrumentation such as CO 2 , CH 4 , CO, O 2 sensors, a micro gas chromatographer (m-GC), a sulfur chemiluminescence detector (SCD) and an LQS system to collect condensable trace compounds in a suitable organic solvent for subsequent offline analysis in the laboratory using GC-MS, GC coupled to a flame ionization detector (FID), GC and SCD, as well as GC-ICP-MS.

EESI-TOF-MS
On-line and off-line measurements were performed using an inhouse adapted commercial EESI-TOF-MS (TOFWERK AG, Thun, Switzerland). The system has been previously used for organic and metal aerosol particles analysis and has been successfully deployed for laboratory measurements, ground-based sampling of atmospheric aerosol, and aboard aircraft [25,27,32]. It consists of an EESI source, an atmospheric pressure inlet (API) TOF-MS, and a computer for data acquisition. The technical characteristics of the hardware of the EESI source and the mass analyzer have been described previously and details can be found in the literature [25,27]. Negative ion production and detection mode was specifically selected to allow the detection of trace metals for this application. The electrospray source consists of a highly negatively charged (À2.9 kV) working fluid of 1:1 water:methanol solution doped with 100 ppm of disodium EDTA dihydrate sprayed via a conventional gas chromatography (GC) fused silica capillary (BGB Analytik AG, Switzerland) into the heated (at 275 C) stainless steel inlet capillary of the API-TOF-MS. The electrospray capillary had a total length of 70 cm and an inner diameter (ID) of 75 mm, whereas a microfluidic flow controller was providing a continuous stable reagent flow of charged droplets through it and close to the TOF-MS inlet (<1 cm). A metal compound interacting with the generated jet of charged droplets (Taylor cone jet) produces negatively charged complexes with the EDTA, which can be then detected by the TOF mass analyzer. The inlet capillary of the API-TOF-MS had a flow rate of 1 L/min and the data acquisition frequency was set at 1 full mass spectrum (m/z 1e1000 Th) per second, while the acquired data were averaged at 1 full mass spectrum per 30 s.

Measurement and quantification procedures
Online field measurements: For the on-line measurements in the premises of the biogas production plant, four sampling points were installed to deliver a given compressed biogas flow. Fig. 1a shows the location of the four sampling points related to the twostep adsorption beds. Sampling point 1 was directly connected to the raw biogas. Sampling point 2 also connects to raw biogas, but with the option of introducing a gas mixture which contains H 2 S, DMS and COS for gas cleaning experiments; during the measurements, this was not activated, making sampling points 1 and 2 equivalent. Since the metal concentrations measured at Point 1 and 2 were almost the same, they demonstrate the good reproducibility (signal variation up to 1.6%) of our measurement procedure. Sampling point 3, delivered semi-clean biogas after an absorption column (AC1) filled with Sulfa Trap™ R7 sorbent material for bulk H 2 S removal. Sampling point 4 supplied the clean biogas stream after passage through a second absorption column (filled with Sulfa Trap™ R2) (AC2) for polishing and removal of terpenes, siloxanes and dimethylsulfide (DMS) [35].
The raw, semi-clean or clean biogas stream coming directly from one of the four individual sampling points was mixed with a pure nitrogen flow (PanGas AG, Switzerland) to a total flow of 1.5 L/min. Fig. 1b presents the experimental setup used during the on-line biogas measurements. The EESI-TOF-MS was sampling at 1 L/min and the remaining 0.5 L/min was vented to atmosphere. Both biogas and N 2 flows were passing through 6.35 mm ID PTFE tubing and were adjusted by standard stainless steel integral bonnet needle valves (Swagelok Switzerland e Arbor Fluidtec AG). The two gas flows were mixed within a 6.35 mm standard Swagelok T-piece union at three different ratios (biogas flow/total flow ratio: 1/10, 1/5 and 1/2) prior to their introduction into the EESI source and the TOF-MS. The sample sequence used was from the most to the least diluted. In addition, due to the biogas composition (58% CH 4 and 42% CO 2 ), dilution with N 2 ensured its safe interaction with the highly charged electrospray reagent ions and its safe operation due to the flammable and explosive nature of CH 4 in case of a unexpected electrospray spark in the EESI chamber (even though the system was properly grounded). A high accuracy portable gas flow calibrator (DryCal FlexCal, Mesa Labs) was used to measure each individual gas stream to ensure stability of the mixing ratios and of the total sample flow. Each dilution step was sampled for 20 min with a 10-min interval of pure N 2 flow prior, during and at the end of each step. Three measurements were made on each of three different days. The above-described procedure was followed for all four sampling points.
Quantification procedure for the on-line measurements: For quantification purposes, calibration of selected metals detected during the on-line biogas testing was performed in the laboratory using a synthetic biogas mixture of high purity CH 4 (58%) and CO 2 (42%) simulating the bulk gas composition of the industrial biogas. Figure S1a shows a schematic representation of the calibration setup used. The output gas flows were controlled using standard stainless steel Swagelok needle valves and were mixed within a 6.35 mm standard Swagelok T-piece union. Five water-soluble metals (iron (II) sulfate heptahydrate, zinc acetate anhydrous, cadmium chloride hydrate, lead acetate trihydrate) were diluted in Milli-Q water at four different concentration levels (125 ppb, 250 ppb, 500 ppb and 1 ppm). A 2DX autosampler connected to an Apex Q Desolvating nebulizer (Elemental Scientific Instruments, France) was used to generate an aerosol containing the five dissolved metal compounds. With the temperature set at 60 C, the nebulizer was connected with a mass flow controller (red-y smart series, V€ ogtlin Instruments GmbH, Switzerland) providing a nitrogen flow rate of 1.2 L/min. Samples were then passed through a silica gel diffusion dryer and the dry aerosol was blended with the synthetic 1:5 biogas-N 2 mixture resulting in a total flow of 1.5 L/ min (as in the biogas plant). The aerosol was passed through a multichannel extruded carbon denuder, and split into three parts: 1L/min was introduced into the EESI-TOF, and 0.3 L/min into a scanning mobility particle sizer (SMPS, TSI Inc., USA), and the remaining aerosol was released to the exhaust. A Gilibrator II standard flow kit (Gilibrator II® System) was used to measure the individual flows and to ensure their stability.
Offline analysis of LQ samples: Raw biogas was quenched using a continuous built-in-house LQS system for off-line analysis (from the sampling point 1 e Fig. 1a). The LQS system was developed at the PSI for sampling, analysis and characterization of condensable and non-condensable species in the biogas stream and it is described in detail elsewhere [36e38]. Its operating principle is based on the continuous quenching of a gas sample in a liquid solvent (2-propanol) at low temperature at a given gas-to-liquid ratio (G/L). In this study, G/L ratios were between 1037 and 1172 (Table S1). Figure S1b describes graphically the experimental setup used for the analysis and calibration of the liquid-quench samples using the EESI-TOF-MS: Liquid-quench samples were transferred in 100 mL Duran laboratory bottles and aerosolized using a Topas aerosol generator ATM 220. The generated aerosol passed through an aerosol diffusion dryer (Cambustion Ltd, UK) and then was mixed with N 2 . The mixed flow was then introduced into the EESI-TOF-MS (1L/min) and the SMPS (0.3 L/min), and the remaining aerosol exhausted. Each sample was measured in two duplicates. The calibration was carried out using commercial standard solutions of Fe, Cu, Zn, Cd and Pb diluted in pure 2-propanol to the following concentrations: 125 ppb, 250 ppb, 500 ppb, 1000 ppb and 2000 ppb. The 2-propanol based liquid-quench samples define a new analytical environment for the ionization source compared to the conventional water-based solutions used for the determination of organic or metal aerosols in ambient air quality and monitoring applications.

On-line biogas measurements
A representative EESI-TOF mass spectrum (m/z 335 to 540 Th) of the raw biogas sampled from the sampling point 1 during the field measurements is shown in Fig. 2. The primary ion peaks of the ESI solution (disodium EDTA) are detected at the following mass-tocharge (m/z) ratios: 291, 313 and 335 and correspond to the [EDTA-H] -, [EDTA þ Na -2H]and [EDTAþ2Na-3H] -, respectively. Sampled metal particles interact with the highly charged reagent analyte spray droplets and bind strongly among them, generating complexes of the general form: [EDTA þ X M e yH] -, where x is the atomic mass of the metal isotope and y the number of hydrogen  cations lost during the deprotonation, which depends on the oxidation state in which the detected metal exists [25]. From the collected data, a range of metals were identified (Table 1) based on their measured stable isotopes which were observed in ratios similar to their natural abundance. The signal intensities for all data (field and laboratory) were normalized to the measured signal intensity of the primary ion m/z 291, and a linear regression was applied for the different measured concentrations.
In Fig. 2 An important part of the on-line measurements was to investigate how the biogas stream interacts with the electrospray droplets and whether the sample matrix affects the detection efficiency. As part of the development of the measurement protocol, three different biogas to total flow ratios were individually tested using N 2 to dilute the biogas (namely, the following ratios 1/2, 1/5, 1/10). Nitrogen was used as dilution gas for several reasons: the content of solid material in the raw biogas was not known, the EESI performance under N 2 atmosphere was investigated and well determined [25], as well as for safety reasons. Due to the ionization energy of CH 4 and CO 2 , the signal intensity of the primary ions of the EDTA was about 5 times (for the biogas to total flow ratio of 1/2) higher compared to the case of a pure N 2 gas flow. As expected, the net intensity of a metal normalized to the net intensity of EDTA primary ion increased linearly with increasing biogas/(biogas þ N 2 ) ratio. Fig. 3 shows this result for m/z 403 ([EDTA þ 114 Cd -3H] -) with a linear regression coefficient R 2 value of 0.9954. For all metals detected at different sampling points, the R 2 was ranging from 0.9927 to 0.9999. These results show that the matrix effects due to biogas can be adequately corrected and any ratio between 1/2 and 1/10 can be used for the calibration.
As the raw biogas is compressed and then passed through the two-stage absorption column cleaning system, the particulate metal concentration decreases and the chemical composition changes, and the relative signal intensities respond correspondingly. This is true for all the metals detected, as shown in Fig. 4 for the measured complexes of EDTA with Li, V, Cr, Fe, Ni, Se, Mo, Ag, Cd, Sn, Ba, Pb, Cu and Zn. During on-line measurements, the most abundant complexes detected at all sampling points were those containing Cu and Fe, whereas the least abundant elements were Cr, Ba and Pb. A small difference (up to 1.6%) of net intensity was found between the sampling points 1 and 2. The latter were a few meters apart from each other and no equipment was installed in between, resulting in minimal losses. The semi-clean biogas exiting the first sorbent column (Point 3) shows a lower trace metal content than does the raw biogas. The net signal intensity decreases by about 62% for Sn, 23% for Cd, 59% for Pb, and 50% for Ba while the decrease of the remaining 14 metals ranges between 23% and 42% (Fig. 4). Similarly, all metals showed a further decrease after the second sorbent column (Point 4), with the Ba and Pb content decreasing below the detection limits of the EESI-TOF-MS. These results show that the installed cleaning system dedicated to adsorb other organic compounds was able to remove 35e100% of the metals present in the raw biogas (Table S2). The evolution of the signal intensities of the metals detected as they pass through the cleaning system is shown in Table S3.
Targeted water-soluble metal compounds were used for the offsite calibration of the EESI-TOF-MS in order to quantify specific metals identified during the on-line measurements. Their selection was based on their presence in the biogas (values were greater than LOD for all four sampling points) and their relevant environmental impact (e.g. Cd, Pb and Zn are hazardous air pollutants). Figure S2 shows the calibration curves for the compounds containing Cd, Fe Table 1 Summary of the metal compounds detected during the on-line biogas sample analysis by our EESI-TOF-MS system. The characteristic integer m/z are presented from the most to the least abundant.

No
Metal Main ion observed m/z (Th)  and Zn. In addition, previous investigations [16] showed that the sensitivity changes by 5e8% when different compounds containing the same metal were analyzed with the EESI-TOF-MS. Even though the chemical form of the detected metals is not known, an accurate quantification can be achieved using specific metal chelation with EDTA. Table 2 summarizes the analytical characteristics (the coefficient of determination R 2 , LOD and limit of quantification e LOQ of the metal compounds, and LOD of the individual metals) of the EESI-TOF-MS system. The LOD was calculated as 3 times the standard deviation (s) of the blank, and the LOQ as 10 times s. Detection limits for the individual metals were in the low ng/m 3 concentration range (<3 ng/m 3 ). The concentrations of all five metals were found to be below 2 mg/m 3 for all biogas measurements (Fig. 5). At each individual sampling point the Cu concentration was the highest, and that of Pb the lowest. Going from the raw to the clean biogas the overall collection efficiency of the five metals was 64% (Cu), 60% (Fe), 62% (Zn), 36% (Cd) and~100% (<LOD for Pb). Individual efficiencies are in Table S2.

Offline measurements
Offline measurements of condensable trace compounds present in the raw biogas stream quenched by 2-propanol were performed at sampling point 1. Five samples from two different dates were analyzed with G/L ratios (water tar free normalized, for conditions at 0 C and 1013 mbar pressure) ranging between 1037 and 1172 by volume (the G/L corresponding to each sampling point can be found in Table S1). Three blank samples were also measured (two blank samples of 2-propanol obtained from the operating LQ system and a blank sample obtained from the solvent storage bottle). Traditionally, liquid-quenched samples are analyzed by GC-MS, GC-FID or ICP-MS for the determination of different organic and inorganic species (such as terpenes, siloxanes and metals). Here, we employed an EESI-TOF-MS as a complementary alternative methodology for metals detection. All metals detected in the online measurement were also measured in the liquid samples (Table S4). For reasons of comparison with the online measurements, Cu, Fe, Zn, Cd and Pb in the LQ samples were quantified. Table S5 summarizes the individual concentrations of the five metals in the different samples given in ng/ mL. Multiplying the concentration of each metal found in the liquid sample by the corresponding G/L ratio the metal concentration in the biogas (in mg/m 3 ) was calculated (Table 3). This results in values for the off-line measurements that are 24%, 9%, 17%, 34%, and 34% lower for Cu, Fe, Zn, Cd and Pb, respectively, compared to the on-line measurements. Most probably, this is due to a different composition of the feedstock loading for anaerobic digestion. Still, these concentrations from the off-line measurements appear to be comparable to the on-line measurements. .

Conclusions
The on-line analytical technology, based on an extractive electrospray ionization (EESI) source coupled to a field-deployable, high-resolution TOF-MS is the first of its kind that was applied for the real-time detection and monitoring of trace metals at an industrial facility processing biogenic waste and producing biogas for commercial use. Raw biogas and processed biogas passing through a two-stage cleaning system was continuously sampled at different points and several metals were qualitatively and quantitatively analyzed. The presented analytical technique showed very good performance in monitoring the level of the metal content at various steps in the process of biogas production, to assist the performance of metal removal of the installed gas cleaning systems, and controlling the biogas quality regarding these contaminants. The installed sorbent materials, dedicated to remove particular organic contaminants, show a relatively high efficiency of the metal removal in a non-selective way. In total, 14 metals were detected successfully. From quantification measurements, about 64% (for Cu), 60% (for Fe), 62% (for Zn), 36% (for Cd) and 100% (for Pb) were removed from the raw biogas, respectively. This obtained information can help in the development of cleaning and filtering systems that are able to efficiently remove metals from the raw biogas, and/or sorbent beds dealing with different contaminants including hazardous metals (for minimizing the cleaning steps). It will also assist regulation offices to set and control the biogas quality and emission standards regarding toxic metals and heavy metals. In addition, the proposed technique could be expanded and adapted for use in other thermo-chemical conversion methods (e.g. pyrolysis or gasification of biomass or waste feedstock).
Furthermore, off-line qualitative and quantitative analysis of raw biogas sampled by a cold solvent (2-propanol) using a continuous liquid-quench system was performed using the EESI-TOF-MS. The results were comparable to the online measurements. The EESI-TOF-MS presents a very promising technique to determine the content of trace metals in LQ biogas samples and is able to complement other analytical technologies (e.g. GC-MS, GC-ICP-MS, GC-FID) focusing on the analysis of organic substances such as siloxanes, terpenes, etc. In this way, a complete dataset can be generated providing insights into the chemical profile of biogas for quality assurance and policymaking activities and decisions.
The EESI-TOF-MS is currently the only available transportable  system offering real-time measurements of trace metals with high sensitivity, high m/z resolution, reliability and robustness that can compete with existing conventional off-line approaches. The online measurement capabilities eliminate any potential chemical artifacts due to sample transportation, contamination or instability risks and provide a unique analytical solution for on-site chemical analysis especially for monitoring of industrial processes.
CRediT authorship contribution statement Stamatios Giannoukos: designed and performed the experiments, as well as analyzed the data, wrote the manuscript, discussed and interpreted the obtained data. Mohamed Tarik: designed and performed the experiments, as well as analyzed the data, wrote the manuscript, discussed and interpreted the obtained data. Christian Ludwig: discussed and interpreted the obtained data. Serge Biollaz: discussed and interpreted the obtained data. Jay Slowik: discussed and interpreted the obtained data. Urs Baltensperger: discussed and interpreted the obtained data. Andre Stephan Henry Prevot: discussed and interpreted the obtained data, All authors commented and agreed with the manuscript.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Table 3 The calculated concentrations of five metals in the biogas based on the analysis of the liquid samples. Comparison with on-line data obtained from the same sampling point on different dates.