Early Detection of Freeze Damage in Navelate Oranges with Electrochemical Impedance Spectroscopy

The early detection of freeze damage in Navelate oranges (Citrus sinensis L. Osbeck) was studied using electrochemical impedance spectroscopy (EIS), which is associated with a specific double-needle sensor. The objective was to identify this problem early in order to help to determine when a freeze phenomenon occurs. Thus, we selected a set of Navelate oranges without external defects, belonging to the same batch. Next, an intense cold process was simulated to analyze the oranges before and after freezing. The results of the spectroscopy analysis revealed different signals for oranges depending on whether they had experienced freezing or not. Principal Component Analysis (PCA) and Partial Least Squares-Discriminant Analysis (PLS-DA) of the obtained data demonstrated that it is possible to discriminate the samples, explaining 88.5% of the total variability (PCA) and being able to design a mathematical model with a prediction sensitivity of 80% (PLS-DA). Additionally, a designed artificial neural network (ANN) prediction model managed to correctly classify 100% of the studied samples. Therefore, EIS together with ANN-based data treatment is proposed as a viable alternative to the traditional techniques for the early detection of freeze damage in oranges.


Introduction
Citrus fruits are one of the most commercialized fruits around the world, with an overall production of more than 124 million tons in 2016, of which almost 67 million correspond to orange production. Spain, with a total production of 6.88 million tons and 3.64 million tons of oranges, is the fifth-largest producing country worldwide [1]. In the current framework regarding the cultivation and commercialization of citrus fruits, the problem of freeze damage to the fruit in the face of intense cold phenomena, either in the countryside when the fruit is still on the tree or due to inadequate refrigerated storage, results in the loss of quality and potential commercialization [2,3]. This problem is potentially more likely to occur in late orange varieties, such as the chosen Navelate variety, which remain on the trees during the entire winter season.
Meteorologically, it is understood that frost occurs when the environment temperature measured under cover drops below 0 • C. However, from an agricultural point of view, frost occurs when the air temperature drops to that point and lasts long enough to damage tissues of plants and fruit due to the formation of ice crystals [4]. The electronic measuring system was developed by the Group of Electronic Development and Printed Sensors (GED+PS) of the Interuniversity Research Institute for Molecular Recognition and Technological Development (IDM) at the Universitat Politècnica de València (UPV), and it has been described in detail in a previous paper [32]. Essentially, it consists of a device and a software application (interactive graphical interface) that run on a PC. The software application sends the parameters established by the user (e.g., signal amplitude, frequency range, etc.) to the equipment. The device generates electrical signals with a maximum voltage of 500 mV in a frequency range of 1 Hz to 1 MHz over the samples. Then the electronic equipment carries out the measurement of the current and sends the data to the PC. For each analyzed frequency, the system calculates 256 points corresponding to the temporary evolution of the signal in a sinusoidal form, which is immediately drawn and shown on the computer screen. In the designed frequency range, up to 50 different frequencies per assay are analyzed. Finally, the PC calculates the impedance module and phase by means of the discrete Fourier transform (DFT) of the measured current and voltage. The result of the measurement is stored in a file and the data obtained can be plotted in two graphs-the module and the phase plot-where the values of the impedance module and phase, respectively, are plotted versus the frequency.
The device and the computer (Figure 1) are connected through an RS-232 port. The device includes a digital block, a 10-bit digital-analogue converter (DAC), two 8-bit analogue-digital converters (ADCs), and several analogue signal adaption circuits. The digital block includes two logic complex programmable devices (CPLD, Altera EPM7160SLC84, San Jose, CA, USA) and three 2-kB static RAM memories. The first CPLD and one of the RAM memories are in charge of data reception from the PC and of signal generation. An internal universal asynchronous receiver-transmitter (UART) interface lets the CPLD receive and store data in the external RAM. When all the data corresponding to the signal are received, the CPLD outputs them to the DAC converter at a rate that fulfills the signal frequency requirements. The CPLD keeps on repeating the stored pattern until it receives an order to stop from the PC. The DAC output signal is adjusted in voltage, amplified in current, and applied to the electrode. At the same time, a second CPLD samples the signals corresponding to the voltage and current in the electrode. Samples are then stored in the above-mentioned static RAM memories. After sampling a complete cycle of the signal, data are sent to and stored on the PC. Additionally, signal adaption blocks are implemented with wide-bandwidth operational amplifiers. An auto-balancing bridge configuration was used to reduce the effects of high frequencies in the measurement. CPLDs work at a frequency of 25 MHz, thus the maximum frequency for the signal generation and sampling is 25,000,000 points per second. Hence, sinusoidal signals of 1 MHZ are implemented at 25 points per cycle [32]. Technological Development (IDM) at the Universitat Politècnica de València (UPV), and it has been described in detail in a previous paper [32]. Essentially, it consists of a device and a software application (interactive graphical interface) that run on a PC. The software application sends the parameters established by the user (e.g., signal amplitude, frequency range, etc.) to the equipment. The device generates electrical signals with a maximum voltage of 500 mV in a frequency range of 1 Hz to 1 MHz over the samples. Then the electronic equipment carries out the measurement of the current and sends the data to the PC. For each analyzed frequency, the system calculates 256 points corresponding to the temporary evolution of the signal in a sinusoidal form, which is immediately drawn and shown on the computer screen. In the designed frequency range, up to 50 different frequencies per assay are analyzed. Finally, the PC calculates the impedance module and phase by means of the discrete Fourier transform (DFT) of the measured current and voltage. The result of the measurement is stored in a file and the data obtained can be plotted in two graphs-the module and the phase plot-where the values of the impedance module and phase, respectively, are plotted versus the frequency. The device and the computer ( Figure 1) are connected through an RS-232 port. The device includes a digital block, a 10-bit digital-analogue converter (DAC), two 8-bit analogue-digital converters (ADCs), and several analogue signal adaption circuits. The digital block includes two logic complex programmable devices (CPLD, Altera EPM7160SLC84, San Jose, CA, USA) and three 2-kB static RAM memories. The first CPLD and one of the RAM memories are in charge of data reception from the PC and of signal generation. An internal universal asynchronous receiver-transmitter (UART) interface lets the CPLD receive and store data in the external RAM. When all the data corresponding to the signal are received, the CPLD outputs them to the DAC converter at a rate that fulfills the signal frequency requirements. The CPLD keeps on repeating the stored pattern until it receives an order to stop from the PC. The DAC output signal is adjusted in voltage, amplified in current, and applied to the electrode. At the same time, a second CPLD samples the signals corresponding to the voltage and current in the electrode. Samples are then stored in the above-mentioned static RAM memories. After sampling a complete cycle of the signal, data are sent to and stored on the PC. Additionally, signal adaption blocks are implemented with wide-bandwidth operational amplifiers. An auto-balancing bridge configuration was used to reduce the effects of high frequencies in the measurement. CPLDs work at a frequency of 25 MHz, thus the maximum frequency for the signal generation and sampling is 25,000,000 points per second. Hence, sinusoidal signals of 1 MHZ are implemented at 25 points per cycle [32].  EIS measurements can be carried out with two, three, or four electrodes in different configurations. In our case, the measurements were made with two electrodes. In order to detect changes in the internal structure of the samples due to the effects produced by freezing, the GED+PS developed a double-electrode sensor (DE). This sensor consists of two parallel stainless steel needles, an epoxy resin frame as a support, from which the electric cable and the connector exit. The electrodes are 1 mm in diameter, 15 mm long, and 10 mm apart to create a stable electric field. One of the electrodes acts as working electrode and the other as counter electrode ( Figure 2). The distance between and the length of the electrodes were designed according to the nature of the samples in order to avoid saturated responses and to obtain a good signal-to-noise ratio. EIS measurements can be carried out with two, three, or four electrodes in different configurations. In our case, the measurements were made with two electrodes. In order to detect changes in the internal structure of the samples due to the effects produced by freezing, the GED+PS developed a double-electrode sensor (DE). This sensor consists of two parallel stainless steel needles, an epoxy resin frame as a support, from which the electric cable and the connector exit. The electrodes are 1 mm in diameter, 15 mm long, and 10 mm apart to create a stable electric field. One of the electrodes acts as working electrode and the other as counter electrode ( Figure 2). The distance between and the length of the electrodes were designed according to the nature of the samples in order to avoid saturated responses and to obtain a good signal-to-noise ratio.

