Nuclear Magnetic Resonance (1.40 T) and Mid Infrared (FTIR-ATR) Associated with Chemometrics as Analytical Methods for the Analysis of Methyl Ester Yield Obtained by Esterification Reaction

In this work, we compared 1.40 T nuclear magnetic resonance (NMR) to 7.05 T (60 and 300 MHz for proton, respectively), and mid-infrared with attenuated total reflectance (FTIR-ATR), associated with chemometrics methods, for the quantification of the reaction yield during esterification of fatty acids with methanol. The results showed that the integrated intensities of the ester C=O stretching region, relative to the total C=O stretching region, is useful to quantify the fatty acid methyl ester (FAME) concentration. Comparing the results obtained by the different final models: NMR (1.40 T and 7.05 T), FTIR-ATR using multivariate partial last squares regression (PLS) with orthogonal signal correction (OSC), and univariate ordinary least squares (OLS), the NMR of 1.40 T (60 MHz for proton) showed more advantages when compared to a high field spectrometer, due to the non-use of cryogenic and solvents and less laborious work for obtaining results.


Introduction
The interest for using alternative fuels has grown in the last decade. 1 The increasing demand for energy and environmental awareness are leading researchers to look for new environmentally acceptable renewable resources. In this context, the interest for biodiesel has increased a lot since it is produced using renewable resources (oils and fats from both vegetable and animal sources), it is biodegradable, and it can be directly placed on diesel engines without any mechanical modifications, due to their similar physical chemical properties. Also it does not contain sulfur compounds, it releases less particulate matter and it is less toxic. 2,3 The most common method used to produce biodiesel is the transesterification of fats and oils, using a strong base as catalyst (like NaOH, KOH or KOCH 3 ). It consists in the reaction between triacylglycerides and short chain alcohols to produce esters and glycerol. It is a reversible process and excess of alcohol is used for moving the equilibrium towards the products. However, this process needs feedstocks containing low concentrations of free fatty acids and water because they react with the basic catalysts forming soaps which hinders the purification of the biodiesel, increasing the cost of the production. 4 An alternative way is the esterification of fatty acids. 5,6 This reaction normally uses homogeneous acid catalysis with strong Brønsted acids such as H 2 SO 4 and HCl that are corrosive and should be neutralized when the process is finished. To overcome this problem, solid Lewis acids can be used allowing easy separation and continuous operation in reactors. 2 The most common method used to monitor the reaction yield during the esterification is the determination of the amount of fatty acids, usually performed using chromatographic methods or titration with alcoholic solution of KOH (method described by AOCS Cd 3a-63). 7, 8 Despite being very effective methods for this kind of analysis, they have the disadvantage of consuming large amounts of organic solvents (chromatography), which calls attention due to the environmental problems, and of being repetitive and time-consuming (titration).
Less laborious/time consuming and/or less expensive methods have been developed in the last years. Infrared spectroscopy (near and mid-infrared) associated with multivariate mathematic methods, such as partial least squares regression (PLS) and principal component analysis (PCA) has already been used. [9][10][11][12] In order to provide reliable results and to assess whether the fitted parameters are in accordance with legal requirements, it is necessary to evaluate the analytical quality of the multivariate models, which can be achieved by the determination of multivariate figures of merit (FOM). Among the suggested FOM are: linearity, accuracy, sensitivity, selectivity, and limits of detection and quantification. Some of these FOM are estimated by means of the calculation of the multivariate net analyte signal (NAS). 13 Another analytical technique is the nuclear magnetic resonance (NMR) spectroscopy. As it is a primary method of measurement, it can be used for quantification purposes and the quantitative method is known as q-NMR. 14 In contrast to the chromatographic and titration methods, that tend to be lengthy procedures, q-NMR is an easy and fast technique. If conducted properly it does not need an external reference for the absolute quantification and it does not need a standard reference of the same material. 15,16 The NMR spectrum of a solution shows all the substances containing the tuned nucleus (e.g. 1 H, 13 C, 31 P, etc.) that are dissolved in the sample, with peak area being directly proportional to the amount of nuclei absorbing into that frequency. Nowadays q-NMR is a very well established technique in many different areas including drugs, peptides, metabolomics, agrochemicals, foods, etc. 17,18 1 H NMR has already been used for identifying vegetable oils and determining specific fatty acids in mixtures and unsaturated fatty acids mixtures with triacylglycerols from the integrated areas of proton peaks. [19][20][21][22][23] It has also been used for identifying intermediates and for quantifying yields of fatty acid methyl esters (FAME) in the esterification and transesterification reactions. [24][25][26][27][28][29] Despite being a great technique for those purposes, it is not still very popular and not applied currently in industry due to the very expensive maintenance of a high-field NMR spectrometer, including cryogens, and the need of deuterated solvents for the analysis.
In this work, we used a 1.40 T NMR spectrometer (60 MHz for proton) for the quantification of the reaction yield of the esterification reaction of fatty acids to produce FAME. The results were compared to that obtained on a 7.05 T high field spectrometer (300 MHz for proton) and also with a Fourier transformed infrared (FTIR) method associated with chemometrics analysis.

