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

HAL
open science

# Basics of spectra processing and analysis

Arnaud Travert

► To cite this version:

Arnaud Travert. Basics of spectra processing and analysis. École thématique. Basics of spectra processing and analysis, Paris, France. 2023. hal-05062976

HAL Id: hal-05062976

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

Submitted on 13 Jun 2025

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.

Public Domain
# Basics of spectra processing & analysis

Arnaud Travert

arnaud.travert@unicaen.fr
## Outline

* Introduction

* Pre-processing of spectra

* smoothing

* baseline correction / background subtraction

* Univariate exploratory analysis

* visual inspection, second derivative

* Fourier self deconvolution

* Univariate modeling

* Curve fitting

* Intensity variations

* Multivariate Exploratory analysis

* generalized 2D-COS

* principal component analysis (PCA)

* Evolving factor analysis (EFA)

* SIMPLISMA

* Hard/Soft modelling

* hard-soft MCR ALS modeling

* 2D IRIS
# Spectroscopy which information?

Band intensities
Quantification

External variable: Pressure, Temperature, Time evolution

Intenal variable : **Thermodynamic, Kinetic,... parameter**

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

Frequency/wavelength/energy:
Identification

## Pros:

- Identification of species

- Relative "interaction strength" / "rates" ...

## Cons:

- Parasistic phenomena: noise, baseline drift...

- Multivariate data are difficult to handle

- Overlapping spectra: how many distinct species ?

- Usually qualitative: Quantification?

number, energetics / kinetics ?
# Univariate vs multivariate analysis

## Univariate analysis

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

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

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

## Multivariate analysis

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

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

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

Multivariate analysis
# What is a spectrum [numerically]?

* 1D array of numbers (intensity/absorbance/...),

* linked to **coordinates** (wavelength/frequency/energy/...)

* often equally spaced (but not always)

* **signal** (meaningful input) is made of peaks/bands/... (signal)

* **noise** (not meaningful) ~ “random” variations of the signal

* **Other non random features:** baseline ...

* **Signal to noise ratio:**

* $SNR = \mu/\sigma$ or $\mu^2/\sigma^2$

* where $\mu$ = signal mean, $\sigma$ = noise standard deviation

* **Resolution**

* Not the data spacing !

* IUPAC: « frequency difference of two still distinguishable lines in a spectrum”

* Rayleigh criterion: “minimum of the first band is at the position of the maximum of the other »

<table><thead><tr><th>λ / nm</th><th>A / au</th></tr></thead><tbody><tr><td>200.0</td><td>3.47144</td></tr><tr><td>201.0</td><td>3.45628</td></tr><tr><td>202.0</td><td>3.50957</td></tr><tr><td>...</td><td>...</td></tr><tr><td>599.0</td><td>0.00461</td></tr><tr><td>600.0</td><td>0.00441</td></tr></tbody></table>

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

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

# Smoothing univariate data: moving window & Savitsky-Golay

- Moving window of preselected size (5 ... 25 pts)

- Fit of the spectrum by a polynomial

- No derivative: peak position ; smoothing

- When the window size increases:

- The noise decreases

- But the resolution decreases...

## Trade-off between resolution and signal to noise ratio