Laboratory Assays
Navelate oranges were purchased from a local market. First, the fruits to be tested were selected by choosing those with similar characteristics, such as belonging to the same variety, origin, and batch; being of similar caliber and ripeness; and absence of injuries. Of these, a set of ten similar fruits was selected and immediately washed, dried, and stored in a laboratory refrigerator (AQUALYTIC TC-135 S, AQUALYTIC® , Drotmund, Germany) at 13.6 °C until the assays were carried out.
The laboratory procedure to analyze the samples was rigorously defined before the assays began so that any researcher could replicate the process employed throughout the study. First, the samples were placed on a laboratory table in order to reach room temperature. Then the oranges and the sensor were both cleaned with distilled water and dried with a tissue. Once they were clean, the EIS measurements were conducted. Overall, 27 measurements per sample were carried out in the following way: (a) three measurements per orange inserting the sensor into the skin, taking into account the effect of the peel on the EIS signal; (b) three measurements after having previously removed the skin, to measure EIS signals in only one segment of the orange; and (c) three final measurements between two segments, to consider the effect of the segment membrane. Three iterations of each assay were performed. The EIS measurements were carried out by completely inserting the sensor needles into the fruit and always maintaining the electrodes perpendicular to the fruit surface. All measurements were made at room temperature. Moreover, the sensor was removed, cleaned, dried, and reinserted into the sample between each measurement.
Once the assays were completed, the oranges were placed into a freezer (LIEBHERR Model GGU 1500 Premium, Liebherr-International Deutschland GmbH, Biberach an der Riß, Germany) long enough to assure freezing. For the selected samples, it was enough to keep them at −9 °C for 6 hours to reach temperatures below their freezing threshold. After this, the oranges were stored at room temperature to thaw. When room temperature was reached, the EIS measurement procedure, that is, 27 measurements per sample and the corresponding sensor cleaning processes, was repeated. Thus, all the necessary information for the 10 oranges assayed was obtained before and after undergoing the freezing process.