Reagents and chemicals
Refined soybean oil was obtained from Cargill, Uberlândia-MG, Brazil. Sodium hydroxide (NaOH), alumina (Al 2 O 3 ), hydrochloric acid (HCl) and methanol (MeOH), all analytical grade, were obtained from Vetec, Rio de Janeiro-RJ, Brazil, and used as purchased without further purification.

Fatty acid synthesis
Fatty acid (FA) was prepared using a method previously described elsewhere. 25 Refined soybean oil was saponified with NaOH. The obtained soap was acidified with HCl leading to a two phase mixture. FA (upper phase) was separated by decantation and was washed 10 times with distilled water.

Biodiesel synthesis
Soybean oil was dried under reduced pressure and a solution of KOH in methanol was added. The molar ratio of the reactants was 6.42:57.5:1 (soybean oil:methanol:KOH). The reaction was kept under magnetic stirring under N 2 atmosphere for 2 h at room temperature. When the stirring was stopped, two phases were observed. The lower phase (glycerol and methanol) was discharged and the upper one (FAME) was washed several times with distilled water and dried under reduced pressure. FAME was then dissolved in CH 2 Cl 2 and anhydrous MgSO 4 was added. The mixture was kept under stirring for 30 min. Finally, the mixture was filtered using a basic alumina column under N 2 atmosphere and the solvent was removed under reduced pressure. The FAME content in the final product was measured by high-performance liquid chromatography (HPLC), resulting in a conversion of 98.5%. 30 Standard and real samples preparation 21 standard samples were prepared with known amounts of fatty acids and FAME (binary mixture, m/m) with concentrations in the range of 0-100% in 5% steps, at room temperature, using a semi-analytical scale (Mettler, ± 0.001 g). The acid indexes for all samples were first determined by titration (method AOCS Cd 3a-63): 0.3 g of the sample was dissolved in a mixture of toluene and isopropylic alcohol (1:1, v:v) and then titrated with an alcoholic solution of KOH (0.1 M) using phenolphthalein as indicator. The titration was performed three times for each sample. 61 real samples were prepared by the esterification of FA with methanol in a stainless steel autoclave (100 mL) equipped with a magnetic stir bar inside and a thermocouple using commercial alumina as catalyst. 31,32 In order to obtain different reaction yields, the reactions were carried out at two different temperatures (150 and 180 °C), at different reaction times (5, 10, 15, 30 and 60 min), different concentrations of catalyst (0.5 and 1.0 mass%) and different molar ratio of the fatty acids and methanol (7:1; 5:1; 3:1; methanol:FA). These samples were centrifuged to separate the catalyst and then stored in a refrigerator (−22 °C).