(NB: other algorithms based on

- Fourier Transform

- PCA (see below)

- ...

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

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

* Polynomial fit over the whole spectral range

* Easy but sensitive to intense bands

* « Automatic » / « Weighted least squares »

* Iterative polynomial fit

* Decrease the weight of points above the baseline

* « Supervised » : selected points and polynomial fit

* Preferred method when « baseline points » are generally well identified

* Can be extended to multivariate data

Vilmin et al. Analytica Chimica Acta 891 (2015)

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

<figure><img src="image_15.png" /></figure>
Background /reference subtraction

Use appropriate reference spectrum...

... and pay attention to

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

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

Fig. 1. (A) IR spectra of ref. [1] and (B) IR spectrum of atmospheric water (Magna 550 Nicolet Spectrometer, 2 cm⁻¹ resolution).

Subtract spectra recorded at similar conditions

See Applied Catalysis A: General 294 (2005) 156–160
# Univariate analysis on spectra: how many bands ?

## 1. Second derivative

* Analysis of band profile

* Accurate peak pointing

* Number of peaks in a group

* Use for shoulders

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

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

Fig. 1. IR spectra of hydroxyl groups in HZSM-5 (Zeolyst, Si/Al = 75) A—spectra of the OH groups recorded at room temperature (a) and at 170 K (b) B—spectra of the OD groups recorded at room temperature (a), at 170 K (b), second derivative diagram (c) and fourth derivative diagram (d) of the spectrum recorded at 170 K.
# Univariate analysis on spectra: how many bands ?
## 2. Fourier self deconvolution

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

Second derivative

Lukyanov et al. J Phys Chem C, 2014, 118, 23918-23929

« Existence of (at least) six distinct BAS that can be visualized by six single bands in Fourier self-deconvolution traces of the IR spectra. »

Caution: FSD assumes that *all bands have the same line shape and width...*

FSD parameters:

width: 22 cm⁻¹

EF: 3.1
# The maths of Fourier self-deconvolution

## Experimental Spectrum B

* Fourier transform of the interferogram

* convolution of 'resolved spectrum' B' by lineshape function LS

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

$$B(\bar{\nu}) = \mathcal{F}^{-1}I(\delta) \qquad I(\delta) = \mathcal{F} B(\bar{\nu})$$

$$ \begin{align*} B(\bar{\nu}) &= B'(\bar{\nu}) \star LS(\bar{\nu}) \\ \Rightarrow \mathcal{F} B(\bar{\nu}) &= \mathcal{F}[B'(\bar{\nu}) \star LS(\bar{\nu})] = I'(\delta) \times \mathcal{F}LS(\bar{\nu}) \quad (*) \\ \Rightarrow I'(\delta) &= \mathcal{F} B(\bar{\nu}) / \mathcal{F}LS(\bar{\nu}) \end{align*} $$

<figure><img src="image_22.png" /></figure>
# Univariate modeling of spectra
## Curve fitting

* Model selection and assessing fit quality

* Number of bands

* Band shapes (gaussian, lorentzian, voigt...)
    * ... are spectroscopy AND case dependent !

* Goodness of fit : residuals as diagnostics

* Beware of overfitting

* Fitting process and options

* Constraints

* Weights

* Fitting software

* Excel, matlab,

* casaXPS

* Python: lmfit

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

Demmati et al. (2015)

DOI:10.2174/1874120701509020026
# Univariate analysis on intensities
## Example #1

alkane @ zeolite at reacting conditions

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

Coverage determined by the perturbation
of the vOH band