Multivariate Analyses
The objective of the multivariate analysis tools is to establish a statistical prediction model by correlating impedance values obtained by the electronic measurement system and the physical parameters of the samples. First, aPCA analysis was carried out in order to see if the nature of the impedance data of the orange samples that underwent the freezing process differed from that of the rest of the samples. That is, the presence of spontaneous groupings between the measurements was analyzed. Basically, the PCA projects all the multidimensional variability of the samples in a new

Laboratory Assays
Navelate oranges were purchased from a local market. First, the fruits to be tested were selected by choosing those with similar characteristics, such as belonging to the same variety, origin, and batch; being of similar caliber and ripeness; and absence of injuries. Of these, a set of ten similar fruits was selected and immediately washed, dried, and stored in a laboratory refrigerator (AQUALYTIC TC-135 S, AQUALYTIC®, Drotmund, Germany) at 13.6 • C until the assays were carried out.
The laboratory procedure to analyze the samples was rigorously defined before the assays began so that any researcher could replicate the process employed throughout the study. First, the samples were placed on a laboratory table in order to reach room temperature. Then the oranges and the sensor were both cleaned with distilled water and dried with a tissue. Once they were clean, the EIS measurements were conducted. Overall, 27 measurements per sample were carried out in the following way: (a) three measurements per orange inserting the sensor into the skin, taking into account the effect of the peel on the EIS signal; (b) three measurements after having previously removed the skin, to measure EIS signals in only one segment of the orange; and (c) three final measurements between two segments, to consider the effect of the segment membrane. Three iterations of each assay were performed. The EIS measurements were carried out by completely inserting the sensor needles into the fruit and always maintaining the electrodes perpendicular to the fruit surface. All measurements were made at room temperature. Moreover, the sensor was removed, cleaned, dried, and reinserted into the sample between each measurement.
Once the assays were completed, the oranges were placed into a freezer (LIEBHERR Model GGU 1500 Premium, Liebherr-International Deutschland GmbH, Biberach an der Riß, Germany) long enough to assure freezing. For the selected samples, it was enough to keep them at −9 • C for 6 h to reach temperatures below their freezing threshold. After this, the oranges were stored at room temperature to thaw. When room temperature was reached, the EIS measurement procedure, that is, 27 measurements per sample and the corresponding sensor cleaning processes, was repeated. Thus, all the necessary information for the 10 oranges assayed was obtained before and after undergoing the freezing process.