NMR instrumentation
1 H NMR spectra were acquired in a Varian Mercury Plus spectrometer 7.05 T (300 MHz for proton) and in an EFT Anasazi 1.40 T spectrometer (60 MHz for proton) at room temperature, using a 5 mm internal diameter probe. For the 7.05 T spectrometer, deuterated chloroform (CDCl 3 ) was used as solvent (0.05 mL of sample dissolved in 0.6 mL of solvent) and TMS (tetramethylsilane) was used as internal reference. For the 1.40 T spectrometer no solvent was necessary (volume of sample used = 0.5 mL) and TMS was also used as reference. Proton relaxation times were measured using the inversion-recovery experiment and for both spectrometers 12 scans were acquired using a preparation delay d1 = 20 s. For the quantification of biodiesel (FAME) the integrated area of the methoxy group from FAME was related to the integrated area of the olefinic hydrogens of the alkyl chain (assumed as 1.00). The 13 C satellites areas were included in the peak integrated area avoiding the need of carbon-13 decoupling. For NMR data, due to the enough resolution and for being a primary method, the ordinary least square (OLS) method (univariate linear regression) was employed using only the standard samples to build the calibration curve. The used software was Statistica 7.1 (Statsoft, USA).

FTIR-ATR (attenuated total reflectance) instrumentation
Mid infrared spectra were obtained on a Shimadzu IR Prestige-21 (FTIR-8400S) using a horizontal ATR cell at room temperature. Each FTIR-ATR spectrum was acquired with 32 scans, at 4 cm -1 nominal spectral resolution. The multivariate regression (PLS) models for FAME quantification using mid infrared spectra were carried out by the The Unscrambler X ver. 10.2 (Camo, Norway), while the statistical tests and FOM calculations were carried out using MATLAB ver. 7.0 (MathWorks, USA). A first attempt was made using the standard samples as calibration set and validation by full cross validation, afterwards, the FAME content of the real samples was estimated and the value compared to the reference method.
To verify the applicability of the calibration model, using only standard samples, to predict FAME concentration in real samples, dummy variables (homogeneity of slopes model, standard versus real samples models) were employed to test the statistical significance of the deviations from the estimated intercept (B 0 + D 0 , where B 0 is the estimated intercept for standard samples and D 0 is the deviation of this intercept for the real samples) and slope (B 1 + D 1 ), where B 1 is the estimated slope for standard samples and D 1 is the deviation of this slope for the real samples. If the dummy coefficients (D 0 and/or D 1 ) are statistically significant, the calibration model using only standard samples will predict FAME concentration in real samples with systematic errors, in a broad sense, i.e., not only bias (D 0 ) but also, for example, underestimation for low concentration samples and overestimation for high concentration samples (D 1 > 0).
Seeking to improve the prediction quality, a new PLS model was built using a 60 samples set for calibration, including all the standard samples and validated by an external set of 22 real samples. Finally, univariate model (OLS) was adjusted also for mid infrared spectra using the area under the 1742 cm -1 methyl ester C=O stretching band after linear baseline correction (two points at 1560 and 1900 cm -1 ), the area was computed in the range 1728-1850 cm -1 . The calibration curve was obtained using only the standard samples and similar to NMR. Dummy variables were utilized to verify the homogeneity of intercepts and slopes between the standard and real samples set.
The statistical significance of the bias was investigated by t-test as described in the ASTM E1655-00 33 and the root mean square error of calibration (RMSEC) and root mean square error of prediction (RMSEP), were compared by F-test. These parameters were selected to evaluate the models because the first take in account the number of latent variables in the degree of freedom calculations (conservative) and the second to the effective errors in prediction, incorporating the bias. Note that RMSEC and RMSEP in this study are related to the FA conversion into FAME and, thus, their unit are % of conversion. The final models performance comparison was made by Bartlett χ 2 test of the RMSEP.
In order to verify some critical statistical assumptions concerning the residual distribution, as recommended by ISO, 34 besides the graphical evaluation of the residuals of the calibration models, a series of statistical tests, with a significance level α = 0.05, were performed. 33, 34 The normal distribution of the residuals was verified by the Bera-Jarque's test 35,36 and non heteroscedasticity by the White's and Breusch-Pagan's (Koenker modification) tests. 37 Afterwards, the NAS and FOM: linearity, accuracy, sensitivity (SEN), selectivity (SEL), inverse of the analytical sensitivity (γ -1 ), limit of detection (LOD) and limit of quantification (LOQ) were calculated according to Ferré et al., 38 Bro and Andersen 13 and Olivieri et al. 39 For that, the instrumental noise was estimated by the calculation of the Euclidean norm of the standard deviation vector from the NAS spectra calculated for each X variable (wavelength) in regions signal-free of the target analyte. The signal-free region was determined by graphical inspection of the regression vector. For NMR, the signal free region was determined by direct inspection of the spectra (8-10 ppm); and the linearity was evaluated graphically by the inspection of the plots of residuals versus predicted, and reference values versus the predicted values. These evaluations are important to check the variance homogeneity (non heteroscedasticity) and also to verify if a high order model (i.e. quadratic or cubic) could fit better the results (non-linear response).