Determination of sorption isotherms &
enthalpic/entropic terms (van't hoff)

<figure><img src="image_25.png" /></figure>
# Univariate analysis on intensities
## Example #1

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

**Surface reaction rate:** Rate per active site

SIMULTANEOUS determination of:

- Reaction rates

- Number of reactant-active site complexes

=> OPERANDO spectroscopy

### 1/ Correlate apparent rate and Coverage

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

Slope = surface rate
constant *k*

### 2/ Determine intrinsic rate parameters

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

Slope and intercept
ΔH<sup>‡</sup>, ΔS<sup>‡</sup>
<figure><img src="image_29.png" /></figure>

# Univariate analysis on intensities (and spectra!)
## Example #2

Dosing of MeOH on MgO

$$Q_{ads}(k) = \sum_{i} A_{i}(k) M_{i} / \epsilon_{i}$$

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

Solve linear equation: $X = A^{-1} Q$

With $X_i = M_i / \epsilon_i$

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

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

**Constraints:**

- individual bands must be resolved (curve fitting can help !)

- A must be full rank (no linear dependence between intensities of distinct species)
# Multivariate analyses

Should be used in case of linear dependencies in one or two dimensions:

- parallel evolution of concentrations and/or

- strong overlap of spectra

i.e. when D is not “Full rank” *

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

Menu...

## Exploratory analyses

2D COS

PCA

EFA

SIMPLISMA

## Multivariate modeling

MCR ALS and apparent methods

Global/Target analysis

2D IRIS
<figure><img src="image_34.png" /></figure>

# 2D Correlation Spectroscopy (2D COS)

Introduced by Isao NODA (1993)

Used to determine “synchronous” vs “asynchronous” changes in evolving spectra

Dynamic spectrum (=mean centered spectra):

$$ \tilde{a}(v, t) = a(v, t) - \overline{a(v, t)} $$

Correlation spectrum

$$ X(v_1, v_2) = \langle \tilde{a}(v_1, t) \tilde{a}(v_2, t') \rangle $$

Synchronous (Φ) and asynchronous (Ψ) spectra

$$ X(v_1, v_2) = \Phi(v_1, v_2) + i\Psi(v_1, v_2) $$

I. Noda, A. E. Dowrey, and C. Marcott, Appl. Spectrosc.47, 1317 (1993)

I. Noda, Appl. Spectrosc. 47, 1329 (1993)

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

<figure><img src="image_36.png" /></figure>
# Synchronous 2D correlation spectrum
a.k.a. the covariance matrix

$$ \Phi(v_1, v_2) = \frac{1}{N-1} \tilde{a}^t(v_1) \tilde{a}(v_2) $$

* Simple data treatment

* Positively or negatively correlated changes

* Autopeaks (variance)

* Cross peaks (covariance)

* Correlation squares

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

Here: At least 3 species ?
# Asynchronous 2D spectrum

* A bit more elaborated...

$$ \Psi(v_1, v_2) = \frac{1}{N-1} a^t(v_1) \mathbf{N} a(v_2) $$

With N = Noda-Hilbert matrix, $N_{j,k} = \frac{1}{\pi(k-j)} \delta_{jk}$

* Antisymmetric

* No autopeaks

* Cross-peaks for Asynchronous changes

* Can order changes ("$a(v_1)$ changes before $a(v_2)$")

Here:

- **240 nm** is out of phase w.r.t. other peaks

- **410 nm** is synchronous with 340 nm (no cross peak), less with 260 ?

- ...

NB: Comparison of intensity profiles is old-school but useful to validate 😊

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

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

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

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

<figure><img src="image_42.png" /></figure>
Other example: 2D IR detection of coke at high temperature

* 2D COS analysis

- Band at 1596 cm⁻¹

- Not xylene (1605)

* Coke Traces

- Not anticorrelated with acidic OHs

- Anticorrelated with low frequency SiOH and with extra framework phase

* Coke in pore defects → reshaping of perfect pores → improved selectivity

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

<figure><img src="image_44.png" /></figure>
# Fields of application of 2D COS

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

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

## Most recent review;

* "Continuing progress in the field of two-dimensional correlation spectroscopy (2D-COS)"

* Park, Jin, Noda, Jung. Spectrochemica Acta (2023) https://doi.org/10.1016/j.saa.2022.121573

* part I. Yesterday and today

* part II. Recent noteworthy developments

* Part III. Versatile applications
# Principal Component Analysis : from SVD...

* Based on Singular Value Decomposition (SVD):

* D is expressed as a sum over r “components”:

$$D = \sum_{i=1}^{r} \sigma_i u_i v_i^t$$

* $\sigma_i$ proportional to the amount of variance captured by component $i$ ($\sigma_i u_i v_i^t$)

* Ranked by decreasing value

$$D = U \Sigma V^t$$

U: left singular (orthonormal) vectors ($u_i u_j^t = \delta_{ij}$)

V: right singular (orthonormal) vectors ($v_i v_j^t = \delta_{ij}$)

Σ: diagonal matrix of singular values $\sigma_i$

$r$: rank of D (number of linearly independent lines or columns)

<figure><img src="image_47.png" /></figure>
... to PCA : $D = TP^t$

Just multiply the left vectors by $\sigma$:

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

- Coordinates of spectra on the principal axis

- Weight of the spectra in the PA

- Correlation between observations/spectra

- Coordinates of the principal axis

- Weight of variables/wavelength in the PA

- Correlation between variables/wavelengths
# Geometrical interpretation of PCA

(32 spectra, M=3 wavelengths...)

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

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

Scores are the projection of the spectrum
on the principal axes

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

2nd component: orthogonal axis capturing most
of the remaining variance (direction = second loading vector)

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

Etc...
PCA Example

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

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

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

<figure><img src="image_56.png" /></figure>
<figure><img src="image_57.png" /></figure>

# PCA example: score plot

* Observations /spectra in the space of principal axes

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

* Useful for:

* Detection of outliers

* Classification/clustering

Exemple: iris flowers dataset

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

* Here: typical of time evolving spectra

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

<figure><img src="image_61.png" /></figure>
PCA example: figures of merit

<table><thead><tr><th>PC</th><th>Eigenvalue<br>of cov(X)</th><th>%variance<br>per PC</th><th>cumulative<br>variance</th></tr></thead><tbody><tr><td>#0</td><td>1.075e+00</td><td>94.944</td><td>94.944</td></tr><tr><td>#1</td><td>2.168e-01</td><td>3.865</td><td>98.809</td></tr><tr><td>#2</td><td>4.729e-02</td><td>0.184</td><td>98.993</td></tr><tr><td>#3</td><td>4.176e-02</td><td>0.143</td><td>99.136</td></tr><tr><td>#4</td><td>3.659e-02</td><td>0.110</td><td>99.246</td></tr></tbody></table>

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

- Most of the variance is explained by few PCs

- Can be used to select the number of relevant components...

- .... But no absolute criteria ! !
<figure><img src="image_63.png" /></figure>

PCA example: components contributions

$$ \bar{D} = \sum_{i=1}^{r} t_i p_i^t $$

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

<figure><img src="image_65.png" /></figure>
<figure><img src="image_66.png" /></figure>

# PCA example: reconstruction of the dataset

Experimental
D

Reconstructed:

$$ \hat{D} = \bar{D} + T P^T $$

Residuals:

$$ E = D_{\text{exp}} - \hat{D} $$

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

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

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

- whether reconstructed spectra are acceptable is user's decision...

- Here, spectra can be reconstructed by 2 independent components

- The number of components should correspond to the chemical rank

Chemical rank = min(R, S) with R: number on independent reactions
S: number of absorbing species
En passant... PCA can be used to denoise spectra

The first components contain the input of interest

The last components contain noise and “random” features

Original dataset

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

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

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

⇒ PCA can be used to denoise a **series** of related spectra !

⇒ This avoids the smoothing of sharp features

.... but requires series of spectra
<figure><img src="image_73.png" /></figure>

# Time evolution of components ?

* The scores are NOT concentration profiles
  ... but PCA accounts for the chemical rank

* **EFA: Evolving Factor Analysis**

* Initially developed of chromatography w. DA detectors

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

* Forward analysis: appearance of components

* Backward analysis: disappearance of components

* Forward x backward: domains of existence/predominance

* **BEWARE !!!! STRONG HYPOTHESIS: first in – first out...**

<figure><img src="image_75.png" /></figure>
<figure><img src="image_76.png" /></figure>

# Application of EFA

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

* Emergence of ... 3 components ?!

* Allows for assessing the predominance regions:

* Eigenvalues can be used to approximate the concentration matrix

* ... which can be normalized or adapted using closure constraints...

<figure><img src="image_78.png" /><figcaption>Forward and Backward EFA</figcaption></figure>
# Spectra of components ?

* The loadings are NOT spectral profiles, just correlations between wavenumbers

* SIMPLISMA:

“SIMPLe-to-use Interactive Self-modeling Mixture Analysis »

* Basic algorithm:

1. Find purest variable with the purity function: $P_{j1} = \frac{\sigma_{j1}}{\bar{a}_j + \alpha}$
   $\bar{a}_j$ : mean absorbance
   $\alpha$ : offset (~3% of $\bar{a}$)*

2. Solve for the spectrum by regression

3.... repeat for the next variable using: $P_{jn} = \frac{\sigma_{jn}}{\bar{a}_j + \alpha}$
   $\sigma_{jn}$ : standard deviation corrected for the variance explained by the n - 1 previous components

* Unsupervised ($j = \text{argmax}(P_{jn})$ or supervised

<figure><img src="image_79.png" /></figure>
Application of SIMPLISMA

<figure><img src="image_80.png" /><figcaption>Purity function $P_{i1}$</figcaption></figure>

<figure><img src="image_81.png" /><figcaption>First pure spectrum</figcaption></figure>

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

Application of SIMPLISMA
with default tolerance
(99.9% explained variance)
yields 2 pure spectra:

<figure><img src="image_83.png" /><figcaption>pure spectrum</figcaption></figure>

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

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

$D_{exp}$ vs. $\hat{D}$ vs. $E$

“merit plot”
# Self Modeling Curve Resolution and bilinear decomposition

* EFA, SIMPLISMA, ...* belong to **self-modeling** curve resolution analysis

* i.e. find concentration/spectral profile using a linear model:

$$D = C S^T + E$$

For instance, unsupervised SIMPLISMA yields:

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

* But bilinear models are not unique...

* For any invertible matrix T : $D = C S^T = C T^{-1} T S^T$, so $C' = C T^{-1}$ and $S^T' = T S$ are also solutions...
# Multivariate Curve Resolution by Alternate Least Squares

* Introduced by Tauler et al (1992), the most flexible and popular MCR method

## « SOFT » constraints on C and/or S<sup>T</sup>

* Non-negativity of C (and/or S<sup>T</sup>)

* Unimodality

* Monotonic

* Closure (material balance)

* Normalization

## « Hard » constraints on C and/or S<sup>T</sup>

* part C or S<sup>T</sup> a priori fixed

* Spectrum of known species

* Known concentration profile (full or partial)

<figure><img src="image_87.png" /></figure>
# Application of MCR-ALS to the dataset

* Choice of the number of components / species

* Chemical rank $r \approx$ rank of the denoised matrix

* For direct spectra, $r = R + 1$, number of independent reactions

* Wise boundaries depend on:

* Your knowledge of the system: can be $\ge R$ or $= S$ (number of species)

* The curse of colinearity... : not too high unless you can add constraints to lift undeterminacy

* Here PCA suggests a chemical rank of 3

* $r = R + 1 \Rightarrow$ 2 reactions?

* Knowledge of the system:

$$A + B \rightarrow C \rightarrow D$$

* Beware: if A and B evolve together or if $C_A \gg C_B \Rightarrow$ 1 species only

* $\Rightarrow$ 2 reactions and 3 species 😊 (generally not as simple in real life...)
# Initial guess and constraints

## Possible initial guess:

* Spectra of pure compounds

* Problem of the intermediate,

* When all known, MCRALS is useless !

* Spectral differences

* Spectra : first spectrum = "A+B"

* Last spectrum = "D"

* Difference between 2 intermediate spectra= "S" ?

* Spectra from SIMPLISMA

* Concentration profiles from intensities

* Concentrations from EFA

* ...

## Minimal constraints

* Non negativity of concentrations [and spectra if no difference spectra

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

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

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

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

<figure><img src="image_92.png" /></figure>
# MCR-ALS Results

<table><thead><tr><th colspan="4">ALS optimisation log</th></tr><tr><th>#iter</th><th>RSE / PCA</th><th>RSE / Exp</th><th>%change</th></tr></thead><tbody><tr><td>1</td><td>0.006829</td><td>0.009254</td><td>-98.943143</td></tr><tr><td>2</td><td>0.005100</td><td>0.008051</td><td>-12.999503</td></tr><tr><td>3</td><td>0.004163</td><td>0.007486</td><td>-7.025018</td></tr><tr><td>4</td><td>0.003624</td><td>0.007195</td><td>-3.876997</td></tr><tr><td>5</td><td>0.003308</td><td>0.007039</td><td>-2.175691</td></tr><tr><td>6</td><td>0.003115</td><td>0.006948</td><td>-1.285927</td></tr><tr><td>7</td><td>0.002986</td><td>0.006890</td><td>-0.836297</td></tr><tr><td>8</td><td>0.002900</td><td>0.006852</td><td>-0.548783</td></tr><tr><td>9</td><td>0.002843</td><td>0.006828</td><td>-0.359699</td></tr><tr><td>10</td><td>0.002804</td><td>0.006811</td><td>-0.240587</td></tr><tr><td>11</td><td>0.002777</td><td>0.006800</td><td>-0.165139</td></tr><tr><td>12</td><td>0.002757</td><td>0.006792</td><td>-0.119851</td></tr><tr><td>13</td><td>0.002743</td><td>0.006786</td><td>-0.088180</td></tr></tbody><tfoot><tr><td colspan="4">converged !</td></tr></tfoot></table>

- Similar results for diff spectra and EFA guesses

- Smalle RSE w.r.t. PCA

- Data are consistent with "A -> B -> C" profiles

- MCR fails for 2 species or ill-conditioned guess...

<figure><img src="image_93.png" /><figcaption>From diff spectra</figcaption></figure>

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

<figure><img src="image_95.png" /><figcaption>From EFA</figcaption></figure>

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

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

<figure><img src="image_98.png" /><figcaption>From intensities</figcaption></figure>

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

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

<figure><img src="image_101.png" /></figure>
<figure><img src="image_102.png" /></figure>

# « Real life » example (1): iso-butanol
dehydration over H-FER zeoli¹

<figure><img src="image_103.png" /><figcaption>Fig. 5. PCA and MCR-ALS on the isobutanol conversion over FER28 (T =525 K, WHSV =100 h⁻¹, P<sub>atm</sub> = 1 bar, P<sub>isobutanol</sub> = 45 mbar, TOS = 4 h) a) Overview of the percentage of variance explained per principal component (PC) b) Reconstruction of the experimental spectra from the pure species obtained by MCR-ALS. Red: experimental spectra X, Blue: reconstructed spectra X̄, Green: residuals c) MCR-ALS concentration profile and d) the pure difference spectral profiles reconstructed using MCR-ALS.</figcaption></figure>
<figure><img src="image_104.png" /></figure>

