Introduction

Apple (Malus pumila Mill.) and its derivative products are the highly sought-after fruits around the world. Apple is a healthy food due to its high content of vitamins, antioxidants, minerals, and dietary fiber (Gil et al., 2022). The nutritional value of apples is influenced by the preservation methods used; therefore, proper processing needs to be performed to inhibit biological degradation (Jin et al., 2018).

To maximize the retention of the original properties of fresh produce, post-harvest processes are applied to ensure year-round availability and consumption of the products. Drying is among the earliest and most commonly used post-harvest preservation techniques to prevent putrefaction and to minimize nutrient degradation (Zhang et al., 2006). Thermal drying results in reduced water activity to levels that prevent microbial growth. It offers numerous benefits in extending the shelf life of dried products; these include simplified handling and storage, reduced packaging, and lower transportation costs (Onwude et al., 2016). In recent years, various emerging drying technologies have been commercialized to enable higher drying efficiency without compromising the quality of finished products (Fan et al., 2017; Dag et al., 2023). Hot air–assisted radio frequency drying (HARFD) is a recently developed thermal dehydration technique used in the food industry which offers the advantages of fast volumetric heating as well as high energy efficiency (Jin et al., 2024; Mahmood et al., 2023). However, unfavorable changes in the sensory and nutrient contents of foodstuffs can occur during the dehydration process. Hence, food processing industries need to explore new approaches to monitor multiple product quality indicators in real time during dehydration. This can be beneficial in improving the quality of finished products.

Traditional detection and analytical techniques (e.g., thin-layer chromatography, gas chromatography, high-performance liquid chromatography) are commonly utilized in the food sector (Ostrovský et al., 2011; Sentellas et al., 2016; Soponar et al., 2008). However, these traditional methods are normally invasive, need manual operation, and hence time-consuming.

By taking advantage of spectroscopic techniques, numerous researchers have made attempts to adapt spectroscopic techniques for use in food processing for detecting compounds, monitoring and controlling various processes, identifying adulteration, and ensuring food security. Infrared spectroscopy results from the absorption spectra of infrared radiation at molecular vibrational frequencies occurring in materials (Cortés et al., 2019). Based on the absorption wavelength of infrared radiation in food, infrared spectroscopy can be categorized into three types: (1) near-infrared (NIR) spectroscopy covers the spectral region from 780 to 2500 nm, (2) middle-infrared (MIR) with spectral region from 2.5 to 25 µm, and (3) far-infrared (FIR) with the spectral region from 25 to 1000 µm (Beć et al., 2020). NIR spectroscopy is demonstrated as an effective approach which is extensively employed for both qualitative and quantitative determination of complex samples in a variety of food areas (Grassi & Alamprese, 2023a; Porep et al., 2015; Zhou et al., 2022), owing to its rapid, non-invasive examination, robustness, and regulatory compliance.

In recent years, the NIR spectroscopic technique has been successfully adopted to monitor the moisture and bioactive compounds of various foodstuffs (Abdullah et al., 2024). Kapoor et al. (2022) successfully tested an inline portable NIR device for measuring the moisture content (MC) of apple slices. Their results indicated that the miniature NIR spectrophotometer incorporated with the partial least squares regression (PLSR) model can be applied for optimal prediction of MC during the dehydration process. Chakravartula et al. (2019) evaluated the combination of NIR spectroscopy and the PLSR model for predicting MC during the drying of bread. The PLSR model showed the highest accuracy in describing drying behavior. Carbas et al. (2020) studied an offline NIR device for examining the phytochemical compositions and of Phaseolus vulgaris L. The PLSR incorporated with the first derivative method achieved the accurate prediction for individual phenolic compounds, but this method was not successful in predicting the ferric-reducing antioxidant power assay. Liu et al. (2021) investigated a benchtop NIR spectrophotometer incorporated with a low-field nuclear magnetic resonance system for intelligent control of the dehydration process of blueberries. Experimental outcomes demonstrated that the back propagation-artificial neural network (BP-ANN) model was capable of determining the smart drying endpoint. Meenu et al. (2023) verified the application of the NIR spectrophotometer with the PLSR model to distinguish hulled and naked oats and predict their total flavonoid content. This study demonstrated that NIR spectra, along with PLSR, can be implemented as an effective tool to examine the flavonoid content of oats. Mancini et al. (2023) studied NIR spectroscopy for the non-destructive assessment of the bioactive compounds (e.g., anthocyanin, soluble solid content, phenolic acid) of strawberries. The partial least squares discriminant analysis method was successfully developed to distinguish strawberry cultivars and examine the bioactive compounds. The rapid measurement of vitamin C content (VCC) in citrus peels was investigated using NIR spectroscopy (Zhang et al., 2023). Stepwise regression combined with multiple linear regression and normalization correction were developed to determine the VCC. Experimental data showed a good correlation between predicted and measured VCCs of citrus peels.

