A nondestructive testing method for soluble solid content in Korla fragrant pears based on electrical properties and artificial neural network

Abstract The detection of soluble solid content in Korla fragrant pear is a destructive and time‐consuming endeavor. In effort to remedy this, a nondestructive testing method based on electrical properties and artificial neural network was established in this study. Specifically, variations of electrical properties (e.g., equivalent parallel capacitance, quality factor, loss factor, equivalent parallel resistance, complex impedance, and equivalent parallel inductance) of Korla fragrant pears with accumulated temperature were tested using a workbench developed by ourselves. After that the characteristic variables of electrical properties were constructed by principal component analysis (PCA). In addition, three models were constructed to predict SSC in Korla fragrant pears based on the characteristic variables: general regression neural network (GRNN), back‐propagation neural network (BPNN), and adaptive network fuzzy inference system (ANFIS). The results indicated that the GRNN model has the best prediction effects of SSC (R 2 = 0.9743, RMSE = 0.2584), superior to that of the BPNN and ANFIS models. Results facilitate a successful, alternative application for rapid assessment of SSC of the maturation stage Korla fragrant pear.

groups of samples, and are not suitable for application in on-line prediction (Tian, Li, Wang, Fan, & Huang, 2018). Hence, nondestructive sensing of internal SSC in fruit is of great value.
Recently, many studies have reported on multiple nondestructive testing techniques. The techniques based on the electrical properties of fruits and vegetables have attracted widespread attention for the simple and fast operation of the method and its high sensitivity to fruit and vegetable quality. Ates, Ozen, and Carlak (2017) tested the dielectric properties of apples and potatoes using a vector network analyzer (VNA) under the microwave frequency and found that the freshness and degree of aging among the tested foods can be characterized by electrical parameters. Tang, Du, and Zhang (2012) explored the relations of the quality parameters of nectarines with complex impedance, equivalent parallel inductance, and equivalent parallel capacitance under the single frequency of 1MHz and constructed a feasible and effective quality index prediction model. Nyanjage, Wainwright, and Bishop (2001) studied the internal and external epicarp qualities of mangoes after thermal treatment and storage at different temperatures and found that electrical impedance can characterize physiological changes of the fruit. Cortes et al. (2015) analyzed complex impedance during the normal deterioration process of pitayas by using a self-made double-needle probe and found that electrical parameters can be applied to evaluate the aging process. These studies demonstrate that electrical parameters can reflect internal quality changes of fruits and vegetables without causing damage to the food. During the growth period of pears, abundant water and electrolytes are concentrated in the fruit. Microscopically, the spatial distribution of many charged particles may change with mutual conversion between substances and energies during the maturation process, thus influencing the macroscopic electrical characteristics of the fruits (Enrico, Aldo, Rudi, Enrico, & Marco, 2013). These results provide the foundations for developing and applying nondestructive tests of SCC in Korla fragrant pears based on electrical properties. Nelson, Trabelsi, and Kays (2006) have studied the electrical properties of section tissues and correlations of physiological indices of honeydew melon and found a strong linear correlation between electrical properties and SSC. Unfortunately, this method was not overly satisfying when applied to other fruit. No significant linear relations between SSC and electrical properties have been found in peaches (Guo & Chen, 2010), apples (Guo, Zhu, Yue, Liu, & Liu, 2011), Dangshansu pears (Guo, Fang, Dong, & Wang, 2015), Red Bartlett pears (Wang et al., 2009), or other fruits. For this reason, Guo, Shang, Wang, and Zhu (2013) deduced that the traditional linear fitting method might be inapplicable to the prediction of SSC in fruits. Moreover, the relationship between the electrical properties and SSC of Dangshansu pears (Guo, Fang, Liu, & Wang, 2015) during the maturation period was discussed through nonlinear models, such as extreme learning machines (ELM) and GRNN. The prediction results were compared with results of linear models like the multiple linear regression models and the partial least squares regression method, and it was found that the artificial neural network has the best prediction performances. Shang, Gu, and Guo (2015) tested the dielectric properties of nectarines and predicted SSC by using neural network models (e.g., support vector machine (SVM) and ELM) and linear models (partial least squares) and also found that neural network achieved better prediction accuracy. These studies all demonstrate that it is feasible to test and predict fruit quality by combining electrical properties and artificial neural networks. However, to our knowledge, no attempt has been made to predict the SSC of Korla fragrant pears during ripening based on measurement of electrical properties and artificial neural network.
The objective of the present study was to investigate the electri- (c) to constructed the prediction models of SSC in Korla fragrant pears based on the characteristic variables: general regression neural network (GRNN), back-propagation neural network (BPNN), and adaptive network fuzzy inference system (ANFIS); and (d) to determine the optimal artificial neural network model for nondestructive prediction of SSC.