## « Real life » example (2): XAS of NP's under reactive atmosphere

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

Reconstructed spectra and residuals

MCR ALS spectral profiles

Theoretically predicted spectra
# MCR ALS with kinetic constraints

<figure><img src="image_106.png" /></figure>
<figure><img src="image_107.png" /></figure>

# Hard-soft MCR-ALS of the uv-vis dataset

<figure><img src="image_108.png" /><figcaption>Kinetic Guess model
A -> B -> C</figcaption></figure>

$$k_{\text{guess}} = [0.5 \ 0.05] \text{ min}^{-1}$$

<figure><img src="image_109.png" /><figcaption>Hard-Soft MCR-ALS</figcaption></figure>

$$k_{\text{opt}} = [0.3337 \ 0.04985] \text{ min}^{-1}$$

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

- Very good reconstruction on the spectra

- Slight discrepancies between $C_{kin}$ and $C = D(C_{kin}^{+}D)'$

=> kinetic model not fully consistent with the data ?

<figure><img src="image_111.png" /></figure>
<figure><img src="image_112.png" /></figure>

# Hard-soft MCR-ALS of the uv-vis dataset

Final model: A = B -> B

--- $C_{kin}$ : final “hard” kinetic profile

— C final MCR ALS profile, $C = D(C_{kin}^{+}D)'^{+}$

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