Although NIR spectroscopy and multivariate modeling approach have already been applied in the area of food processing, no study has so far been reported using a portable NIR tool for monitoring the HARFD of apple slices. Therefore, this investigation was aimed at verifying the application of a portable NIR spectrophotometer combined with statistical modeling for rapid determination of product quality of apple slices during HARFD. The major targets of the present investigation were as follows:

  • To explore the impact of variable electrode gaps (10, 15, and 20 cm) on drying efficiency and product quality

  • To refine the NIR spectral information using the standard normal variate (SNV) pretreatment method and PCA method

  • To evaluate the performance of multivariate models for predicting MC and VCC of apple slices during HARFD

Materials and Methods

Materials and Sample Preparation

Fresh “Fuji” apples utilized in the present investigation were obtained from a local fruit store (Wuxi, Jiangsu, PRC) and then kept under the stable conditions (temperature 4 °C and relative humidity 95%) until drying experiments (maximum 2 weeks). Prior to each drying experiment, the apple was washed with water and peeled, and the seeds were eliminated and then cut into slices (length 30 mm, width 15 mm, height 10 mm).

Drying Equipment

As shown in Fig. 1, a 6-kW laboratory-scale radio frequency (RF) heater (Model: SO6B, Strayfield, Bohsari, India) coupled with a hot air system was fabricated to conduct this study. The RF heater consisted of a parallel plate-type applicator between the upper and lower flat electrode to generate electric fields oscillating at a frequency of 27.12 MHz. The intensity of RF heating is controlled by the gap between the upper and lower flat electrode within the range of 10 to 40 cm. Hot air is supplied by an electric heater with controllable air temperature ranging from ambient temperature to a maximum of 110 °C. The hot air is implanted into the RF chamber via a hot air tube and distributors under the lower electrode, and the air speed is adjustable within the range of 0.5 to 3 m/s.

Fig. 1
figure 1

Schematic diagram of hot air–assisted radio frequency drying system: 1, upper electrode; 2, lower electrode; 3, apple slices; 4, exhaust air fan; 5, electric controller of RF heater; 6, safety switches; 7, hot air tube and distributors; 8, electric heater; 9, fresh air fan; 10, electric controller of hot air system; 11, conveyor belt

Experimental Plan and Procedures

Apple slices (400 ± 0.4 g per batch) were placed on the perforated conveyor belt and positioned in the center of the lower electrode inside of the dryer. Samples were subjected to HARFD with three different electrode gaps (10, 15, and 20 cm). According to the preliminary trials, a hot air temperature of 60 °C and an air speed of 1.5 m/s were selected to achieve a faster drying rate and avoid excessive energy consumption.

During the drying process, NIR spectra were collected, and the MC and VCC were measured at 10-min intervals. Once measurements were completed for each batch, the dried apple slices were discarded, and slices from a new batch were placed inside the drying cavity for further processing. This identical process was repeated until the targeted MC of 0.08 g/g dry matter was achieved.

The simplified diagram of NIR incorporated with spectral preprocessing and multivariate modeling for smart prediction of MC and VCC of apple slices during HARFD is shown in Fig. 2, and more detailed explanations for each individual step were provided in the following sections.

Fig. 2
figure 2

Simplified diagram of NIR incorporated with spectral preprocessing, and multivariate modeling for predicting MC and VCC of apple slices during HARFD

Determination of MC

The MC (dry matter, d.m.) of apple slices was assessed according to the method introduced by Cao et al. (2020). Samples were collected at regular intervals of 10 min by gravimetric determination at 105 °C until a consistent mass was obtained. The MC of the products was computed according to the formula as follows:

$${X}_{t}=\frac{{m}_{t}-{m}_{f}}{{m}_{f}}$$
(1)

where Xt represents the MC at time t (g/g d.m.), mt represents the product weight at time t (g), and mf represents the weight of a completely dried substance (g).

Determination of VCC

The VCC was measured based upon the quantitative discoloration of 2,6-dichloro-indophenol titration method with slight alterations (Feng et al., 2022). Extraction of vitamin C was performed by using 2% oxalic acid. The VCC was expressed in micrograms per 100 g dry matter (mg/100 g d.m.).

Collection of NIR Spectrum

NIR spectra were acquired via the use of a portable Micro-NIR spectroscopy (model: PAT-U, software version: 3.2, VIAVI, Wichita, United States) with the wavelength ranges between 950 and 1650 nm. The portable NIR spectrometer was calibrated by scanning a reference spectralon and repeated every 20 min. Subsequently, apple slices were randomly selected for NIR data collection during each measurement, and all NIR spectra for apple slices were collected at room temperature. The repeats of scan and measurement time for each apple slice were 100 and 0.95 s, respectively. The spectra data were then recorded and exported as the.unsb format for further analysis.

Pretreatment of NIR Spectral Data

NIR spectral data frequently involve background information, instrumental, and environmental noises as well as baseline drift, which may impair the interpretation and predictive performances of multivariate models (Wang et al., 2023). Proper pre-processing of raw NIR spectral data is helpful in effectively eliminating those unnecessary interference factors, thus improving the accuracy of further established models (Islam, 2022). Various NIR spectral pretreated methods such as SNV, Savitzky-Golay smoothing (SGS), and multiplicative scattering correction (MSC) have been implemented in food analysis (Islam et al., 2018a; Porep et al., 2015). The SNV transformation is a widely used scattering correction method to smooth spectra by correcting scatter effects and eliminating variations in the baseline (Zou et al., 2010). Most recent publications (Hasanzadeh et al., 2022; Malvandi et al., 2022; Pissard et al., 2021) have already proven that SNV is an effective and optimal method for preprocessing NIR spectral data of apples. Thus, this preprocessing method was selected in the present investigation.

PCA Based on SNV-Pretreated NIR Spectral Data

PCA was conducted using OriginPro 2023b (Origin Lab, Northampton, MA, USA) to reduce dimensional variables, examine the possible classification, and retain useful diversity in the original data. In the present investigation, the PCA method was employed to identify and interpret the useful information from the SNV-pretreated NIR spectrum. In addition, PCA interpreted the NIR absorbance database into scores and loading vectors. Loadings of principal components (PCs) described the data features corresponding to variable (spectral wavelength) contributions and their correlations. And the scores of PCs illustrated the relative distribution of individual PCs in a multidimensional map (Khorasani et al., 2015).

Development of Multivariate Modeling and Model Evaluation

Three multivariate methods including PCR, PLSR, and BP-ANN were utilized to develop the statistical models. The PCR and PLSR models were developed via the use of Unscrambler-X software (version 10.4, Camo analytical, Bedford, USA). BP-ANN model was established using MATLAB software (version: R 2022a, Mathworks, Natick, USA). Three models were developed using NIR data from a total of 96 apple samples subjected to various drying conditions. For calibration and cross-validation, data from 75% of the samples (72 samples) were utilized, and the remaining 25% of samples (24 samples) were used for prediction.

In order to evaluate the performance and stability of three statistical models based on SNV pre-processed NIR spectrum. Hence, the metrics of the three coefficients of determination (\({R}_{C}^{2}\), calibration; \({R}_{CV}^{2}\), cross-validation; \({R}_{P}^{2}\), prediction) and three root mean square errors (RMSEC, calibration; RMSECV, cross-validation; RMSEP, prediction) were selected to assess the prediction performance of the applied prediction models. Meanwhile, the standard error of prediction (SEP) value was calculated according to the method introduced by Golic and Walsh (2006) to assess the precision of the constructed models. Generally, higher R2 values (expected to be close to 1) and lower SEP and RMSEP values (expected to be close to 0) indicate better predictive performance (Islam et al., 2018b). Additionally, the RMSE ratio (RMSEP/RMSEC) was examined following the description from Kapoor et al. (2022) and utilized to compare the robustness of developed models. A model with a value of RMSE ratio higher than 1.2 was commonly recognized as overfitted (Li et al., 2020a, b), while a value closer to 1 indicated a more robust model (Alves et al., 2012).