| Test materials
Samples of Korla fragrant pear were collected from the conventional management pear garden in the Alaer City. This is a high-quality production area of South Xinjiang and the pear trees were twelve years of age. Because the previous study of the research group found that there is a close relationship between SSC and accumulated temperature (Lan, 2017), that during the maturation stage of Korla fragrant pears the accumulated temperature after blossom is lower than 3,000°C and SSC in the Korla fragrant pears is stable. Every day, 30 Korla fragrant pears with carpopodium of similar fruit size and color and with no damage or infection were picked in different trees and in different canopy layers to get representative samples which contain a wider range of growth conditions. These samples were processed simply to measure the electrical properties and SSC directly. Then repeat this step the next day.

| Test methods
The electrical properties of the samples were tested by the selfmade testing system in Figure 2. The LCR (inductance, capacitance, resistance) testing bridge was pre-heated for one hour before use.
Subsequently, all electrical properties were set zero to reduce error. Electrodes of the upper parallel-plate were adjusted slightly by a hand-wheel to ensure that the electrodes were in close contact with two relative points on the surface equator region of the pears. However, pears are ellipsoid in shape and air in the space between the electrodes and the pear surface is difficult to eliminate.
Moreover, air can influence test results significantly. Therefore, conducting resin was coated on the contact surface between the electrodes and pears to eliminate air space completely. Under these conditions, the pear samples were clamped between copper polar plates with a diameter of 10 mm by using 0.5 N tightening force. The polar plates were connected with external mechanical structures by insulating rods and then put in a shielding case with the pears to measure electrical properties, aiming to prevent errors caused by external electromagnetic interference. Before the measurement, wax or impurities on the surface of the pears was cleaned by distilled water and put static in a constant-temperature (25°C) box for one hour. Equivalent parallel inductance, quality factor, equivalent parallel capacitance, loss factor, equivalent parallel resistance, and complex impedance were tested under the voltage of 100 mV and the frequency of 1 kHz. Pears were also peeled and the juice was collected to test SSC with a portable refractometer (Lan et al., 2015).
Mean results were collected after multiple measurements and registered as a percentage value.

| General regression neural network
General regression neural network (GRNN) is a radial basis function (RBF) neural network with a highly parallel structure that was developed by Specht (1991). It can approach any function based on nonlinear regression. GRNN has a simple network structure, and it is closely related to training data. As a feedforward network, GRNN is constructed based on training data of a fixed structure and configuration. Different from the traditional neural network, it is easier to optimize parameters of GRNN, without allocation of initial weights.
In addition, GRNN adopts single-pass learning rather than backpropagation and avoids iterative training. Finally, GRNN converges at the optimized regression surface with the most sample quantity.
It also achieves good effect under missing and unstable data due to the high error tolerance and robustness.

| Back-propagation neural network (BPNN)
In the back-propagation neural network, signals were input through the input layer, calculated in the hidden layer and outputted from the output layer. Next, output signals were compared with the expected output value to calculate the corresponding errors. The network was corrected according to errors from back-propagation. In this process, threshold and connecting weights among different layers were adjusted by the error gradient descent method (GDM). Each forward propagation layer and the back-propagation errors were repeated periodically until the output error of the BPNN algorithm was lower than the acceptable level. This is determined by the expected error set by users or the learning period set up by the algorithm.
Nevertheless, this algorithm has a major disadvantage for the trend of trapping in a local optimal solution (Sun et al., 2019). This is because the initial threshold and weights are generally initialised in the random number within a certain range.