— $S^t$ final MCR ALS profile, $S^t = (C_{kin}^{+}D)'$

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

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

RSE= 0.029637

$[k_1 = 0.2296 \text{ min}^{-1}, k_{-1} = 0.06104, k_2 = 0.03829]$
## "Real life example": Silane (TESPT) grafting on silica

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

<table><tr><td>Hydrolysis</td><td>A + H<sub>2</sub>O<sub>ads</sub> → B</td><td>~Si(Et)O···HOSi≡ + H<sub>2</sub>O···HOSi≡ → ~Si(H)O···HOSi≡ + HOSi≡ + EtOH<sub>(g)</sub></td></tr><tr><td>Direct Graft.</td><td>A → C<sub>g</sub></td><td>~Si(Et)O···HOSi≡ → ~SiOSi≡ + EtOH<sub>(g)</sub></td></tr><tr><td>Condens.</td><td>A + B → C<sub>p</sub></td><td>~Si(Et)O···HOSi≡ + ~Si(H)O···HOSi≡ → ~SiOSi≡ + 2 HOSi≡ + EtOH<sub>(g)</sub></td></tr><tr><td>H<sub>2</sub>O desorpt.</td><td>H<sub>2</sub>O<sub>ads</sub> → H<sub>2</sub>Og</td><td>H<sub>2</sub>O···HOSi≡ → HOSi≡ + H<sub>2</sub>O<sub>(g)</sub></td></tr></table>

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

