Introduction

Continuous flow reactors (CFRs) are an emerging technology that offer several advantages over traditional batch synthesis methods, including more efficient mixing schemes, rapid heat transfer, and increased user safety [13]. CFRs are capable of producing thousands of pounds of target chemicals through scale-out of production by using multiple parallel flow reactors. Modular scale-out reduces extensive engineering challenges associated with the scaling-up of a pilot batch reaction to a larger production volume. For example, if a CFR yields 1 ton of target product per year, 100 identical, parallel systems would yield 100 tons of target product per year with no reaction adaptation required [4]. To achieve a similar increase in production using a batch reactor would require extensive engineering and adaptation to account for the extensive changes in heating and mixing profiles.

Currently, quantitative quality confirmation of chemical synthesis on flow reactors largely requires off-line validation [58]. This requires acquiring an aliquot from the reactor and performing quantitative analysis using the appropriate off-line instrument. The delay between the formation of product and the determination of product quality, negatively affects the ability to make informed process control decisions. The longer time required to make decisions can lead to a variety of problems, from the production of off-specification material to potentially unsafe reactor conditions. In addition, the continuous sampling systems required to monitor processes are often time-consuming and resource-intensive [9, 10]. High-performance liquid chromatography (HPLC), the most frequently used off-line analytical measurement technique [11], introduces further time delays and limits the number of validation samples that can be run in a given time period. Off-line spectroscopic methods, such as NIR, IR, and Raman, allow for rapid analysis of a reaction system, provide high resolution chemical information, and have seen use in the petrochemical and pharmaceutical fields as alternative validation techniques [1219].

Raman spectroscopy is an information-rich vibrational spectroscopic method. It has previously been used for in-line process monitoring in batch and flowing systems in a variety of industries [20]. Raman spectroscopy has also been used for quantitative modeling of simple chemistry in microreactor systems using peak-height ratios [8]. Though Raman spectra contain chemical and physical information that can be used for online monitoring of a continuous flow reaction, deconvolution of spectral data is not easy in complex chemical systems that contain many Raman active species. Chemometric tools, such as principal component analysis (PCA) and partial least squares (PLS) are often used to process and analyze the spectral data quickly and effectively [21, 22]. Used in tandem, these techniques allow for robust process monitoring and effective control [2325].

Once the analytics and sampling are defined, a system's performance can be tested. Design of Experiments (DoE) provides a statistically sound method of evaluating the performance of a CFR, and determining what variables can affect the chemical conversion of the system. Reactions such as the Fischer esterification [11], which is highly dependent on residence time and temperature, make ideal candidates for applying DoE principles. Process parameters such as flow, temperature, and stoichiometry in the CFR are all readily controlled using custom control hardware and software. A factorial design allows for the deconvolution of contributions each of these in-process process parameters have towards the system's critical response factor (conversion). Using the Yates algorithm, the main total effect can be determined for each process parameter [26, 27]. A full understanding of the effect each process parameter has on the conversion of the system allows for optimization and control [28].

The main goal of this investigation was to demonstrate that Raman spectroscopy can provide real-time validated quantitative monitoring of CFRs when used in tandem with multivariate modeling. In this study, the esterification of benzoic acid was investigated in a continuous flow reactor. Raman spectroscopy and DoE were used to determine the effects that flow, temperature, and stoichiometry had on the chemical conversion of the system. PLS models were used to assess the ability of Raman spectroscopy to quantitatively determine chemical conversion. The overall results demonstrate the ability of Raman spectroscopy coupled with multivariate PLS models to quantitatively predict chemical conversion in a CFR.

Experimental

The esterification (Fig. 1) of benzoic acid (1) in methanol (2) to methyl benzoate (3) was investigated in a continuous flow reactor system. Stock solutions of 1.1 M benzoic acid (Sigma-Aldrich) and 1.1 M methyl benzoate (Sigma-Aldrich) were prepared in methanol (Sigma-Aldrich). Sulfuric acid (Sigma-Aldrich) stock solutions of 0.275 M and 1.1 M were prepared in methanol. Calibration standards were prepared from these stock solutions with 20 mL of sulfuric acid and 20 mL of benzoic acid/methyl benzoate mixtures, ranging from 0 to 100 % methyl benzoate, for a total of 11 calibration standards.