| Adaptive network fuzzy inference system
Adaptive network fuzzy inference system (ANFIS) is a multilayer feedforward neural network based on the Takagi-Sugeno fuzzy F I G U R E 1 Relationship between soluble solid content and accumulated temperature during sampling F I G U R E 2 Testing system of electrical properties. 1-fineturning hand-wheel; 2-force sensor; 3-shielded box; 4-testing bridge; 5-loading motor; 6-support; 7-force controller inference system. It combines the neural network learning algorithm and the fuzzy inference system. Based on the advantages of using fuzzy inference systems and artificial neural networks, ANFIS improves the validity of the algorithm in various applications and has the ability to process complicated nonlinear problems. Compared to classical neural networks, ANFIS can be inserted into a network as prior knowledge of the fuzzy rule (for example, if the water is hot, …). The output variables apply fuzzy rules into the fuzzy set of input variables. If the ANFIS model has two inputs (x and y), this results in one output f. For a one-order Sugeno fuzzy model, the two relevant fuzzy if-then rules are as follows: where A1, A2 and B1, B2 are fuzzy sets of x and y, respectively. p1, q1, r1 and p2, q2, r2 are parameters of output functions that are determined during the training process. The ANFIS model offers relatively high convergence probability and it can reach a relatively good generalization effect.

| Model assessment
To evaluate the prediction accuracy of the models, the prediction performances were compared by root-mean-square error (RMSE) and determination coefficient (R 2 ). The equation of RMSE is: where Nis the total number of data, Y E is the expected output (test) and Y P is the predicted value of the given input model. Generally speaking, a stable model shall have relatively low RMSE and high R 2 . Specifically, an R 2 in the range of 0.82-0.90 indicates good performance of the model, while an R 2 higher than 0.90 is viewed as sufficient to apply to a specific prediction goal.

| Analysis of the electrical parameters of Korla fragrant pears
The relation between electrical parameters and SSC is shown in According to the analysis of equivalent parallel resistance and complex impedance, data fluctuated dramatically and showed no significant linear relations with SSC: the R 2 values are 0.1371 and 0.115, respectively. Based on the above analysis, there is no strong linear relationship between a single electrical property and SSC. The correlation coefficient (R 2 ) is less than 0.90. This was similar to the research findings by Guo Wenchuan on peaches (Guo & Chen, 2010), apples (Guo et al., 2011), and Dangshansu pears (Guo, Shang, Zhu, & Nelson, 2015). The results demonstrate that equivalent parallel inductance, quality factor, equivalent parallel capacitance, and loss factor can represent changes in the SSC of pears to some extent.
However, it is difficult to predict the SSC of Korla fragrant pears accurately with single electrical properties due to the low determination coefficient. Therefore, it is necessary to predict the SSC of pears through multiple electrical properties and even all electrical properties at once. For this reason, the SSC of Korla fragrant pears was tested by combining PCA and artificial neural network.

| Construction of characteristic variables of electrical parameters
According to the Pearson correlation analysis of six electrical parameters in Table 1, SSC has extremely significant correlations with equivalent parallel inductance, quality factor, equivalent parallel capacitance, and loss factor and presents significant correlation with But mass information may hinder the analysis and it is difficult to characterize internal correlation with quality. Therefore, it is necessary to construct characteristic variables of the electrical properties of Korla fragrant pears to screen electrical properties and explore implicit variables that are hidden in the original variables and are difficult to measure (Guo, Shang, Zhu, & Nelson, 2015).
To determine influences of equivalent parallel inductance, quality factor, equivalent parallel capacitance, loss factor, complex impedance, and equivalent parallel resistance on the SSC of pears, factor analysis on electrical property indices was carried out after the Pearson correlation analysis. To begin with, the feasibility of the factor analysis method was verified by the Bartlett sphericity test and the significance was less than 0.05, indicating that the relevant matrix was a nonidentity matrix and applicable for factor analysis.
The results are presented in Table 2 with the KMO valued at 0.819 (it is generally required to be higher than 0.7), which indicates strong partial correlations among variables. This means the factor analysis effect is relatively good.
It can be seen from Figure 4 and Table 3 that the first two principal components explain 92.386% of the total variance of the original (1) Rule 1: If x is A1 and y is B1; then f1 = p1x + q1y + r1 (2) Rule 2: If x is A2 and y is B2; then f2 = p2x + q2y + r2 six variables and the characteristic root of these two principal components is higher than one. According to the general principle of determining the number of principal components, the number of characteristics when the characteristic value is higher than one, or the cumulative variance contribution rate is higher than 80%, is equal to the number of principal components. The previous two principal