Statistical Analysis

Unless otherwise stated, all tests were conducted in triplicate, and the mean values were reported. Data variance analysis of data was performed using SPSS 25.0 (SPSS: Armonk, NY, USA). Differences between samples were determined for statistical significance through Duncan’s multiple-range analysis of variance (ANOVA). Statistical differences in the experimental results were considered significant at a confidence level of 0.95 (p < 0.05).

Results and Discussion

Moisture Content

The initial MC of raw apple slices was 7.33 ± 0.24 g/g (d.m.), and samples were dehydrated to the final MC of approximately 0.08 g/g (d.m.) by applying the HARFD method. The drying curves plotted from experimental MC values of HARFD under different electrode gaps are presented in Fig. 3. The longest drying time (270 min) was examined with an electrode gap of 20 cm, followed by HARFD with an electrode gap of 15 cm (240 min), HARFD under electrode gap of 10 cm (200 min). It was evident from the examination of these curves that the drying of apple slices by HARFD with a smaller electrode gap was much faster than that produced by HARFD with bigger electrode gaps. Moreover, HARFD with an electrode gap of 10 cm enabled a significant reduction in drying duration by 16.7 ~ 25.9% compared to HARFD with electrode gaps of 15 and 20 cm. This could be explained by the smaller electrode gap, which increased electric field intensity, thereby significantly accelerating heat and mass transfer efficiency during HARFD. Similar results were observed for HARFD of paddy, hazelnut, black carrot, and Amomi fructus (Ai et al., 2023; Elik, 2021; Mahmood et al., 2022; Wang et al., 2020). Meanwhile, it was also observed that the changes in MC are quite slow during the end stage for all three drying techniques.

Fig. 3
figure 3

Drying curve of apple slices dried by HARFD with different electrode gaps

Vitamin C Content

Vitamin C is recognized as a labile bioactive compound that loses activity owing to various impactors, such as MC, oxygen, processing temperature, and so forth (Uddin et al., 2001). As noted in Fig. 4, VCC values of apple slices dehydrated under different conditions changed differently. The VCC of apple slices processed under different electrode gaps decreased along with the increase in drying duration, and lower VCC values were obtained with the enlargement of the electrode gap. More specifically, the VCC values were determined from fully dried slices produced by HARFD with electrode gaps of 10, 15, and 20 cm were 12.54, 9.19, and 7.11 mg/100 g, respectively. It was evident that HARFD samples with a smaller electrode gap had significantly higher vitamin C retention (p < 0.05). This might be due to the prolonged drying duration of HARFD with bigger electrode gaps, resulting in a higher loss of VCC. This finding was consistent with previous publications from Gong et al. (2020) and Peng et al. (2019), who reported that HARFD with a smaller electrode gap resulted in a higher VCC in dehydrated carrot cubes and apple slices.

Fig. 4
figure 4

Vitamin C content of apple slices during HARFD with different electrode gaps

Raw and Pretreated NIR Spectrum Characteristics of Apple Slices

The raw NIR spectra of apple samples at three electrode gaps are displayed in Fig. 5a, b, and c. All the raw absorption curves of apple slices showed three noticeable spectra peaks, which were located at around wavelengths of 950–990, 1140–1200, and 1430–1470 nm. Similar NIR spectral curves of apple samples were disclosed by Bobelyn et al. (2010) and Zeng et al. (2024). The first and third peaks near 970 nm and 1450 nm were mainly related to the second/first overtone of O–H bond groups from water and carbohydrates (Talari et al., 2017), while the second peak near 1170 nm corresponded to the second overtone of C–H bond groups from some organic compounds (Rowe et al., 2014). Moreover, the absorption bands at 1387–1547 nm were reported to be associated with vitamin C concentration (Tjandra Nugraha et al., 2021). In addition, it was also observed in Fig. 5a, b, and c that the absorption curves of apple slices exhibited some distinct characteristics in terms of the drying duration and among each other. Apparently, fresh apples with higher MC and VCC were associated with higher peaks in NIR spectra, and the absorbance shifted towards lower values with the prolongation of the drying process. Similar conclusions were also reported by previous studies on the drying of food products using an NIR spectrophotometer (Kapoor et al., 2022; Liu et al., 2021).