Fig. 1
figure 1

Reaction schematic. Benzoic acid ( 1 ) and methanol ( 2 ) react in sulfuric acid to form methyl benzoate ( 3 )

The continuous flow reactor system (Fig. 2) consisted of three main components: an Intraflow NeSSI sampling system, continuous flow mixers, and online analytics. The Intraflow sampling system (Parker Hannifin, Cleveland, OH) contained two reagent lines which combined to a single stream at the reactor mixing plates where the esterification occurred. The Advanced-flow™ LF continuous flow reactors (Corning Inc., Corning, NY) employed heart-shaped mixers to ensure turbulent flow throughout the reactor. Five sequential mixing plates were used with parallel flow heating. The reactor terminated in a pressure controlled Intraflow product line equipped with pressure, temperature, and flow analytical instruments.

Fig. 2
figure 2

Hardware schematic. Two HPLC pumps supplied constant flow of benzoic acid and sulfuric acid solutions to NeSSI Sampling systems. Online analytics consisted of flow meter and pressure meter. Raman measurements were performed online using an immersion ball probe. Reagent streams were combined in Corning continuous flow reactor mixing plates. A pressure regulator maintained liquid phase throughout reactor. Pneumatic valve controlled via software directed flow towards product

A multichannel Raman system (Kaiser Optical Systems, Ann Arbor, MI) equipped with ball-probe immersion optics (Matrix Solutions, Seattle, WA) was used to monitor each of the reagent lines and the product line. Data from these analyzers were collected using in-house software developed in LabVIEW. The online analytics on each reagent line and the product line consisted of flow meters (FCI Incorporated, San Marcos, CA), pressure transducers (Heise, Stratford, CT), and thermocouples (Omega Engineering, Stamford, CT). Pressure in the reactor was maintained via a variable backpressure regulator to ensure the reaction occurred in the liquid phase throughout the synthesis. Reaction temperature was controlled via a Huber Tango heat exchange pump (Huber USA, Northport, NY) which supplied heat exchange fluid to channels surrounding each reactor plate. In-house software developed in LabVIEW (National Instruments Corporation, Austin, TX) was also used to control the physical reaction parameters. Residence time was controlled by the flow rate of the two HPLC pumps, (Flom Co., Ltd., Tokyo, Japan) connected to each of the reagent lines. To ensure effective flow control and minimize pulsation in the reactor, the reactor was equipped with 2.0-MPa backpressure regulators (Parker Hannifin).

Raman calibration was performed prior to initiating the esterification. Calibration was performed by injection of an aliquot of each calibration standard into the product line and measuring with the online analytics and Raman spectroscopy. Three Raman spectra of the calibration standards were collected in this fashion, each consisting of five 3-s exposures, for a total of 33 calibration spectra. Aliquots of these calibration samples were collected and diluted into methanol for off-line HPLC validation. All HPLC samples were analyzed using an Agilent 1100 Series HPLC (Agilent Technologies, Santa Clara, CA) using a reverse-phase column (Agilent C18 Column). The liquid chromatography was performed using two mobile phases: 0.1 % acetic acid in water, and acetonitrile. A gradient of 20 to 95 % acetonitrile over 5.5 min resulted in clearly defined peaks for benzoic acid and methyl benzoate. The methyl benzoate peak percentage was used to determine reaction progress.

Residence time, temperature, and catalyst concentration were investigated to determine how each affects the product conversion. A full factorial design using three factors with two levels per factor was used in conjunction with Yates algorithm to determine which factors had the largest main total effect upon product conversion. Consequently, synthesis was performed in the reactor at 60 and 150°C, at flow rates of 1 and 8 mL/min, with 0.275 and 1.1 M sulfuric acid. After the reactor reached a steady state at each of the design conditions, five aliquots were collected from the product stream for off-line HPLC measurement. These were paired using time stamps with corresponding Raman spectra acquired online during the synthesis upstream, each consisting of five 3-s acquisitions, for a total of 40 external validation samples.