Concentration profiles:

kinetic model vs. MCR (g)

<figure><img src="image_118.png" /><figcaption>Spectra of pure species</figcaption></figure>

<figure><img src="image_119.png" /><figcaption>Rate constants and activation energies</figcaption></figure>
## FACPACK Kinetic Modeling: pure hard modeling approach

Schröder et al. Analytica Chimica Acta 927 (2016) 21e34

bilinear model: $D = C_{kin}S^t$

and SVD: $D = U \Sigma V^t = (U \Sigma T_{kin}^{-1})(T_{kin}V^t)$

from: $C_{kin} = U \Sigma T_{kin}^{-1}$

we have: $T = C_{kin}^+ U \Sigma$

=> Optimize the $k_i$ constants model ($C_{kin}^+$) by minimizing $|D - C_{kin}S^T|$ with non-negativity constraints on $k_i$

## MCR-NAS (Net Analyte Signal)

## Benchmark: MCR-ALS vs MCAR-NAS vs FACPACK on the uv-vis dataset

<figure><img src="image_120.png" /><figcaption>**Table 3**</figcaption></figure>

Optimized reaction rate constants and error indicators for Data set 3 broken down by chemometric method.

<table><thead><tr><th></th><th>HS-MCR</th><th>MCR-NAS</th><th>FKM</th></tr></thead><tbody><tr><td>$k_1 \times 10^{-1}$ in min<sup>-1</sup></td><td>2.30</td><td>2.18</td><td>1.89</td></tr><tr><td>$k_{-1} \times 10^{-2}$ in min<sup>-1</sup></td><td>6.12</td><td>7.57</td><td>9.71</td></tr><tr><td>$k_2 \times 10^{-2}$ in min<sup>-1</sup></td><td>3.83</td><td>3.88</td><td>4.48</td></tr><tr><td>$||D - CS^T||_F/||D||_F$</td><td>0.0067</td><td>0.0003</td><td>0.0003</td></tr><tr><td>$||C - C^{\text{adj}}(k)||_F/||C||_F$</td><td>0.0010</td><td>0.0035</td><td>0.0034</td></tr><tr><td>$||\min(C, 0)||_F/||C||_F$</td><td>0</td><td>0.00060</td><td>0.00056</td></tr><tr><td>$||\min(S, 0)||_F/||S||_F$</td><td>0</td><td>0.000067</td><td>0.000069</td></tr></tbody></table>

