# In Situ and Operando X-ray Scattering Methods in Electrochemistry and Electrocatalysis

Olaf Magnussen, Jakub Drnec, Canrong Qiu, Isaac Martens, Jason Huang, Raphaël Chattot, Andrej Singer

► To cite this version:

Olaf Magnussen, Jakub Drnec, Canrong Qiu, Isaac Martens, Jason Huang, et al.. In Situ and Operando X-ray Scattering Methods in Electrochemistry and Electrocatalysis. Chemical Reviews, 2024, 124 (3), pp.629-721. 10.1021/acs.chemrev.3c00331. hal-04457381

HAL Id: hal-04457381

https://hal.science/hal-04457381v1

Submitted on 29 Oct 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# In situ and operando X-ray scattering methods in electrochemistry and electrocatalysis

Olaf M. Magnussen,*,†,† Jakub Drnec,*,¶ Canrong Qiu,†,§ Isaac Martens,¶ Jason J. Huang,‖ Raphaël Chattot,⊥ and Andrej Singer‖

†Kiel University, Institute of Experimental and Applied Physics, 24098 Kiel, Germany

‡Ruprecht-Haensel Laboratory, Kiel University, 24118 Kiel, Germany

¶ESRF, Experiments Division, 38000 Grenoble, France

§New address: DESY, Notkestraße 85, 22607 Hamburg, Germany

∥Department of Materials Science and Engineering, Cornell University, Ithaca, NY 14853, USA

⊥ICGM, Univ. Montpellier, CNRS, ENSCM, 34095 Montpellier Cedex 5, France

E-mail: magnussen@email.uni-kiel.de; drnec@esrf.fr

## Abstract

Electrochemical and electrocatalytic processes are of key importance for the transition to a sustainable energy supply as well as for a wide variety of other technologically relevant fields. Further development of these processes requires in-depth understanding of the atomic, nano, and micro scale structure of the materials and interfaces in electrochemical devices under reaction conditions. We here provide a comprehensive review of *in situ* and *operando* studies by X-ray scattering methods, which are powerful and highly versatile tools for provide such understanding. We discuss the application of X-ray scattering to a wide range of electrochemical systems, ranging from metal and oxide single crystals to nanoparticles and even full devices, show how structural data on bulk phases, electrode-electrolyte interfaces, and nanoscale morphology can be obtained, and describes recent developments that provide highly local information and insight into the composition and electronic structure. These X-ray scattering studies provide structural insights in the double layer potential range as well as into the structural evolution during electrocatalytic processes and phase formation reactions, such as nucle-

ation and growth during electrodeposition and dissolution, the formation of passive films, corrosion processes, and the electrochemical intercalation into battery materials.

## Contents

Abstract 1

1 Introduction 3

2 X-ray scattering 6

2.1 X-ray interactions with matter . . 6

2.2 Fundamentals of X-ray scattering 6

2.3 Scattering by the atomic structure within condensed matter . . 8

2.3.1 Scattering by ensembles of atoms . . . . . . . . . . . 8

2.3.2 Scattering by three-dimensional and two-dimensional crystals . . . 9

2.3.3 Scattering of surfaces and interfaces . . . . . . . . 12

2.3.4 Scattering of liquids and amorphous materials . . . 13

2.3.5 Scattering by liquid interface structure . . . . . . 15

2.4 Scattering of nanoscale objects . . 16
2.5 Resonant X-ray scattering . . . . . 17

3 Experimental aspects 17

3.1 X-ray sources for in situ and operando studies . . . . . . . . . . 17

3.1.1 Lab sources . . . . . . . . . . 18

3.1.2 Synchrotron sources . . . . . 19

3.1.3 X-ray Free Electron Lasers 21

3.2 X-ray diffractometers . . . . . . . . 21

3.3 Electrochemical cells for in situ and operando studies . . . . . . . . 24

3.4 X-ray beam effects . . . . . . . . . . 27

4 In situ and operando methods 30

4.1 Overview . . . . . . . . . . . . . . . . . 30

4.2 Methods for studies of particle ensembles . . . . . . . . . . . . . . 30

4.2.1 Conventional powder X-ray diffraction . . . . . . . . . 30

4.2.2 High energy powder X-ray diffraction . . . . . . . . . 30

4.2.3 The Rietveld method . . . . . 34

4.2.4 X-ray atomic pair distribution function method . . 37

4.3 Methods for studies of thin films . . 38

4.3.1 X-ray reflectivity . . . . . . . 38

4.3.2 Grazing incidence diffraction . . . . . . . . . . . . . . . 41

4.4 Methods for studies of single crystals . . . . . . . . . . . . . . . . 41

4.4.1 In-plane surface diffraction 43

4.4.2 CTR measurements . . . . . . 46

4.4.3 High energy surface diffraction . . . . . . . . . . . 48

4.5 Methods for studies of nanoscale morphology . . . . . . . . . . . . . 49

4.5.1 Small angle X-ray scattering . . . . . . . . . . . . . 49

4.5.2 Grazing incidence small angle X-ray scattering . . 52

4.6 Locally resolved measurement techniques . . . . . . . . . . . . . . 53

4.6.1 X-ray nanodiffraction . . . . 53

4.6.2 Bragg coherent diffraction imaging . . . . . . . . . . 53

4.6.3 Ptychography . . . . . . . . . 55

4.7 Determination of composition and electronic structure . . . . . . . 56

4.7.1 Resonant anomalous X-ray scattering . . . . . . . . . 56

4.7.2 Resonant anomalous surface X-ray scattering . . . . 57

4.7.3 Determination of electronic structure by RAXS 58

5 Fundamental electrochemical interface structure 58

5.1 Metal electrode structure . . . . . . 59

5.1.1 Surface reconstruction . . 59

5.1.2 Surface relaxation . . . . . . 61

5.2 Adsorbates at metal electrodes . . 61

5.2.1 Anion adlayers . . . . . . . 62

5.2.2 Metal adlayers . . . . . . . 63

5.2.3 Molecular adsorption . . . 65

5.3 Interface structure of oxides and minerals . . . . . . . . . . . . . . 67

5.3.1 Surface termination and surface reconstruction . . 67

5.3.2 Surface relaxation . . . . . . 68

5.4 Adsorption on oxides and minerals 69

5.4.1 General aspects . . . . . . . 69

5.4.2 Metal cation adsorption . . 69

5.4.3 Interfacial water structures at oxide surface . . . . 74

5.5 Liquid-liquid interfaces . . . . . . . 75

6 Electrocatalysis 77

6.1 Hydrogen oxidation, evolution, and absorption . . . . . . . . . . . 79

6.1.1 Hydrogen oxidation and evolution . . . . . . . . . . . 79

6.1.2 Electrochemical hydrogen loading of Pd . . . . . . . 81

6.2 Oxygen reduction and evolution . . 82

6.2.1 Platinum group metal based single crystals . . . . 84

6.2.2 Platinum group metal based nanoparticles . . . . 86

6.2.3 Ir and Ru oxide electrodes 93

6.2.4 Fe, Co, and Ni oxide electrodes . . . . . . . . . . . . . 94

6.3 Other electrocatalytic reactions . . 98

6.3.1 Electrochemical reduction of CO and CO₂ . . . . 98

6.3.2 Nitrogen reduction . . . . . . 99

6.4 Electrocatalytic devices . . . . . . . 99
6.4.1 Proton exchange membrane fuel cells . . . . . . 100

6.4.2 Solid oxide fuel cells . . . 100

6.4.3 Electrolysers . . . . . . . . 101

7 Electrochemical phase formation 101

7.1 Electrodeposition and dissolution 101

7.1.1 Homoepitaxial electrodeposition . . . . . . . . . . 102

7.1.2 Electrochemical and chemical dissolution . . . . 104

7.1.3 Heteroepitaxial electrodeposition . . . . . . . 106

7.2 Passivation and corrosion . . . . . 109

7.3 Synthesis of electrocatalysts . . . . 111

8 Intercalation batteries 113

8.1 Introduction to battery intercalation . . . . . . . . . . . . . . 113

8.2 Powder Diffraction . . . . . . . . 115

8.3 Single Particle Diffraction . . . . 116

8.4 Operando Bragg Coherent Diffractive Imaging . . . . . . . . 117

8.5 Operando Surface Scattering in Intercalation Batteries . . . . . . 119

9 Conclusions 120

10 Biographies 124

References 125

# 1 Introduction

For the upcoming transition towards a sustainable society, economically viable technology is necessary that allows storing electric energy from renewable sources and converting it back for mobile and stationary applications. This need led to a renaissance of electrochemistry, which provides direct and efficient ways for electric energy conversion and storage. Extensive efforts are ongoing to further develop electrochemical devices, such as batteries, electrolysers, fuel cells, and processes for the electrochemical production of synthetic fuels and base chemicals. These require deeper knowledge of electrocatalytic reactions as well as

electrochemical intercalation and phase formation processes. Intertwined with this are traditional fields of electrochemical science and engineering, such as electroplating, electrosynthesis, and corrosion. The latter are still important in their own right but also play new roles in the context of energy science, for example in the context of electrocatalyst preparation and stability. Progress in all these areas depends on understanding the involved electrochemical processes on the molecular scale, for which detailed knowledge on the structure of materials and their interfaces and structural changes under relevant conditions is a central prerequisite.

Most materials characterization is still done at ambient conditions. Typically, the structure of the as-prepared materials is compared with that after using the material in the studied electrochemical process. While this can still provide useful information, the problems of this approach are evident. First, the transfer of the sample out of the electrochemical environment can lead to structural changes that can be difficult to distinguish from changes caused by the electrochemical reaction itself. In particular, this transfer necessarily involves the loss of potential control. For the most important case – an electrode taken out of an (aqueous) electrolyte – this will result in a transient state, in which the electrode is covered by a thin, typically air-saturated film of electrolyte at open circuit potential. This situation is well-known in the context of atmospheric corrosion and often results in surface oxidation and material dissolution. Furthermore, transfer through the laboratory air may result in additional surface contamination. These problems are especially significant for studies aiming at understanding the surface structure and properties, e.g., of electrocatalysts. In contrast, studies of bulk materials are less affected. A second problem of this approach is that information on the structural evolution of the sample at different stages or times during the process can only be obtained by studying a large number of identical samples, exposed to different conditions. Such studies are tedious and ensuring comparability of the employed samples can be challenging.

The first approach to overcome these prob-
lems was developed in the 1980ies. It is based
on the preparation of the electrode under ultra-
high vacuum (UHV) combined with a care-
ful transfer under inert gas into electrolyte so-
lutions for electrochemical studies and back-
transfer to UHV for analysis by surface science
methods. In recent years, this ex situ approach
has been rediscovered and is now often called
somewhat euphemistically quasi in situ. Pio-
neering ex situ studies demonstrated that, de-
pendent on the system, some but not neces-
sarily all properties of the electrochemical en-
vironment can be maintained¹,². Often, the
success of this approach depends on subtle de-
tails, such as the behavior of electrolyte species
during emersion. In particular, ex situ stud-
ies are not possible in potential regimes where
faradaic currents occur, because the open cir-
cuit conditions during transfer will necessarily
result in a potential shift into the double layer
range, with resulting changes in the geometric
and electronic structure of the interface. This
makes studies of the electrode structure under
reaction conditions impossible.

True insights into the state of electrochemical
material systems require *in situ* and *operando*
methods, where structural data are obtained di-
rectly in electrochemical environment. These
methods have to be capable of probing bulk
materials and interfaces that are deeply buried
in liquid or solid phases. Most typically used
are techniques that are based exclusively on
near-field effects, such as in scanning probe mi-
croscopy, or on the scattering or absorption of
photons. The difference between *in situ* and
*operando* measurements is often not clearly dif-
ferentiated in electrochemical publications. We
here follow the definition commonly employed
in studies of thermal heterogeneous catalysis in
the gas phase. According to this definition, *in
situ* and *operando* studies both study materi-
als or interfaces in their natural environment,
i.e., in the case of electrochemical systems in
the presence of the electrolyte and at controlled
potential or current density. However, in con-
trast to *in situ* measurements, *operando* stud-
ies monitor structural or electronic properties
of the material in parallel to properties that are
linked with material function, e.g., the activity

in the case of an electrocatalyst, and directly
correlate both. In principle, *operando* studies
are straightforward in electrochemistry, as the
relevant functional property is often the elec-
trochemical response, which is anyway recorded
by the potentiostat. Typical examples are mea-
surements where the structure is recorded dur-
ing a cyclic voltammogram (CV) and features
in the latter compared to parallel structural
changes. However, in practice *operando* stud-
ies may not be that easy, because the exper-
imental geometry may restrict mass transport
and electric conductivity and thus the current
density. This is, for example, the case in studies
that employ a thin layer geometry, where *in situ*
measurements in the electrolyte are still possi-
ble, but not *operando* studies at high current
density or under gas evolution conditions.

This review focuses on *in situ* and *operando*
studies by X-ray scattering and diffraction
methods. X-ray diffraction (XRD) is a stan-
dard method in analytical chemistry to deter-
mine the atomic crystal structure of bulk ma-
terials and the basis of modern crystallography.
It is typically performed using hard X-rays with
photon energies in the range 5-25 keV. Since
the atomic cross sections for the absorption and
scattering of such photons are low, in particular
for low-Z elements, X-rays can penetrate deep
into the condensed matter and hence are well-
suited for studies inside solid and liquid phases.
Furthermore, the measurement is not impeding
mass transport and electrochemical reactions,
making *operando* much easier than most com-
peting techniques. Whereas X-ray diffraction
describes the scattering of X-rays by a crystal
lattice, other X-ray scattering methods explore
the atomic, nano, and micro scale structure of
less ordered matter.

A wide range of structural features of ma-
terial systems can be accessed, including the
structure of nanoparticles, defects, surfaces and
interfaces, and even the average structural ar-
rangement within liquids and at liquid inter-
faces. Furthermore, modern approaches pro-
vide information on chemical composition and
electronic structure as well as allow direct imag-
ing of individual nanoobjects. In addition, X-
ray scattering can deliver time-resolved data
over a wide temporal range, reaching from fem-
toseconds to days. This provides access to the
kinetic behavior and nanoscale dynamics of the
studied systems.

Many of the more advanced methods rely on
the analysis of scattering signals that are several
orders of magnitude lower than those originat-
ing from bulk crystals. Their development de-
pends, therefore, on sufficiently intense sources
of hard X-rays and thus has been strongly cou-
pled to developments in synchrotron science.
With the increasing performance and availabil-
ity of synchrotron sources and the instrumen-
tation provided there, also the capabilities and
application ranges of X-ray scattering methods
increase continuously. This opens up attractive
opportunities for energy and electrochemical re-
search.

In the following, we provide an introduction
into *in situ* and *operando* structural studies
of electrochemical systems by X-ray scattering
and diffraction methods. The review's objec-
tives are twofold: First, it aims at helping non-
specialist readers to add these methods to their
toolbox of advanced techniques for research in
electrochemistry and energy science, by pro-
viding a basic understanding of these methods.
This understanding will help in better assessing
specialist papers employing modern X-ray scat-
tering methods and to make first steps towards
using these methods. Second, it gives a com-
prehensive overview over the results obtained
in the area of electrochemistry by *in situ* and
*operando* X-ray scattering since the beginning
of this field in the 1990ies. The latter illustrates
the capabilities of X-ray scattering methods as
well as provides a resource for the correspond-
ing community. We stress that we do not in-
tend to provide an in-depth introduction to the
theory of X-ray scattering and the technical as-
pects of the individual techniques, which are
complex and require attention to many techni-
cal details that are too numerous to be treated
within the scope of this review. A number of
excellent books and reviews on these topics ex-
ists (see references in the individual sections),
which discuss these techniques in much greater
detail.

In chapter 2, we first discuss the origin of

X-ray scattering and how it is influenced by
the spatial distribution of matter on the atomic
scale. This is required for a true understand-
ing of X-ray scattering data that goes beyond
a fingerprint type of interpretation of powder
diffractograms or crystallographic data. Every
scattering experiment effectively performs the
equivalent of a Fourier transform of the sam-
ple structure and thus is best described in the
Fourier space, commonly denoted as reciprocal
space. This concept is not easily comprehensi-
ble but essential for the interpretation of scat-
tering data. We try to convey this concept in
a compact way and then show how this ap-
plies to various relevant ensembles of atoms,
such as crystals, liquids, crystal surfaces, in-
terfaces, and nanoparticles. Subsequently, we
treat in chapter 3 various experimental aspects,
such as X-ray instrumentation, electrochemical
cells for *in situ* and *operando* measurements, as
well as potential detrimental effects of the X-
ray beam on the sample. Chapter 4 describes
in detail X-ray scattering techniques for *in situ*
and *operando* studies of electrochemical sys-
tems. These are sorted by the type of samples
to which they are typically applied to and the
information that can be obtained from them.

The rest of the review summarizes the results
obtained from *in situ* and *operando* studies by
X-ray scattering methods. Chapter 5 gives an
overview on studies of the structure of electro-
chemical interfaces. It describes X-ray scatter-
ing results on the surface structure of metal and
oxide electrodes in liquid electrolytes and on
the arrangement of various adsorbates at these
electrodes. Because many of these results were
already topics of more specialized previous re-
views, this section is kept concise. Also in-
cluded here are studies of more unconventional
interfaces, such as interfaces to ionic liquids and
liquid-liquid interfaces. Whereas chapter 5 pre-
dominantly focuses on the electrode structure
in the absence of continuous faradaic reactions,
the latter are the center of interest of the sub-
sequent chapters.

In chapter 6, studies in the field of elec-
trocatalysis are described. Here, we discuss
X-ray scattering results on the interface and
bulk structure of electrocatalysts under dif-
ferent electrode reactions. The research in this area encompasses studies of single crystalline model catalysts and catalyst nanoparticles. Furthermore, it includes direct studies of materials in devices for energy conversion, such as fuel cells and electrolyzers. Chapter 7 presents *in situ* and *operando* results on electrochemical phase formation processes. These include studies of electrodeposition and electrochemical dissolution, passivation and corrosion, and processes employed in the synthesis of electrocatalysts. Finally, chapter 8 provides an overview on the application of X-ray scattering methods to intercalation batteries. As the phase changes caused by electrochemical intercalation have been studied for a long time by X-ray diffraction, we here rather focus on more modern approaches that are capable of providing local structural data on particles or interfaces in batteries.

# 2 X-ray scattering

## 2.1 X-ray interactions with matter

In this chapter, we will give a brief introduction to the theory of X-ray scattering to provide some insight into the various types of signals produced by liquids, two-dimensional (2D) and three-dimensional (3D) crystals, as well as crystal surfaces. The reader is warned: scattering theory is a complex topic, and the treatment here will merely impart some basic ideas that are essential for understanding scattering studies. More technical aspects of the analysis of X-ray scattering data can be found in the literature³⁻⁶.

The following treatment is limited to scattering within the kinematic approximation. Within this approximation, it is assumed that (i) no multiple scattering occurs within the sample, (ii) refraction effects can be neglected, and (iii) the scattering is elastic, i.e., the energies (or wavelengths, respectively) of the incident and scattered wave are identical. To a large extent, these assumptions are justified for X-ray scattering by the (non-perfect) sam-

ples typically used in most studies, including those of electrochemical interfaces: the probability for multiple scattering is low due to the low scattering cross-section of X-rays, the inelastic scattering contribution is much weaker than the elastic scattering in the typically employed photon energy range, and the index of refraction is very close to one for all materials. Nevertheless, the latter has to be considered to rationalize some characteristic effects in surface scattering. We will therefore revisit the role of refraction effects when discussing the specific surface scattering methods in chapters 4.3 and 4.4.

## 2.2 Fundamentals of X-ray scattering

All scattering processes have in common a change in the momentum and energy of the scattered objects. Methods for structure determination are based on elastic X-ray scattering. Here, all possible scattering events of a sample with a given orientation can be described by the involved momentum transfer. We assume in the following that the reader is familiar with the properties and the mathematical description of electromagnetic radiation and recall that (apart from the factor $\hbar$) the momentum of a photon is given by the wave vector $\mathbf{k}$, which is oriented parallel to the propagation direction and of magnitude $k = 2\pi/\lambda$. For an incident and scattered wave with wave vectors $\mathbf{k}_i$ and $\mathbf{k}_f$, respectively (see Figure 1a), the scattering process is hence described by the wave vector transfer or scattering vector $\mathbf{q} = \mathbf{k}_f - \mathbf{k}_i$, which is the central variable in scattering theory. $\mathbf{q}$ is commonly measured in units of $\AA^{-1}$ and the 3D space defined by it is therefore termed reciprocal space. Its modulus is related to the scattering angle $2\theta$ via $\mathbf{q} \equiv |\mathbf{q}| = 2k \cdot \sin(2\theta/2) = \frac{4\pi}{\lambda} \cdot \sin(2\theta/2)$. For elastic scattering, where $k_f = k_i = k$, the $\mathbf{q}$ vectors corresponding to the $\mathbf{k}_f$ of all elastically scattered waves are located on the surface of a sphere, whose center is given by $-\mathbf{k}_i$. This sphere is called the Ewald sphere. It plays an important role in the interpretation of scattering data, as it defines the $\mathbf{q}$ vectors probed at a
defined incident wave vector **k**ᵢ, e.g., by record-
ing the intensity with an area detector.

