Operando characterization of batteries using x-ray absorption spectroscopy: advances at the beamline XAFS at synchrotron Elettra

X-ray absorption spectroscopy is a synchrotron radiation based technique that is able to provide information on both local structure and electronic properties in a chemically selective manner. It can be used to characterize the dynamic processes that govern the electrochemical energy storage in batteries, and to shed light on the redox chemistry and changes in structure during galvanostatic cycling to design cathode materials with improved properties. Operando XAS studies have been performed at beamline XAFS at Elettra on different systems. For Li-ion batteries, a multiedge approach revealed the role of the different cathode components during the charge and discharge of the battery. In addition, Li-S batteries for automotive applications were studied. Operando sulfur K-edge XANES and EXAFS analysis was used to characterize the redox chemistry of sulfur, and to relate the electrochemical mechanism to its local structure.


Introduction
In a world with a growing population the demand for energy is growing in parallel, and up to the present fossil fuels have supplied most of humanity's energy. The environmental costs, such as the effects of climate change, can only be thwarted in a low-carbon society. This requires alternative energy sources, such as wind and solar, which, notwithstanding recent advances, are still intermittent and unreliable. Batteries are one of the most important devices for energy storage and their implementation in grid-level sectors would make carbon-free energy sources competitive and effective [1]. In the automotive sector, replacing conventional cars with battery electric vehicles would offer an opportunity to significantly reduce future carbon dioxide emissions [2]. Finally, in the area of information and communication technology the advances in processing power and increasingly complex mobile and portable devices demand more and more batteries with outstanding characteristics. In this context, much effort is being made to design safe, lightweight, small and environmentally friendly batteries, with a high-energy density and long run and lifetimes, sometimes in an all-in-one solution.
Ideally, the dynamic processes that rule electrochemical energy storage in batteries should be studied under operating conditions. In addition, researching new high-performance electrode materials requires a better understanding of the electrochemical reaction mechanisms that take place during the charge/discharge processes [3]. In operando experiments the data are expected to provide a realistic representation of the reaction behavior found under normal operating conditions. The typical drawbacks of ex situ experiments due to sample transfer, such as the alteration of air or moisture-sensitive species, are avoided, and so are the relaxation reactions that may occur when the electric circuit is opened. Operando studies can be performed on a single test cell. In this way the uncontrolled differences between cells, which are needed for a stepwise ex situ study of the electrochemical mechanism, are suppressed. In addition, operando studies allow us to check the structural and electronic reversibility of a battery system while at least one full cycle is performed. For all these reasons, ex situ studies of electrode materials are now complemented by operando measurements using complementary tools such as x-ray diffraction and/or spectroscopic techniques such as x-ray absorption spectroscopy (XAS).
XAS is a synchrotron-based technique that measures the x-ray absorption coefficient as a function of energy above the absorption edge of a selected element [4]. Besides being chemically selective, it is sensitive to dilute elements and requires small sample volumes for analysis. Since XAS is a local structural probe, it is applicable to all states of matter, including crystalline solids and amorphous and liquid states, allowing the accurate study of a large variety of materials. The x-ray absorption near edge structure (XANES) part provides information about the oxidation state and site symmetry of the photoabsorber. The extended x-ray absorption fine structure (EXAFS) part of the spectrum probes short range order, namely bond distances, coordination numbers and, to some extent, the chemical identity of nearest neighbors.
X-rays in XAS can penetrate the electrochemical cells, permitting an in situ characterization of the whole system [5,6]. In this way, valuable information about the electrochemical reactions and degradation mechanisms of electrode materials during cycling can be obtained. These results, together with the electrochemical data and complementary analytical tools, provide a deep understanding of the electrochemical reaction mechanisms to guide the conception of new materials for batteries. Furthermore, chemometric approaches can be applied to a set of experimental XAS data recorded in situ, allowing us to obtain a more complete understanding of the cell dynamic. The first example was reported in [7], where among various chemometric techniques, the use of multivariate curve resolution (MCR) analysis enabled the identification of a new species during the charge of a Cu 0.1 V 2 O 5 /Li ions battery, and the checking of the structure by EXAFS analysis.
For Li-ion batteries there are numerous examples in which XAS has been applied in operando mode (for example [5,[8][9][10][11][12][13]). In the majority of these studies XAS is used to investigate which elements are electrochemically active, and at which point of the charge/discharge cycle. This clarifies the role of the metallic ions that constitute the cathode materials during the Li insertion, in particular the redox change of the metallic ions, and how this is connected with the electrochemical process. Usually the redox evolution is obtained by performing a linear combination fitting (LCF) of the XANES part of the spectra, either using the XANES spectra of reference compounds or, more often, taking as reference spectra those that correspond to the initial and final states of the process [14]. In some cases the EXAFS part can also be analyzed, yielding a local structural view of the cathode material during the operation of the battery [15,16].
More recently, XAS has also been applied to the study of Li-S batteries. These are emerging high-energy-density batteries with great potential for automotive applications. Since the reactions involved in the electrochemical mechanism include solid-liquid-solid transformations that cause great complexity, XAS is a suitable analytical tool to characterize the initial and final solid phases such as S 8 and Li 2 S, and also the intermediate molecular polysulfides dissolved in the electrolyte [17][18][19][20][21][22][23][24][25][26].
The aim of this paper is to describe the beamline XAFS at synchrotron Elettra (Trieste, Italy) and the different improvements recently implemented to perform operando measurements in batteries, and to show some studies in this field. The first example regards a Li-ion battery for which a metal hexacyanoferrates-like material (MeHCFs), which is known to have an open framework structure, has been used as cathode. The XAS study was conducted at the K-edges of the different metals of the cathode, revealing the role of the two metals during the charge and discharge of the battery. The second example concerns a Li-S battery studied at the S K-edge. In this context XAS analysis was employed as an ex situ and in situ analytical tool to characterize the redox chemistry of sulfur, and to relate its local structural behavior to electrochemical performance.

General characteristics
The beamline XAFS at Elettra is dedicated to XAS. It operates from tender to hard x-rays, namely from 2.4 to 27 keV. Within this energy range, the K-edges of elements from sulfur to silver are accessible and the L-edges of the elements from yttrium to bismuth can be studied, together with those of the lanthanides. The photon source of the beamline is a bending magnet with a critical energy of 3.2 keV and 5.5 keV for Elettra running at 2 GeV and 2.4 GeV, respectively.
The beamline XAFS can perform XAS in transmission, fluorescence and converse electron yield modes. Its assets are to perform XAS with an excellent signal-to-noise ratio, stability, versatility and reliability, and a high automation level.
The optical scheme (figure 1), including the mask, collimating mirror and double crystal monochromator, is described in [38]. In 2012 the optics of the beamline were completed with the addition of a pair of SiO 2 mirrors. Their aim is to suppress the contribution of higher harmonics when working at energies below 4 keV and therefore to enhance the performance of the beamline in the lower range of operation energies. The chamber described in [39] was installed in the exper imental hutch downstream from the exit slits parallel to the monochromatic beam at 6 mrad with respect to the ground. The mirrors were recommissioned and tested. Figure 2 shows the intensity of the I 0 detector while rocking the first crystal of the monochromator around the angle corresponding to the energy of 2400 eV without and with the SiO 2 mirrors placed at 8 c θ = mrad with respect to the direct beam. The peak at around −570 V in the blue curve indicates that photons of energy corresponding to 7200 eV (2400 eV × 3) and diffracted by the Si(1 1 1) monochromator crystals are mixed with those of 2400 eV and counted by the I 0 detector. The red curve shows that the higher harmonic contribution is suppressed thanks to the lack of reflectivity at 8 mrad of SiO 2 in this energy range.
In order to evaluate the efficiency of the SiO 2 mirrors we measured the K-edge (E 7112 K = eV) x-ray absorption spectrum of an iron foil by scanning the monochromator around an angle corresponding to an energy of E E 3 2370.6 K / = = eV. The left panel of figure 3 shows that without SiO 2 , even a detuning as large as 90% of the maximum of the rocking curve does not suppress the third harmonic, as evidenced by the presence of the Fe edge, whereas the data recorded using the the SiO 2 at both 8 c θ = mrad do not evidence the presence of the Fe K-edge (figure 3: right panel). This shows that the SiO 2 effectively suppresses the third harmonic, although a quantitative evaluation of the possible third harmonic photons cannot be assessed.

Experimental station and sample environment for operando studies of batteries
The experimental station of the beamline XAFS at Elettra allows us to host different multipurpose apparatus easily. Three ionization chambers (I 0 , I 1 and I 2 ) are permanently installed for data collection in the transmission mode. In addition, two chambers with motorized sample holders allow us to accommodate multiple samples for ambient temperature and reference measurements. A silicon drift detector is installed perpendicularly to the x-ray beam direction for measurements in fluorescence mode.
Different models of in situ electrochemical cells were used for the operando XAS studies reported here. They must reproduce the same behavior as those used to test the electrochemical processes and, at the same time, they must fulfill the requirements dictated by the x-ray optics. In particular, the cell must be provided with windows that are transparent to x-rays, and at the same time it should be impermeable and corrosion-resistant.
Typical pouch cells used for operando studies of batteries are shown in figure 4. The one on the left is characterized by a large dimension of the cathode. In this particular case, the cathode material had previously been coated in an Al foil collector and assembled together with a Li anode and Celgard separator. This cell can be used at energies above 8 keV without the need for special x-ray windows along the x-ray path. If needed, a small tube can be used as a sink for the gas evolution which can take place during the electrochemical processes. On the right we show a different model of pouch cell that is used for measurements at energies of less than 4 keV, in which part of the external wrapper has been substituted with a mylar of 2 μm thickness to ensure good transparency to tender x-rays.  A different type of electrochemical cell that we used for operando studies of batteries is a Swagelok cell that was designed for operando experiments at synchrotron facilities for both x-ray diffraction and x-ray absorption, but which was recently also used for Raman spectroscopy (figure 5). This cell is described in detail in [40]. For XAS, this cell can be used in the transmission and fluorescence modes. In this cell the x-ray window is given by a Be window that was originally of 100 μm thickness. In order to use the cell in the low energy region (below 4 keV) it can be modified by decreasing the thickness of the Be down to 13 μm while at the same time decreasing its diameter to prevent mechanical failure.
In order to perform measurements at energies below 4 keV the electrochemical cells can be placed inside a chamber that is connected directly to the beamline and equipped with electrical connections. The fluorescence detector can be placed inside, as shown in figure 6. The whole system can operate in vacuum or in a gas overpressure. For in situ studies of batteries the chamber is usually filled with He at 10% above atmospheric pressure to avoid absorption of the air while at the same time avoiding the lack of electric contact within the cell induced by vacuum conditions.

Intercalation material based cathodes for Li-ion batteries
Among the cathode materials used for rechargeable batteries, the use of an open framework structure with sufficiently large interstitial spaces for the fast intercalation/release process of Li + and other cations is one of the most interesting chemical challenges. Metal hexacyanoferrates (MeHCFs) were recently proposed as a host for lithium and/or sodium ion batteries [41,42]. These structures are related to Prussian blue (PB) and are characterized by a rigid three-dimensional cubic network of repeating -NC-Fe-CN-Me-NC-units, where Me is a  transition metal. Iron and Me sites are typically octahedral in the so-called soluble structure, and the sites at the cube center are occupied by water (zeolitic water) as well as the countercations necessary to achieve charge neutrality. The cube size, which is twice the Fe-Me distance, is about 10 Å and guarantees enough space in the zeolitic channels for the insertion/ release of ions (like Li + , Na + and K + ) inside the structure.
We used Fe hexacyanocobaltate (K 0.44 Fe 1.56 Co(CN) 6 ) as the active material for the positive electrode of the Li-ion battery. We conducted the study on pristine electrodes and in the operando mode during galvanostatic cycling versus Li metal. The cathode was obtained by tape casting a slurry containing the pure active material (80%), 10% polyvinylidene fluoride (PVDF) and 10% carbon black in N-methylpyrrolidone (NMP) on a flat teflon surface. The anode comprised a Li foil and 1 M LiPF 6 in EC:PC:3DMC (ethylene carbonate, propylene carbonate, dimetlylcarbonate) was used as the electrolyte. The battery delivered 77 and 59 mAh g −1 during charge and discharge, respectively.
The battery was assembled in the cell described in figure 5 without modification, i.e. with a 100 μm thick Be window. It was charged and successively discharged at a C/30 rate, i.e. with the insertion of a mole of Li per mole of active material in 30 h. The data were recorded alternately at the Fe K-edge (7112 eV) and the Co K-edge (7709 eV) in the transmission mode. Each spectrum lasted approximately 45 min. We recorded 73 spectra, 42 during the charge and 28 in the subsequent discharge. In this way we were able to accurately monitor the local charge and structure modification upon the potassium release and the lithium insertion process. Figure 7 shows the voltage profile of the charge and discharge curves of the iron hexacyanocobaltate cathode, as obtained during the operando XAS experiment. In the first half of the charge of the battery the voltage curve showed a curved-shape behavior. This can be attributed to an activation process of the electrode material, most probably related to the irreversible dehydration of the pristine iron hexacyanocobaltate. Figure 8 shows selected Fe K-edge XANES spectra obtained during the first full electrochemical cycle. These are characterized by pre-edge features at E 7115 ∼ eV due to the transition from 1s to 3d bound states [43]. The main edge resonance is associated with the transition from 1s to the continuum and involves multiple scattering resonances of the photoelectrons [44]. The overall XANES region depends on the interatomic distances and the coordination geometry.
During the charge the K + cation is extracted from the hexacyanocobaltate structure according to the reaction K 0. 44 6 . The changes in the XANES spectra during the charge and discharge indicate that the Fe is electrochemically active. In particular, the ferrous iron of the pristine electrode is oxidized to trivalent iron, as evidenced by the shift to higher energy of the onset of absorption (figure 9). During the discharge, a backward shift of the onset of absorption is observed, indicating the reduction of Fe. It must be noted that the process is not fully reversible, as indicated by the different features of the XANES spectra of the pristine material and final product. On the other side the XANES spectra at the Co K-edge do not show any modification during the electrochemical cycle and reveal that Co is not taking part in the process in the explored electrochemical potential.
In order to understand the structural changes of the electrode material during the operation of the battery we performed a full EXAFS analysis using the GNXAS package [45,46]. In this method the EXAFS signal is decomposed into a sum of several contributions, namely the n-body terms. The two-body terms are associated with pairs of atoms, and probe their distances and variances. The three-body terms are associated with triplets of atoms and probe angles and bond-bond and bond-angle correlations. The four-body terms are associated with chains of four atoms, and probe distances, angles in-between, bond-bond and bond-angle correlations. Given the presence of both Fe and Co in the electrode, a multiple edge approach was used. The multiple edge fitting allows us to obtain a more constrained structural description by doubling the number of experimental observations while using the same structural parameters [47]. The fitting procedures at the Fe and Co K-edge were conducted while including the relevant set of multiple scattering paths that originates from the typical structure of hexacyanoferrates and are discussed in detail for a similar system in [48]. Figure 10 shows the moduli of the Fourier transform of the EXAFS spectra at the Co and Fe K-edges (top and bottom panels, respectively) during the charge and discharge (left and right panels, respectively) of the battery. For Fe data the fits suggest that the Fe-N bond distance decreases slightly during the first charge, from 2.07 to 2.05 Å and sets back to the value of 2.07 Å at the end of the discharge. The increase of the intensity of the first peak of the modulus of the FT is due to an increase of the structural order upon the release of K + , evidenced by a decrease of the Debye-Waller factor. Regarding the Fe-C bond length, this remains constant during the charge but decreases during the discharge. At the Co site, the Co-C and Co-N bond lengths are the same in all the investigated spectra, and the same holds true for the corresponding Debye-Waller factor. The contribution in the modulus of the FT at ∼4.3 Å is attributed to an intense multiple scattering signal due to the Fe-C-N-Co linear chains of the Fe-haxacyanocobaltate structure. From both the Co and the Fe point of view it is evident that the number of linear chains increases during the first charge. This, in combination with the decrease of the Debye-Waller factor for the Fe-N pair, reflects a rearrangement of the structure to a more interconnected one during charge, i.e. upon K + release.

Operando XAS study of Li-S batteries
Li-S batteries, with their high energy density and costeffectiveness, are potential candidates for commercialization among all the post-Li-ion batteries. In fact, the transition from an intercalation compound to an elemental cathode, e.g. sulfur or oxygen, theoretically raises the storage capacity by more than one order of magnitude. However, the electroactive elements such as sulfur and oxygen are insulators and need to be housed inside an electronic and ionic conductor. In the case of Li-S batteries, additional issues arise through the unavoidable formation of various intermediate polysulfides during the reversible conversion of elemental sulfur into Li 2 S. Improper confinement of the sulfur/polysulfides leads to large losses in the active mass of the chalcogen, resulting in continuous capacity fading. In this context, it is essential to comprehend aspects such as the interactions among sulfur, the host matrix, polysulfides and electrolytes in order to develop new materials for usable and marketable batteries.
Sulfur is a highly reactive, heterovalent element that occurs in a wide range of formal oxidation states, ranging from −2 in some sulfides to +6 in sulfates. K-edge XANES spectra are sensitive to the oxidation state, chemical environment, type of bonding and group symmetry, and can be used as a fingerprint to identify individual sulfur compounds. Generally, the pre-edge and white-line peaks can be attributed to transitions of sulfur 1s core electrons to the lowest symmetryavailable unoccupied antibonding states. These are atomic  or molecular orbitals with a substantial p-orbital character [49][50][51]. Post-edge features are often attributed to multiple scattering resonances [49,52], but also to further molecular orbital transitions [53][54][55]. Therefore, XAS is an appropriate tool for characterizing the redox chemistry and the modifications of the sulfur species of Li-S batteries during cycling, as well as monitoring polysulfide formation and evaluating possible interactions of sulfur and polysulfides with the host matrix and the electrolyte.
We used different in situ and ex situ analytical tools to analyze Li-S batteries at different stages of charge and discharge as well as in operando conditions with the aim of understanding the mechanism of the Li-S battery and the impact of different chemical environments on its electrochemical properties. Different spectroscopic techniques, including UV-Vis, Raman spectroscopy and XAS, were coupled with galvanostatic charging/discharging of the battery.
Restricting the discussion to XAS characterization, two milestones were achieved prior to performing operando measurements of actual batteries, made using a different combination of cathodes and electrolytes. First, there was the optim ization of a reliable setup for XAS measurements at the S K-edge. This included the refurbishment of the experimental hutch of the beamline XAFS (with the installation of SiO 2 mirrors for harmonic suppression) and the He chamber for low energy measurements, as well as the modification of the electrochemical cells, as discussed in section 2. The second milestone consisted of building a set of measured spectra for the different battery components (sulfur and electrolyte) and products of the electrochemical reaction (polysulfides and crystalline Li 2 S).
All the measurements were performed in the fluorescence detection mode using either the cell shown in figure 4 (right panel) or the one shown in figure 5. Fluorescence S K-edge data are affected by flaws, which, if not taken into account, lead to mistaken interpretations of the results. In fact, the shape of the spectra can be altered significantly by self-absorption effects and by an increase of penetration depth. Selfabsorption effects spoil the XANES part of the spectrum in particular. The intensities of its features decrease nonlinearly with increasing concentration of the photoabsorber ( figure  11: left panel). To a first approximation, the intensity of the spectral features is dependent on the sulfur oxidation state. This is due to the fact that the size of the white line, and therefore the respective transition probability, is proportional to the number of available final states and, thus, should increase with increasing valence. The alteration of the intensity of the spectral features also yields an erroneous estimate of the energy of the absorption onset evaluated by the maximum of the derivative of the absorption ( figure 11: right panel).
The increase of the penetration depth of the incident beam in the sample with increasing photon energy mostly affects the EXAFS part of the spectrum. The number of atoms illuminated by the incident beam increases at higher photon energies and consequently the fluorescence signal increases  proportionally. An example is shown in figure 12 (top). A standard normalization procedure leads to mistaken EXAFS oscillation intensities (figure 12: bottom panels) and therefore erroneous evaluation of intensity-dependent parameters such as the coordination numbers and Debye-Waller factors. Correct EXAFS oscillation intensities are obtained by subtracting a linear function determined in the pre-edge region, and dividing by the post-edge background, approximated by a smooth best-fit spline function.
Examples of the operando XAS characterization of Li-S batteries at the sulfur K-edge are reported in some studies [17][18][19][20][21][22][23][24][25][26]. Here we report the XANES study of a Li-S cell in which the cathode composite contained zeolite as the additive to adsorb polysulfides. The addition of zeolite is supposed to block the diffusion of polysulfides, making it possible for XAS to give a view of the whole system, although the penetration depth of x-rays in the S K-edge energy range is limited to approximately 5 μm. More specifically, the cathode  composite had the following composition: 20% S + 3.5% zeolite + 61.5% CB + 15% teflon. The electrolyte comprised 1 M of LiTFSI (lithium bistrifluoromethanesulfonimidate) in sulfolane. The open-circuit voltage was 2.5 V, the discharge and charge were performed at the C/20 rate, and each spectrum lasted 65 min. Figure 13 shows the XANES data during the operation of the battery. From the sulfur K-edge XANES spectra measured in the operando mode it is possible to determine the change of composition of the cathode. The different sulfur compounds formed at the cathode can be identified by the characteristic energy positions of the sulfur edge and pre-edge resonances. Elemental sulfur has a main resonance at 2472 eV, while the onset of absorption in sulfate species is shifted to higher energy at 2479 eV. The lithium polysulfide molecular systems produced in the electrochemical reaction, in which sulfur has an oxidation state of S 2− , are characterized by a pre-peak at 2470.2 eV together with a S 0 peak at 2472 eV. The ratio between the pre-peak and the peak is inversely proportional to the chain length [19,23,56]. The XANES spectrum of the crystalline form of Li 2 S is significantly different from the spectra of long-or short-chain polysulfides [17,21,56,57]. In the present case the main contribution to the spectra comes from the S 6+ compounds present in the electrolyte. The resonance relative to elemental sulfur is present in the initial state and the increasing shoulder during the discharge indicates the formation of Li polysulfides. At the end of the discharge the features in the energy range 2470 eV-2475 eV indicate  the formation of crystalline Li 2 S. During the charge the peak relative to elemental sulfur reappears, although the system is shown to not be completely reversible. In order to retrieve the quantity of the different components during the discharge and the charge of the battery, LCF was performed using the Athena program [58]. For the LCF we used reference spectra of the electrolyte, elemental sulfur, mid-long chain lithium polysulfides and Li 2 S in a similar environment and at a similar sulfur concentration. Figure 14 shows the relative quantities of the S species during the discharge/charge, together with the electrochemical curve. A drop of S is observed in the high voltage plateau concomitantly with the appearance of polysulfides. Nonetheless, the quantity of S never goes to zero and in the low voltage plateau the quantity of S remains constant. In this part of the discharge it is the polysulfide quantity that varies with inverse proportionality to the Li 2 S quantity, which is maximum at the end of the discharge as expected. The trend is symmetrically inverted for polysulphides and Li 2 S during the charge, although the pristine state is not recovered.
LCF shows that it is the electrolyte that makes the dominant contribution to the XAS spectra. This does not hinder the evaluation of the redox chemistry of sulfur during the operation of the battery from the XANES part of the spectrum. This holds true because the sulfur and its reduced compounds have an onset of absorption at energies well below and easily distinguishable from the onset of absorption of the sulfate species of the electrolyte. However, the EXAFS signal is actually dominated by the presence of the sulfates in the TFSI anion of the Li salt dissolved in the electrolyte. This dominant signal impedes study of the transformation of the local environment of the sulfur species in the electrode. This point is par ticularly important if one wants to suppress, as far as possible, the shuttle mechanism of the polysulphides. The measurements presented here confirmed that zeolites have an affinity with polysulphide adsorption, since during the discharge process a much larger quantity of sulfur species remained on the back side of the electrode. However, even though these results are promising, they cannot be considered to be complete without a more precise study of the possible short-range interaction of these species with the zeolite additive. This can only be achieved with a full EXAFS study. S K-edge EXAFS analysis was only made possible by switching from the commonly used electrolyte salt to a sulfur-free one [21]. This provided complementary information on the neighbors around the sulfur center, which could not be gained solely through XANES. In particular, EXAFS analysis allowed us to detect sulfur and Li 2 S components, whereas the polysulfides were determined from the variation in the average coordination number of the S-S bonds during the discharge process. In addition, the presence of unknown sulfur species was ruled out, as was specific interaction of the polysulfide species with the matrix or with other species in the electrolyte [21].

Conclusion
The results shown here for both types of batteries demonstrate that XAS is a valuable analytical tool to characterize the different components of a battery at the atomic level and evaluate how they evolve during operation. This represents a strong step towards a deeper understanding of the complex redox mechanisms that take place in these devices.
We demonstrated the possibilities offered by the beamline XAFS at Elettra for performing operando studies of batteries, which allow us to unravel the complex electrochemical mechanisms of new cathode materials in operating conditions. A variety of experimental setups, including electrochemical cells, were implemented at the beamline, allowing us to analyze both the XANES and the EXAFS parts of the absorption spectrum, even at low energies such as at the S K-edge. This development not only strongly aids the understanding of and hence possible improvements to such materials, but it also offers the possibility of extending measurements to other sulfur based batteries with other alkali metal (Na) and alkali earth metal elements (Mg, Ca).