S. Mostafapour et al., Chemometrics and Intelligent Laboratory Systems 210 (2021) 104228
Apparented methods (II)
Global and Target Analyses

- Photobiology ... (see Victor LORENZ-FONFRIA's lecture on Thursday !)

- **Global analysis**: exponential decay only, sequential or parallel

- **Target analysis / Compartment models:**
  allows for realistic reaction schemes

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

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

parallel

sequential
<figure><img src="image_123.png" /></figure>

Current work: full modeling of operando
experiments in transient conditions

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

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

<figure><img src="image_126.png" /></figure>
# Hard modelling using inversion methods
(2D IRIS)

Band intensities
Quantification

Experimental variable *p*: Pressure, Temperature, Time evolution

External variable *q*: Thermodynamic, Kinetic,... parameter

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

Band frequencies:
Identification

**In many cases:**

- several types of species are present (strong overlap !)

- but their relative concentrations can be approximated by a single 2-parameters expression:

$$c_i = K(p, q)$$
Examples from heterogeneous catalysis...

<table><thead><tr><th></th><th>p</th><th>q</th><th>θ<sub>i</sub> = K(p, q)</th></tr></thead><tbody><tr><td>Adsorption</td><td>p</td><td>K<sub>ads</sub></td><td>θ<sub>i</sub> = <sup>K<sub>ads</sub> p</sup>&frasl;<sub>1 + K<sub>ads</sub> p</sub></td></tr><tr><td>First order rxn, reactant</td><td>t</td><td>k</td><td>θ<sub>i</sub> = exp(-kt)</td></tr><tr><td>First order rxn, product</td><td>t</td><td>k</td><td>θ<sub>i</sub> = 1 - exp(-kt)</td></tr><tr><td>Internal diffusion</td><td>t</td><td>D/L<sup>2</sup></td><td>θ<sub>i</sub> = 1 - <sup>6</sup>&frasl;<sub>π<sup>2</sup></sub> &sum;<sub>n=1</sub><sup>&infin;</sup> <sup>1</sup>&frasl;<sub>n<sup>2</sup></sub> exp(-<sup>n<sup>2</sup>π<sup>2</sup></sup>&frasl;<sub>9</sub> <sup>D</sup>&frasl;<sub>L<sup>2</sup></sub> t)</td></tr><tr><td>TPD, first order</td><td>T</td><td>E</td><td>θ<sub>i</sub> = exp[-<sup>ν<sub>0</sub></sup>&frasl;<sub>β</sub> (<span style="color:red;">T</span> exp(-<sup>E</sup>&frasl;<sub>RT</sub>) - T<sub>0</sub> exp(-<sup>E</sup>&frasl;<sub>RT<sub>0</sub></sub>) - <sup>E</sup>&frasl;<sub>R</sub> (expint(<sup>E</sup>&frasl;<sub>RT</sub>) - expint(<sup>E</sup>&frasl;<sub>RT<sub>0</sub></sub>)))]</td></tr></tbody></table>
# Case study: CO2 adsorption over metal oxides

<figure><img src="image_128.png" /><figcaption>Spectroscopic isotherm
CO2/ZrO2, 250°C</figcaption></figure>

<figure><img src="image_129.png" /><figcaption>Gravimetric isotherm
CO2/ZrO2, 250°C</figcaption></figure>

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

All bands increase simultaneously

Curve fitting not applicable

How to recover amount and adsorption energy of individual species ?
From univariate data...

$$ \text{Gabal isotherm} \qquad n_{ads}(P) = \sum_{\text{species } i} \theta_i(K_i, P) L_i $$

Generalized isotherm

$$ n_{ads}(P) = \int_{-\infty}^{+\infty} \theta(K, P) f(K) d \ln K $$

Inversion of the Generalized isotherm

- Hypothesis on the local isotherm

$$ \theta(K, P) = KP/(1 + KP) $$

- Find $f(K)$ knowing $n_{ads}(p)$ and $\theta(K, P)$

J.D. Wilson, *J. Mater. Sci.*, 1992, 27, 3911

P.J. Barrie, *Phys. Chem. Chem. Phys.*, 2008, 10, 1688

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

<figure><img src="image_132.png" /></figure>
... to multivariate approach: 2D-IRIS

Absorbance at each wavenumber:

$$a(v, P) = \int_{-\infty}^{+\infty} \theta(K, P) f(v, K) d \ln K$$

IR spectra

2D distribution function

Resolves individual spectra on the energy scale.

⇒ Nature & Stability of spectroscopically distinct species.

⇒ Quantification ?

<figure><img src="image_133.png" /></figure>
<figure><img src="image_134.png" /><figcaption>Kinetics of H/D exchange</figcaption></figure>

$$ \theta_i = \exp(-kt) $$

<figure><img src="image_135.png" /><figcaption>CO2 TPD over metal oxide</figcaption></figure>

$$ \theta_i = \exp\left[-\frac{\nu_0}{\beta}\left( T \exp\left(-\frac{E}{RT}\right) - T_0 \exp\left(-\frac{E}{RT_0}\right) - \frac{E}{R}\left(\expint\left(\frac{E}{RT}\right) - \expint\left(\frac{E}{RT_0}\right)\right) \right)\right] $$

<figure><img src="image_136.png" /><figcaption>Internal diffusion in zeolites</figcaption></figure>

$$ \theta_i = 1 - \frac{6}{\pi^2} \sum_{n=1}^{\infty} \frac{1}{n^2} \exp\left(-\frac{n^2 \pi^2}{9} \frac{D}{L^2} t\right) $$
<figure><img src="image_137.png" /></figure>

# Spectrochempy

## Python API for processing and analysis of spectral data

* Open Science

* Free and Open Source Software
    <https://github.com/spectrochempy/>

* Releases archived on zenodo
    <https://doi.org/10.5281/zenodo.3823841>

* User friendly (?)

* Online documentation, examples, tutorials...

* No need of extended python knowledge

* Usable with Notebooks (Jupyter)

* ‘template notebooks’ for standard operations

* No need of local python installation (Google Colab)

<figure><img src="image_138.png" /></figure>
<figure><img src="image_139.png" /></figure>

Finding and running some of the above examples using Colab/Scpy

<figure><img src="image_140.png" /></figure>
<figure><img src="image_141.png" /></figure>

# Take home messages

* **Quantification by spectroscopic methods:** not only Beer-Lambert (number of species), but also thermo/kinetic parameters !

* **Multivariate analysis:** easily available (matlab, python), facilitates exploratory analysis, mandatory for « big data »

* **Hard-Soft-MCR:** Interplay between multivariate analysis and kinetic modeling

* Kinetics helps resolving spectra / spectra help optimizing kinetics...

* Extension to Operando : simultaneous use of ALL data

* **2D IRIS:** An analysis method for simple processes...

(suggestions of other spectroscopies and processes are welcome 😊)

* **SpectroChemPy** used for data processing and analysis [www.spectrochempy.fr](http://www.spectrochempy.fr)

.. Free an Open Source: worth a try 😊
Aknowledgements

* LCS Shashikant Kadam, Philippe Bazin, Olivier Marie, Pawel Stelmachowski, Sergey Sirotin, Abdelhafid Ait Blal

* MFP Michelin Franck Vilmin, Marc Couty, Florian Dulong

* LJF / PPG Aerospace Christophe Lechevalier

* Toyota Europe: Hai P Nguyen

* Normandy region, French National Agency, CNRS, FEDER

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

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