**3. Investigating a battery at work:** *ex situ* **and** *in situ (operando)* **studies**

The simplest way to study the structural end electronic modification of a cathode or anode material is by *ex situ* XAS. XANES and EXAFS spectra at a selected K-edge are collected at a specific state of charge (or discharge) of the battery. In this case, the battery is stopped at the chosen state of charge (or discharge) and disassembled; the recovered material, protected from air in adapted sample holders, is transported to a synchrotron to perform the experiment in a suitable XAS beamline [32]. Basically, two geometries are used for this purpose, namely transmission and fluorescence. In transmission geometry, the sample is placed between *I* 0 and *I* detectors and the absorption is measured according to the Beer's law exponential decay, as mentioned before. The fluorescence detection is carried out by tilting the sample at 45 degrees and collecting the fluorescence X-rays by using a solid-state detector at the right angle with respect to *I* 0 .

Such *ex situ* XAS studies of electrode materials are now extensively completed by *operando* measurements, *i.e.*, performed during a discharge or charge process. Such an approach allows one to avoid several drawbacks due to the sample transfer needed for the *ex situ* measurements. Alteration of air- or moisture-sensitive species is avoided, as well as the occurrence of relaxation reactions which might show up when the electrical circuit is open, inducing a transformation of the unstable cycled material [49]. The effects of sampling deviations are also eluded since the sample remains in the same position during the whole measurement series. Finally, the whole study can be performed on a single test cell suppressing the effects of uncontrolled differences in a set of cells which are needed for a stepwise *ex situ* study of the electrochemical mechanism. To perform such an experiment, a special *in situ* electrochemical cell, obeying to the specific requirements of XAS, has to be used. This cell consists of an electrode containing the active material, a lithium foil, a separator, which is typically a polymeric membrane such as Celgard, and an electrolyte, usually based on organic carbonate solvents such as propylene carbonate (PC), dimethyl carbonate (DMC) and ethylene carbonate (EC).

**Figure 4** displays two different types of *in situ* electrochemical cells. The first one (left) is a typical pouch cell which is characterized by a large dimension of the cathode. In this case, a film containing the active material is previously deposited on a square Al (or Cu) current collector of 4 cm<sup>2</sup> and assembled in a glove box together with a Li (Na) counter-electrode, a separator and the electrolyte. The mass loading varies between 2 and 15 g/cm<sup>2</sup> of active material, depending on the energy of the X-ray. Sometimes, a small tube (visible in the right part of the cell) can be used as a sink for the gas, which may be released during the electrochemical processes and which can be analyzed in line, if necessary. The figure on the right displays a typical stainless steel cell [50], which uses self-supported films or pellets of electrode material of smaller dimension (1 cm diameter). The versatility of this second approach is testified by the successfully use of this cell in transmission and fluorescence geometry, as well as in other techniques including *in situ* XRD [51], Mössbauer [52] and Raman spectroscopy [53] measurements.

**Figure 4.** Typical *in situ* electrochemical cells used for *operando* XAS studies of batteries: A pouch cell (left) and a stainless steel cell (right) mounted on different XAS beamlines.