Multivariate Analyses
The objective of the multivariate analysis tools is to establish a statistical prediction model by correlating impedance values obtained by the electronic measurement system and the physical parameters of the samples. First, aPCA analysis was carried out in order to see if the nature of the impedance data of the orange samples that underwent the freezing process differed from that of the rest of the samples. That is, the presence of spontaneous groupings between the measurements was analyzed. Basically, the PCA projects all the multidimensional variability of the samples in a new frame of coordinates composed of two orthogonal directions, maximizing the variance of the input data. PCA also allows the identification of unusual variations within the model, which may indicate the presence of outliers or potential erroneous measurements.
Secondly, a PLS-DA was carried out. The purpose of PLS-DA is to detect significant differences between groups of objects with respect to a set of variables. In fact, it can be considered as a regression analysis with a categorical dependent variable, which can be stated as the label of the group, and a number of continuous independent variables, determining to which groups the samples belong. Therefore, asPCA, it is a classification method. PLS-DA analysis is used to conduct a mathematical description of samples by their distribution in groups and to classify new samples into the previously established groups [34,35].
In this work, both PCA and PLS-DA studies were carried out using amplitude and phase data of 50 impedance measures per assay, logarithmically distributed in the range of 1 Hz to 1 MHz. Regarding the applied pre-processing methods, data were previously autoscaled by means of standardization and mean centering, and a Venetian blinds algorithm was used for the cross-validation.

ANN Modeling
In order to carry out a more precise, flexible, and adaptive prediction model than those traditionally conducted by PLS [35,36], an ANN model was developed. To do so, the software Alyuda Neurointelligence 2.2 © (Alyuda Research Inc., Cupertino, CA, USA) was used. Several preliminary trials allowed us to determine the type and structure of the ANN to be used. Once the type and structure of the ANN were defined, more in-depth work with the software helped us to determine the specific architecture (i.e., number of layers and neurons in each layer), the kinds of algorithms to work with in the layers, and the kinds of functions to be applied in the neurons.
Data were randomly divided into three sets in order to conduct training (70% of the data), validation (15%), and test (15%) phases. Thus, the training phase allowed the creation of the appropriate ANN model, and the validation and test phases permitted the evaluation of the model by using both previously used data and independent data. As the goal was to conduct a classification ANN, the accuracy of the model was expressed by the correct classification rate (CCR%) and the confusion matrix, clearly indicating the quality of the model by showing the number of elements correctly and incorrectly classified. Finally, the proportional structure of the selected architecture, the use of cross-validation, and the early stopping when training allowed us to avoid overfitting [37].

Electrochemical Impedance Spectroscopy Results
A preliminary configuration of the software allowed us to obtain up to 100 data analyses per assay, that is, 50 analyses of module data and 50 analyses of phase data, which were appropriately saved in a data file for further treatment and graphically represented as shown in Figure 3. The results of the preliminary comparison of EIS data among the assays conducted (a) with the skin (b) without the skin, and (c) without the skin and between two segments showed that we clearly achieved better results in the case of working without the skin and between two segments. Consequently, this section will only refer to the obtained results, discrimination, and modeling for these specific data.
Raw data from these EIS measurements showed a clear difference between signals, depending on whether the sample had been previously frozen of not. These differences were particularly remarkable for modulus data in the range of 100 Hz-10 kHz and for phase data in the range of 100 kHz-1 MHz, clearly indicating that it was possible to identify freeze damage in Navelate oranges via EIS measurements. These differences can be explained from a biological point of view, as the cell wall is a natural insulator acting as a capacitor [38]. The freezing-thawing process destroys an important number of cellular walls that would otherwise remain complete. Thus, broken cells provoke the increase of electrolytes in the orange tissues and also increase the electrical conductivity of the samples. This results in an important decrease of the impedance modulus in the described frequency range. Additionally, this phenomenon produces a diminution of the capacitive behavior of the orange tissue that can be observed in the decrease of the absolute value of the phase in the abovementioned range ( Figure 3).