In the following, we will first discuss in a more
general way how the variation of the scattered
intensity *I* with **q** depends on the spatial ar-
rangement of the scatterers before turning to
the description of scattering by solids, liquids,
and interfaces. In classical Thompson scat-
tering, the X-rays interact with electrons, and
their scattering can be described by the pro-
cess illustrated in Figure 1b for a linearly po-
larized incident X-ray wave propagation along
the direction described by wave vector **k**ᵢ. The
oscillating electric field of this wave excites a
forced vibration of the electron, resulting in the
emission of electric dipole radiation, i.e., of a
spherical wave of identical wavelength. As for
every dipole radiation, the emission is isotropic
within the plane normal to the incident wave
field vector *ε*ᵢ, whereas for directions under an
angle 2θ out of this plane, the emitted intensity
is reduced by the polarization factor cos²(2θ).
For the atomic nuclei, this Thomson scattering
process can be neglected since their excitation
is weak due to the much higher mass.

To understand the scattering by an ensemble
of several electrons, we first consider the simple
case of two electrons, separated by a distance-
vector **r** (Figure 1c). The incident plane wave
will excite spherical waves originating from the
positions of the two electrons, which will inter-
fere with each other. In a scattering experi-
ment, we measure the intensity scattered in di-
rection **k**<sub>f</sub> with a detector that is much further
away from the sample than the distance be-
tween the scattering electrons. The spherical
waves can therefore be approximated by plane
waves with the wave vector **k**<sub>f</sub>. Because the
wave scattered by electron 2 travels a longer
distance than that scattered by electron 1, the
two waves are phase shifted to each other by a
distance of r·**k**<sub>i</sub>/k − r·**k**<sub>f</sub>/k, i.e., a phase shift
−r·q, illustrating clearly the central role of the
scattering vector. Employing the complex rep-
resentation of plane waves, the electric field vec-
tor amplitudes of the two scattered waves only
differ by the phase factor exp(−i r·q) and the
superposition is described by adding up both
of these complex amplitudes. Depending on

<figure><img src="image_2.png" /></figure>

<figure><img src="image_3.png" /></figure>

<figure><img src="image_4.png" /><figcaption>Figure 1: (a) Geometry of a scattering exper-
iment. (b) Classical description of the scat-
tering of electromagnetic waves by a charged
particle. (c) Scattering by an ensemble of two
scatterers, illustrating the resulting phase shift
between the scattered waves.</figcaption></figure>
the phase factor, i.e., on **r** and **q**, the scattered waves will interfere constructively or destructively, resulting in enhancement or reduction of the scattered radiation.

This simple case illustrates a general, useful concept: The scattered intensity $I(\mathbf{q})$ probes spatial correlations of the electron density along the direction of scattering vector **q** on a length scale given by $2\pi/q$. However, as we will see below, these correlations are not necessarily directly identical to the distances between the atoms of the system. The key to understanding scattering experiments is to grow accustomed to the description of structure in the reciprocal space, defined by the scattering vector **q**, rather than in real space.

The case of two scattering electrons can be easily generalized to an arbitrary spatial electron distribution, described by the electron density $\rho_e(\mathbf{r})$. The number of electrons in an infinitesimal volume element $d\mathbf{r}$ at position $\mathbf{r}$ is then $\rho_e(\mathbf{r})d\mathbf{r}$ and their contribution to the field vector of the scattered wave has to be multiplied by the corresponding phase factor for this position. By integrating over the entire sample (still assuming the sample size is much smaller than the sample-detector distance), we obtain the scattering amplitude:

$$S(\mathbf{q}) = \int \rho_e(\mathbf{r}) \cdot \exp(-i\mathbf{r} \cdot \mathbf{q}) d\mathbf{r} \quad (1)$$

which is proportional to the field amplitude of the scattered wave. Therefore, $S(\mathbf{q})$ is the Fourier transform of the electron density and hence contains the full information about the structural arrangement. Yet a typical X-ray scattering experiment only measures the scattered intensity, which is (neglecting polarization, absorption, etc.) proportional to $|S(\mathbf{q})|^2 = S(\mathbf{q})S^*(\mathbf{q})$ ($*$ denotes the complex conjugate) and does not contain the phase of

the complex quantity $S(\mathbf{q})$:

$$ 
\begin{aligned}
|S(\mathbf{q})|^2 &= \iint \rho_e(\mathbf{r}) \cdot \exp(-i\mathbf{r} \cdot \mathbf{q}) \cdot \rho_e(\mathbf{r}') \\
&\qquad \cdot \exp(i\mathbf{r}' \cdot \mathbf{q}) d\mathbf{r}' d\mathbf{r} \\
&= \iint \rho_e(\mathbf{r}) \cdot \rho_e(\mathbf{r} + \mathbf{R}) d\mathbf{r} \\
&\qquad \cdot \exp(-i\mathbf{R} \cdot \mathbf{q}) d\mathbf{R}
\end{aligned} 
\quad (2) $$

Equation (2), where we have substituted the integration over $\mathbf{r}'$ by an integration over the difference vector $\mathbf{R} \equiv \mathbf{r} - \mathbf{r}'$, it becomes apparent that a scattering experiment measures spatial correlations within the sample. In the remainder of this chapter, we will use examples to develop a sense of how $I(\mathbf{q})$ depends on the structural arrangement within the sample.

## 2.3 Scattering by the atomic structure within condensed matter

### 2.3.1 Scattering by ensembles of atoms

Describing the sample as a continuous distribution of electrons, as we have done above, is convenient in some scattering experiments, especially for studies at small $q$, where the experiments only probe long-range correlations. However, in most cases, it is preferable to account for the atomic structure of condensed matter. The large majority of all electrons in a sample are located in the ion cores where their distribution $\rho_e^{\text{atom}}(\mathbf{r})$ around the nucleus is given by the occupied atomic orbitals. The scattering amplitude Eq. (1) of a single atom (or ion) with Z electrons is called the atomic form factor:

$$f(\mathbf{q}) = \int \rho_e^{\text{atom}}(\mathbf{r}) \cdot \exp(-i\mathbf{r} \cdot \mathbf{q}) d\mathbf{r} \quad (3)$$

In practice, one usually ignores the small deviations of $\rho_e^{\text{atom}}(\mathbf{r})$ from spherical symmetry and uses functions $f(q)$ that only take the dependence on the amplitude of the scattering vector into account. Atomic form factors smoothly decay with increasing $q$ from (within the kinematic approximation) $f(0) = Z$ to 0. Parameterized functions, obtained by fits to the re-
sults of detailed quantum mechanical calculations, can be found for all atoms and many ions in the relevant literature (See, for example, International Tables for Crystallography (2006). Vol. C. Ch. 6.1, pp. 554-595).

A more precise quantum mechanical description shows that the scattering by an atom also depends on the binding strengths of the electrons to the nucleus, which for the core level electrons are determined by discrete energy levels. This correction gives rise to a change of the atomic form factor, which depends on the photon energy $\epsilon_{Ph}$ and, by convention, is denoted $f'$. Furthermore, the scattering may exhibit an additional phase-shift with respect to the field of the incident wave, especially if $\epsilon_{Ph}$ is in resonance with a core level energy, which can be described by an imaginary term $if''$. Both of these contributions are largely independent of $q$. For a precise description of the scattering, $f'(\epsilon_{Ph}) + if''(\epsilon_{Ph})$ has to be added to the form factor $f(q)$ in Eq. 3. This is critical for resonant scattering (see section 2.5) and will otherwise be ignored in the following.

Next, we consider an ensemble of atoms, for example, a molecule or the atoms in the unit cell of a crystal, which have well-defined positions $\mathbf{r}_j$ with respect to a common origin. The electron density is then given by the sum over all atoms $\rho_e(\mathbf{r}) = \sum_j \rho_e^{\text{atom},j}(\mathbf{r}-\mathbf{r}_j)$ and the corresponding scattering amplitude conventionally termed structure factor $F(\mathbf{q})$. The latter can be calculated via Eq. 1 by replacing the integration over $\mathbf{r}$ in each summand by integration over the relative spatial coordinates $\mathbf{r}-\mathbf{r}_j$ and using Eq. 3, resulting in:

$$F(\mathbf{q}) = \sum_j f_j(q) \cdot \exp(-i\mathbf{r}_j \cdot \mathbf{q}). \quad (4)$$

The effect of thermal vibrations of the atoms around the equilibrium positions $\mathbf{r}_j$ can be included in the atomic form factors by an additional Gaussian factor, i.e., by replacing $f_j(q)$ in Eq. (4) with:

$$f_j(q) \cdot \exp(-\frac{1}{2}q^2 \cdot \langle \mathbf{u}_{j,q}^2 \rangle) \equiv f_j(q) \cdot \exp(-M_j) \quad (5)$$

Here $\langle \mathbf{u}_{j,q}^2 \rangle$ is the mean-square amplitude of vibration

of atom $j$ in direction $\mathbf{q}$ and $M_j$ is called the Debye-Waller factor of the atom. Often, $M_j$ is assumed to be isotropic in space (i.e., only dependent on $q$), but for species at interfaces, the difference between surface-normal and in-plane vibration amplitudes has to be considered explicitly.

We will use Eq. (4) in the following chapters to derive the scattering for the components in electrochemical systems. This includes bulk solids and liquids as well as (quasi-) 2D systems, such as crystal surfaces and adsorbate layers.

### 2.3.2 Scattering by three-dimensional and two-dimensional crystals

Scattering by periodic lattices results in discrete, well-defined intensity peaks at defined $S(\mathbf{q})$ values, an effect called diffraction. Although X-ray diffraction by bulk crystals is treated in every introduction to solid-state physics, we here briefly repeat the derivation of the basic equations, since those can be easily varied to describe the scattering by 2D lattices and crystal surfaces.

Let us consider a 3D crystal defined by the lattice vectors $\mathbf{a}_1, \mathbf{a}_2$, and $\mathbf{a}_3$. For simplicity, we assume that the crystal is a block consisting of $N_1, N_2$, and $N_3$ unit cells along the three lattice directions. The position of a unit cell is then given by the vector $\mathbf{R} = n_1\mathbf{a}_1 + n_2\mathbf{a}_2 + n_3\mathbf{a}_3$, and the scattering amplitude is:
$$ 
\begin{aligned}
S(\mathbf{q}) &= F(\mathbf{q}) \sum_{n_1=0}^{N_1-1} \sum_{n_2=0}^{N_2-1} \sum_{n_3=0}^{N_3-1} \exp[-i(n_1\mathbf{a}_1 + n_2\mathbf{a}_2 + n_3\mathbf{a}_3) \cdot \mathbf{q}] \\
&= F(\mathbf{q}) \sum_{n_1=0}^{N_1-1} \exp(-in_1\mathbf{a}_1 \cdot \mathbf{q}) \sum_{n_2=0}^{N_2-1} \exp(-in_2\mathbf{a}_2 \cdot \mathbf{q}) \sum_{n_3=0}^{N_3-1} \exp(-in_3\mathbf{a}_3 \cdot \mathbf{q})
\end{aligned}
\quad (6) $$

Here, the possibility that the unit cell contains several atoms is accounted for by the structure factor $F(\mathbf{q})$, which can be calculated from Eq. (4) with the $\mathbf{r}_j$ given with respect to the origin of the unit cell. According to the second line of this equation, $S(\mathbf{q})$ is the product of the structure factor with three independent sums of the identical type that can be evaluated using the geometric series:

$$ S_N(x) = \sum_{n=0}^{N-1} \exp(-inx) = \frac{1 - \exp(-iNx)}{1 - \exp(-ix)} \quad (7) $$

The scattered intensity is the square modulus of $S(\mathbf{q})$. It is identical to the “N-slit interference function” known from optics, which describes the intensity distribution of an ideal grating composed of N slits:

$$ |S_N(x)|^2 = \frac{\sin^2(Nx/2)}{\sin^2(x/2)} \quad (8) $$

This function has pronounced primary maxima at $x = 2\pi n$ (with $n$ being an integer), which have a height $N^2$, a full width at half maximum (FWHM) of approximately $2\pi/N$ (the FWHM is converging to $0.88 \cdot 2\pi/N$ for large $N$), and $N-2$ subsidiary maxima, which are negligibly small for large $N$ as in typical crystals (Figure 2).

The scattered intensity for the 3D crystal is therefore given by:

$$ |S(\mathbf{q})|^2 = |F(\mathbf{q})|^2 \cdot |S_{N_1}(\mathbf{a}_1 \cdot \mathbf{q})|^2 \cdot |S_{N_2}(\mathbf{a}_2 \cdot \mathbf{q})|^2 \\ \cdot |S_{N_3}(\mathbf{a}_3 \cdot \mathbf{q})|^2 \quad (9) $$

and exhibits peaks if all three interference functions are at a maximum, i.e., if the following three equations, called the Laue conditions, are

<figure><img src="image_5.png" /><figcaption>Figure 2: N-slit scattering function for a row of N equally spaced unit cells. Shown is the scattered intensity I normalized by N.</figcaption></figure>

simultaneously fulfilled:

$$ \mathbf{a}_1\mathbf{q} = 2\pi h; \quad \mathbf{a}_2\mathbf{q} = 2\pi k; \quad \mathbf{a}_3\mathbf{q} = 2\pi l \quad (10) $$

The integers $h$, $k$, and $l$ are called Miller indices. Eq. (10) can be satisfied by $\mathbf{q}$ vectors of the type:

$$ \mathbf{q} = h \cdot \mathbf{b}_1 + k \cdot \mathbf{b}_2 + l \cdot \mathbf{b}_3 \quad (11) $$

where $\mathbf{b}_1$, $\mathbf{b}_2$, and $\mathbf{b}_3$ are vectors in reciprocal space which obey the conditions ($\delta_{ij}$ is the Kronecker delta):

$$ \mathbf{a}_j \cdot \mathbf{b}_k = \delta_{jk} \quad (12) $$

$\mathbf{b}_1$, $\mathbf{b}_2$, and $\mathbf{b}_3$ define a 3D lattice in reciprocal space and hence are called the reciprocal lattice vectors of the crystal. They can be calculated via:

$$ \mathbf{b}_1 = \frac{2\pi}{V_c}\mathbf{a}_2 \times \mathbf{a}_3; \quad \mathbf{b}_2 = \frac{2\pi}{V_c}\mathbf{a}_3 \times \mathbf{a}_1; \quad \mathbf{b}_3 = \frac{2\pi}{V_c}\mathbf{a}_1 \times \mathbf{a}_2 \quad (13) $$

where $V_c = \mathbf{a}_1 \cdot (\mathbf{a}_2 \times \mathbf{a}_3)$ is the volume of the crystal’s unit cell. For crystals with cubic unit cells of length $a$, which covers a large fraction of the metals used commonly as electrode materials, the reciprocal lattice vectors $\mathbf{b}_j$ are parallel
to the corresponding lattice vectors $\mathbf{a}_j$ in real space and $|\mathbf{b}_j| = b = 2\pi/a$.

At the reciprocal space positions defined by Eq. (11), the scattered X-ray intensity exhibits peaks whose integrated intensity is proportional to:

$$|S(\mathbf{q})|^2 = |F(h \cdot \mathbf{b}_1 + k \cdot \mathbf{b}_2 + l \cdot \mathbf{b}_3)|^2 \cdot N_1 N_2 N_3 \quad (14)$$

i.e., scales with the structure factor measured at these $\mathbf{q}$ values and the total number of atoms in the sample. For large 3D crystals, the scattering between these peaks is negligible. This distribution $I(\mathbf{q})$ in reciprocal space is illustrated schematically in Figure 3a. The peaks are the Bragg reflections of the crystal, each defined by a triplet of Miller indices $hkl$. They originate from the constructive interference of atomic planes in the crystal lattice. For example, the 110 reflection of the cubic crystal in Figure 3a is observed at $q = \sqrt{2b}$, corresponding to the nearest neighbor spacing $2\pi/q = a\sqrt{2}$ between the diagonal planes of the atoms perpendicular to that direction. As discussed before, this inverse relationship between the peak positions in reciprocal space and the real space distances of the atoms in the sample is characteristic in scattering experiments.

A 2D lattice defined by vectors $\mathbf{a}_1$ and $\mathbf{a}_2$ can be treated analogously (Figure 3b). The scattering amplitude is now:

$$|S(\mathbf{q})|^2 = |F(\mathbf{q})|^2 \cdot |S_{N_1}(\mathbf{a}_1 \cdot \mathbf{q})|^2 \cdot |S_{N_2}(\mathbf{a}_2 \cdot \mathbf{q})|^2 \quad (15)$$

and consequently only two Laue conditions with the Miller indices $h$ and $k$ and corresponding reciprocal space vectors $\mathbf{b}_1$ and $\mathbf{b}_2$ exist. The component $q_\perp$ of $\mathbf{q}$ along the direction normal to this plane (i.e., parallel to $\mathbf{a}_1 \times \mathbf{a}_2$) only enters in the structure factor $F(\mathbf{q})$. If all atoms are located in the same plane as in a simple monolayer, $F(\mathbf{q})$ is independent of $q_\perp$, apart from the slow decay caused by the $q$-dependence of the atomic form factor. The distribution of the scattered intensity in reciprocal space then takes on the form of continuous rods that are oriented perpendicular to the crystal plane and arranged in a 2D lattice within this plane (Figure 3b). These diffraction rods are the hall-

<figure><img src="image_6.png" /><figcaption>Figure 3: Real space structure (left) and distribution of scattered intensity in reciprocal space (right) for (a) a 3D crystal lattice, (b) a 2D lattice, and (c) the surface of a 3D crystal. The variation of the intensity along the diffraction rods shown in (b) and (c) is indicated by the rod diameter.</figcaption></figure>
mark of any scattering by a (quasi-) 2D system and explain why the contribution of interfaces or adsorbed layers can easily be separated from that of the bulk, despite the much smaller number of contributing atoms: While the scattering from 3D bulk crystals is concentrated at discrete points in reciprocal space and hence only observed for certain well-defined orientations of sample and detector, the scattering by 2D lattices, although much weaker, is distributed over a wider region of reciprocal space. It, therefore, can be separated from the scattering by the 3D crystalline substrate by measuring at reciprocal space positions along the rods that are sufficiently far away from the Bragg peaks.

From the above derivation, it follows that the scattered intensity distribution not only contains information about the atomic distances but also about the shape of the scattering crystal. This shape determines the width of the main peak as well as the minor peaks in the N-slit scattering function (see Fig. 2). The intensity distribution for a simple 3D crystal with orthogonal edges is already given by Equation 9. The diffracted X-ray intensity from an arbitrarily shaped crystal can be calculated from the electron density via a Fourier transform by using the Ewald function $s(r)$, which is unity inside the crystal and zero outside$^{7,8}$. For example, in a cubic perfectly crystalline particle, the diffraction intensity can be described as the product of three sinc functions, as described in section 2.3.2. In electrochemical systems, crystals are often distorted: the atomic positions deviate from the ideal lattice. If the crystalline planes are distorted, the positions of the unit cells $R = R_0 + u(R)$, where $R_0$ are the atomic coordinates of the undistorted lattice and $u(R)$ is the displacement field. These distortions will result in a change of Laue fringes visible in Figure 2. It can be shown that the intensity in the vicinity of a Bragg peak hkl, can be well approximated with$^8$

$$I(\mathbf{Q}) = |F_{hkl}|^2 \int s_{hkl}(\mathbf{r}) \exp(-i\mathbf{G}_{hkl} \cdot \mathbf{u}(\mathbf{r})) d\mathbf{r} \quad (16)$$

where $F_{hkl}$ is the unit cell structure factor, $s_{hkl}(\mathbf{r})$ is the density of (hkl) Bragg planes multiplied

by the Ewald function, and the momentum transfer, $Q = q - G_{hkl}$, is the distance of the reciprocal space position from the reciprocal lattice point $G_{hkl}$. Therefore, the intensity and shape of the interference fringes decorating the Bragg peak contain information on the crystal shape and the crystalline distortions within.

### 2.3.3 Scattering of surfaces and interfaces

We now analyze how the surface of a 3D crystal contributes to the scattering, following the literature on surface diffraction$^{4,5,9}$. Specifically, we consider a semi-infinite crystal with lattice vector $a_3$ along the surface normal and $a_1$ and $a_2$ are within the surface plane, see Figure 3c (this is always possible by choosing a suitable unit cell and conventionally used in surface diffraction studies). We further assume a scattering geometry as in Figure 1a where incident and scattered X-ray beam approach and leave through the free space on top of the crystal, respectively. Using Eq. (10) and taking into account that due to X-ray absorption each penetrated atomic layer of the crystal reduces the intensity by a factor $\exp(-\beta)$, we can rewrite Eq. (6):

$$S(\mathbf{q}) = F(\mathbf{q}) \sum_{n_1=0}^{N_1} \exp(-2\pi i n_1 h) \sum_{n_2=0}^{N_2} \exp(-2\pi i n_2 k) \\ \sum_{n_3=-\infty}^{0} \exp(-2\pi i n_3 l) \cdot \exp(-\beta n_3) \quad (17)$$

The first two sums are identical to those of a 2D crystal lattice with lattice vectors $a_1$ and $a_2$. Their contribution to the scattering is therefore given by Eq. (15) and, in the limit of an infinite extension of the crystal in the surface plane, will approach a set of delta functions located at reciprocal space positions defined by integers $h$ and $k$. The last sum contains the specific influence of the termination of the crystal at
the surface. Evaluating it, we obtain

$$ S_{CTR}(\mathbf{q}) = \sum_{n_3=-\infty}^{0} \exp[-(2\pi il - \beta) \cdot n_3] = \frac{1}{1 - \exp(-2\pi il - \beta)} \quad (18) $$

Typically, absorption only has a substantial influence near the Bragg peaks (i.e., if $l$ is close to an integer value), where it results in a reduction of the peak intensity. Assuming $\beta \ll 1$, we obtain from Eq. (18):

$$ S_{CTR}(\mathbf{q})^2 \approx \frac{1}{4\sin^2(\pi l)} \quad (19) $$

Hence, the intensity is a continuous function of $l$ (defined through $a_3\mathbf{q} = 2\pi l$) and again distributed in reciprocal space in the form of rods that are oriented along the surface normal (see Figure 3c) and pass through the Bragg peaks of the bulk crystal. Because these rods originate in the symmetry break at the surface of the semi-infinite lattice, they are called crystal truncation rods (CTRs). However, contrary to the rods for a single 2D layer, the intensity along the CTRs strongly varies with the surface normal component of the scattering vector $q_z = l\mathbf{b}_3$.

Specifically, the intensity rapidly decays to both sides of the Bragg peaks, reaching minima at half-integer $l$, the so-called anti-Bragg position, where it is of similar magnitude as the scattering by a single 2D layer. In other words, the presence of the surface induces streaks of scattering that extend out from the Bragg peaks. Summarizing these results, the scattered intensity from an ideal crystal surface is:

$$ |S(\mathbf{q})|^2 = |F(\mathbf{q})|^2 \cdot |S_{N_1}(\mathbf{a}_1 \cdot \mathbf{q})|^2 \cdot |S_{N_2}(\mathbf{a}_2 \cdot \mathbf{q})|^2 \cdot |S_{CTR}(\mathbf{q})|^2 \quad (20) $$

At real surfaces and interfaces, the atomic spacings and the Debye-Waller factors $M$, which describe the thermal vibrations, usually deviate from those in the bulk lattice. Furthermore, the topmost layers may exhibit defects, such as adatom or vacancy islands, and hence be only occupied to a fraction $\theta_j \le 1$. These effects

can be addressed by a scattering amplitude that is the sum of a surface contribution, consisting of a finite number $N_{surf}$ of atomic layers that are located at vertical positions $z_j$ relative to the first bulk-like layer, and a bulk contribution given by the semi-infinite sum in Eq. (18). The corresponding intensities can be obtained numerically from this expression. In most cases, only a very small number of layers has to be considered explicitly. Nevertheless, even rather small deviations from the ideal lattice parameters can give rise to substantial changes in the CTRs, as will be discussed in more detail in chapter 4.4.2. Similarly, a finite number of surface layers in which the atoms occupy different in-plane positions than in bulk or consist of different chemical species can be included explicitly in Eq. 17 to describe surface reconstructions and adsorbates.

### 2.3.4 Scattering of liquids and amorphous materials

As the last case, we discuss the scattering by a liquid or amorphous material. These two cases are very similar; the main difference is that for the first the disorder is dynamic whereas for the second it is static. This difference is only relevant for more advanced cases, such as inelastic scattering, but can be ignored in the framework of the simple theory described here. Scattering by non-crystalline matter is a more advanced topic (see Ref. 10 for a more detailed description), which may be omitted upon first reading. Nevertheless, it is of significance for in situ studies of electrochemical systems, where it contributes significantly to the scattering originating from the electrolyte. Furthermore, electrode materials can be amorphous or highly disordered or become so under reaction conditions. For simplicity, we restrict ourselves to a simple single-component liquid of identical atoms or molecules, described by the form factor $f(q)$. We further assume that the liquid is homogeneous with a number density $\rho_n = N/V$ and is isotropic.

The spatial distribution of the atoms in the liquid at a given moment can be described by the particle density function, where the particle
positions are described by Dirac delta functions:

$$ \bar{n}(\mathbf{r}) = \sum_j \delta(\mathbf{r} - \mathbf{r}_j) \quad (21) $$

Using this expression Eq. (4) can be written as:

$$ S(\mathbf{q}) = f(q) \int \bar{n}(\mathbf{r}) \cdot \exp(-i\mathbf{r} \cdot \mathbf{q}) d\mathbf{r} \quad (22) $$

and the corresponding square modulus:

$$ |S(\mathbf{q})|^2 = f(q)^2 \iint \bar{n}(\mathbf{r}) \cdot \bar{n}(\mathbf{r}') \cdot \exp[-i(\mathbf{r} - \mathbf{r}') \cdot \mathbf{q}] d\mathbf{r}' d\mathbf{r} \quad (23) $$

In a typical scattering experiment, we measure only the average over many configurations $\bar{n}(\mathbf{r})$, existing in the liquid. The relevant quantity to describe the scattered intensity is, therefore:¹⁰

$$ \langle |S(\mathbf{q})|^2 \rangle = f(q)^2 \iint \langle \bar{n}(\mathbf{r}) \cdot \bar{n}(\mathbf{r}') \rangle \cdot \exp[-i(\mathbf{r} - \mathbf{r}') \cdot \mathbf{q}] d\mathbf{r}' d\mathbf{r} \quad (24) $$