Results and Discussion
Aluminum oxide showed catalytic activity for esterification of fatty acids with methanol in all the reaction conditions studied. It is interesting to note the high effect of the temperature: better reactions yields were observed at 180 °C than at 150 °C under similar conditions. The higher yield (80%) was obtained at 180 °C and 60 min, using a molar ratio of 7:1 (methanol:fatty acid) and 0.5 mass% of catalyst.
It is also important to highlight that the residual distribution of all final models described in sequence attended the critical statistical assumptions, i.e., the residuals are: normally distributed (Bera-Jarque's test), not heteroscedastic (White's and Breusch-Pagan's, Koenker modification, tests) and independent (Durbin-Watson test), as well as all the models were linear.

H NMR for analyzing esterification yields
The 1 H NMR spectrum of soybean oil and biodiesel in a 7.05 T spectrometer (Figure 1a) shows peaks related to the aliphatic (2.78-2.67 ppm, multiplet; 2.30 ppm, triplet; 2.12-1.96 ppm, multiplet; 1.68-1.56 ppm, multiplet; 1.42-1.22 ppm, multiplet; 0.98 ppm triplet; and 0.92-0.84 ppm, multiplet) and olefinic protons (5.46-5.27 ppm, multiplet), all of them part of the alkyl chain that does not change with the reaction. Also a peak at 3.67 ppm can be observed due to the methoxy group. The chemical shifts of all peaks are in good agreement with those already published. 24,25 Figure 1b shows the spectrum of the same sample in a 1.40 T spectrometer. It can be seen that despite the worse resolution and overlapping peaks when comparing to the 7.05 T, as it is expected for a lower field spectrometer, the regions of interest (methoxy group at 3.67 ppm and olefinic hydrogens) can be easily integrated, since they do not overlap with any other peak. It is worth to note that acid proton of the carboxylic group can only be detected in the 1.40 T at 11.5 ppm (not shown). This peak is not observed in the 7.05 T spectrometer due to the use of the solvent.
The regression results (Table S1, Supplementary  Information) showed that for NMR, at 7.05 T as well as at 1.40 T, only the slopes (B 1 ) were statistically significant and equal to one (95% confidence limits). This is expected since NMR is a primary method. The non-significance of the dummy variables (D 0 and D 1 ) indicates that the model obtained using standard samples can be used to estimate the FAME content of the real samples. Additionally, since these standard samples were obtained with known amounts of FAME and the parameters of both the calibration curves: (i) estimated for known concentrations and; (ii) titrated FAME concentrations, were statistically equal, the time and reagent consuming reference method (titration) to build a suitable calibration curve is unnecessary. Thus it is enough to only prepare reference samples and build the calibration curve using the known concentrations ( Figure 2) This is in agreement with the green chemistry concepts.

The use of FTIR for analyzing esterification yields
The FTIR spectra of FAME (Figure 3) show significant absorptions. Comparing them, the major difference is observed at 1750-1735 cm -1 region, due to two absorptions: at 1710 cm -1 (fatty acids) and at 1740 cm -1 (methyl esters). Increasing the amount of methyl esters in the mixture, a The obtained model, using only the standard samples, was not prone to obtain models suitable to estimate the FAME concentration in real samples since, despite several data transformation, such as derivative, standard normal variate, extended multiplicative scatter correction, etc., the regression coefficients of the dummy variables were statistically significant (Table S1, Supplementary  Information). In other words, the adjusted model systematically overestimated the FAME concentration (significant bias), probably because in the real samples other compounds, with vibrational bands in similar regions of the modeled FAME, could absorb in the same spectral region and result in a "false" FAME signal.
To overcome this problem, several real randomly selected samples were added in the calibration set. In this way, the calibration set was formed by 21 standard samples plus 39 real samples. The remaining 22 real samples were used as external validation set.
Using the full spectra (4000-600 cm -1 ) the best model was obtained after linear baseline correction; however, the minimum validation error was obtained with two latent variables. For the present case, the expected, and wanted,  should be that one latent variable was just enough for a good adjustment, because the target analyte was a relatively simple compound and with a spectrum approximately unique. In fact the second latent variable was just necessary to linearize the model in the full studied range, because for larger concentrations of FAME (above 75%) the model overestimated the concentrations, with mistakes successively larger (data not shown), that means the model did not present a linear answer in the whole studied range of concentration, even though the inclusion of the second latent variable corrected this, resulting in excellent models (Table S1, Supplementary Information).
The use of only the C=O stretching region (1830-1600 cm -1 ), after offset correction, resulted in models with larger errors at low FAME concentrations, resulting in residues with heteroscedastic. Simple transformations of predict variable y (FAME concentration), such as log and square root, were not enough to overcome that problem, even though the inclusion of a second latent variable solved it (data not showed).
The orthogonal signal correction (OSC) of the full spectra, with 1 principal component, was able to linearize the model with just one latent variable resulting in a more parsimonious model ( Figure S1, Supplementary  Information).
The RMSEC and RMSEP are low and statistically equivalent (F-test), showing that the OSC transformation of new spectra, using the OSC model estimated for the calibration samples set was able to provide good predictions. 39 According to what was expected, due to the transformation properties (filtering out signal orthogonal to y), this model presented an excellent selectivity (the maximum value is 1), that is to say, about 96% of the OSC transformed signal was orthogonal to the interferents (non-overlapping) and carries the analyte only information modeled. 39-41

PLS regression coefficients interpretation
It is very current in the literature just to do a "blind" modeling without a critical interpretation of what is being modeled; without a proper interpretation of the variable relationship, looking for a desirable cause-effect relationship. Rare are the cases that the authors present and discuss the loadings or regression coefficients. 42 Citing Kjeldahl and Bro: 43 "…we looked at a number of commonly occurring mistakes in the use of chemometrics. Generally, the problems often appear to be a result of a combination of misunderstandings and noncritical push-the-button analysis. What often happens is that the software readily throws plots and diagnostics in the face of the user, and the inexperienced user is inclined to apply these rather uncritically. Using well-known, widely used diagnostics seems safer and more 'correct' than sound reasoning, although the latter is often preferable. The only way to go is to take responsibility: decide what is relevant by support of biological/chemical knowledge and sound reasoning and always keep the purpose of the modeling in focus!".
Taking this in account, besides the conventional diagnostic tools, a careful interpretation of the regression coefficients vector was carried out, similar to the approach proposed by Bro and Andersen 13 for the NAS vector, i.e., focusing in its usefulness as a toll to characterize a specific analyzing system. This is helpful to identify spectral signals attributable to the analyte and also to detect potential spurious correlations. This analysis assures the obtaining of reliable models, since the modeled signal have direct relationship with the analyte concentration.
The PLS regression coefficients obtained for the models that used the full mid infrared spectra (4000-600 cm -1 ), were very similar (Figure 4), in spite of the different pre-processing. Besides, as expected, the PLS regression coefficients were typically bipolar, being characterized by positive coefficients for typical bands of the FAME (bands centered at 1180 and 1740 cm -1 ) and negative for typical signals of the fatty acids (930, 1410 and 1710 cm -1 ). The PLS model adjusted using only the C=O stretching region, for its turn, presented PLS regression coefficients positive for the C=O stretching of the ester acyl group (1740 cm -1 ) and negative for those of the fatty acids carboxyl groups (1710 cm -1 ). These results confirm the cause-effect relationship among the different concentrations of FAME, in detriment of the fatty acids, and the respective vibrational infrared bands.

Univariate model
Nowadays, with the availability of excellent chemometric software, it is very tempting just use multivariate tools to analyze the results. However in the same situations, the simplest univariate model could be able to satisfactorily modeling the data. To verify this, the OLS method is employed to build a regression model (calibration curve), in a similar way that was done for NMR data. For this, the C=O stretching region was selected and the baseline corrected (two points: 1900 and 1560 cm -1 ) and the area under the ester C=O stretching band (1900-1728 cm -1 ) was calculated ( Figure 3). This area was used as predictor (x) variable. For the mid infrared case, the intercept was statistically significant and the slope significant and larger than one (Table  S1, Supplementary Information, and Figure 5). This is due to the fact that infrared is not a primary method. However the Vol. 28, No. 10, 2017 proportionality concentration vs. signal intensity (Lambert-Beer law) is maintained. On the other hand, similar to NMR, the categorical variables were not significant, and then it is possible to build a useful calibration model using just the standard samples with their known concentrations, showing the superiority of the simpler univariate model compared to the PLS-model.

Comparing 1 H NMR and FTIR for analyzing esterification yields
In order to compare the results obtained by the different final models: 1 H NMR of 1.40 T and 7.05 T (Titrated and Known); IR multivariate (PLS with OSC) and univariate (OLS: titrated and known) the estimated RMSEP was evaluated by Bartlett χ 2 test. The value of Bartlett statistic (Table S1, Supplementary Information) indicates that there are differences between two or more variances. The RMSEP of NMR at 7.05 T (titrated and known) models were significantly highest at p < 5%. This highest expected errors in future predictions probably is due to the additional analytical step (the sample dilution) when NMR at 7.05 T was employed, which may result in more additive errors in this method. 44 Concerning the inverse of analytical sensitivity (Table S1, Supplementary Information), that is the minimum concentration difference, statistically discernible, all models presented extremely low values, very inferior to the smallest experimental differences, the same happening for limits of detection and quantification. This demonstrates the suitability of the proposed methodology. 41

Conclusions
The direct inspection of the adjusted parameters, as is current in the literature, could result in type I errors (incorrect rejection of a true null hypothesis) and the available statistical test can avoid this. However, for the correct use of these tests, several residual assumptions must be checked, especially the ones more sensitive for each test (test robustness). On the other hand, when these assumptions are fulfilled (or a robust test is used), there is a higher confidence in the model evaluation.
The use of categorical variables (dummy variables) enabled, with statistical confidence, the conclusion that, for some models, including seemingly "worst" models  (e.g. higher, but not statistically significant, RMSEC and RMSEP) the use of time and reagent consuming titration method is unnecessary, that is in accordance with the green chemistry concepts.
It was demonstrated that 1 H NMR and IR with OLS adjustment (univariate modeling) can be used to quantify the yield of esterification reaction of fatty acids and methanol, in general with an equivalent performance that the multivariate ones. However, in OLS it is possible build the models using just the standard samples with their known FAME concentration. The results showed that the integrated intensities of the ester C=O stretching region, relative to the total C=O stretching region, is useful to quantify the FAME concentration. For NMR, the peak around 5.46 ppm (olefinic protons) related to the methoxy group of the biodiesel in 3.60 ppm can be used as a primary quantification method and that the lower field (1.40 T) is still better than higher field (7.05 T), probably due to less preparative method (without dilution). Additional advantage of using an equipment of 1.40 T is the lower cost of the analysis, no need of solvents and cryogenics, such as the case of a superconducting magnet, and it could be applied in routine analysis in industry for quality control.

Supplementary Information
Supplementary information is available free of charge at http://jbcs.sbq.org.br as PDF file.