Fig. 5
figure 5figure 5figure 5

Raw and SNV-pretreated NIR spectra of apple slices during HARFD with different electrode gaps

The SNV-pretreated spectra plots of samples under three electrode gaps are described in Fig. 5d, e, and f. It was found that the trends of the spectral curves were significantly transformed after SNV pretreatment. The interferences of multiplicative scattering have been largely eliminated; this finding was aligned with the conclusions from Qiu et al. (2022) and Li et al. (2020a, b). Meanwhile, it was observed that the pretreated spectrum around 1450 nm of fresh samples is somewhat isolated from the rest. This was due to the dramatic changes in the composition (such as moisture, vitamin C, phenolics) of apple samples after drying, resulting in significant differences in the spectrum of fresh samples compared to those that underwent the drying process. A similar finding was also reported by Malvandi et al. (2022).

PCA Interpretation Based on SNV-Pretreated NIR Spectral Data

PCA is able to distinguish the variances of spectral data into different groups based on their principal components (PCs). Figure 6a shows the PC1, PC2, and PC3 values obtained from PCA based on SNV-pretreated NIR spectra were 71.0%, 17.7%, and 5.4%, respectively. The accumulated variance of PC1, PC2, and PC3 accounted for 94.1% of the total variance, suggesting that the majority of the determined data were representative and interpretable. Consequently, these principal components (PCs) were used as input variables for PCR, PLSR, and BP-ANN models, with the associated MC and VCC values selected as outputs for these statistical models.

Fig. 6
figure 6

Principal components score plot (a) and loading plot of PCs (b) based on SNV-pretreated NIR spectra

As presented in the loading plots (Fig. 6b), the original variances (absorption bands) that primarily relate to the separation of apple slices are evident in the individual PCs. The loading plot of PC1 depicted a high impact of absorption bands at multiple bands near 990 nm and 1180 nm, which may correspond to the water molecules and the second/third overtones of C-H bonds from carbohydrates and organic acids (Bobasa et al., 2020). Furthermore, both PC2 and PC3 suggested the spectral absorptions near the wavelength of 1450 nm had higher loadings, which could be characterized as O–H and water absorbance stretches (Shafiee et al., 2018).

Performance of Multivariate Models

It is critical to verify whether the outcomes of prediction models exhibit appropriate accuracy compared to measured experimental data. Thus, predictive accuracy was assessed using statistical metrics of calibration, cross-validation, and prediction set of the three models (Yang et al., 2019). The accuracy metrics of PCR, PLSR, and BP-ANN models for predicting MC and VCC of apple slices are listed in Table 1. PCR model showed a good accuracy of MC and VCC prediction of apple samples with RMSEP of 0.534, 2.151; \({R}_{P}^{2}\) of 0.925, 0.919; and SEP of 0.542, 2.195, respectively. These results were verified by an acceptable linear fit between the measured and predicted MC and VCC of apple samples during HARFD (Fig. 7). Meanwhile, the PLSR model for predicting MC and VCC of samples had RMSEP of 0.486, 2.015; \({R}_{P}^{2}\) of 0.938, 0.928; and SEP of 0.496, 2.056. And the scatter plots of measured and predicted MC and VCC developed by the PLSR model are presented in Fig. 8a and b. These results also confirmed that PLSR had a good model-fitting result. Similar to this finding, Carbas et al. (2020) stated that PLSR method was successfully developed for estimating antioxidant activity through the DPPH (R2 = 0.95) and ABTS (R2 = 0.89) assays.

Table 1 Statistical performances of calibration, cross-validation, and prediction obtained by PCR, PLSR, and BP-ANN models based on SNV-pretreated NIR spectra
Fig. 7
figure 7

Measured and predicted moisture content (a) and vitamin C content (b) of HARFD produced apple slices by PCR model

Fig. 8
figure 8