where:

$$ \langle \bar{n}(\mathbf{r}) \cdot \bar{n}(\mathbf{r}') \rangle = \left\langle \sum_{j,k} \delta(\mathbf{r} - \mathbf{r}_j) \cdot \delta(\mathbf{r}' - \mathbf{r}_k) \right\rangle \quad (25) $$

is the density-density correlation function. Since liquids per definition do not exhibit long-range order, the positions of the atoms become uncorrelated for large distance vectors $\mathbf{R} \equiv \mathbf{r} - \mathbf{r}'$. On the other hand, atoms cannot overlap physically and hence each atom can only be correlated with itself at small distances. Consequently, the density-density correlation function approaches the following limiting values, which only depend on the number density n of the atoms:

$$ \langle \bar{n}(\mathbf{r}) \cdot \bar{n}(\mathbf{r}') \rangle = \begin{cases} \langle \bar{n}(\mathbf{r}) \rangle \cdot \langle \bar{n}(\mathbf{r}') \rangle = \rho_n^2 \\ \rho_n \cdot \delta(\mathbf{r} - \mathbf{r}') \end{cases} \quad \text{for} \quad \begin{cases} |\mathbf{r} - \mathbf{r}'| \to \infty \\ |\mathbf{r} - \mathbf{r}'| \to 0 \end{cases} \quad (26) $$

One of the most convenient functions to describe correlations in condensed matter is the pair distribution function $g(\mathbf{R})$, which is related

to $\langle \bar{n}(\mathbf{r}) \cdot \bar{n}(\mathbf{r}') \rangle$ via:

$$ \langle \bar{n}(\mathbf{r}) \cdot \bar{n}(\mathbf{r}') \rangle = \rho_n \cdot \delta(\mathbf{R}) + \rho_n^2 \cdot g(\mathbf{R}) \quad (27) $$

The pair distribution function can be interpreted in a simple, intuitive way. It provides the average probability to find in a small volume element at distance $\mathbf{R}$ from a reference atom (labeled as $j = 0$ with position $r_j = 0$) another atom of the liquid:

$$ g(\mathbf{R}) = \rho_n^{-1} \langle \sum_{j \neq 0} \delta(\mathbf{R} - \mathbf{r}_j) \rangle \quad (28) $$

For a homogeneous (infinitive) liquid consisting of a single species, $g(\mathbf{R})$ is identical for each atom and thus independent of its position $\mathbf{r}$. Furthermore, because of the orientation isotropy of the liquid, $g(\mathbf{R})$ can be replaced by $g(\mathbf{R})$, which only depends on the absolute value $\mathbf{R}$ of the distance vector. The corresponding quantity $g(\mathbf{R})$ is known as radial distribution function, but is also often denoted as air distribution function in the literature (see Ref.¹¹ for a critical comparison of different correlations functions used in describing X-ray scattering). The probability to find another atom within a shell of radius $\mathbf{R}$ and thickness $\delta(\mathbf{R})$ around the reference atom is then given by $4\pi r^2 g(\mathbf{R})$ (Figure 4). Obviously, $g(\mathbf{R}) \to 1$ for $\mathbf{R} \to \infty$, where the atoms become uncorrelated. In most liquids, $g(\mathbf{R})$ is dominated by the repulsion of the ion cores and resulting packing constraints, which leads to a shell of direct neighbors at a spacing close to the minimum in the pairwise interaction energy (first maximum in $g(\mathbf{R})$) as well as several less-defined shells at larger $\mathbf{R}$. The local correlations in water, which are of particular interest in electrochemical systems, are more complex due to the presence of local hydrogen bonds and are still strongly under debate. They manifest in an additional, temperature-dependent fine structure in the pair distribution function.

By inserting Eq. (27), we can write Eq. (24)
<figure><img src="image_7.png" /><figcaption>Figure 4: Typical configuration of atoms in a simple liquid, showing the characteristic short-range spatial correlations around a reference atom (black circle) and corresponding radial distribution function with maxima indicating first, second, and third shell of neighbor atoms (indicated in red).</figcaption></figure>

as:

$$ \begin{aligned} \langle |S(\mathbf{q})|^2 \rangle &= f(q)^2 \iint [\rho_n \cdot \delta(\mathbf{R}) + \rho_n^2 \cdot g(\mathbf{R})] \\ & \qquad \cdot \exp(-i\mathbf{R} \cdot \mathbf{q}) d\mathbf{R} d\mathbf{r} \\ &= f(q)^2 \cdot N \\ & \qquad \cdot \left[ 1 + \rho_n \int g(\mathbf{R}) \cdot \exp(-i\mathbf{R} \cdot \mathbf{q}) d\mathbf{R} \right] \end{aligned} \quad (29) $$

In the calculation of the second expression, we have taken into account that the integration of the number density provides the number of atoms in the sample, i.e., $\int \rho_n d\mathbf{r} = N$. Eq. (29) shows that $g(R)$ can be directly obtained by Fourier transformation from the scattered intensity. In the literature on liquid scattering, the asymptotic value $g(R \to \infty) = 1$ is customarily subtracted from the pair distribution function within the integral. The Fourier transform of 1 is the $\delta$-function, therefore:

$$ \langle |S(\mathbf{q})|^2 \rangle = f(q)^2 \cdot N \cdot \left[ 1 + \rho_n \int (g(\mathbf{R}) - 1) \cdot \exp(-i\mathbf{R} \cdot \mathbf{q}) d\mathbf{R} + (2\pi)^3 \cdot \delta(\mathbf{q}) \right] \quad (30) $$

The last term in this expression only describes the (experimentally not measurable) forward

scattering in the direction of the incident beam. The first two terms in the bracket are called the liquid structure factor $S_L(\mathbf{q})$. Note that, in contrast to the normal structure factor $S(\mathbf{q})$, $S_L(\mathbf{q})$ is proportional to the intensity rather than to the field. Performing the integration over the angular coordinates we obtain for an isotropic liquid:³

$$ S_L(q) = 1 + 4\pi\rho_n \int \frac{R}{q} \sin(qR)(g(R) - 1)dR \quad (31) $$

which – similar to $g(R)$ – also exhibits peaks, indicating the local correlations in the liquid that rapidly decay with increasing $q$ (see also Figure 4). $g(R)$ can be extracted from $S_L(\mathbf{q})$ by the pair distribution function method described in 4.2.4.

### 2.3.5 Scattering by liquid interface structure

The symmetry break near interfaces results in a distortion of the isotropic order in a liquid, which can be detected by scattering methods.¹² Often, this interface-induced ordering manifests in a molecular layering that decays into the bulk liquid. Such layering has been observed at the free surface of liquids as well as at liquid-solid and liquid-liquid interfaces. Typical examples where pronounced layering was observed are interfaces of liquid metals and ionic liquids (see section 5.5 and 5.2). The layering leads to oscillations of the electron density along the surface-normal direction, whereas the structure parallel to the interface remains liquid-like. Thus, the layering predominantly manifests along the specular axis, i.e., in the X-ray reflectivity (XRR).

The most common way to describe such surface layering is the distorted crystal model (DCM), which was originally derived by Magnusen et al. to describe the layering at the free surface of liquid Hg.¹³ In this model, the scattering by the layered liquid is described by a semi-infinite series of atomic or molecular layers that are spaced at equal distances $d$. The layer directly at the interface has a finite Gaussian width $\sigma_0$ in surface normal direction $z$, corre-
sponding to a contribution to the Debye-Waller factor $M_z = q_z^2 \cdot \sigma_0^2/2$. The width of layer $n$ is assumed to increase with increasing distance $z = n \cdot d > 0$ from the interface according to the following relationship:

$$ \sigma_n^2 = \sigma_0^2 + n \cdot \bar{\sigma}^2 \quad (32) $$

This results in an oscillatory electron density profile that decays to the uniform average density within the bulk liquid (see Figure 27c for an example). The constant $\bar{\sigma}$ describes how fast the layering decays with $z$. The scattering from this series of broadening layers can be calculated in the same way as in Eq. 18. Now the Debye-Waller expression of eq. 5 has to be included within the sum used for calculating the structure factor:

$$ S_{\text{DCM}}(q_z) = \sum_{n=0}^{\infty} \exp(-ind \cdot q_z) \cdot \exp(-\frac{1}{2}\sigma_n^2 \cdot q_z^2) \quad (33) $$

Assuming an increase in width as provided by eq. 33 an analytical expression for $S_{\text{DCM}}(q_z)$ can be obtained by using the geometric series:

$$ S_{\text{DCM}}(q_z) = \frac{\exp(-\frac{1}{2}\sigma_0^2 \cdot q_z^2)}{1 - \exp(-id \cdot q_z) \cdot \exp(-\frac{1}{2}\bar{\sigma}^2 \cdot q_z^2)} \quad (34) $$

In the absence of any further structure, e.g., for the scattering of a free liquid surface that exhibits layering, Eq. 34 leads to a modulation of the Fresnel reflectivity of a perfect interface (see section 4.3.1) in form of a weak peak at $q_z \approx 2\pi/d$ (see e.g. Figure 27a,b). The width and height of this peak depend on the decay parameter $\bar{\sigma}$. In some cases, the layer(s) next to the interface can have a density, spacing, or width that differ from those assumed in the DCM. These effects can be implemented by adding one or more additional layers with deviating parameters to the sum in Eq. 33.

## 2.4 Scattering of nanoscale objects

The theory for scattering from nanoscale objects is based on the general scattering theory, as described in Section 2.2. The scattering am-

plitude $S(\mathbf{q})$ for a given electron density distribution $\rho_e(\mathbf{r})$ is given by Eq. 1, the corresponding scattered intensity $|S(\mathbf{q})|^2$ by Eq. 2. In the case of a single nanoscale object, the integration takes place throughout the volume of the whole object, and the electron density $\rho_e$ is often substituted by the fluctuation of electron density $\Delta\rho_e$.

$$ S(\mathbf{q}) = \int \Delta\rho_e(\mathbf{r}) \cdot \exp(-i\mathbf{r} \cdot \mathbf{q}) d\mathbf{r} \quad (35) $$

If the objects in the probed volume are randomly oriented, the intensity is proportional to their average

$$ I(\mathbf{q}) \sim \langle |S(\mathbf{q})|^2 \rangle \quad (36) $$

$\langle |S(\mathbf{q})|^2 \rangle$ is often denoted as particle form factor $P(\mathbf{q})$ in the small-angle scattering literature and in section 4.5.1. Substituting from Eq. 2, this can be integrated to the form of the Debye scattering function for ensemble of particles$^{14}$

$$ I(q) \sim N \langle V^2 \Delta \rho^2 \rangle \int p(R) \frac{\sin qR}{qR} dR \quad (37) $$

$$ p(R) = 4\pi R^2 \frac{\int \Delta\rho_e(r) \cdot \Delta\rho_e(r+R) dr}{\langle \Delta\rho_e^2 \rangle} \quad (38) $$

, where $p(r)$ is the normalized total pairwise distribution function. Eq. 37 shows that the scattered intensity is proportional to the number density of nano-objects in the scattering volume, $N$, as well as to the volume of the scattering elements, $V$. The integral term describes the interference effects associated with the distribution of electrons in an average object. This equation is the basis for an approximate description of the X-ray scattering by various nano-scale objects. In the case of spatial correlations between the objects, Eq. 37 is extended by a structure factor (see chapter 4.5.1). For perfectly spherical objects of radius $R_p$, the scattered intensity (form factor) can be expressed analytically as$^{15}$

$$ \langle |S(\mathbf{q})|^2 \rangle = \left[ 3 \frac{\sin qR_p - qR_p \cos qR_p}{(qR_p)^3} \right]^2 \quad (39) $$
## 2.5 Resonant X-ray scattering

The access to tunable photon energy at synchrotron X-ray sources also allows using the so-called resonant anomalous effects to obtain element-sensitive information from diffraction patterns. Such characterization is based on the dependence of the atomic form factors on the photon energy $ε_{Ph}$ or X-ray wavelength $λ$, respectively, as already mentioned in chapter 2.3.1. To describe this effect, the atomic form factor has to be written as a complex number:

$$f(\mathbf{q}, \lambda) = f_0(\mathbf{q}) + f'(\varepsilon_{Ph}) + if''(\varepsilon_{Ph}) \quad (40)$$

Here $f_0(\mathbf{q})$ is the conventional form factor defined in Eq. 3. $f'(\varepsilon_{Ph})$ and $f''(\varepsilon_{Ph})$ are called dispersion coefficients and describe the correction to $f_0$ for photon energies close to the possible electron transitions of a particular element (Figure 5). These energies are often called absorption edges. This phenomenon is due to res-

<figure><img src="image_8.png" /><figcaption>Figure 5: Anomalous energy dispersion of atomic scattering factor for Pt in the range of L absorption edges. Generated at http://skuld.bmsc.washington.edu/scatter/AS_form.html</figcaption></figure>

onant effects near the adsorption edges, which lead to a direct alteration of the X-ray scattering length ($Δf'$) as well as to phase lags with respect to the driving field of the incoming wave that lead to dissipation ($i·Δf''$).³ The dependence of dispersion coefficients on $\mathbf{q}$ is very small and can be neglected. The resonant anomalous behavior of the form factors is typically used to solve the phase problem or highlight certain elements in the diffraction patterns

in both small-angle X-ray¹⁶ and wide-angle X-ray scattering¹⁷,¹⁸ techniques (see section 4.7). It can also be used for effective background subtraction, where two diffraction patterns taken below the edge and at the edge are subtracted, leaving only the scattering from the element of interest¹⁹⁻²¹.

# 3 Experimental aspects

This section aims to give an introduction to the technical aspects of *in situ* and *operando* experiments, as they often employ synchrotron sources and advanced instrumentation. Therefore basic understanding of the underlying principles of X-ray generation and X-ray scattering instrumentation are often needed to properly choose the appropriate X-ray source and/or synchrotron beamline. The design of *operando* electrochemical cell is equally important as well as understanding of how the X-ray beam influences the electrochemical environment. This knowledge forms a basis for successful experiment and data interpretation.

## 3.1 X-ray sources for *in situ* and *operando* studies

There is a wide variety of X-ray sources available for the *in situ* and *operando* X-ray scattering experiments. They are mainly characterized by the quality of emitted X-rays which defines their fundamental interactions with matter. The main parameters defining the optimal use in different experiments and measurements are photon energy, flux, and coherence. The energy of the X-ray photons determines its cross-section towards different modes of interaction with the atoms, of which the studied material consists. The X-ray energy parameter is therefore instrumental in the choice of a proper X-ray source for the particular experiment. In general (with the exception of anomalous scattering experiments), higher energies are better suited to diffraction experiments than lower energies. This is because at lower energies the photo absorption process dominates the interactions with the sample or the electrochemical
cell, and this causes undesired effects. First, the electrons emitted in the photo-absorption process interact with the sample and electrolyte, producing radicals that then affect the integrity of the sample or alter the electrochemical environment. Second, a higher fraction of the incident photons is absorbed in the parts of the electrochemical cell which are in the path of the X-ray beam, i.e., the photoabsorption cross-section, and thus the X-ray attenuation coefficient $\mu$ is higher. Following the Beer-Lambert law ($I(t) = I_0e^{-\mu(E)*t}$, t is the thickness of the material), this increase in $\mu$ results in much lower transmission (penetration power), which significantly limits the design of suitable electrochemical cells and limits their performance.

The choice of the X-ray energy also defines the volume of reciprocal space which is accessible in a scattering experiment. In particular, it defines the reciprocal region that can be acquired in a single acquisition with a large 2D detector. High photon energies provide access to large reciprocal space volumes. This can significantly improve data acquisition time as the detector does not have to be moved during acquisition, allowing faster time-resolved experiments as well as a more accurate analysis of the obtained diffraction patterns. This is particularly important for experiments where fine Rietveld refinement or pair distribution function (PDF) analysis is needed. In surface-sensitive diffraction, the large reciprocal space volume acquired at high energies speeds up the measurements by an order of magnitude and also enables more reliable and detailed surface structure determination.

It should be noted, however, that for some *in-situ* and *operando* experiments use of lower energy X-rays is inevitable. This typically applies to resonant X-ray scattering measurements where energy around probed X-ray edge must be used. Another examples are experiments using coherent beams, which are normally available only at lower energies due to the physical constraints of synchrotron undulators. Experiments demanding high reciprocal space resolution are also often performed at low X-ray energies to increase the angular resolution of the setup.

Many topics of interest in *in situ* and *operando* studies, such as interfaces or poorly ordered materials, rely on the analysis of scattered intensities that are much weaker than that of bulk crystals. For such studies, high photon flux is required, especially for time-resolved studies. In addition, for some techniques, for example grazing incidence diffraction and nanodiffraction, the size of the incident X-ray beam at the sample position has to be in the (sub)micrometer range in one or two directions. This requires X-ray beams of high brilliance that can be well-focused. Furthermore, a sizable coherent fraction of the X-ray beam is necessary for some advanced methods (see 4.6.2).

### 3.1.1 Lab sources

Laboratory X-ray sources play an important part in the characterization workflows of many scientific fields. A common laboratory would be equipped with a standard rotating anode X-ray source with simple optics and a goniometer. Such instruments are ideal for *ex situ* characterization of materials, but the low flux and X-ray energy do not typically allow for *operando* experiments. However, recent advances in both X-ray source design and detector technology allow using high X-ray energies to penetrate *operando* cells and reasonably fast data acquisition by large area detectors, enabling studies with satisfactory time resolution.

Nowadays all major manufacturers provide advanced X-ray source and detection systems, suitable for both small-angle and wide-angle scattering experiments. The liquid metal jet X-ray source technology can be used for *operando* science as it provides relatively high flux even at high X-ray energies²². However, the brilliance of such systems is still orders of magnitude lower than that of 3rd and 4th generation synchrotron sources²³. Given the fast progress of X-ray generation technologies, we expect that this inequality will change and more and more laboratory systems will be used for routine *operando* experiments.
### 3.1.2 Synchrotron sources

Synchrotron radiation is produced by charged particles with velocities close to the speed of light moving on a curved path due to an applied magnetic field. Its physical origin is the (centripetal) acceleration of the electric charge, resulting – similar to a radio antenna – in the emission of electromagnetic radiation. However, the angular distribution of this emission is not identical to that of a conventional (non-relativistic) oscillating electric dipole but strongly distorted in the forward direction due to relativistic effects. As a result an intense, collimated beam fans out from the curved path of the moving charge. Synchrotron radiation has a continuous spectrum and is almost perfectly polarized parallel to the plane of movement of the generating charge. Together with the orders of magnitude higher intensity and much lower angular divergence of the X-ray beam, these properties make synchrotron radiation by far superior to that produced by conventional X-rays tubes in laboratory instruments. Basics about synchrotron radiation are in the following paragraphs, but for more details we refer reader to specialized textbooks and reviews²⁴,²⁵

Synchrotron sources are storage rings where electrons or positrons are kept circulating under UHV conditions at a constant kinetic energy (typically ~ GeV). The radiation is generated in the magnets that bend the beam to obtain a closed orbit or by optimized magnetic devices, called wigglers and undulators, that are inserted in the straight sections between the bending magnets. Arranged around the storage ring are synchrotron beamlines where the X-ray beams are further focused, collimated, monochromatized, and finally passed into experimental hutches, which contain one or several instruments for the actual experiments. This experimental layout is schematically depicted in Figure 6.

Before further discussing the different X-ray sources and the beamline instrumentation in a synchrotron we consider the actual experimental requirements for elastic scattering studies. First, such experiments employ highly monochromatic radiation, i.e., utilize only a

small wavelength interval $\Delta\lambda$ of the beam. Second, well-defined angles between the beam and atomic planes in the sample are essential for all X-ray diffraction studies, which is only possible if the angular divergence of the beam is low. Third, focusing the beam to a small size is necessary. In particular surface studies often require the beam to impinge on the sample under a small gracing incidence angle $\alpha_i$. The projection of the X-ray beam onto the surface is, therefore, a factor $1/\sin(\alpha_i)$ larger than the vertical beam size. To optimally utilize the incident intensity, the beam thus has to be focused to a small size (10 to 100 µm for a sample of several mm in width) and also should have a low divergence on the sample. These requirements can only be fulfilled if the radiation is emitted out of a small source area with low source divergence. For comparing different X-ray sources one needs a physical quantity that takes all this into account and provides a measure for the photon flux under these constraints. This quantity is the brilliance of the X-ray beam, which is customarily defined in synchrotron science as the number of photons per second, emitted by a 1 mm² large source into a solid angle of 1 mrad² and a 0.1% wide relative energy interval around a given photon energy. For the Cu Kα line of a typical laboratory X-ray tube, the brilliance is $10^8$ photons/s/mm²/mrad²/0.1% bandwidth. Even bending magnet stations surpass this value by more than 6 orders of magnitude, enabling fundamentally different experiments.

<figure><img src="image_9.png" /><figcaption>Figure 6: Schematic layout of a synchrotron source, showing bending magnets, insertion devices, and a typical beamline.</figcaption></figure>
iments and explaining the rapid rise of X-ray science after the emergence of the first dedicated synchrotron facilities in the 1980s.

The central facilities of modern third-generation synchrotron sources, however, are insertion devices (or so-called undulators), which can provide a much higher brilliance, up to $10^{20}$ photons/s/mm$^2$/mrad$^2$/0.1% bandwidth. Both wigglers and undulators employ an array of magnets with alternating fields to force the charged particles in the storage ring onto an oscillatory path. The synchrotron radiation emitted at each bend in this path is superimposed, resulting in a more intense beam. In a wiggler, the emissions produced in each curve are independent and uncorrelated. The intensity is consequently directly proportional to the number of magnet pairs in the array and the energy spectrum corresponds to that of a bending magnet, i.e., is a broad, continuous distribution. In contrast, undulators are constructed in such a way that the electromagnetic waves emitted by the charged particle at each bend in its path can be in phase with each other. In this case, the field amplitudes are superimposed and the resulting intensity scales with the square of the number of magnet pairs, providing much higher amplification factors. Obviously, the condition for coherent superposition can only be met at one particular wavelength and its higher harmonics, making the emitted radiation quasi-monochromatic. By changing the gap between the upper and lower array of magnets and by this the magnetic field strength the energy of these emission maxima can be tuned continuously. Furthermore, since the deflection angles in undulators are small as compared to wigglers or bending magnets, their radiation cones are compressed. All this makes undulators the most brilliant sources employed in current synchrotrons.

Most diffraction beamlines have a setup as shown schematically in Figure 6. After the X-ray beam is generated, a single wavelength is selected by Bragg reflection at a crystal lattice. A common design is a double crystal monochromator, where the beam is reflected twice by two parallel-oriented, opposing silicon crystals, using Bragg reflection from the lattice planes par-

allel to the crystals' surfaces. This ensures that the beam maintains its direction and is only slightly vertically shifted. Silicon is the material of choice, since single crystals of extremely high perfection are easily available. Such crystals reflect the X-ray beam to almost 100% within a small (for Si(111) ≈0.1 mrad wide) angular range – the “Darwin widths” of the crystal – which is well adapted to the natural divergence of the synchrotron beam. The resulting monochromatized beams have relative spectral widths $\Delta\lambda/\lambda$ typically below ≈ $10^{-4}$, which is an important prerequisite for spectroscopic or high-resolution scattering studies. Modern high energy beamlines (E >50 keV) use monochromators in transmission mode (Laue monochromators), where the beam is passing through two 1 mm thick Si single crystals and photons are reflected from lattice planes that are nearly normal to the crystal surface. This geometry allows tuning the spectral width by bending the crystals with the trade-off in intensity, which is particularly advantageous for experiments where high intensity is necessary, such as total scattering measurements from amorphous materials or surface-sensitive studies.

Various other X-ray optical elements are employed for further configuring or characterizing the incident beam. Many beamlines employ curved X-ray mirrors, which allow additional focusing of the beam and define the beam at the sample position. Other focusing devices, such as arrays of refractive lenses or Fresnel zone plates, are also often used. If focusing is not used, the beam size at the sample position is controlled by horizontal and vertical slits. Because the number of electrons in the synchrotron ring gradually decays due to collisions with residual gas molecules, the incident X-ray intensity $I_0$ slowly decreases and has to be continuously monitored, which is usually done by measuring the ionization of a gas by the traversing beam or by inserting a photo-diode in the beam path. Furthermore, many beamlines include an attenuator in front of the sample, consisting of several metal foils of different thicknesses. This allows measurements over many orders of magnitude in intensity, as required in surface studies, without damaging
the X-ray detectors.

The energy of the electrons in the storage
ring, the used source magnets, and the optics
layout define the properties of the X-ray beam
at the end stations. Therefore each experiment
requires consideration about what storage ring
and instrument would fit best the needs. For
*in situ* and *operando* experiments, energies >
20 keV are advantageous due to the high pen-
etration power of the X-rays. High photon en-
ergy allows using robust electrochemical cells
and devices without making compromises in
electrochemical performance due to constraints
such as measurement geometry, cell wall size,
electrolyte thickness in the beam path, and
materials used for the cell manufacturing (see
chapter 3.3). Another consideration is the
needed reciprocal space resolution, which is a
convolution of the spectral width, divergence of
the beam, sample size, detector pixel size, and
position of the detector. In this respect, low en-
ergy instruments (E = 5-10 keV) can have a su-
perior resolution, particularly if analyzer crys-
tals are used, but for the majority of *in situ*
and *operando* experiments, the typical resolu-
tion of mid and high energy beamlines using
2D detectors is sufficient. Possibilities of focus-
ing the X-ray beam to sub-micron sizes can be
an advantage in experiments where high spa-
tial resolution is demanded. Modern diffraction
beamlines can achieve this focus range by using
refraction optics or Fresnel plates, which are rel-
atively easy to set up. Small focused beams are
typically used for scanning experiments of het-
erogeneous materials and interfaces, an impor-
tant part of studies of electrochemical devices.

Given the high brilliance of synchrotron
sources, the amount of data generated during
one experiment can easily surpass several ter-
abytes. Therefore data handling, processing,
and analysis is an essential aspect of the ex-
periment. Each instrument will provide raw
data sets which need to be further processed.
Different instruments have different pipelines
for data processing and the resulting diffraction
patterns can be output in different formats, of-
ten only a raw form. Therefore postprocessing
of the data by individual research groups is typ-
ically needed. The most efficient way is to use

common scripting languages, such as Python or
MATLAB, for data postprocessing and special-
ized software for further crystallographic anal-
ysis.

3.1.3 X-ray Free Electron Lasers

With the upcoming X-ray free electron lasers (XFELs), an even more powerful tool for X-ray science has emerged in recent years. XFELs are essentially linear accelerators equipped with very long undulators. Due to the interaction of the generated synchrotron radiation with the charged particles, the latter spontaneously organize into bunches that emit coherently. Hence, contrary to normal undulators, where the emissions of each particle at the subsequent bends are in phase, but the emissions by different particles are uncorrelated, the field amplitudes of all emitted radiation are superimposed constructively. The result is a fully coherent beam as in a laser, composed of femtosecond pulses with a ten orders of magnitude higher brilliance than current undulators at storage ring sources. XFELs offer exciting opportunities for radically new experiments that exploit these properties, such as time-resolved structural studies, but also pose substantial challenges in developing suitable beamline optics and experimental techniques. Currently, these instrumental questions are the focus of intense research efforts, whereas the application of these sources to more routine studies of surfaces and interfaces seems still a few years away.

## 3.2 X-ray diffractometers

The most common configurations found in com-
mercial diffractometers in laboratories world-
wide are the Bragg-Brentano (reflection mode)
and Debye-Scherrer (transmission mode) ge-
ometries (Figure 7.a and 7.b, respectively).
These setups consist of an X-ray source, a sam-
ple holder, and a detector, whose positions are
precisely controlled by motorized stages. The
adjustable X-ray source emits a beam of X-rays
that is directed at the sample holder (goniome-
ter), which precisely controls the position of the
sample with respect to the incoming beam and
the detector. The detector is positioned to receive the scattered X-rays, which are diffracted at various angles due to the crystal structure of the sample. Commercial instruments differ in the choices of optics, detector physics and geometries, and beam characteristics, which can be tuned for specific experimental purposes. Older instruments are equipped with a one-dimensional (1D) point detector which can be scanned in a circle around the sample. Modern instruments use 2D detectors which can image larger volumes of reciprocal space, therefore speeding up the measurement.

Synchrotron instruments can have various geometries, depending on the main purpose of the beamlines. For all synchrotron instruments, the beam source is fixed in space, and only the sample and detector can change position with respect to the incident beam. The standard is a four-circle diffractometer, where the sample is mounted on an Eulerian cradle consisting of three circles (rotation axes), and the $2\theta$ angle between the incident beam and detector is determined by the fourth circle (Figure 7c)$^{27}$. This minimal arrangement allows to measure within a large volume of reciprocal space, and it is typically used for single-crystal diffraction experiments. However, powder diffraction experiments or measurements on thin films can also be performed on this diffractometer. For surface scattering experiments, diffractometers with a six-circle geometry are employed (Figure 7d)$^{28}$. These allow setting with high precision any desired orientation of the sample with respect to the incident beam as well as choosing independently the angular position of the detector within and perpendicular to the surface plane. Specifically, this also allows fixing the incident angle $\alpha_i$ and exit angle $\alpha_k$ of the surface relative to the impinging and scattered beam, respectively (see Figure 1a). Six-circle diffractometers are over-determined with respect to their motional degrees of freedom and hence can be operated in different modes that are preferable for surface diffraction studies (e.g., measurements at constant $\alpha_i$ or at $\alpha_i = \alpha_k$). A specific type of surface diffractometer allows additional tilting of the incident beam, enabling studies of samples that cannot be tilted, for

example, liquid interfaces.$^{29}$ Other diffractometer geometries, such as (2+3) type diffractometers$^{30}$, are also used, and all the described geometries can be utilized in laboratory settings.

Recently detector development underwent rapid evolution, and photon-counting large detectors are becoming a norm. This detector technology defines the optimal energy range for the experiment as well as the quality of the final data. For experiments up to 30 keV silicon-based photon counting detectors are suitable; for higher energies, CdTe or GaAs detectors need to be used as they provide enough absorption for high-energy photons. It is also common to use detectors based on scintillator material (typically CsI) in front of the standard complementary metal-oxide semiconductor (CMOS) detector. Such detectors have more counting noise, and therefore they are used for less demanding measurements. However, they still provide an acceptable alternative.

Large stationary 2D detectors are becoming heavily used at synchrotron beamlines as it is possible to obtain a large section of reciprocal space, e.g., full diffraction rings, in one acquisition without moving the detector. This allows very fast measurements but also requires different approaches in the analysis. To obtain standard 1D powder diffraction patterns, the raw images need to be radially integrated with specialized software$^{31}$. Furthermore, for single crystal studies rotating the sample without moving the detector allows scanning of a large reciprocal space volume which significantly speeds up the measurement and allows more advanced analysis. This can also be achieved at lower energy beamlines by moving the 2D detector with the diffractometer arm, albeit at a slower pace. In these cases, the reflections are often binned and analyzed in 3D reciprocal space,$^{32}$ which for some techniques, such as Bragg coherent diffractive imaging (BCDI) or high energy surface X-ray diffraction (HES-XRD), is a standard approach$^{33-35}$. Binned data, or data reduced by other means, are then further processed by specialized software in order to get physical quantities of interest. Examples of established software are GSAS-II$^{36}$, TOPAS$^{37}$ and FullProf$^{38}$ for Rietveld analysis.
<figure><img src="image_10.png" /></figure>

<figure><img src="image_11.png" /></figure>

<figure><img src="image_12.png" /></figure>

<figure><img src="image_13.png" /></figure>

<figure><img src="image_14.png" /></figure>

<figure><img src="image_15.png" /></figure>

<figure><img src="image_16.png" /></figure>

<figure><img src="image_17.png" /><figcaption>Figure 7: Schematic diffractometers geometries and exemplary pictures for (a) Bragg-Brentano, (b) Debye-Scherrer (Adapted from Ref. ²⁶. Copyright 2021 Springer Nature), (c) four-circle, and (d) six-circle instruments.</figcaption></figure>
via the introduction of additional liquid into the cell. After inflation, the electrolyte layer on the surface is several mm thick, which provides high conductivity and enables substantial mass transport of species from the electrolyte to the electrode. In these cells, true *in situ* investigations of electrochemical interfaces during processes such as electrodeposition, dissolution, or gas (e.g., H₂) evolution are obviously not possible and experiments have been restricted almost exclusively to potentials in the double layer regime. As a further disadvantage, not only the studied surface but also the sides of the sample are exposed to the electrolyte and hence contribute to the electrochemical current.

Insertion device beamlines at modern, hard X-ray, third-generation synchrotron sources can provide high brilliance beams in the photon energy range $\ge$ 20 keV. This allows the usage of electrochemical cells, where the beam passes through several millimeters or even centimeters of an extended electrolyte volume and/or cell casing. An example is provided by the cell depicted in Figure 8b, in which an electrolyte-filled glass tube establishes contact with the electrode surface via a free-standing meniscus within a compartment filled with an inert gas atmosphere. This arrangement resembles the “hanging meniscus” geometry commonly used in single crystal electrochemistry, resulting in a comparable electrochemical behavior, i.e., low cell constants and facile transport. The X-ray beam passes through the meniscus and is only scattered by the sample and the electrolyte solution. Due to this wall-free geometry, the scattered background intensity – although higher than in thin layer geometry – is given solely by the slowly changing scattering of the electrolyte solution (see chapter 2.3.4) and therefore varies much less with the scattering angle than in thin-layer cells, where a strong, non-uniform contribution from the powder scattering by the polymer X-ray window exists. Furthermore, problems caused by beam damage of the window material are avoided. Because the meniscus is stabilized by surface tension, the cell can be positioned on the X-ray diffractometer in arbitrary orientations as required by diffraction experiments. To avoid collapse of the meniscus

during the measurements, the cell has to be perfectly tight and evaporation of the electrolyte has to be negligible over hours. As this is often difficult to achieve, such cells are often connected with precision pumps for adjusting the electrolyte remote-controlled, which also allows establishing electrolyte flow or exchange.

Under conditions of strong gas evolution at the electrode, a freestanding meniscus is not stable. Here, cells resembling conventional electrochemical cells have been employed (Figure 8c). The sample is embedded at the bottom of a narrow conical vessel, which is partly filled with the electrolyte. Near the sample, the cell walls are kept thin, and their distance is minimized to reduce X-ray absorption. A typical material for such cells is polyether ether ketone (PEEK), which has good stability in the X-ray beam. The background scattering of such cells is typically higher than in the “hanging meniscus” variant. Still, they offer almost unlimited possibilities for *operando* studies under reaction conditions up to very high current densities.

Various variations of thin layer and transmission cells have been developed, including cells that provide temperature control, allow direct transfer of the sample from a UHV system, or permit the exchange of the electrolyte during the X-ray studies by a remote-controlled pump system. The precise design often depends on the requirements of the specific experiment, both with respect to the electrochemical conditions as well as the geometric demands of the X-ray studies. While thin layer cells as in Figure 8a provide full access of the hemispherical angular space above the sample surface, other cell designs may restrict this geometrically to some extent (although this can often be compensated for by employing higher photon energies). For X-ray scattering methods that do not require a wide field of view, e.g., X-ray reflectivity, powder diffraction, or small-angle scattering, even more simple cell geometries are possible.

Investigations conducted on thin-film catalyst electrodes, have used different cell designs (featuring two or three electrodes) that enable diffraction measurements of the catalysts in liquid or solid electrolytes (Figure 8d-f). For thin films featuring high metal loading, transmission
<figure><img src="image_18.png" /><figcaption>Figure 8: Schematic illustration of various electrochemical cells for X-ray diffraction studies. (a) Thin layer cell, (b) hanging meniscus cell (Adapted from Ref.⁵². Copyright 2023 Elsevier. (c) transmission cell (Adapted from Ref.⁵³. Copyright 2019 American Chemical Society), (d) liquid half-cell (Adapted with permission from Ref⁵⁴. Copyright 2019 American Chemical Society), (e) commercial gas diffusion electrode cell (Courtesy from redoxme AB⁵⁵), (f) modified standard single fuel cell (Adapted from Ref.⁵⁶. Copyright 2018 Elsevier), (g) XRD-CT fuel cell (Adapted from Ref.⁵⁷. Copyright 2019 Elsevier), and (h) XRD-CT electrolyzer cell (Adapted from Ref.⁵⁸. Copyright 2023 Elsevier).</figcaption></figure>
measurements through the film plane are possible as long as the counter-electrode is kept away from the beam path or has negligible metal loading compared to the working electrode. For example, Asset et al. used this transmission configuration on a 250 µg<sub>Pt</sub> cm<sup>-2</sup> film in liquid electrolyte with a Pt ring counter studied electrode (see Figure 8d).<sup>54</sup> Petkov and coworkers modified a standard single proton exchange membrane fuel cell for laboratory studies (Figure 8f) to allow transmission measurements of the catalyst in contact with the solid polymer electrolyte<sup>56</sup>. Here, the beam is probing both the anode and cathode, but the low Pt loadings of the anode as compared to the cathode allowed attributing the scattered signal mostly to the cathode. Another possible electrochemical cell is the gas diffusion electrode half-cell. In this configuration, the working gas diffusion electrode is fed with a gaseous reactant while the counter electrode is kept in a liquid electrolyte. Such a cell adapted for transmission X-ray diffraction measurements is commercially available from redoxme AG, Sweden (Figure 8e).<sup>55</sup>

For thin films featuring low metal loading, grazing incidence (or in-plane) measurement is by far the most efficient approach for collecting scattered signals with sufficiently high intensities. Despite requiring a more careful alignment with the X-ray beam as compared to the transmission configuration, this approach has been extensively employed and can be adapted to various electrolyte types (liquid, polymeric, solid oxides, etc.).<sup>57-59</sup> For example, Chattot et al. used this configuration to investigate the electrochemical strain dynamics on 20 µg<sub>Pt</sub> cm<sup>-2</sup> thin films in liquid electrolyte<sup>60</sup>. Finally, the careful design of electrochemical cells with rotation symmetry and 360 degrees free path for the beam in grazing incidence configuration allows measuring X-ray diffraction computed tomography (XRD-CT). Figure 8.g and h show examples of recently designed X-ray transparent fuel cells and electrolyzer cells for *operando* XRD-CT studies.<sup>57,58</sup>

In battery research, the same general principles for the cell design, as described above, hold. Conventional battery coin, prismatic and cylin-

drical cells, tubular ("Swagelok") cells, pouch cells, and capillary cells can be used (see chapter 8 Figure 41). Other cell geometries are also feasible in cells without liquid electrolytes, e.g., polymer electrolytes. In some cases, X-ray scattering techniques were also used to probe materials inside electrochemical devices, such as fuel cells. Particularly suited for this are XRD methods at very high photon energies of 70 keV or higher, where several cm of low-Z materials can be easily penetrated.

## 3.4 X-ray beam effects

For every *operando* method, it is crucial to always assess the effects of the used probe on the studied system. In comparison to electron probes, X-rays interact with electrons in materials only weakly, allowing them to penetrate the studied materials, as well as electrochemical cells, with relatively manageable beam effects (sometimes referred to as beam modulation or beam damage). However, the beam modulation is always present and needs to be assessed for each studied electrochemical system separately to avoid beam damage and misinterpretation of the data. Pioneering work by R. Henderson on a beam influence in biological systems forms a basis for a discussion in this section<sup>61</sup>. A comprehensive review of the possible X-ray beam effects is further provided in Ref.<sup>62</sup>.

The fundamental process causing the beam modulation in matter is the photoelectric effect. In this process, the incoming photon is fully adsorbed by an electron bound in the atom, and this electron is ejected from the atom with the kinetic energy $\epsilon_{el} = \epsilon_{Ph} - \epsilon_0$, where $\epsilon_{Ph}$ is the energy of the photon and $\epsilon_0$ is the energy required to remove the electron from the surface of the material or from the atom/molecule. This typically results in the formation of holes and excited states in the case of metallic electrodes, the generation of radical molecules in the case of electrolytes and soft matter, as well as in heating. Furthermore, high-energy free electrons can propagate through the environment and further interact with the atoms and molecules of the studied system. This, in turn, causes an avalanche effect, where one en-
ergetic electron generates several radicals and secondary free electrons along the propagation pathway. The radicals then further interact with the environment inducing an interaction cascade and possibly generating new species. The mean free path between each collision is typically less than 50 nm, but for electrons excited by high energy X-rays (> 30 keV), the total traveled path is on the order of tens of microns. Therefore, the interaction cascade can extend far from the X-ray interaction volume, and the effects of the beam often reach outside of the beam path.

Thermal effects are the most obvious beam modulation. These are most pronounced at low temperatures, where the temperature of the material can increase even by tens of degrees upon beam exposure. However, this greatly depends on the energy of used probe, total photons absorbed, irradiated volume, as well as on the material density and heat capacity. For typical experiments at ambient temperatures, the in-beam sample temperature is unlikely to increase by more than several degrees, and this only for insulating samples. If precise temperature control is needed, the temperature of the sample should be taken as close to the beam as possible to account for beam heating effects$^{62}$.

The most severe beam modulation in electrochemical systems results typically from the radiolysis of liquid electrolytes (e.g. water, battery electrolytes). The photoelectrons causing the interaction cascade are often generated in the solid electrode itself and propagate far in the electrolyte. In the case of high Z elements, those photoelectrons are the main fraction, not the photoelectrons generated in the electrolyte itself. Therefore the highest concentration of electrolysis products are often produced at the electrode surface, which can be highly detrimental for *operando* experiments in electrocatalysis. The interactions between energetic electrons and the electrolyte molecules, the products in form of radicals, and the interaction cascade has been described by various authors from diverse backgrounds$^{63-70}$. For the hydrolysis of water, the main radicals are hydrated electrons ($e_{aq}^{-}$), hydrogen and hydroxyl radicals ($H\cdot$, $OH\cdot$), which are further

converted into the hydrolysis products $OH^{-}$, $H^{+}$, $H_{2}$, $H_{2}O_{2}$, and $HO_{2}$ in the time frame of $1 \times 10^{-6}$ s (Figure 9a)$^{63}$. These products can interfere with the surface chemistry or change substantially the pH in the vicinity of the X-ray beam, leading to undesired effects and wrong conclusions. These effects are often overseen, but there are several reports in the literature where beam modulation during *in situ/operando* experiments was explicitly discussed. Examples include the beam-induced Fe redox chemistry under the ESRF-EBS beam$^{71}$, the rate enhancement in metal electrodeposition and NP formation$^{62}$, and the oxidative etching of gold NPs$^{72}$. It should be noted here, that the beam modulation is not only present in liquid or polymer electrolytes during electrochemical *in situ/operando* experiments, even though the effects here are most pronounced. Altering of the solid state structure of the materials in the form of permanent atomic displacement in crystalline materials (defect formation), induced phase transitions, formation of electron-hole pairs in semiconductors, and changes in the chemical state of the atoms is not unusual.$^{62}$

Two main factors affect the beam modulation: the employed energy of the X-rays and the total dose in the probed volume of the sample. These two parameters can be controlled and careful beam modulation assessment and possible mitigation measures should take place ahead of each *in situ/operando* measurements. The evolution of cross sections for various X-ray/matter interactions with energy shows that higher X-ray energy is advantageous for diffraction experiments in terms of beam modulation, because of the favorable ratio of elastic versus photoelectric cross sections at higher energies (Figure 9b)$^{61}$. However, this is a generalization that should be taken with a grain of salt, as more energetic electrons can induce higher concentrations of hydrolysis products, while also penetrating much larger distances in the electrolyte. The ideal energy for an experiment will depend on the electrode/electrolyte composition and the morphology of the materials. To proper assess all these effects, careful simulation should be performed, but to the best
<figure><img src="image_19.png" /><figcaption>Figure 9: (a) Main reactions occurring during the three stages of water radiolysis (Adapted from$^{63}$). (b) Cross sections of coherent scattering (blue) and photoelectron absorption (orange). Their ratio (green) is related to amount of useful scattering signal in comparison to the beam damage. Higher ratio means less photoelectrons per scattering event and possibly less beam modulation.</figcaption></figure>

of our knowledge, the foundation has not been yet developed for electrochemical systems. In the case of protein diffraction, the ideal energy has been determined to be around 24-41 keV depending on crystal size$^{73}$.

In current *in situ* and *operando* studies, the maximum total dose at which significant beam modulation can be avoided is assessed and controlled experimentally. The easiest method to check whether severe beam modulation occurs is to expose the studied system to the X-ray beam and observe whether the scattered intensity changes with time under electrochemical conditions, where the sample should be stable. If no changes are detected, the measurement can proceed. If changes are detected, the dose needs to be decreased. In addition, the presence of radiolysis species may also manifest in the electrochemical data (e.g., CVs), which provides another check. Decreasing the dose can be achieved by several means, e.g., by lowering the incident flux of the beam, by defocusing the beam and spreading it over a larger sample volume, and by moving the beam across the sample. It is also good practice to measure at multiple spots on the sample: one spot at high temporal resolution and one (or multiple) spot(s)

with a much lower dose as a control measurement. The golden rule is to keep the dose at a minimum while still getting data of reasonably high quality. Note that dose is defined as the total energy deposited by X-rays per unit mass (units Gray). This quantity is directly proportional to the incident X-ray flux and photoelectric cross sections of the composed matter. In the literature, the dose is often loosely defined as just proportional to the incident flux.

While it seems that the beam modulation problem is insurmountable, it is actually a solvable issue and it should not stop the experimentalist from doing the measurement. However proper design of the measurement protocol is often needed, together with extra time to understand the radiation damage of the electrochemical system in hand. Then appropriate precautions can be taken and high-quality data can be obtained.
# 4 In situ and operando methods

## 4.1 Overview

A large number of X-ray techniques exist, of which most are suitable for studies. Depending on the precise technique, different types of samples can be studied and these studies provide different types of structural information. A basic distinction is made between wide-angle X-ray scattering and small-angle X-ray scattering techniques. The former investigate the sample structure on the atomic scale, as described in Section 2.3.2-2.3.5; the latter analyze the scattering at much smaller $q$ vectors (see Section 2.4) and thus provide structural data on length scales between several nanometers up to micrometers. In addition, X-ray scattering methods differ with respect to the central properties of the employed X-ray beam, such as photon energy, the degree of coherence, and the size of the beam at the sample position.

Available X-ray scattering techniques for *in situ* and *operando* studies are summarized (in alphabetic order) in Table 1. In the following sections, we provide short introductions to these techniques, sorted by the type of samples they can be applied to. We mostly focus on basic principles and aspects necessary to understand the information on electrochemical systems that can be gained by them. For an in-depth description of individual techniques, we refer to the reviews given in Table 1 and the subsequent sections.

## 4.2 Methods for studies of particle ensembles

### 4.2.1 Conventional powder X-ray diffraction

In contrast to scattering techniques for single-crystal materials, powder diffraction is dedicated to the study of crystallite ensembles, i.e., to fine dispersions of single- or poly-crystals. Because it applies to most of the solid matter, powder diffraction receives considerable interest in applied materials science, with no exception

for electrochemistry and electrocatalysis. Powder X-ray diffraction (PXRD) is a widely used non-destructive method that provides information on the molecular structure, lattice parameters, and crystallinity of a sample. One of the key advantages of PXRD is its ability to analyze complex mixtures of crystalline and amorphous materials. This makes PXRD a powerful tool for analyzing geological samples, pharmaceuticals, and catalysts. In recent years, PXRD has become more accessible to researchers due to advances in instrumentation and data analysis software. Modern PXRD systems can generate high-quality data quickly and accurately, making it an indispensable tool for researchers in a variety of fields. Unfortunately, more complex sample environments (liquids, electrochemical cells etc.) remain obstructing for laboratory X-rays.

### 4.2.2 High energy powder X-ray diffraction

The use of high-energy X-rays from brilliant synchrotron sources is a game-changer for *in situ* or *operando* X-ray powder diffraction. As discussed previously (chapter 3.1), high photon energies (in the range of 100 keV) provide better penetration power and the ability to probe a large fraction of the reciprocal space. In that sense, brilliant and high-energy X-rays meet the most desirable aspects of neutron scattering, while exceeding these by far in signal and temporal resolution properties. The increasing amount of high-energy beamlines at last-generation synchrotron sources around the globe has considerably accelerated the development and realization of *in situ* and *operando* powder diffraction experiments in numerous fields of material science. Considering the scope of the present review, we will briefly discuss the key aspects of powder X-ray diffraction, especially in the context of synchrotron *in situ* or *operando* experiments. Although beamlines do not necessarily use similar experimental setups (goniometer, detector geometry etc.), we will discuss the simplest case of a large flat 2D detector placed perpendicular to the incident beam. For a more comprehensive and
<table><caption>Table 1: Overview of X-ray scattering methods for *in situ* and *operando* studies, the samples they can be applied to, and the type of information provided by these methods (in-depth technical information is provided in the cited reviews).</caption><thead><tr><td>technique</td><td>sample type</td><td>obtainable information</td></tr></thead><tbody><tr><td>Bragg coherent diffractive imaging (BCDI)<sup>74-77</sup></td><td>individual nanoparticles</td><td>3D displacement and strain fields, dislocations</td></tr><tr><td>crystal truncation rods (CTR)<sup>5,6</sup></td><td>single crystal</td><td>3D interface structure</td></tr><tr><td>grazing-incidence small angle X-ray scattering (GISAXS)<sup>78</sup></td><td>nanoparticle ensembles on planar surfaces, interfaces with nanoscale in-plane modulation</td><td>interface morphology, characteristic nanoscale dimensions</td></tr><tr><td>grazing-incidence X-ray scattering (GIXS)<sup>5</sup></td><td>single crystals, planar surfaces, thin films</td><td>in-plane structure of 2D phases and 3D crystals, texture</td></tr><tr><td>high-energy surface X-ray diffraction (HESXRD)<sup>79</sup></td><td>single crystal, ensembles of supported nanoparticles</td><td>3D interface structure, 3D crystallites on surfaces</td></tr><tr><td>X-ray atomic pair distribution function (PDF)<sup>80</sup></td><td>ensembles of crystalline and/or amorphous nanoparticles</td><td>real space description of short-length structure</td></tr><tr><td>powder X-ray diffraction (PXRD)<sup>81</sup></td><td>powders</td><td>lattice constants, crystalline symmetry, structural phase transformations</td></tr><tr><td>Ptychography<sup>82</sup></td><td>larger particles, extended samples</td><td>3D displacement and strain fields, dislocations</td></tr><tr><td>resonant anomalous surface X-ray scattering (RASXS)<sup>83,84</sup></td><td>single crystals, planar surfaces, thin films, liquid interfaces</td><td>distribution of selected element at interface, interface electronic structure</td></tr><tr><td>resonant anomalous X-ray scattering (RAXS)<sup>83,84</sup></td><td>various samples</td><td>distribution of selected element</td></tr><tr><td>single-particle X-ray diffraction</td><td>individual nanoparticles</td><td>strain distribution, lattice mosaicity, phase transitions, particle rotation</td></tr><tr><td>small angle X-ray scattering (SAXS)<sup>85,86</sup></td><td>ensembles of nanoparticles</td><td>size distribution, shape</td></tr><tr><td>surface X-ray diffraction (SXRD)<sup>5,6</sup></td><td>single crystals</td><td>3D interface structure</td></tr><tr><td>X-ray reflectivity (XRR)<sup>3</sup></td><td>single crystals, planar surfaces, thin films, liquid interfaces</td><td>surface-normal electron density profile</td></tr></tbody></table>

detailed coverage of the technique, notably its adaptation to contemporary laboratory powder diffractometers, the reader is referred to the excellent textbooks from R.E. Dinnebier and J.L. Billinge$^{87}$, V. K. Percharsky and P.Y. Zavalij$^{88}$, and a recent Primer from Kaduk et al.$^{26}$.

High-resolution powder X-ray diffraction experiments require optimization of X-rays beams, the detection system, and powder samples (among other parameters such as well-controlled geometrical configurations, such as a small sample size). The optimal X-ray beam is monochromatic, parallel (i.e., neither convergent or divergent), and has a beam size that exceeds by far the characteristic length of the crystals composing the sample. The detection system requires a high angular resolution and

fast signal acquisition, which is particularly important for operando measurements. X-rays at synchrotron sources combined with large area detectors satisfy the requirements and are ideally suited for *operando/in situ* powder diffraction experiments. The ideal powder sample consists of an ensemble of completely randomly oriented crystals. The orientational average is the fundamental pillar of the powder diffraction technique.

As shown in Figure 10a, a hypothetical powder sample of crystals with identical orientation in space is equivalent to a pseudo single-crystal. When exposed to the monochromatic X-ray beam, diffraction peaks are only observed on the detector if the Laue conditions (Eq. 10) are fulfilled, which only is the case for selected
<figure><img src="image_20.png" /><figcaption>Figure 10: Key aspects of HE powder X-ray diffraction. Simulated diffraction pattern produced by (a) pseudo single-crystalline powder, (b) textured powder, and (c) randomly oriented powder. (d) Example of information loss in powder X-ray diffraction experiments for a face-centered cubic crystal powder. (e) Base parameters, controlling the *q* range to be effectively measured during a powder X-ray diffraction experiment in typical synchrotron experiment geometry involving forward scattering.</figcaption></figure>
crystal orientations with respect to $k_i$. Thus, without carefully rotating the sample into Laue condition no or only a few hkl reflections will be typically observed on the detector placed behind the sample. Solving such powder sample crystal structure would require the same approach as for single-crystals, meaning extensive sample alignment and rotations under the beam. For ‘textured’ samples in which the crystallites are rotated with respect to each other around a single axis that is aligned with a reciprocal lattice vector (c* in Figure 10b),⁸⁹ the Laue conditions can be more easily met and diffraction peaks will always be observed on the detector. Nevertheless, the distribution of these diffraction peaks on the detector will be highly anisotropic, resulting in a magnification of the scattered intensities for some families of reflections and a reduction of intensities for others. For a sophisticated structure analysis, a rotation of the sample would be required. In addition, it may be difficult to further disentangle the effects of such preferential orientation from those resulting from an anisotropic shape of the crystallites. Finally, if the crystallites are perfectly randomly oriented, the diffraction peaks merge into diffraction cones (i.e., a cone around the X-ray beam with a $2\theta$ angle corresponding to the Bragg angle of a particular family of hkl plane spacing). All accessible Laue conditions are fulfilled without the requirement for a sample rotation and the detector shows characteristic Debye-Scherrer rings (i.e., the intersection of Debye-Scherrer cones with the flat surface of the detector). In other words, a fundamental advantage of powder X-ray diffraction compared to diffraction of single crystal and textured samples is that the sample ‘aligns itself’, and diffraction occurs systematically as long as X-rays reach the sample.

The experimental ease in powder diffraction measurements is paid for by a reduction of the information contained in the data. For example, during the transition from single crystal diffraction peaks to Debye-Scherrer rings, different (hkl) reflections from the same phase can become indistinguishable: they occur on the same ring if the lattice spacing of the different Bragg planes is identical (see the 333 and 511

rings for a face-centered cubic phase in Figure 10d). More generally, in the case of a multiphase sample, a ring describes an inter-planar distance, irrespectively of the original phase or (hkl) nature of this distance. Consequently, and as shown in Figure 10.d, 2D diffraction images of perfectly random powders measured on the large 2D detector can be reduced to conventional 1D diffraction patterns via azimuthal integration, without further loss of information. Note such 1D diffraction patterns still contain an extremely high amount of information (as detailed in the following), and that in the case of non-random powders such as textured powders, analysis can also be possibly performed on the 2D images.

As mentioned above, measuring diffraction from a powder sample that meets the condition of random crystallites orientation is quite straightforward. In the case of synchrotron setups using a flat 2D detector and tuneable X-rays energy, geometrical aspects of the experiment, such as X-ray wavelength and sample-to-detector distances must be set by the user according to the objectives of the measurement. Those parameters are summarized in Figure 10e. First, the energy of the incoming X-rays (i.e., their wavelength) must be chosen according to several key aspects including their penetration power, the possible absorption of the sample, its consequence on the beam flux, but also the maximal momentum transfers $q$ that needs to be probed in the experiment. As the wavelength will set the radius of the Ewald sphere, the highest momentum transfers $q_{max}^{probed}$ (or smallest interplanar distance $d_{min}^{probed}$) that can in principle be probed by the experiment (i.e., that will produce diffraction) is given by Equation 41:

$$q_{max}^{probed} = \frac{4 \cdot \pi}{\lambda} = \frac{2 \cdot \pi}{d_{min}^{probed}} \quad (41)$$

This fundamental value cannot be reached in a typical synchrotron experiment that uses a large flat 2D detector because the geometry is restricted to forward scattering only (no backscattering). In practice, the highest momentum transfers $q_{max}^{probed}$ to be possibly collected is given by Equation 42:
$$q_{max}^{measured} = q_{max}^{measured} \cdot \sin(\frac{1}{2} \cdot \arctan(\frac{L}{D})) \quad (42)$$

where L is the largest distance on the detector from the incident beam (supposed to impinge orthogonally on the detector) and D is the sample-to-detector distance (see Figure 10e). The user must naturally ensure that the interplanar distances of interest for the experiment exceed the minimum lattice spacing measured, controlled by the chosen wavelength and detector distance. At fixed detector dimensions L, $q_{max}^{measured}$ increases with decreasing D. Yet, excessively short distances D may result in a decrease of the pattern resolution at low angles if the thickness of the diffraction rings meets the detector pixel size. Because, contrary to some laboratory diffractometers, this geometry does not allow the measurement of diffraction angles $2\theta$ higher than 90° the q-range is limited to $q_{max}^{measured} < q_{max}^{probed} / \sqrt{2}$. In practice, knowing the X-rays wavelength, the ‘detector size’ L and the desired q-range for the experiment, D is given by:

$$D = L \cdot [\tan(2 \cdot \arcsin(\frac{q_{max}^{measured}}{q_{max}^{probed}}))]^{-1} \quad (43)$$

Note that, L (and so $q_{max}^{measured}$) can be increased (L by positioning the detector in such a way that the incident beam hits one of the corners. Furthermore, the fraction of the recorded ring and thus the integrated scattered signal decreases for the rings with q values near $q_{max}^{measured}$, which has to be accounted for in the analysis. Finally, the above expressions must be considered carefully, as in practice (especially at high energies), the decreasing form factor strongly reduces the signal at high q values.

Figure 11 shows the exceptionally large amount of information on the sample structure that can be extracted from a powder diffraction pattern. Schematically, two main sources of information can be identified: the information located in the Bragg peaks (scattering by coherent domains, labeled in orange) and the information located ‘underneath’ the Bragg

peaks (diffuse scattering from amorphous matter and/or extremely short coherence lengths, labeled in blue). Naturally, analytical methods used to extract the different information differ according to the information source. In the following, we will briefly present the Rietveld refinement method of the powder diffraction data and the pair distribution function analysis, related to the interpretation of the Bragg peaks and the total scattering, respectively.

### 4.2.3 The Rietveld method

Accessing quantitative information on the sample crystallographic structure, microstructure, and phases weight fractions through the Rietveld method⁹⁰ requires preliminary qualitative knowledge of the phases constituting the sample, such as their individual crystal space group and lattice constants. Taking only Bragg peak positions and intensities as input parameters, such qualitative information can be obtained by comparing experimental powder diffraction pattern and a database of reference patterns (manually or with the assistance of commercial software). For in situ or operando studies, the obvious starting point is the ex situ sample structure. Based on this qualitative information on the sample, the Rietveld method consists of a non-linear least-square fitting of the experimental data by the following model function:

$$y_{ci} = y_{bi} + \sum_{\phi=1}^{N} S_{\phi} \sum_{k=1}^{m} A_{\phi_k} \cdot |F_{\phi_k}|^2 \cdot \Omega_{i\phi_k} \quad (44)$$

where $y_{bi}$ is the intensity of the background at point i, $\phi$ is the index of the structural phases, of which the sample constitutes, k is the index of the reflections contributing at point i, and $S_{\phi}$ is the scale factor of phase $\phi$. $A_{\phi_k}$ is a corrective term applied to the intensity of the $k^{th}$ reflection of phase $\phi$, which takes into account the reflection’s multiplicity, the Lorenz-polarization, possible preferred orientation, absorption, etc.. $|F_{\phi_k}|$ is the modulus of structure factor of the $k^{th}$ reflection of phase $\phi$ and $\Omega_{i\phi_k}$ is the profile function of the $k^{th}$ reflection of phase $\phi$ calculated at point i.
<figure><img src="image_21.png" /><figcaption>Figure 11: Information content of a powder diffraction pattern (Adapted from Ref. ²⁶. Copyright 2021 Springer Nature).</figcaption></figure>
The variables adjusted during the refinement are those which determine the Bragg peak positions, shapes, and intensities. As shown in Figure 11, the positions of the Bragg reflections are determined by the lattice constants and crystal type of each phase. Their intensities can be derived from the structure factors, which depend on the atomic positions, displacements, and site occupancies. Complementary, the Bragg peaks shapes and broadening can be well-described by a Pseudo-Voigt (PV) function, which is the weighted sum of a Gaussian and a Lorentzian of the type $PV(2\theta, \eta, H) = \eta \cdot L(2\theta) + (1-\eta) \cdot G(2\theta)$ where $\theta$ is the Bragg angle, $\eta$ ($0 \le \eta \le 1$) is the mixing parameter, $L(2\theta)$ and $G(2\theta)$ are respectively the Lorentzian and Gaussian contributions, and $H$ the common FWHM of $PV(2\theta)$. Because $PV$ is an analytical function, it can be easily least-square refined, giving the values of $\eta$ and $H$. Moreover, it has been shown by Thomson, Cox, and Hastings⁹¹ that the values of $H_G$ and $H_L$ (the widths of the Gaussian and Lorentzian components of the Voigt function, respectively) can be directly calculated from those of $H$ and $\eta$. As shown in Figure 11, it is generally assumed that the Bragg peak profile (shape and width) can be described as the convolution of three main contributions: (i) the incident X-ray beam monochromaticity, (ii) the instrument optics (slit gaps and positions, detector pixel size, etc.), and (iii) sample-related broadening effects. Contributions (i) and (ii) can be unified as the 'instrumental resolution function' (IRF), while contribution (iii) can be further divided into two additional contributions, namely the finite size of the coherent domains (or grain size), and the presence of microstrain, which reflects the local variations of interplanar distances caused by some sort of stress (disorder, stacking fault, twins, grain boundaries, inhomogeneous alloying, etc.). $H_G$ and $H_L$ are directly linked to these different sources of broadening via:

$$ 
\begin{aligned}
H_G^2 &= H_{I,G}^2 + U_{strain,G} \cdot \tan(\theta)^2 + \frac{I_{size,G}}{\cos(\theta)^2} \\
&= H_{I,G}^2 + H_{strain,G}^2 + H_{size,G}^2
\end{aligned} 
\quad (45) 
$$

$$ 
\begin{aligned}
H_L &= H_{I,L} + X_{strain,I} \cdot \tan(\theta) + \frac{Y_{size,L}}{\cos(\theta)} \\
&= H_{I,L} + H_{strain,L} + H_{size,L}
\end{aligned} 
\quad (46) 
$$

where $H_{I,G}$ and $H_{I,L}$ are the Gaussian and Lorentzian instrumental contributions to broadening, $H_{strain,G}$ and $H_{strain,L}$ are the Gaussian and Lorentzian microstrain contributions from the sample to broadening, and $H_{size,G}$ and $H_{size,L}$ the Gaussian and Lorentzian size contributions from the sample to broadening. The IRF (i.e. $H_{I,G}$ and $H_{I,L}$) can be determined separately from the sample by refining the diffraction pattern of a standard powder of perfectly determined structure (CeO₂ or LaB₆ National Institute of Standards and Technology standards for example). However, the remaining parameters related to the sample can hardly be refined simultaneously due to strong correlation problems. In practice, simplifying hypotheses are commonly made, such as arbitrarily fixing the Gaussian or Lorentzian contribution(s) for the size and/or strain broadening to zero. This can of course impact the outcome of the refinement, as shown in Ref.⁹². The broadening derived from Equations 45 and 46 can be thus compared to the size and strain contributions from the sample. By derivation of Bragg's law, Scherrer demonstrated that this width ($\Delta_{size}(2\theta)$) depends on the domain size $T$ as⁹³:

$$ \Delta_{size}(2\theta) = \frac{K \cdot \lambda}{T \cdot \cos(\theta)} \quad (47) $$

where $K \approx 1$. Alternatively, microstrain is characterized by the constant $\epsilon = \Delta d/d$. Using derivation of Bragg's law, one obtains:

$$ \Delta_{strain}(2\theta) = 4 \cdot \epsilon \cdot \tan(\theta) \quad (48) $$

The above description refers to the isotropic case where the domain size is approximated by a sphere and the micro-strain is supposed to be the same in any direction. Although it often represents a good approximation, in some cases the micro-structure can be strongly anisotropic and the corresponding peak broadening will depend not only on the reflection Bragg angles but also on their Miller indices with respect to the
anisotropy of the microstructure. Overall, the Rietveld method is a powerful method to describe samples with crystallographic models in the reciprocal space. However, its application is naturally limited to crystalline materials.

### 4.2.4 X-ray atomic pair distribution function method

Crystallography has unambiguously powered the discovery and development of advanced functional materials over the past century. However, the last decades have seen a growing interest in non-crystalline materials, or in crystalline samples with pronounced local disorder. The pair distribution function (PDF) technique provides quantitative insights into the structure of materials where the coherence domains extend only over a few nanometers. In contrast to crystallographic methods such as the Rietveld method described above, PDF is based on the scattering theory outlined in section 2.3.4 and does not require assumptions of periodicity but can be defined directly in real-space in terms of static atomic coordinates. In the following, we briefly introduce the method and how it can be measured (for details see Ref. 80). Basis for the analysis is the pair distribution function $g(\mathbf{R})$ defined according to Eq. 28 or, more typically, its isotropic counterpart, the radial distribution function $g(\mathbf{R})$. These functions have the advantage to be extremely intuitive and strongly emphasize the short range order, but they cannot be obtained experimentally with high accuracy, notably without assumptions on $\rho_n$.

Consequently, the reduced pair distribution function $G(\mathbf{R})$ is most widely used, which is defined as:

$$G(\mathbf{R}) = 4\pi R \rho_n [g(\mathbf{R}) - 1] \quad (49)$$

Inserting this function into Eq. 31, the total scattering structure function $S_t(q)$ is given by:

$$S_t(q) = 1 + q^{-1} \int_0^\infty \sin(qR)G(R)dR \quad (50)$$

$G(\mathbf{R})$ can consequently be obtained by Fourier transformation of the experimentally observed quantity $S_t(q)$ via:

$$G(\mathbf{R}) = \frac{2}{\pi} \int_{q_{\min}}^{q_{\max}} q[S_t(q) - 1]\sin(qR)dq \quad (51)$$

where $q_{\min}$ and $q_{\max}$ define the $q$ range in which the diffraction pattern is measured. $S_t(q)$ depends on the differential scattering cross section which is derived from the measured signal on the detector. The main advantages of $G(\mathbf{R})$ compared to the other related functions (besides being experimentally accessible from intensity data) are: (i) no assumption on underlying structure is required, (ii) random uncertainties of the intensity data 'spread' equally with $R$ in $G(\mathbf{R})$ and (iii), the amplitude of the oscillations give a direct measure of the structural coherence in the sample$^{94}$.

Data acquisition for PDF is thus as straightforward as for high energy powder X-ray diffraction experiments, except that it is important to measure data over a wide range of momentum transfer, $q$. In fact, because the PDF is a Fourier transform, the $q$ range and the resolution in $q$ ($\delta q$) of the powder diffraction pattern will directly impact the quality of the PDF signal in real space, according to:

$$\delta R = \frac{2\pi}{q_{\max}} \quad (52)$$

where $\delta R$ is the resolution (or definition) of the PDF, i.e. the shortest real-space atomic oscillation to be possibly encoded in the data. The effective longest atomic pair distance probed by the PDF is:

$$R_{\max} = \frac{2\pi}{\delta q} \quad (53)$$

With poor $q$ resolution in reciprocal space, the PDF 'dampens' at high-$R$ values. Importantly, however, the fine local structure (i.e. the PDF signal at low $r$ values) is nearly nonsensitive to this parameter. Finally, the longest real-space oscillation present in the PDF data is given by:

$$\Lambda_{\max} = \frac{2\pi}{q_{\min}} \quad (54)$$

This parameter is particularly important for PDF on nanoparticles, as the shape function of
the nanoparticle is encoded in the low-q region of the diffraction pattern.

The procedure outlined above can also be applied to systems consisting of different types of atoms.⁸⁰ In this case, the different atomic form factors and concentrations of the involved species have to be considered.

## 4.3 Methods for studies of thin films

### 4.3.1 X-ray reflectivity

As any other electromagnetic wave, X-rays that impinge on a smooth surface or interface under an angle $\alpha_i$ split up into a reflected beam that leaves the interface under the same angle $\alpha_f = \alpha_i$ and a transmitted beam, entering the new phase under a different angle $\alpha_t$ due to the effect of refraction. The calculation of the refraction angle as well as the intensities of reflected and transmitted wave is fully possible within the classical theory of electromagnetic waves, but requires to go beyond the kinematic approximation, where we explicitly excluded refraction. Refraction depends on the dielectric properties of the phases at both sides of the interface, specifically on the complex index of refraction n. For X-rays n always is smaller 1, because the X-ray photon frequencies are higher than all electronic resonances of the atoms and molecules of the material. It therefore is commonly written in the form:

$$n = 1 - \delta + i\beta \quad (55)$$

Here the deviation from one for a homogeneous material with the total electron density $\rho_e$ is given by³:

$$\delta = \lambda^2 r_e \rho_e / 2\pi \quad (56)$$

where $r_e = 2.82 \cdot 10^{-5}$ Å is the classical electron radius. $\delta$ is usually a very small quantity. For example, for a wavelength $\lambda = 1$ Å and Au, a material with very high electron density $\rho_e = 4.65$ Å⁻³, this deviation is $\delta = 2.09 \cdot 10^{-5}$. The imaginary part of n, which describes the decay of the wave's amplitude due to absorption, is given by:

$$\beta = \lambda\mu/4\pi \quad (57)$$

with $\mu$ being the linear absorption coefficient.

As a consequence of Snell's law, for an electromagnetic wave propagating from a region of higher to one of lower index of refraction total reflection occurs beyond a critical angle $\alpha_c$. That is, the wave enters the low n material only in the form of an evanescent wave, whose intensity decreases exponentially with increasing distance from the surface, and the incident wave is completely reflected with almost identical intensity. This situation applies to the reflection of a wave entering into a sample with high electron density from the vacuum, where $n = 1$, or from a low-Z material (e.g. an electrolyte solution). In the latter case, the difference in the electron density of the two materials has to be used in the calculation of $\delta$. For the case of a vacuum-Au interface, the critical angle, which is given by $\alpha_t = \sqrt{2\delta}$, is ($\lambda = 1$ Å) 6.5 mrad or 0.37°, respectively. Such small critical angles are typical in surface X-ray scattering and justify the experimental needs for low divergent beams, highly planar surfaces, and precise positioning in these experiments. Since refraction and absorption effects are usually only relevant in the vicinity of the critical angle or of the Bragg peaks, they can be often ignored, justifying the restriction to the kinematic approximation in our derivation of scattering theory in chapter 3.3. Nevertheless, they are important at gracing incident angles, such as in reflectivity measurements at low q or grazing incidence X-ray diffraction (GIXRD).

To understand quantitatively the change in reflected intensity with the surface normal component of the scattering vector $q_z$, we first consider the case of reflection at a perfect interface between two materials described by the complex indexes of refraction $n_1$ and $n_2$, respectively. The reflectivity, defined as the ratio between the reflected and incident intensity, is then given by the Fresnel equations:

$$R_F = \left| \frac{I}{I_0} \right| = \left| \frac{\alpha_i - \alpha_t}{\alpha_i + \alpha_t} \right|^2 \quad (58)$$

Expressing $R_F$ as a function of the scattering
vector one obtains:

$$R_F(q_z) = \left| \frac{q_z - \sqrt{q_z^2 - q_c^2}}{q_z + \sqrt{q_z^2 - q_c^2}} \right|^2 \approx \left( \frac{2q_z}{q_c} \right)^{-4} \quad (59)$$
for $q_z \gg q_c$

where $q_t = 4\sqrt{\pi\rho_e r_e}$ is the critical scattering vector for total reflection. The behavior of $R_F(q_z)$ near $q_c$ is illustrated in Figure 12a. For materials with low X-ray absorption coefficients, a sharp drop in intensity occurs at the critical angle; for strongly adsorbing materials this drop is slightly softened, but even here ≈ 70% of the incident intensity is reflected at $q_c$. In parallel, the penetration depth $\Lambda$ of the X-ray beam into the sample substantially increases and the transmitted intensity $T$ directly at the interface exhibits a so-called Vinyard profile with a local maximum (“Yoneda peak”) at $q_c$ (Figure 12b,c).

For an interface where the total electron density does not change abruptly but varies gradually, the reflectivity differs distinctly from $R_F(q_z)$. In most cases, it is well described by the so-called master formula:

$$R(q_z) = R_F(q_z) \left| \int_{z=-\infty}^{\infty} \frac{d}{dz} \left( \frac{\langle \rho(z) \rangle}{\rho_{\infty}} \right) e^{-izq_z} \right|^2 \quad (60)$$

Here, $\langle \rho(z) \rangle$ is the electron density profile along the surface normal, obtained by averaging $\rho(\mathbf{r})$ within the plane parallel to the surface at each $z$ value, and $\rho_{\infty}$ is the difference in the electron densities, found in the bulk of the materials to both sides of the interface. Thus, the normalized curve $\langle \rho(z) \rangle / \rho_{\infty}$ is a smooth function that varies from 0 to 1 when crossing the interface region and describes the relative change in the refraction index $n$. The derivation of the master formula employs the kinematic approximation and is well justified for $q_z \gg q_c$. Since $R$ is in many cases almost identical to $R_F$ near the critical angle, it is usually well suited for describing the full reflectivity curve. A notable exception is the reflectivity of a sample, covered by a thin layer with much higher electron density and thus a larger critical angle.

As an example of the application of the master

<figure><img src="image_22.png" /><figcaption>Figure 12: (a) Reflectivity $R$, (b) transmitted intensity $T$ at the position of the interface, and (c) penetration depth $\Lambda$ near the critical scattering vector $q_c$ for perfectly terminated Au (red) and Si (blue) samples.</figcaption></figure>
ter formula, we consider an interface where the density does not change abruptly, but gradually (Figure 13, inset, blue line). This type of density profile can be conveniently described by the error function $\langle \rho(z) / \rho_{\infty} \rangle = erf(z/\sqrt{2}\sigma)$; its derivation is a Gaussian. Fourier transform results in another Gaussian, resulting in a reflectivity curve described by:

$$R(q_z) = R_F(q_z)e^{-q_z^2 \sigma^2} \quad (61)$$

The additional factor leads to a faster decay of $R$ with $q_z$ as compared to $R_F$ (see Figure 13). This effect increases with the interface width $\sigma$, causing a decrease in the experimentally accessible $q_z$ range (typically $\approx 10^{-8} \cdot I_0$). This is the reason why rather smooth surfaces are required for surface X-ray scattering studies.

<figure><img src="image_23.png" /><figcaption>Figure 13: Calculated X-ray reflectivities and normalized density profiles (inset) for an Au surface exhibiting a gradual density change with a Gaussian width of 2 Å (blue) and a similar Au sample covered with a Cu layer of 10 Å (red) and 20 Å (green) thickness. For comparison, also the Fresnel reflectivity is shown (dotted line).</figcaption></figure>

Because reflectivity does not involve any momentum transfer within the surface plane ($q_x = 0 = q_y$), it is insensitive to the lateral distribution of the electron density. Eq. (61) therefore describes equally the specular reflectivity of a surface with an inherent, spatially homogeneous

density gradient, as e.g. caused by the gradual change in electron density within the ion core of the surface atoms, and that of an interface with an inhomogeneous density distribution in the surface plane, such as a (Gaussian) surface roughness. However, the latter induces additional diffuse scattering and leads to modifications along non-specular CTRs, which allows distinguishing these two cases.

As a second example, the influence of a thin layer of a different material on the sample surface is illustrated in Figure 13. Here, characteristic oscillations in the reflected intensity are observed (often denoted as "Kiessig fringes"). Their physical origin is identical to optical interference effects at soap bubbles: The coherent superposition of the waves reflected from the film surface and the film-substrate interface lead to constructive or destructive interference, depending on $q_z$. From the spacing of $\Delta q_z$ of the interference minima, the layer spacing can be directly obtained as $2\pi/\Delta q_z$. The overall decay of the curve is determined by the decay in $R_F$ and the widths of both interfaces, which provide an envelope for the interference fringes due to the adlayer.

More complex interface density profiles, consisting e.g. of several subsequent layers with different interface widths in between, can lead to reflectivity curves that exhibit a rich sequence of modulations. Such profiles can be determined by setting up a parametrized model of $\langle \rho(Z) \rangle / \rho_{\infty}$, calculating from those $R(q_z)$ via Eq. (61) or more precise approaches, and employing this in a numerical fit of the model to the reflectivity data. These fits are not fully unique, because of the loss of the phase information in the master formula, which can lead to indistinguishable reflectivity curves for rather different density profiles. For example, the reflectivity curves of a sample with an adlayer of density $x \cdot \rho_{\infty}$ and $(1-x) \cdot \rho_{\infty}$ are exactly identical. For these reasons, fits by models with a larger number of parameters can be difficult to obtain. Therefore, often additional physical information on the structure and composition of these interfaces is used to constrain the boundary conditions.
### 4.3.2 Grazing incidence diffraction

To obtain data on the crystal structure and the texture, i.e., the orientation distribution of the crystallites in the film, wide-angle diffraction is commonly used. Often, these experiments are performed in grazing incidence geometry, where the angle of the incident X-ray beam with respect to the surface is around the critical angle. In this scattering geometry the penetration of the X-ray beam into the substrate is minimized (see Figure 12c), reducing the substrate's contribution to the scattered intensity. In particular, this is important to lower the intensity of bulk Bragg peaks, which otherwise would provide orders of magnitude higher intensities. In addition, the enhancement of the transmitted intensity at the interface near the critical angle (see Figure 12b) can increase the diffracted intensity of the film's Bragg reflections. However, this effect only plays a role for very smooth films.

Depending on the type of texture, different types of diffraction patterns are observed. This is schematically illustrated in Figure 14a, where the distribution in reciprocal space is shown for different textures. For thin films in which the individual crystallites are randomly oriented, i.e., powder-like samples, the Bragg peaks are distributed over a spherical surface. The condition for scattering is met where this sphere intersects with the Ewald sphere (green), which is on a ring, resulting in the typical powder rings. In contrast, the Bragg peaks of epitaxial films on a single crystalline substrate are located at well-defined reciprocal space positions, similar as those of a single crystal. Here, diffraction peaks are only observed for orientations of the crystal relative to the incoming beam, in which one of the Bragg reflections lies on the Ewald sphere. An important intermediate case are films where the crystallites have a defined orientation along the surface normal, but a random in-plane orientation. The Bragg reflections of films with such fiber texture reside on rings around the surface-normal axis. These rings always intersect the Ewald sphere at a well-defined point, resulting in an intensity peak that is independent of the in-plane sample

orientation.

An example of the scattering by such fiber-textured films is given in Figure 14b. Here, *in situ* grazing incidence diffraction data is shown that was recorded at a liquid Hg- electrolyte interface after electrodeposition of a PbFBr film. The PbFBr crystals are oriented with their c-axis along the surface normal but have arbitrary orientations within the interface plane due to the liquid metal substrate. Various intensity peaks can be found on the 2D detector images, which can be attributed to PbFBr Bragg reflections. Enlarged detector areas around these reflections (top panels) show that these peaks consist of small individual peaks of different crystals. The intense peaks in the center are located precisely on the Ewald sphere, and the peaks to both sides of that gradually decrease in intensity reflecting the decreasing match with the diffraction condition.

## 4.4 Methods for studies of single crystals

We will now discuss experimental X-ray scattering techniques for studies of single-crystal interfaces, using predominantly electrochemical systems as examples. Figure 15a gives an overview of the characteristic features in reciprocal space as well as of several typical modes of measurements for the case of a (100) surface of an fcc metal. As discussed in textbooks of solid state physics the face-centered unit cell results in systematic extinctions of Bragg reflections, leaving only the reflections with *h*, *k*, and *l* all even or all odd intact. Hence the lowest-order CTRs are the (0 0 *l*), (0 2 *l*), the (2 0 *l*), and the (1 1 *l*) rod. In addition, an additional layer with a *c* (2 × 2) in-plane superstructure is included in Figure 15a, which is a very common adlayer arrangement on this type of surface. This 2D superstructure lattice gives rise to additional (*h* *k* *l*) rods at all integer *h* and *k* in between the CTRs. As shown in chapters 3.3.3 and 3.3.4 the intensity of the superstructure rods is approximately independent of *l*, whereas that of the CTRs exhibits strong variations with maxima at the Bragg peak positions. First information on the presence of ordered superstructures at
<figure><img src="image_24.png" /><figcaption>Figure 14: (a) Reciprocal space scheme illustrating wide-angle scattering in grazing incidence geometry from a film with epitaxial, powder, and fiber texture. (b) Example of the scattered intensity distribution from a thin film with fiber texture. The bottom panel shows a detector image (projected into the $q_x-q_z$ plane) that was obtained at an incidence angle of 0.135° on an electrodeposited c-axis oriented PbBrF film on a liquid Hg electrode. The top panels show selected parts of the detector in the vicinity of the (102) and (112) PbFBr Bragg peaks (reproduced for Ref. ⁹⁵. Copyright 2020 American Chemical Society).</figcaption></figure>

the interface is usually obtained by studies at small $l$, i.e., under gracing incidence and exit angles $\alpha_i$ and $\alpha_k$, respectively. Because of the small wave vector transfer $q_z$ normal to the surface, this GIXRD selectively probes the lateral positions of atoms within the surface plane but is insensitive to their positions in the surface normal direction, e.g., vertical modulations or their spacing to the atomic layer underneath. In contrast, measuring the (0 0 $l$) CTR, which is identical to a specular reflection of the beam at the crystal surface, only provides data on the in-plane averaged structure along the surface normal. Full crystallographic data on the 3D arrangement of atoms at the interface requires the measurement of specular and non-specular CTRs as well as potential superstructure rods. All three types of measurements will be discussed in detail in the chapters below.

To give an impression of the strength of the various contributions to scattering from electrochemical interfaces, actual SXRD data for Cu(100) in Cl-containing perchlorate solution is shown in Figure 15b. At the employed potential of 0.2 V the surface is fully covered by an ordered Cl adsorbate layer with $c(2 \times 2)$ structure, i.e., the structure is identical to that in Figure 15a. The displayed in-plane scan along the $h$ axis exhibits two sharp peaks that correspond to the diffraction rods at (1 0 $l$) and (2 0 $l$) and sit on a slowly varying background, caused predominantly by the bulk liquid scattering. However, the peak intensity at the $h = 2$ position, which is close to the (2 0 0) Bragg peak, is orders of magnitude higher than that of the superstructure peak (at $h = 1$) or of the CTRs close to the anti-Bragg position (not shown), who have a signal-to-background ratio in the range of one. As a rule of thumb, this is a typical situation in *in situ* SXRD studies, although signal-to-background ratios from more than 10:1 down to immeasurably small signals are possible – depending on the material (due to the $\approx Z^2$ dependence of the atomic form factor), the domain size (via $I \propto N_x N_y$), and the surface roughness (see below). We note that the same considerations apply to the case of epitaxial multilayer films with well-defined orientation relative to a single crystalline substrate
(see section 6.2.4 for an example).

### 4.4.1 In-plane surface diffraction

In gracing incidence X-ray diffraction, the crystalline order within the surface plane is probed. Prime applications are studies of surface reconstructions and adsorbate layers. In these measurements, the incident X-ray beam impinges on the surface under a small incident angle $\alpha_i$ and the intensity scattered under similarly small exit angles $\alpha_k$ is recorded. Under these conditions, the wave vector lies almost in the surface plane, i.e., $q_\| \approx q$ whereas the out-of-plane component $q_z \ll q$ (see Figure 1a). By varying the scattering angle $2\theta$, the radial component $q$ can be changed; by rotating the sample around its surface normal, the azimuthal orientation of the wave vector relative to the surface lattice is altered.

In typical grazing incidence X-ray scattering (GIXS) experiments the incident angle is chosen to be close to the critical angle for total reflection, i.e., $\alpha_i \approx \alpha_c$. Under these conditions, the transmitted intensity at the interface is enhanced by up to a factor 4 (see Figure 12b), resulting in a corresponding enhancement of the X-ray scattering (the height of this maximum decreases with increasing X-ray absorption of the material, as illustrated in the figure for the case of Si and Au surfaces). A similar enhancement effect is also found for exit angles $\alpha_f \approx \alpha_c$. The increase in intensity leads to the amplification of the weak scattering by 2D crystalline layers, such as adsorbates. However, in *in situ* studies of electrochemical interfaces often substantially larger angles are used, in particular, if the experiments are performed in thin layer cells of the type shown in Figure 8a. Here, the gain in intensity due to this enhancement can be easily overcompensated by the longer X-ray path length in the electrolyte, which increases proportionally to $\alpha_i$ and $\alpha_f$.

A second advantage of choosing angles near the critical angle is the small penetration depth $\Lambda$, which reduces the contributions from the bulk material. As shown in Figure 12c, $\Lambda$ increases in a strongly non-linear way from values of a few 10 nm at angles clearly below $\alpha_c$ to sev-

<figure><img src="image_25.png" /><figcaption>Figure 15: (a) Overview over surface X-ray scattering techniques, shown exemplarily for a $c(2 \times 2)$ adlayer on an fcc(100) surface. (b) *In situ* surface X-ray scattering data for a Cu(001) surface in Cl-containing electrolyte, illustrating the various contributions to the scattered intensity. The scan was performed along the **b**$_1$ axis at small $q_\perp$ ($l = 0.1$) and is scaled in units of the reciprocal lattice. Visible are sharp peaks at the positions of the CTR at (2 0 0.1), i.e., close to the (2 0 0) Bragg peak, and of a superstructure rod at (1 0 0.1), that indicates the presence of an ordered $c(2 \times 2)$ Cl adlayer, as well as the broad distribution, caused by scattering of the bulk liquid electrolyte.</figcaption></figure>
eral 100 nm up to several µm, depending on the X-ray absorption coefficient. Thus structural properties of the material in the near-surface region and in the bulk can be probed in the same experiment, simply by a small variation of the incident angle. For example, this allows the determination of surface strain or an increased defect density near the interface. Such experiments are only possible with samples of very high surface quality, however. In reality, even metal single crystal electrodes often do not exhibit a sufficient planarity to realize a (within ≈ 0.1°) defined incident angle, required for utilizing these effects.

Typical applications of *in situ* and *operando* GIXS are studies of surface reconstructions and chemisorbed adlayers on electrodes (see section 5.1.1 and 5.2.1), which form ordered 2D atomic layers with unit cells that differ from those of the underlying substrate lattice. GIXRD measurements allow to determine these superstructures with high precision. To illustrate how the in-plane surface structure is obtained by GIXS measurements, we consider typical adlayer structures found on substrates with a hexagonal surface lattice (lattice spacing *a*), such as the (111) surface of fcc metals (Figure 16a-b). One of the most simple types of superstructures formed by adsorbates on these surfaces is a simple commensurate (√3 × √3)R30° superlattice (red symbols), where all adsorbates sit on identical adsorption sites, separated by the next-nearest neighbor spacing √3*a*. The presence of this 2D superstructure gives rise to additional diffraction rods, which are located at *q* that are a factor 1/√3 further inward and 30° rotated with respect to the CTRs of the substrate lattice. In a simple picture, these superstructure peaks may be considered as Bragg reflections at regular rows of the adsorbates (e.g., at the close-packed rows of neighboring adsorbates for the first-order peaks). For this commensurate structure, some of the adlattice peaks are located at the in-plane positions of the substrate CTRs and therefore will not be directly visible. However, they will modify the intensity distribution of the CTRs, and thus adlayer formation may manifest in the form of sudden intensity changes at those peaks.

Furthermore, incommensurate structures are observed in many electrochemical systems, where one or two of the adlattice's unit cell vectors cannot be described as a rational fraction of substrate lattice vectors. Such structures are frequently found for simple atomic or ionic adsorbates and usually exhibit potential-dependent lattice parameters. We illustrate GIXS studies of incommensurate structures by two examples, found on hexagonal surfaces. In the first case – a uniaxially incommensurate superstructure denoted as $c(p \times \sqrt{3})$ (Figure 16a-b, blue symbols) – the adlattice maintains the commensurate $\sqrt{3}a$ spacing along one of the main lattice directions but is slightly compressed in the perpendicular direction. As a consequence of this compression, the superstructure peaks shift outwards from the positions of the ($\sqrt{3} \times \sqrt{3}$)R30° structure. Because the adlattice can be compressed along any of the three symmetrically equivalent main directions of the hexagonal substrate, a splitting in three adsorbate peaks is observed at each position, corresponding to the three rotational domains of this phase. Concretely, the full diffraction pattern is obtained by rotating the pattern corresponding to a single domain by ±60°.

A typical 2D incommensurate superstructure on hexagonal substrates exhibits a hexagonal lattice, which has a different spacing $a_{ad}$ than the substrate lattice and is rotated to the latter by an angle $\pm\phi$ (Figure 16a-b, green symbols). Consequently, the GIXS diffraction pattern is obtained by scaling the in-plane pattern of the substrate's CTRs by a factor $a/a_{ad}$ and rotating it appropriately, leading to pairs of peaks separated by $2\phi$. Such a structure is formed for example by bromide adsorption on Au(111) electrodes. Typical *in situ* GIXS data at the superstructure peaks, obtained by measuring the X-ray intensity while rotating the sample (azimuthal scans) or changing *q* (radial scans) are shown in Figure 16c-e. The rotation angle of $\phi = 3.7°$ relative to the $\sqrt{3}$ direction (i.e., $h = k$) and the spacing $a_{ad}$ of 4.24 to 4.03 Å, depending on potential, can be directly obtained from such scans with a precision of ≈ 0.1° and sub-picometer, respectively. The
<figure><img src="image_26.png" /></figure>

<figure><img src="image_27.png" /></figure>

<figure><img src="image_28.png" /></figure>

<figure><img src="image_29.png" /></figure>

<figure><img src="image_30.png" /></figure>

<figure><img src="image_31.png" /></figure>

<figure><img src="image_32.png" /></figure>

Figure 16: Schematic (a) in-plane diffraction pattern and (b) real space structure of a commensurate ($\sqrt{3} \times \sqrt{3}$) R30° superstructure (red), a uniaxially incommensurate $c(p \times \sqrt{3})$ superstructure (blue), and a 2D incommensurate hexagonal-rotated superstructure (green). 1st, 2nd, and 3rd order peaks are indicated by circles of decreasing size; open black circles indicate the CTRs of the substrate. In addition to the superstructure domains shown in (b), the diffraction spots of other rotational domains are shown in lighter colors. The shift of the diffraction peaks of the incommensurate structures upon compression are indicated by the blue and green lines. For clarity, the peaks of the incommensurate phases are omitted in the full diffraction pattern (a, left side). (c) In-plane geometry and (d-e) *in situ* GIXRD data for an incommensurate hexagonal-rotated Br adlayer, formed on Au(111) in 0.1 M $HClO_4$ + 10 mV NaBr. (d) Azimuthal scans at the positions of the 1st (top), 2nd (center), and 3rd (bottom) superstructure peak, obtained at 0.2 (filled circles) and 0.6 V (open circles) vs. Ag/AgCl, where the superstructure is present and absent, respectively. (e) Radial scans through the 1st order peak at various potentials between 0.48 and 0.68 V, showing the outward shift of the peaks with increasing potential (Reproduced from Ref. 96. Copyright 1996 American Chemical Society.
accuracy in the determination of these lattice
parameters surpasses other methods, such as
scanning probe microscopy, by orders of mag-
nitude, which is a major strength of this tech-
nique. In particular, it allows precise measure-
ments of the potential-induced compression of
the adlattice – a phenomenon that is typical for
incommensurate adlayers at electrochemical in-
terfaces.

As visible in Figure 16d, the 1st order Bragg
peaks are of equal intensity as the background
scattering of the bulk electrolyte, the intensity
of the 3rd order peaks is a factor of ≈ 20 lower
and only slightly above background. Never-
theless, even those weak peaks can be clearly
identified and associated with the Br adlayer
by shifting the potential to more negative val-
ues, where the adlayer becomes disordered, re-
sulting in a disappearance of these peaks. As
expected, the scattering of the bulk electrolyte
(as well as of X-ray windows and other contri-
butions to the background) remains constant
and thus can be removed by such potential-
dependent measurements. If the peak posi-
tion does not shift with potential, as e.g. in
the case of commensurate adlayers or CTRs,
the potential-dependence and kinetics of the
in-plane adlayer order can be directly moni-
tored by measuring the peak intensity during
cyclic voltammograms, often denoted as "X-
ray voltammogram" (XRV), or during potential
steps, which provides a powerful tool for study-
ing structural transitions at electrode surfaces.

The decrease in the peak intensities from the
1th to the 3rd order Bragg peaks is caused
by the *q*-dependence of the atomic form fac-
tors and Debye-Waller factors, i.e., the displace-
ments due to thermal motion or in-plane disor-
der. Such static disorder may arise from the
occupation of different adsorption sites in such
adlayers. Specifically, adsorbates may be dis-
placed toward energetically favored sites (e.g.,
hollow sites) and away from unfavorable sites
(e.g., top sites), leading to a modulation of the
adlattice. In the most extreme case, a periodic
network of commensurate domains, separated
by domain boundaries of higher or lower surface
density may be formed. A well-known example
of such a network is the Au(111) surface recon-

struction, discussed in chapter 5.1.1. In such a
case, one will still observe diffraction peaks at
the positions corresponding to the average spac-
ing in the adlayer, but also additional weaker
"satellite peaks" separated from each other and
the main peaks by a small $\Delta q$ that corresponds
to the size of the domains. If the network is
not well ordered or the surface density changes
rather gradually across the domain boundary,
the satellite peaks intensity often becomes too
weak to be distinguished from the background
– a situation found in most studies of electro-
chemical systems.

Also, the peak width contains information
about the adlayer. According to chapter 3.3.3,
the full width at half maximum of the peak in
the radial direction is given by $2\pi/L$, where L is
the characteristic size of (incoherently scatter-
ing) adlayer domains. In the experiment, the
actual peak width is convoluted by the instru-
mental resolution function. However, for exper-
iments at typical surface scattering beamlines
of modern synchrotron sources, the latter has
typical widths in the range of $10^{-3} \AA^{-1}$ and
thus often can be neglected for many electro-
chemical systems. The azimuthal peak width is
determined by both the domain size and the ro-
tational dispersion. These effects can be decon-
voluted by measuring the width of peaks with
different $q$. (the $q$ width due to the domain size
is identical for all peaks, whereas that caused
by the rotational dispersion scales with $q$).

All the above is valid for 2D ordered struc-
tures with single atoms in the primitive unit
cell as well as more complex surface struc-
tures, formed by periodic ensembles of differ-
ent atoms. In the latter case, the interference
between the atoms within the unit cell gives
rise to a structure factor $F(q)$, which leads to a
modulation of the peak intensities.

4.4.2 CTR measurements

For a full surface crystallographic determina-
tion of both the lateral and the vertical posi-
tions of the atoms at the interface, the CTRs of
the sample have to be measured. As demon-
strated in Figure 17, the intensity distribu-
tion along the CTRs is highly sensitive to
the structural arrangement at the crystal surface. Even rather small deviations from a perfectly truncated crystal lattice can give rise to $|S_{CTR}(q)|^2$ distributions that strongly differ from that given by Eq. (20). For example, an expansion or contraction of the spacing between the topmost and second atomic layer at the crystal surface can lead to pronounced asymmetry in the decay of the intensity to both sides of the Bragg peaks and a corresponding shift and deepening of the minimum in intensity in between. At selected reciprocal space positions, the intensity can change by orders of magnitude, providing a highly sensitive tool for measuring surface relaxations of the lattice. Changes in the electron density of the surface layer, e.g., due to surface reconstructions or a pseudomorphic adlayer formed by a different atomic species, likewise result in clear changes of the intensity in between the Bragg peaks. Specifically, the intensity increases for a higher and decreases for a lower density, respectively. A similar decrease is found, if the displacement amplitude of the atoms along the surface-normal direction increases or if the sample exhibits roughness. However, in these cases, the effect increases with a larger L, i.e., increasing $q_z$. Displacements parallel to the surface obviously cannot affect the specular CTR (see chapter 4.3.1), but lead to intensity decreases in the non-specular CTRs.

In real interface systems typically a combination of changes in layer density, spacing, and displacement amplitudes occurs. These can often be disentangled, because of the different effects they have on the CTRs. Furthermore, one may have to consider structural deviations from the bulk lattice structure in more than one atomic layer as well as layers of adsorbed species, including laterally disordered layers of water or hydrated ions in the double layer. Just as in the crystallographic analysis of bulk crystals, the structure determination becomes more precise with an increasing number of independent reflections measured, i.e., larger numbers of (symmetrically non-equivalent) CTRs and an extended range of $l$ values.

As demonstrated in section 5, CTR measurements are capable of providing very detailed in-

<figure><img src="image_33.png" /><figcaption>Figure 17: Influence of changes in the structure of the topmost atomic layer at an fcc(001) crystal surface on the specular (left) and a non-specular (right) CTR. The effect of a change in the vertical spacing between this layer and the underlying lattice (top), an increase or decrease in the layer density (center), and an increase in the in-plane or out-of-plane vibrational displacements of the atoms in this layer (bottom) are illustrated. For reference, the CTRs of an ideally terminated crystal are shown in all figures (dotted lines).</figcaption></figure>
sight into the interface structure. However, one should keep in mind that high-quality *in situ* CTR data can only be obtained by experiments at synchrotron sources that employ single crystal samples of high crystallinity and with very smooth surfaces. In addition, recording a full set of CTRs typically requires hours, even at X-ray sources of high brilliance, since it requires sequential recording of the intensity at different angles of the detector and the sample. In studies where time resolution is critical, e.g., *in operando* studies of structural changes at electrodes under reaction conditions, the measurements are therefore often confined to locations in reciprocal space that are particularly sensitive to the surface structure, e.g., the “anti-Bragg” positions between two Bragg peaks of the substrate and the locations of superstructure rods.

### 4.4.3 High energy surface diffraction

Modern hard X-ray synchrotron sources can deliver beams with sufficient intensity for surface scattering experiments up to photon energies of 150 kV, i.e., very small wavelengths $\lambda$. HESXRD has recently been introduced as a new method for *operando* studies of heterogeneous catalysts in the gas phase$^{79,97}$ and of electrochemical interface processes.$^{98-101}$ Employing very high photon energies has several advantages: First, the linear X-ray absorption coefficient becomes very small. This allows penetration of large amounts of condensed matter without significant attenuation of the beam, which is highly beneficial for *in situ* studies of electrochemical interfaces. Secondly, because of the small $\lambda$, the same $q$ values are reached at much smaller scattering angles $2\theta$. In other words, X-ray scattering at high energies occurs predominantly in directions close to that of the incident beam. This forward scattering can be measured simultaneously with a 2D X-ray detector (Figure 18a). The latter collects the intensity for all scattered beams with outgoing wave vectors $\mathbf{k}_f$ in a certain solid angle. This allows direct imaging of a fraction of the Ewald sphere. At high photon energies, the curvature of the Ewald sphere is low and a nearly

planar slice through reciprocal space is imaged by the detector. Under grazing incident angles, this allows projecting a large section of a CTR onto the detector, enabling rapid acquisition of the surface structural data. By taking detector images while rotating the sample around the surface normal, a large reciprocal space volume can be collected within a few minutes, enabling subsequent quantitative analysis of CTRs and superstructure rods as well as other scattering features, e.g., Bragg peaks of deposited materials. The strong Bragg peaks of the substrate have to be blocked by absorbers to avoid damage of the detector. Because of the large Ewald sphere volume, the accessible reciprocal space in HESXRD measurements can be several times larger than that in conventional SXRD. This leads to considerable improvements in the structural resolution and allows more precise and more complex modeling of the interface structure. Nevertheless, these data sets can be obtained in a much shorter time than in conventional SXRD, opening up possibilities for time-resolved surface crystallographic studies, e.g., *operando* measurements of transient interface structures. HESXRD measurements require extremely precise alignment, because the angle of incidence should be kept near the critical angle, which is very small ($\approx 0.1^\circ$) at small $\lambda$. This make the experiments technically challenging. Specialized high-precision diffractometers and samples with very high bulk crystal quality and surface planarity are needed. A further disadvantage is the lower resolution in reciprocal space, although the latter can often be compensated for by moving the detector further away from the sample.

As a variant of this method, high energy X-ray scattering may also be performed in a geometry, where the beam impinges approximately perpendicular onto the interface (Figure 18b).$^{102}$ X-ray beams with photon energies in the range 70 to 150 keV can even penetrate several hundred micrometers of high-density materials such as Au, allowing experiments where the beam passes through a thin single crystal, a layer of electrolyte, and an X-ray window. In this transmission geometry, the detector images a slice that is almost parallel to the surface and
<figure><img src="image_34.png" /></figure>

<figure><img src="image_35.png" /><figcaption>Figure 18: High energy surface diffraction (a) in grazing incidence and (b) in transmission geometry, shown in real space (left) and reciprocal space (right), respectively. X-ray diffraction peaks are located at the intersections of the CTRs and adlayer rods with the Ewald sphere (Reproduced from Ref. ¹⁰². Copyright 2014 American Chemical Society).</figcaption></figure>

thus can record the in-plane intensity distribution. The obtained structural information is similar to that of a GIXRD experiment, but in contrast to the latter can be recorded in a single shot. As a further advantage as compared to studies under grazing incident conditions, only a surface area of the size of the beam diameter is probed, which can have (sub-)micrometer dimensions. This enables studies with corresponding spatial resolution in real space, which can be used e.g. for the local mapping of the atomic scale interface structure on the µm scale or for studying the surfaces of materials that cannot be grown as large single crystals.¹⁰²,¹⁰³

## 4.5 Methods for studies of nanoscale morphology

### 4.5.1 Small angle X-ray scattering

Small-angle X-ray scattering (SAXS) allows to determine the inhomogeneities in materials on the order of tens to hundreds of Å. It is therefore an appropriate technique to look at the morphology of electrode materials and electrolytes (both solid and liquid). As the SAXS probe lengths are substantially larger than the atomic distances, the medium is typically treated as a continuum of electronic density. Consequently, the scattering is described as scattering of electron density embedded in a matrix of different electron density (see chapter 2.4).

While wide-angle scattering measures the atomic scale structure of a material, small-angle scattering probes structural correlations between larger units. For simplicity, we consider a nanoscale object of homogeneous density (e.g., a metal nanoparticle) and of a characteristic size $R_0$ (e.g., the particle’s radius). Inside this object, the electron density has a constant value $ρ_e$ (neglecting the atomic structure); outside the density is assumed to be 0. If the particle is embedded in another medium, the difference in electron density has to be used here instead of $ρ_e$. This is called a 'contrast'. The scattering amplitude and the scattered intensity of such an object can be calculated from Eq. (1) and (2) in chapter 2.2, respectively (explicit examples for simple object shapes can be
found in the more advanced literature, e.g., in Ref.³). This procedure is completely analogous to that used in the calculation of the atomic form factor $f(q)$ and leads to similar decay at $q$ values larger than $2\pi/R_0$. For this reason, the resulting $P(q)$ is called the form factor of the particle. The main differences to $f(q)$ are the shift of the decay to smaller $q$ and the appearance of characteristic oscillations. The latter is caused by interference effects due to the abrupt change in density at the particle boundary.

In the second step, we consider now an ensemble of such objects. Even in the absence of interactions between them, short-range order will emerge at sufficiently high number densities $\rho_n$ of the objects, because the particles cannot overlap. This situation is analog to the local order in a liquid and thus can be described by the same formalism as that discussed in chapter 2.3.4. The scattering by the ensemble is consequently described by a structure factor $F(q)$ with the relevant $q$ range being now in the small-angle regime. The most prominent feature in $F(q)$ is a peak that corresponds to the correlations between neighboring objects – analogous to the first peak in the structure factor of real liquids. Given the above, the total scattered intensity is therefore given by

$$I(q) = I_0 N(\Delta\rho)^2 V^2 P(q) F(q) \quad (62)$$

, where $I_0$ is proportional to incident X-ray flux, N is the number of nanoscale objects in the volume of the sample intersected by the beam, $\Delta\rho$ is the contrast, and V is the volume of one object. For uncorrelated particles, $F(q) = 1$ and $I(q)$ contain only information about the size, shape, and internal structure of the particle. For correlated objects, $F(q)$ characterizes the type of order. The separation of these two contributions is a challenge and good knowledge of the model helps with this task.

Because the SAXS signal increases very strongly with the particle volume (e.g., for spherical particles the SAXS signal increases with a power of six with the radius), the particle size distribution determined from the SAXS pattern is weighted by the particle size. As an example, SAXS intensity from one 10 nm

particle is the same as the SAXS intensity from $10^6$ 1 nm particles. This is important to keep in mind when comparing the size of nanocatalyst particles measured by different techniques, as the determined average size is often not the same even for the same sample. Eq. 62 also shows that the SAXS signal is proportional to squared contrast, so the sign of the contrast does not play a role. Voids in the matrix, therefore, result in the same scattering as material particles in the matrix.

The assumption that all N particles in the probed volume of the sample have the same size is typically not correct. Usually, the particles have a distribution of sizes (polydisperse) or different shapes (polymorphous). The scattering curves can be then seen as a sum of all N form factors $P(q)$ from each particle and the result is an averaged form factor with no sharp minima. In contrast, an experimental profile with sharp minima is a sign of a monodisperse sample.

The typical shape of SAXS patterns, if plotted on a double logarithmic scale, is a plateau at low $q$ followed by a decreasing intensity with a transition at $\lambda^*$ defined by the average size of the objects (Figure 19a). It can be shown that at low $q$ the particle form factor can be approximated by $P(q) \approx \exp[-(qR_G)^2/3]$ where $R_G$ is the radius of gyration.³ This is known as Gunier law and provides an independent way of size determination as $R_G$ is closely related to the size and from the plot of $\ln(I(q))$ versus $q^2$ it is straight forward to find $R_G$. In practice, however, this analysis can be challenging for composite materials, such as nanocatalyst used in electrochemical systems, due to the strong small-angle scattering from the carbon-based supports (or any other fractal materials). The shape of the SAXS curve at high $q$ typically follows $I \approx C/q^{-\alpha}$, which is easily observed in the scattering curves (Figure 19). The $q^{-4}$ relationship is known as Porod law and it is universal to all structures with a sharp interface (Figure 19 a,b,c). Smeared interfaces or fractal structures lead to exponents larger than -4 and are typical for materials used as supports for electrocatalysts (Figure 19 d.). The constant C in the Porod law relates to the specific surface
<figure><img src="image_36.png" /></figure>

Figure 19: Representative SAXS patterns. (a) Guinier approach and Porod's law for obtaining the sizes and surface areas of particles/voids, respectively, and (b) SAXS curves for different nanostructures (Adapted from Ref. ¹⁰⁴. Copyright 2020 Elsevier). c) Scattering curves obtained from SAXS measurements on cubic silica shells. The cyan curve is the measured scattering profile while the blue, green, and red curves are obtained from models of, respectively, a cubic 14 nm shell, a cubic 13 nm shell, and a spherical 14 nm shell (Adapted from Ref. ¹⁰⁵. Copyright 2020 Elsevier). (d) Fitting of the SAXS of (a) the fresh and (b) the spent ORR electrocatalyst with a stochastic model. The crosses are the data and the blue line is the best fit, with the contributions of the solid support in black and of the particles in red. In each case, five realizations of the particle model are shown, together with their projections. (Reproduced from Ref. ¹⁰⁶. Copyright 2021 International Union of Crystallography).

area and can be therefore used for its determination, provided that the contrast of the system is well known. This type of analysis can be useful in determining changes in the porosity of materials in electrochemical systems. The full SAXS curve can also be analyzed by combining various models for nanoparticle form factors and structure factors and fitting those models to experimental SAXS data (Figure 19b,c,d). This is typically done by using specialized software which contains a library of possible models. Prior knowledge of particle size and shape is often needed to properly select the model and extra caution has to be taken not to overinterpret the fitted values, as the final interpretation heavily depends on the model chosen for analysis.

SAXS can be measured on both lab instruments and at synchrotron beamlines. Currently, several companies offer specialized instruments capable of SAXS/WAXS/USAXS (Ultra SAXS) combination with variable X-ray sources and flexible detection systems. These are suitable mainly for ex-situ measurements

due to lower X-ray flux and often *in-vacuum* detection, but can be also used for slow *in-situ* and *operando* experiments. Such experiments are regularly performed at synchrotron beamlines, which sometimes provide the possibility to combine various scattering techniques within one experiment (e.g. SAXS, WAXS, XAS and imaging). The beamline choice and setup depend on the planned experiment. The use of high-energy probes allows to use more relevant electrochemical cells, but limits the q-range and maximum size of probed objects. On the other hand, lower energies provide possibilities to measure lower q-values and thus larger objects, but the cells need to be optimized for X-ray transmission. Both transmission and grazing incidence geometries are used, each of them having advantages and disadvantages. Transmission geometry (X-ray beam perpendicular to the sample) allows to measure with small beams and achieve good in-plane spatial resolution in the scanning mode. However, the signal-to-background ratio is low, and electrodes with high loading need to be used. This limits the
electrochemical performance and can lead to misleading results, as parts of the electrode might not be active. Grazing incidence geometry (X-ray beam parallel to the electrode) permits the use of low-loading electrodes and superior resolution in the direction perpendicular to the electrode but does not provide in-plane resolution. The detector is typically positioned far from the sample (1-10 m) and an evacuated or helium-filled tube between the sample and the detector is used to reduce the background. Ideally, this tube is equipped with a beamstop before the exit window to block the direct beam before the detector. The beam is often focused on the beamstop to further lower the background.

### 4.5.2 Grazing incidence small angle X-ray scattering

The same ideas as for general SAXS scattering hold true for a spatial distribution of objects on a surface, such as deposited nanoparticles or islands formed by a growth process. This 2D distribution can be probed by an X-ray beam impinging on the surface under grazing incidence (Figure 20a). Because the curvature of the Ewald sphere can be neglected in the small angle regime, the intensity distribution of this scattering in a plane perpendicular to the incident beam direction $I(q_y, q_z)$ can be directly recorded by a 2D X-ray detector. This scattering is much weaker than that of the reflected beam, which has to be masked by a beam stop. However, *in situ* measurements at electrochemical interfaces are still feasible, since the background scattering by the electrolyte is low at small angles.

Typically, this grazing incidence small angle X-ray scattering technique is used for studying nano- and mesoscale structures in the range between one and several hundred nanometers. As an example, we discuss the case of a Pt(111) surface, which has been roughened by repetitive potential cycles into the potential range of Pt surface oxidation (Figure 20b,c). Such oxidation/reduction cycles result in the formation of 3D Pt islands with characteristic distances of a few nm (see chapter 6.2.1. The

*in situ* GISAXS data obtained from this surface exhibit wings at reciprocal space positions $\pm 2\pi/\zeta$, where $\zeta$ corresponds to characteristic distances between the islands. This scattering represents a specific case of diffuse surface scattering, which originates from the deviation of the surface from a perfect plane. Along $q_z$, the intensity reaches a maximum at $q_z = q_c$, caused by the enhancement effect discussed in chapter 4.3.1, and then decays. The diffuse peaks intensity increases with increasing scattering volume of the islands; their width is a measure of how well-defined the short-range order is. For epitaxial systems, $S_L(q)$ is not necessarily isotropic, but may reflect the sample symmetry. For example, anisotropic island growth on surfaces with a uniaxial symmetry will result in GISAXS images that depend on the in-plane orientation of the sample relative to the incident beam.

<figure><img src="image_37.png" /><figcaption>Figure 20: (a) Scattering geometry of a GISAXS experiment. (b) STM image and corresponding autocorrelation function and (c) *in situ* GISAXS data obtained on a Pt(111) electrode that was roughened on the nanometer scale by potential cycling into the oxide formation regime (Adapted from Ref. $^{107}$. Copyright 2017 American Chemical Society).</figcaption></figure>
Because GISAXS images can be obtained within seconds, this technique is well suited for time-resolved *in operando* studies of the nanoscale evolution of the surface structure during interface reactions. Studies of that type have been performed for electrochemical and other interface processes. Furthermore, since GISAXS is insensitive to the crystal structure, it does not require single-crystal surfaces but can be performed on any sufficiently planar interface, including amorphous and liquid substrates. It thus fills an important niche between *in situ* atomic-scale characterization methods and *ex situ* studies by techniques such as electron microscopy.

A more recent variation of GISAXS is transmission small angle X-ray scattering (TM-SAXS).¹⁰⁸ Here, the measurements are performed with high photon energy beams at incidence angles above the critical angle, and the scattering of the transmitted X-ray beam is measured. Analysis of the data obtained in this geometry is substantially simplified, because refraction of the X-rays can be neglected.

## 4.6 Locally resolved measurement techniques

### 4.6.1 X-ray nanodiffraction

The advent of spatially coherent X-ray sources and sophisticated X-ray optics enabled the focusing of the hard X-ray beams to 10 nm and below¹⁰⁹⁻¹¹¹. Step-wise scanning these small beams across the specimen and recording scattering signal at every position allow imaging that is reminiscent of dark field microscopy conventionally used with light or electrons. Nanodiffraction, which is possible with X-rays and electrons, yields direct access to the crystal structure and distortions thereof. While electron nanodiffraction typically works in transmission geometry on thin membranes, X-ray nanodiffraction often finds application in reflection geometry and has extensively been used to image nanoscale heterogeneity in thin crystalline films epitaxially attached to substrates. In X-ray nanodiffraction, one records diffraction profiles of sample volumes that are only

a few tens of nanometers across all directions. Recent research focused on interpreting these diffraction profiles and forming images of coexisting phases during phase transitions¹¹²,¹¹³, domains in poled ferroelectrics¹¹⁴, and local crystal distortions¹¹⁵. While early work focused on manual interpretation of diffraction profiles, for example by choosing regions on the detector corresponding to different structural phases, more recent approaches use unsupervised machine learning for interpreting the data¹¹⁵,¹¹⁶. The high penetration depth of hard X-rays makes X-ray nanodiffraction an appealing approach to studying electrochemical systems *operando*. In addition, the sample geometry potentially allows forming of an *operando* electrochemical cell on top of the thin film supported by the substrate.

### 4.6.2 Bragg coherent diffraction imaging

Many electrochemical systems comprise active crystalline particles ranging in size from a few nanometers in electrocatalytic systems to up to a micrometer in battery electrodes. Often, it is desirable to study fundamental processes inside these nanoparticles under real operating conditions. For particles of the order of 50 nm and larger, high-quality diffraction data can be collected at the modern X-ray synchrotron sources, which includes the Bragg peak and the interference fringes surrounding it<sup>74,75,117-119</sup>. The 3D diffraction profile can be recorded by using an area detector, which records 2D slices of the Ewald sphere through the reciprocal space, and rocking the crystal through the diffraction condition (typically tens of angles within about 1 degree of total rotation)<sup>117</sup>.

As shown in 2.3.2, one can readily calculate the scattering amplitude from an arbitrarily shaped and strained particle via a Fourier transform. The Fourier transform is invertible, yet the notorious phase problem – one can only measure X-ray photon intensities, not their phases – prevents a direct inversion of the coherent X-ray data into a real-space structure. Bragg Coherent Diffractive Imaging is a tech-
<figure><img src="image_38.png" /><figcaption>Figure 21: (Top) The schematic illustration of an iterative phase retrieval algorithm: the forward and inverse Fourier transforms are complemented by real space and reciprocal space constraints. The iterative procedure retrieves the shape of the nanocrystal and the displacement field projected on the reciprocal lattice vector within the crystal (reprinted from Ref. 75. Copyright 2009 Springer Nature). (Bottom) The schematic of a 3D neural network comprised an encoder network and two decoder networks. In the network, the amplitude of a 3D coherent X-ray diffraction pattern in reciprocal space is used as input, and the output is the complex structure information (i.e., amplitude and phase) of the particle in real space. (reprinted from Ref. 120. Copyright 2021 Springer Nature).</figcaption></figure>
nique that uses phase retrieval¹²¹ to find the lost phases of the intensity profile *I*(*Q*) and thereby invert the diffraction profile into a 3D image of the nanocrystal. The method generates the density of Bragg planes (allowing to determine the shape of the nanocrystal) and displacement field (allowing a study of the internal displacement field inside the nanocrystal). The conventional BCDI uses iterative phase retrieval algorithms. One starts with a randomized guess of what the crystal might look like, typically a phase object where in 3D, every voxel receives a random phase. The algorithm consists of four steps (see figure 21): (1) Fourier transform, (2) reciprocal space constraint, (3), inverse Fourier transform, and (4) real space constraint. In the reciprocal space constraint, the modulus of the complex X-ray field is replaced with the square root of the measured intensity. Often, a low-pass filter is applied at the beginning of the procedure and gradually eliminated towards the end: this is believed to determine the overall shape first and subsequently achieve a higher resolution while taking higher *Q* values into account. More recently, convolution networks have been used to invert the coherent diffraction data¹²⁰. One advantage of the approach is the ability to invert the data within a single step, avoiding the tedious iterative procedure. The network is trained on simulated data and can continuously be improved.

BCDI combines a spatial resolution on the order of 10-50 nm (excellently suited to image the long-range displacement fields due to crystalline distortions) with sub-picometer sensitivity to displacements (excellently suited to resolve the minute lattice displacements due to defects). Through a numerical differentiation, the displacement field can be converted into a local strain field or local crystal inclination¹²². Importantly, the local displacement, strain, and crystal-plane inclination are all measured on the crystal planes that are normal to the reciprocal lattice point $G_{hkl}$. Measuring the full strain tensor is possible by combining BCDI measurements on multiple Bragg peaks¹²³,¹²⁴. Furthermore, the X-ray interference of all parts of the crystal is critical for detecting clear interference fringes and therefore is a key requirement

for capturing the distortions in the coherent diffraction profile, although small deviations from perfect coherence can be accommodated¹²⁵,¹²⁶. The size of the nanocrystal is limited from below by the amount of scattering signal: too small particles will generate insufficient intensity in the interference fringes and make the inversion impossible. The size of the crystal is limited from above by experimental geometry (interference fringes become too small to be resolved) and more importantly by the breakdown of the kinematic approximation¹²⁷. While the experimental geometry limitation can be overcome by larger sample-detector distance or smaller detector pixels, the latter requires an interpretation of the diffraction signal in terms of dynamical diffraction theory. The limit for the validity of kinematical approximation is about 1 µm for Au nanocrystals¹²⁷. An interpretation of BCDI data from intermediately sized crystals is possible within the quasi-kinematical approximation¹²⁸.

### 4.6.3 Ptychography

Ptychography is another method that uses iterative phase retrieval to form an image of the specimen under study⁸². Ptychography combines raster scanning during the experiment with iterative phase retrieval during the analysis. Specifically, the early works on X-ray ptychography¹²⁹ showed that the overlap of illumination regions during a raster scan leads to a robust conversion of the iterative phase retrieval algorithm. In the last decade, X-ray ptychography matured and is widely used to study biological systems¹³⁰,¹³¹, X-ray optics¹³²,¹³³, magnetic structures¹³⁴, or the structure of integrated circuits at nanoscale¹³⁵. Ptychography can be used to image extended objects, which is a major advantage as compared with other diffractive imaging approaches such as BCDI. Finally, X-ray ptychography is appealing to studying electrochemical systems: the method is applicable *operando* due to the high penetration depth of hard X-rays, enables studying extended objects, and leads to a robust inversion of scattering data.
## 4.7 Determination of composition and electronic structure

### 4.7.1 Resonant anomalous X-ray scattering

Resonant anomalous X-ray scattering (RAXS) combines X-ray diffraction techniques with X-ray absorption spectroscopy (XAS). It allows to probe the long-range structural order and, in addition, to provide element-specific structural information for atoms of a selected element within this structure. The theoretical foundation for RAXS and its applications in experiments at modern synchrotron X-ray radiation sources was reviewed comprehensively by Walker and Specht.¹³⁶ RAXS is based on the analysis of the scattering near an X-ray absorption edge, where the atomic form factor of the corresponding element exhibits a pronounced, so-called anomalous dependence on photon energy (see chapter 2.5). By quantitatively analyzing the scattered X-ray intensity distribution as a function of the energy, the position of the atoms of this element in the structure can be located. This principle can be applied to every X-ray scattering method.

RAXS experiments have to be performed at synchrotron X-ray sources, where the energy can be scanned with a resolution of at least 1 eV through the absorption edge of the studied resonant element. During this energy scan, the scattering vector $\mathbf{q}$ must be maintained. The scattering intensity at a specific $\mathbf{q}$ as a function of energy is called a RAXS spectrum. Its variation near the absorption edge energy contains both structural and electronic information about the resonant element, which can be retrieved by modeling.

The general mathematical equation for computing the RAXS intensity is given by combining Eq. 4, 5, and 40, resulting in

$$ 
\begin{aligned}
F_{TOT}(\mathbf{q}, \varepsilon_{Ph}) &= F_{NR}(\mathbf{q}) + F_{R}(\mathbf{q}, \varepsilon_{Ph}) \\
&= \sum_{j} \theta_{j} f_{0,j}(\mathbf{q}) e^{i\mathbf{q} \cdot \mathbf{r}_{j}} e^{-M_{j}} \\
&\quad + (f'(\varepsilon_{Ph}) + if''(\varepsilon_{Ph})) \sum_{k} \theta_{k} e^{i\mathbf{q} \cdot \mathbf{r}_{k}} e^{-M_{k}}
\end{aligned}
\tag{63}
$$

According to Eq. 63, the RAXS structure factor $F_{TOT}(\mathbf{q}, \varepsilon_{Ph})$ can be split into two contributions, one ($F_{NR}$) from the non-resonant Thomson scattering described by the q-dependent form factors $f_{0,j}(\mathbf{q})$, and the other ($F_{R}$) from the resonant contributions of the selected element caused by the dispersion corrections ($f'$ and $f''$), which vary with X-ray energy $\varepsilon_{Ph}$. $F_{NR}$ is a sum over all atoms in the sample's unit cell, which are described by their position $\mathbf{r}_{j}$, their site occupancy $\theta_{j}$, and their Debye-Waller factor $M_{j}$. The sum in $F_{R}$ only includes the atoms of the resonant element. This calculation requires as priori knowledge of the dispersion corrections $f'$ and $f''$ as a function of photon energy. $f''$ can be obtained experimentally by X-ray absorption near edge spectroscopy (XANES), $f'$ is computed from $f''$ through a Kramers-Kronig transformation. In addition, the non-resonant structure factor $F_{NR}(q)$ is needed for fitting the RAXS spectra. The latter is usually obtained from scattering data recorded at an energy far away from the absorption edge, where the resonant scattering factor can be ignored. Once the non-resonant total structure factor is known, the RAXS can be fitted by optimizing the occupancy, position and Debye-Waller factor for the resonant atoms.

Besides this traditional fitting approach based on a structural model, $F_{R}$ can also be obtained from a model-independent approach, where the structure factor for the resonant atoms is expressed as

$$ F_{R}(q, \varepsilon_{Ph}) = [f'(\varepsilon_{Ph}) + if''(\varepsilon_{Ph})]A_{R}(q)e^{i2\pi P_{R}(q)} \tag{64} $$

This expression is independent on the structural parameters of resonant atoms and introduces instead two new fit parameters, the coherent occupancy $A_{R}(q)$ and coherent position $P_{R}(q)$.⁸⁴ If $F_{NR}$ is known, each RAXS spectra can now be fitted separately with one pair of coherent parameters. Using this approach for multiple RAXS spectra recorded at different q values, the obtained $A_{R}(q)$ and $P_{R}(q)$ values can be employed in a discrete Fourier synthesis to regenerate an electron density profile for the resonant element. Due to the finite