F I G U R E 3 Relations between electrical properties and SSC
components were chosen in this study. To highlight the electrical properties of the first two principal components, experimental data taken from their loading matrices were processed using the Kaiser standardized tilting rotating method. In other words, the loads of principal components change simultaneously while the weights of the electrical properties remain constant. According to the PCA in Figure 5 and factor loading matrices in Table 4 after rotation, the principal component "1" mainly extracts equivalent parallel capacitance, quality factor, loss factor, and equivalent parallel inductance of Korla fragrant pears, which contributes 67.834% of total variance. The principal component "2" is mainly caused by equivalent parallel resistance and complex impedance in the electrical properties of pears, which contributes 24.553% of total variance. It can be seen from where t n is the standardized variable of electrical properties: t n = (xn−xn) n , x n is variable of an electrical property, x n is the mean of x n , and n is the standard deviation of x n . n can represent the influencing factors in addition to the variables of the electrical properties and it may be ignored. where Y i is the ith observed value, N is the sample size and is the generalized spreading coefficient of Gaussian function, which is called a smooth factor. In this equation,

| GRNN prediction of the SSC in Korla fragrant pears
x is the input value and x i is the ith neuron of the corresponding sample.
As a feedforward network without iterative training, GRNN is constructed by training samples with appropriate smooth factor.
The smooth factor is used as the only single parameter that GRNN has to learn. It controls the width of RBF and determines the degree of fitting of the regression function. A relatively large or small smooth factor may cause unsatisfying localization results, so it has (4) T 1 = 0.233t 1 + 0.252t 2 − 0.234t 3 − 0.249t 4 − 0.106t 5 + 0.077t 6 + n (5) T 2 = 0.086t 1 − 0.101t 2 − 0.082t 3 + 0.159t 4 + 0.61t 5 + 0.5t 6 + n values and prediction values are presented in Figure 6.

| BPNN prediction of the SSC in Korla fragrant pears
As with GRNN, BPNN analysis used two principal components that were extracted by PCA as the network input and SSC as the network output. Seventy percent experimental data were chosen randomly as the training set, and BPNN was trained for four times by crossvalidation. The number of neurons in the input and output layers was set one, and the number of neurons in the hidden layer was set at 12.
The objective mean square error was set at 0.0004, and the learning rate was 0.1. The number of iterations was 1,000. Since the initial threshold and weight of BPNN were chosen randomly within a certain range, the network was trained by 100 times and the network with the best prediction results was used to construct the BPNN.
The residual 30% of data were input into the trained BPNN model.
The linear fitting results between the measurement values and prediction value of BPNN are shown in Figure 7.

| ANFIS prediction of the SSC in Korla fragrant pears
Experimental data were divided into a training set and verification set according to the proportion of 7:3. Input data were classified by the meshing technique. Meanwhile, the initial ANFIS model, which applied two principal components as the input, was constructed

The correlation between prediction values and measurement values
is shown in Figure 8.

| Prediction results of GRNN, BPNN, and ANFIS
The SSC of the testing samples was predicted by models based on GRNN, BPNN, and ANFIS and the prediction results were compared.
The membership function gasuss2mf, which has the best prediction effect of ANFIS, was chosen as the representative. It can be seen from Figures 6 and 7 and

| CON CLUS ION
In this study, we measured the electrical properties of Korla fragrant pears at the maturation stage using a workbench developed by ourselves. The SSC presents poor linear correlation with equivalent parallel capacitance, quality factor, loss factor, equivalent parallel resistance, complex impedance, and equivalent parallel inductance. Single

CO N FLI C T O F I NTE R E S T
The authors have declared that there is no conflict of interest to this work.

E TH I C A L A PPROVA L
This study does not involve any human or animal testing.