Measured and predicted moisture content (a) and vitamin C content (b) of HARFD produced apple slices by PLSR model

BP-ANN model is a promising intelligent machine learning method with a multi-layer feedforward network to mimic the non-linear mapping between outputs and inputs (Liu et al., 2015); this method can handle the complicated linear and non-linear relationship between spectral information and correlated physicochemical components (Niu et al., 2012). The RMSEP, \({R}_{P}^{2}\), and SEP of the BP-ANN model for predicting MC were 0.331, 0.976, and 0.323, while the values of RMSEP, \({R}_{P}^{2}\), and SEP for VCC prediction were 0.605, 0.933, and 0.619. Meanwhile, an excellent fitting was observed from the scatter plots of measured and predicted MC and VCC of apple slices in Fig. 9a and b. Compared with PCR and PLSR models, the predictive performance of the BP-ANN model for predicting MC was significantly optimized with increasing \({R}_{P}^{2}\) from 0.925 ~ 0.938 to 0.976 and decreasing RMSEP from 0.486 ~ 0.534 to 0.331. The predictive accuracy of the BP-ANN model for predicting VCC was also greatly enhanced by increasing the \({R}_{P}^{2}\) from 0.919 ~ 0.928 to 0.933 and decreasing RMSEP value from 2.015 ~ 2.151 to 0.605, a significant reduction of 70.0% ~ 71.9% compared to those of PCR and PLSR models. This might be because both PCR and PLSR are standard linear regression models, and inadequate prediction performance might occur when processing non-linearity data (Tian et al., 2019). This result was also aligned with the previous findings (Jiang et al., 2023; Qiu et al., 2022; Sun et al., 2019, 2022; Zang et al., 2023), which reported that the BP-ANN model had the highest \({R}_{P}^{2}\) and lowest RMSEP for predicting MC, antioxidant activity, shrinkage, chemical components, and textural parameters of food products using NIR spectroscopy.

Fig. 9
figure 9

Measured and predicted moisture content (a) and vitamin C content (b) of HARFD produced apple slices by BP-ANN model

The RMSE ratio is another key statistical metric that can be used to assess the predictive accuracy of the applied models. Table 1 also illustrates the RMSEP/RMSEC ratio of PCR, PLSR, and BP-ANN models for predicting MC of apple samples which were 0.971, 0.955, and 1.038, respectively. And the BP-ANN model for forecasting VCC of apple slices presented the highest RMSE ratio of 0.915, followed by PCR (0.897) and PLSR model (0.872). All the applied models have values of RMSE ratio lower than 1.2, indicating acceptable robustness. Moreover, the robustness of models for MC prediction showed the order as PCR > BP-ANN > PLSR. And the robustness of models for VCC prediction followed the order BP-ANN > PCR > PLSR.

With regard to the abovementioned performances, the model fitting results demonstrated that the BP-ANN model achieved the highest prediction accuracies for MC (lowest RMSEP = 0.331, lowest SEP = 0.323, higher RMSE ratio = 1.038 and highest \({R}_{P}^{2}\)=0.976) and VCC (lowest RMSEP = 0.605, lowest SEP = 0.619, highest RMSE ratio = 0.915, and highest \({R}_{P}^{2}\)=0.933) of apple slices during HARFD based on NIR spectrum data. Overall, BP-ANN modeling based on the rapid real-time NIR spectroscopic application is recommended for predicting MC and VCC of apple slices under different HARFD conditions.

Conclusion

A portable NIR spectrophotometer was employed for real-time rapid and non-destructive determination of critical quality attributes during HARFD of apple slices. Experimental results revealed that the MC and VCC of apple slices during HARFD could be predicted based on SNV-pretreated NIR spectrum data combined with optimized statistical modeling. Compared to PCR and PLSR models, the BP-ANN model displayed better prediction accuracy. The experimental results proved that the MC and VCC of apple slices during HARFD can be determined using portable NIR spectroscopy incorporated with statistical models. Hence, this approach can be further deployed for the rapid and accurate prediction of MC and bioactive compounds during HARFD of other food products. Future studies will be focused on investigating various selection methods to identify specific wavelengths for the instant quantification of other quality indicators, such as texture, total phenolic content, and color of HARFD of apple slices.