Raman spectra were imported into MATLAB (Mathworks, Natick, MA) for analysis and modeling. All spectra were preprocessed using a first-order baseline removal [29, 30] to remove baseline variations between spectra. PCA was performed using mean-centered background corrected spectra to monitor the reaction progress (Eigenvector Research, Inc., Wenatchee, WA). A PLS model was constructed to enable predictions of chemical conversion through correlations between Raman signal and off-line HPLC data. The number of latent variables used was determined from the total variance captured and a priori knowledge. Model performance was determined with the root mean square error in calibration and prediction.

Results/Discussion

In order to demonstrate the ability to monitor and control reactions in a continuous flow reactor, well-understood chemistry was selected based on its suitability to spectroscopic measurement and high dependence on physical reaction parameters. A Fischer esterification was chosen based on these criteria as well as its pharmaceutical relevance. The reaction has been shown to be exothermic with a high energy of activation, requiring 1 hour of reflux to reach completion in a batch reactor. The reaction's high dependence on temperature can be exploited beyond the batch limit of reflux by controlling pressure, temperature, and reaction time in a continuous flow reactor. Both reagent and product were Raman active, with clear and separate peaks throughout the spectrum. Methyl benzoate had strong Raman emissions at 350 and 816 cm−1, and benzoic acid had strong emissions at 390 and 780 cm−1. Figure 3a demonstrates the variation throughout the spectrum as the ratio of benzoic acid (reagent) to methyl benzoate (product) is varied from 0 to 100 % at 20 % increments. Figure 3b represents a highly active region of interest in the Raman spectrum more clearly showing the changing peak heights and positions.

Fig. 3
figure 3

a Raman spectra of 0–100 % conversion standards (20 % increment). Subset shown to highlight active spectral regions. Spectra have first-order polynomial fit to maintain common baseline. b Subset of spectra shown in Fig. 3a. The product peak for methyl benzoate is at 816 cm−1 and the reactant benzoic acid peak is at 780 cm−1. Percent conversion varied from 0 % methyl benzoate and 100 % benzoic acid to 100 % methyl benzoate and 0 % benzoic acid

Initial reactor testing established upper and lower levels for the three design factors: residence time (as determined by flow rate), temperature, and catalyst concentration. Residence time ranges were dictated by reactor flow rate limitations. The reactor used for this work required total flow above 1 mL/min to maintain turbulent flow. Lower flow rates led to laminar flow, which resulted in inconsistent mixing and poor reaction progress. Flow rates higher than 8 mL/min resulted in a large pressure drop across the reactor, resulting in pressures outside of the analytics' specifications on the reagent side to maintain liquid phase throughout the reactor. The DoE temperature range was determined by experiment in the CFR. It was determined that temperatures below 60°C resulted in minimal product formation while temperatures above 150°C resulted in an unstable liquid phase, requiring pressure beyond the reactor specifications to maintain liquid phase. Catalyst concentration was determined by experiment to range between 0.125 to 1.1 M. Below that range resulted in little product formation and above 1.1 M was determined to be incompatible with the stainless steel of the sampling system, resulting in excessive corrosion. The esterification reaction was performed at each combination of low and high factor levels for a total of eight experimental conditions (Table 1). Conversion was determined through off-line HPLC.

Table 1 Results of the factorial design experiment (Yates factor determination). Conversion determined via off-line HPLC. High Yates factor indicates that combination of variables strongly correlates to change in conversion

The experimental results of the factorial design experiment results indicated a direct correlation to percent conversion (as measured via HPLC) across the three studied factors of residence time, temperature, and catalyst concentration. The Yates algorithm was applied to the data to find total factorial effects across these independent variables. Temperature and residence time were shown to have the strongest main total effect on the conversion, while catalyst concentration was shown to have the least main total effect. As a result, subsequent experiments were performed only at the high catalyst concentration, 1.1 M H2SO4, which resulted in conversions between 0.3 and 93.8 %. Eleven calibration standards from 0 % methyl benzoate to 100 % methyl benzoate were prepared off-line for the generation of a calibration curve.