PCA
A preliminary PCAcarried out on the results obtained in the EIS tests allowed us to differentiate behaviors of the samples according to whether they had been previously frozen or not. With this PCA analysis, it was possible to explain 72.6% of the total variability of the samples with the first main component (PC1) and an additional 15.9% with the second component (PC2), reaching a total of 88.5% of the total variability being explained with only two main components ( Figure 4). Consequently, PC1 can be associated with the freezing phenomenon and PC2 with other variables affecting natural samples such as the studied Navelate oranges.

PLS-DA Analysis
A discriminant analysis based on partial least squares was developed from the PCA test, showing that there were differentiable electrical responses for the samples depending on whether

PCA
A preliminary PCAcarried out on the results obtained in the EIS tests allowed us to differentiate behaviors of the samples according to whether they had been previously frozen or not. With this PCA analysis, it was possible to explain 72.6% of the total variability of the samples with the first main component (PC1) and an additional 15.9% with the second component (PC2), reaching a total of 88.5% of the total variability being explained with only two main components ( Figure 4). Consequently, PC1 can be associated with the freezing phenomenon and PC2 with other variables affecting natural samples such as the studied Navelate oranges.

PCA
A preliminary PCAcarried out on the results obtained in the EIS tests allowed us to differentiate behaviors of the samples according to whether they had been previously frozen or not. With this PCA analysis, it was possible to explain 72.6% of the total variability of the samples with the first main component (PC1) and an additional 15.9% with the second component (PC2), reaching a total of 88.5% of the total variability being explained with only two main components ( Figure 4). Consequently, PC1 can be associated with the freezing phenomenon and PC2 with other variables affecting natural samples such as the studied Navelate oranges.

PLS-DA Analysis
A discriminant analysis based on partial least squares was developed from the PCA test, showing that there were differentiable electrical responses for the samples depending on whether

PLS-DA Analysis
A discriminant analysis based on partial least squares was developed from the PCA test, showing that there were differentiable electrical responses for the samples depending on whether they had been frozen or not. The result of this PLS-DA analysis ( Figure 5) show that it is possible to create a reliable model to determine the frost phenomenon in oranges using only six latent variables. For the samples used, it was possible to reach a sensitivity of 0.95 for calibration and cross-validation phases and of 0.80 for the final prediction phase.

ANN Results
Complementary to the preliminary PCA and PLS-DA analyses, the same data set was used to carry out a study using an ANN. To do this, different architectures and functions were considered within the nodes and, for a finer analysis, those that best suited the expected results were selected. Additionally, in order to maximize signal differences and in view of the future simplification of ANN programming selected in a microcontroller [28,39], only the first 20 data points out of 100 that the EIS device provided for each test were taken into account, corresponding to the first 20 modulus data points provided in each measurement (Figure 3).
The best ANN architecture among the studied options turned out to be a 20-9-1 structure, which means having 20 input nodes connected to a 9-node hidden layer with one final output layer. This ANN architecture gave very good results using the online back propagation function; therefore, it was the one selected to conduct the ANN modeling. Additionally, several tests using different node functions for both the hidden layer and the output node allowed us to select the hyperbolic tangent function for the hidden layer nodes and the cross-entropy function for the output layer. Once the ANN was designed, the training, validation, and test phases were carried out.
The obtained results demonstrated that the early detection of the freeze phenomenon in the studied set of oranges by the designed ANN prediction model was possible with a high level of robustness and reliability, as the model correctly classified all the analyzed samples and consequently had a CCR = 100% for all the phases: training, validation, and test. Table 1 shows the confusion matrices for the data used in each phase and for the overall data, demonstrating the high quality of the model, since the complete data were assigned diagonally in the matrix (cells in blue in Table 1) without any classification errors.

