Electronic Supplementary Information Multivariate analysis of inline benchtop NMR data enables rapid optimization of a complex nitration in flow

Multivariate analysis is applied to inline benchtop NMR data for a complex nitration in flow. This rapid quantification enables reaction optimization using advanced techniques in flow, such as design of experiments and dynamic experimentation.


Materials and Flow Equipment
Solvents and chemicals were obtained from commercial suppliers and were used without any further purification unless otherwise noted. In the flow setup, standard PFA tubing (0.8 mm or 1.6 mm i.d.), fittings, T-pieces manufactured from PTFE or PEEK were used as connectors. The back pressure regulator was obtained from Upchurch Scientific.

High Field NMR
NMR spectra were recorded on a Bruker 300 MHz instrument. 1 H spectra were recorded at 300 MHz, respectively, with a chemical shift (δ) relative to the methyl group (3.31 ppm) of methanol-d 4 expressed in parts per million. The letters s, d, dd, td, t, and m are used to indicate singlet, doublet, doublet of doublets, triplet of doublets, multiplet respectively.

General Flow Configuration
Input solutions were made up with conc. H 2 SO 4 (95 %) in 250 mL or 500 mL volumetric flasks. 0.5 M SA: In a 250 mL volumetric flask 17.264 g of SA was diluted in conc. H 2 SO 4 (95 %). 0.6 M HNO 3 : A 500 mL volumetric flask was placed in an ice bath and filled with 400 mL conc. H 2 SO 4 (95 %), then 19.2 mL of conc. HNO 3 (15.6 M, 68%) was slowly added. After the addition the volumetric flask was removed from the ice bath and filled up to the 500 mL mark with conc. H 2 SO 4 (95 %).
The reaction was performed in a Modular MicroReaction System (MMRS) from Ehrfeld Mikrotechnik, the phase separation was accomplished with an inline phase separator (SEP-10) from Zaiput and the reaction stream was analyzed by a 43 MHz Spinsolve Ultra benchtop NMR from Magritek (Fig. S1).
The aqueous stream was diverted to a waste bottle and the organic phase stream was delivered through PFA tubing (1/16" o.d., 0.8 mm i.d.) to the benchtop NMR. A backpressure regulator (Upchurch cartridge holder (P-465) equipped with a 2.8 bar (blue, P-761) cartridge) was installed prior the glass flow cell (800 µL internal volume, 550 mm length) for the NMR for safety reasons (Fig. S5). Fractions for offline analysis were collected after the NMR in 15 mL PP tubes. The detailed flow rates and temperature settings for the experiments are listed in section 3.6.

HiTec Zang Control Unit and LabVision Software
The pumps and thermostats were controlled via RS232 interface by a control module (HiTec Zang, LabManager) and its associated software (HiTec Zang, LabVision). Temperature and pressure probes were connected to the HiTec Zang LabManager and the data were recorded in the LabVision software.
Data points were collected every 1 second. A HiText script for automatically shutting off the pumps, if the pressure exceeded 15 bar due to a blockage, was running constantly in the background of LabVision Software. The temperature ramp for the dynamic experiment was programmed and executed by a HiText script.

Residence Time Distribution (RTD) Experiments
RTD experiments were performed in the setup described in section 2. Modifications were as followed instead of the 0.5 M SA solution a 0.2 M nitrobenzene in conc. H 2 SO 4 (95 %) (pump 1) was used. Instead of the 0.6 M HNO 3 a conc. H 2 SO 4 (95 %) solution was used (pump 2). At the beginning of each experiment pump 1, pump 2, pump 3 and pump 4 were set to the investigated flow rates (Table S1), whereas only pump 2 was switched on and pump 1 switched off. The step was induced by switching on pump 1 and switching off pump 2, vice versa for the step down. Proton spectra were acquired with single scan, a 90° pulse, 3.2 s acquisition time, and 4 s repetition time. The stacked proton spectra were processed (Fourier transform, phasing and baseline correction) in Mestrenova (v11,Mestrelab Research) and the total integral was obtained by integration of peaks between 7.1 and 8.5 ppm (corresponds to 5 aromatic protons of nitrobenzene). The experimental data were fitted with the transfer function Ps (Fig.   S7). The concentration c in and c out are the Laplace-transformed concentrations at the inlet and outlet of the reactor. The time constants T 1 and T 2 and dead time T t (time delay from starting the stream of tracer until the tracer appears at the NMR) and the scaling factor K were identified using experimental data.      Entry 4 Fitted Experimental S12

Measurements of Training Set and Validation Set Solutions
Training and validation set solutions were prepared by weighing the correct amounts of SA, 3-NSA, 5-NSA and DNSA into either a 10 mL or 25 mL volumetric flask and filled up with iPrOAc to the mark (Table S2). The solutions were typically sonicated and stored in the fridge prior usage. The general measuring procedure was as followed. The Knauer Azura HPLC pump, tubing and flow cell were purged with iPrOAc prior to flushing the system with 10 mL of the training or validation solution to avoid cross contamination. Then the solution was circulated through the NMR with the corresponding flow rate of  Table. S 2 Overview of the prepared solutions for the training set (Level_1 to Level_10) and validation set (Val_1 to Val_4). Note: Level 2 was not included in 3-NSA and 5-NSA models. Level 1 was not included in the DNSA model.

SA
The PLS model consisted of 4 components and was trained with a total of 1320 observations (N) and 501 variables (K).

3-NSA
The PLS model consisted of 4 components and was trained with a total of 1320 observations (N) and 552 variables (K).

5-NSA
The PLS model consisted of 4 components and was trained with a total of 1320 observations (N) and 701 variables (K).

DNSA
The PLS model consisted of 4 components and was trained with a total of 1320 observations and 67 (N) variables (K).

SA
The OPLS model consisted of 1+4+0 components and was trained with a total of 1320 observations (N) 501 variables (K).

3-NSA
The OPLS model consisted of 1+5+0 components and was trained with a total of 1320 observations (N) 552 variables (K).

5-NSA
The OPLS model consisted of 1+6+0 components and was trained with a total of 1320 observations (N) 701 variables (K).

DNSA
The OPLS model consisted of 1+4+0 components and was trained with a total of 1320 observations (N) 67 variables (K).

3-NSA
The OPLS model consisted of 1+5+0 components and was trained with a total of 1319 observations (N) 484 variables (K).

5-NSA
The OPLS model consisted of 1+6+0 components and was trained with a total of 1319 observations (N)

DNSA
The OPLS model consisted of 1+4+0 components and was trained with a total of 1319 observations (N) 102 variables (K).

3-NSA
The OPLS model consisted of 1+5+0 components and was trained with a total of 1220 observations 484 variables (K).

5-NSA
The OPLS model consisted of 1+6+0 components and was trained with a total of 1220 observations (N)

DNSA
The OPLS model consisted of 1+4+0 components and was trained with a total of 1218 observations (N) 102 variables (K).

Model Robustness / Validation Set
The RMSE V (Root Mean Square Error of Validation) was calculated by taking the square root of the mean of the squared value of the difference between the expected value (known concentration of the validation set) and the predicted value (predicted concentration of the MVA model).
To validate the robustness of the model different flow rates (1.7 mL/min and 2.4 mL/min) and different acquisition times (3.2 s and 6.4 s) were tested on two validation solutions (Table S4). For the different acquisition times the repetition times had to be modified to 4 s and 7 s.

Statistical Approach to Remove Outliers
For the DoE experiments quartiles (Q) and interquartile ranges (IQR) were calculated from each individual data set. For the dynamic experiment the quartiles (Q) and interquartile (IQR) were calculated for each data point from the 18 previous data points. Outliers were detected and removed if the data point exceeded the lower (Q1 -1.5 IQR) or upper (Q3 + 1.5 IQR) boundary (Fig. S14).

Experimental Conditions DoE
For the three-factor full factorial DoE design the conditions in Table S5 were used. To investigate curvature effects the facial points were added.

Reaction Optimization Data Model Fitting
The data for the optimization were fitted in MODDE (version 12.1, Umetrics). The data were imported from Excel. Models were fitted for the NMR and UPLC data for SA, 3-NSA, 5-NSA and DNSA by using multiple linear regression (MLR). The histogram plot of SA in the NMR or UPLC data set did not show a "bell shaped" normal distribution, therefore the response was log transformed. Models were fit by using main, square and interaction terms.

Experimental Conditions Dynamic Experiment
Experimental conditions are given in Table S11 for the dynamic experiments. In case of the slow ramp the HiText Script was used to control thermostat 1 and in case of the fast ramp the temperature was immediately changed.
Compounds were eluted with following gradient elution: starting with 3 % B, increasing to 40 % B in