Three aliquots from each calibration standard were analyzed using HPLC. Separate aliquots from each standard were injected into the product line of the reactor after the mixing plates and before the online analytics (Fig. 2) to replicate measurement conditions in live synthesis and to ensure the standards did not react. Three spectra were collected of each standard, and matched to HPLC aliquots, for a total of 33 calibration spectra. Additionally, 20 samples for external validation were collected during continuous synthesis in the reactor. Once steady state had been established in the reactor, five samples were collected for HPLC analysis and verification, each used to validate a Raman spectrum collected upstream.

The 33 calibration spectra were preprocessed by removal of baseline artifacts and mean centering. The spectrum was truncated from 300 to 850 cm−1 to include only relevant spectral information. PCA in conjunction with online Raman spectra was used to model reaction progress. Two principal components were used within the model, which accounted for 99.5 % of the variation. Figure 4a shows the same truncated region and subset of spectra as Fig. 2a (solid lines), with the loadings of principal component one overlaid (dashed line). The positive regions of the loadings spectrum correlate to the product formation, and the negative regions correlate to reagent consumption. This inverse correlation between the product and reactant peaks is demonstrated in the anti-correlated intensities of the PCA loadings plot shown in Fig. 4b. From these results, it was concluded that the real-time Raman spectral data collected in the CFR was explicitly describing the reaction progress and could be used for product conversion determination.

Fig. 4
figure 4

a Raman calibration standards (solid line) with the loadings plot from principal component 1 (dashed line) overlaid. Negative loadings indicate the regression of a peak, positive loadings indicate peak formation in this figure. b Subset of a, illustrating the active Raman spectral region containing the benzoic acid and methyl benzoate peaks. Inverse correlation of the loadings plot (dashed line) indicate the production of methyl benzoate (peak at 818 cm−1) and consumption of benzoic acid (peak at 780 cm−1)

The success of the initial modeling lead to the development of a PLS calibration model that would allow direct prediction of product conversion. The calibration model was constructed using 33 spectra (Fig. 5, white circles) and corresponding HPLC reference measurements. Two latent variables were included within the calibration model that captured 99.7 % of the variance. The calibration error of the model was determined to be 0.9 % conversion. The calibration model was applied to a series of Raman spectra collected during the reaction to determine product conversion, (Fig. 5, black triangles). The prediction error of the model was determined to be 2.1 % conversion. The strong agreement between the calibration and prediction datasets resulted in a low prediction error. This demonstrated that calibration standards can be prepared off-line and used to predict samples collected online in a CFR.

Fig. 5
figure 5

Partial least squares (PLS) regression model of percent conversion to methyl benzoate measured (via HPLC) versus predicted (via Raman). Calibration samples were prepared off-line, validation samples were collected online during the esterification reaction

Calibration samples, prepared off-line and collected in-line in the reactor, allowed for easy model construction and calibration. The in-line Raman sampling required only 30 s to determine product conversion, compared to 30 min of sample collection, prep, and run-time for HPLC, offering a ×60 time improvement over off-line determination of product conversion. Combined with a robust model, this reactor system could be used to predict and control product production in real-time. The optimization and control of product conversion through the use of online analytics and multivariate modeling also provides the potential for real-time release testing in highly regulated industries where product quality is essential.

Conclusion

Raman spectroscopy combined with multivariate modeling allowed for quantitative chemical monitoring of continuous flow reactors, and demonstrated vast improvements over current methods requiring at-line or off-line analysis. Over the course of this investigation, a custom reactor system was built utilizing online analytics and control software capable of monitoring a chemical reaction. Boundary limits were determined, and statistical methods were employed to define the independent in-process parameters with the largest effect on product conversion. The reaction system with online analytics allowed for quick optimization of a given reaction using DoE, determination of product conversion online, and monitoring and control of conversion. At the milliliter per minute scale, this process offers significant advantages over batch synthesis, with reduced solvent and energy use, quicker reaction times, and the rapid collection of data for optimization and control. The online measurement capabilities and speed of analysis of the reactor system provide the potential for real-time release testing of final product quality. Use of a CFR with integrated process analytics offers many advantages over current methods for determining product conversion and could have broad impact on many process development, optimization, and control methodologies.