Training
Validation Test Overall Figure 5. Partial least squares discriminant analysis (PLS-DA) biplot for EIS raw data from the analyzed orange samples: green crosses represent natural (i.e., unfrozen) samples, and red triangles represent those having experienced a freeze phenomenon.

ANN Results
Complementary to the preliminary PCA and PLS-DA analyses, the same data set was used to carry out a study using an ANN. To do this, different architectures and functions were considered within the nodes and, for a finer analysis, those that best suited the expected results were selected. Additionally, in order to maximize signal differences and in view of the future simplification of ANN programming selected in a microcontroller [28,39], only the first 20 data points out of 100 that the EIS device provided for each test were taken into account, corresponding to the first 20 modulus data points provided in each measurement (Figure 3).
The best ANN architecture among the studied options turned out to be a 20-9-1 structure, which means having 20 input nodes connected to a 9-node hidden layer with one final output layer. This ANN architecture gave very good results using the online back propagation function; therefore, it was the one selected to conduct the ANN modeling. Additionally, several tests using different node functions for both the hidden layer and the output node allowed us to select the hyperbolic tangent function for the hidden layer nodes and the cross-entropy function for the output layer. Once the ANN was designed, the training, validation, and test phases were carried out.
The obtained results demonstrated that the early detection of the freeze phenomenon in the studied set of oranges by the designed ANN prediction model was possible with a high level of robustness and reliability, as the model correctly classified all the analyzed samples and consequently had a CCR = 100% for all the phases: training, validation, and test. Table 1 shows the confusion matrices for the data used in each phase and for the overall data, demonstrating the high quality of the model, since the complete data were assigned diagonally in the matrix (cells in blue in Table 1) without any classification errors.

Conclusions
The early detection of freeze damage in citrus fruits-particularly in oranges-is essential, as it helps in making decisions on what to do with the fruits when this phenomenon occurs. This process contributes to minimizing the economic consequences as well as to avoiding the introduction of fruits that may have experienced quality losses into the market.
This study proposes the use of the EIS technique by means of specific equipment and a doubleneedle sensor to generate electrical signals in the analyzed samples and then classify them using an ANN model. The results of this study show that it is possible to classify oranges depending on whether they have suffered a freeze phenomenon or not by using the described device and the analysis of the data via ANN. The designed model was robust, and it was reliable enough to classify all the samples tested correctly (CCR% = 100%).
This methodology surpasses the existing ones as it is easy, economical, immediate, portable, and can be used in the field. Therefore, this methodology is proposed as an alternative to the existing traditional methods for the early detection of freeze damage in oranges.

Conclusions
The early detection of freeze damage in citrus fruits-particularly in oranges-is esse helps in making decisions on what to do with the fruits when this phenomenon occurs. Th contributes to minimizing the economic consequences as well as to avoiding the introductio that may have experienced quality losses into the market.
This study proposes the use of the EIS technique by means of specific equipment and needle sensor to generate electrical signals in the analyzed samples and then classify them ANN model. The results of this study show that it is possible to classify oranges depe whether they have suffered a freeze phenomenon or not by using the described devic analysis of the data via ANN. The designed model was robust, and it was reliable enough all the samples tested correctly (CCR% = 100%).
This methodology surpasses the existing ones as it is easy, economical, immediate, por can be used in the field. Therefore, this methodology is proposed as an alternative to th traditional methods for the early detection of freeze damage in oranges.

Conclusions
The early detection of freeze damage in citrus fruits-particu helps in making decisions on what to do with the fruits when this contributes to minimizing the economic consequences as well as to that may have experienced quality losses into the market.
This study proposes the use of the EIS technique by means o needle sensor to generate electrical signals in the analyzed sampl ANN model. The results of this study show that it is possible whether they have suffered a freeze phenomenon or not by us analysis of the data via ANN. The designed model was robust, an all the samples tested correctly (CCR% = 100%).
This methodology surpasses the existing ones as it is easy, eco can be used in the field. Therefore, this methodology is propose traditional methods for the early detection of freeze damage in or