Parameters Optimization of Adaptive Cashew Shelling Cutter Based on BP Neural Network and Genetic Algorithm

Corresponding Author: Hui Huang Agricultural Product Processing Research Institute at Chinese Academy of Tropical Agricultural Sciences, Chinese Agricultural Ministry Key Laboratory of Tropical Crop Products Processing, Zhanjiang524001, China Email: huihuangli@21cn.com Abstract: The aim of this study is to determine the optimal parameters of the adaptive cashew shelling cutter. To meet the requirements of cashew nut processing enterprises, this study takes the whole-kernel rate as the optimization objective. Let the three main parameters of the adaptive cashew shelling cutter: The distance between upper and lower cutters, the pre-pressure of the spring and the velocity of the scraper be design variables. The BP neural network and genetic algorithm is used to find out the optimal parameters based on the limited shelling test data of cashew nuts. The optimal test result and its corresponding parameters are obtained by executing the BP neural network and genetic algorithm. The optimal whole-kernel rate is 0.0533 kg min −1 and the optimal parameters are the distance between upper and lower cutters of 8.37 mm, the prepressure of the spring of 141.56 N and the velocity of the scraper of 0.57 m sec −1 . To evaluate the accuracy of the predicted value, the shelling tests under the optimal parameters are carried out 5 times. The test results show that the error between the predicted value and actual value is in the range of 2.25 to 13.7%.


Introduction
Cashew (Anacardium Occidentale L.) nut is an important tropical fruit crop that originated from South American countries, such as Bolivia, Brazil, Ecuador and Peru (Aliyu and Awopetu, 2007;Fu et al., 2015). At present, Vietnam is the world's leading exporter of cashew nuts. In 2013, the export amount of cashew nuts in Vietnam is about 25 million tons, which occupies the world's largest market share (Uchiyama et al., 2014). The cashew nut consists of the kernel and shell. The kernel of the cashew nut is of high food value with about 40-57% oil and 21% protein contents (Ogunwolu et al., 2009). The kernel is mainly used in confectioneries and as dried fruits and it is also being considered as an additional source of protein concentrates and isolates for use in human food products (Ogunwolu et al., 2009). The Cashew Nut Shell Liquid (CNSL) is a byproduct of the cashew nut production and is a natural source of saturated and unsaturated long-chain phenols (Maia et al., 2012). The constituents of CNSL can be used as antioxidants or as basis for the production of new compounds with antioxidant action (Maia et al., 2012). Therefore, the cashew nut is of considerable economic importance.
Due to the size variance of cashew nuts, the automatic cashew shelling is still a technical difficulty. At present, the shelling operation of cashew nuts is highly dependent on traditional hand-operation. It is known that topical contact with cashew nut shell liquid will induce contact dermatitis, so cashew nuts should be carefully handled by workers (Fukushima et al., 2008). The biggest disadvantage of traditional hand-operation is the low shelling speed. To improve the shelling speed, the cutter with two blades, whose profile is similar to the cashew shape, hammer-like tools and wedge-like tools are used for shelling cashew nuts (Uchiyama et al., 2014). Although the production efficiency of these methods is higher than that of traditional hand-operation, they also have some disadvantages: Cashew nuts must be previously classified by size; the shelling efficiency are insufficient; and the whole kernel recovery rate depends on workers' skill (Uchiyama et al., 2014).
To overcome the above disadvantages, this paper presents a novel adaptive cashew shelling cutter, which can be used in some cashew nut shelling machines with different feeding devices. The proposed design consists of the fixing frame, spring, tool holder, upper cutter, lower cutter and scraper. To ensure that the performance of the adaptive cashew shelling cutter meets cashew nut manufacturers' requirements well, the optimal parameters of this cutter should be determined. Due to the limitation of time and research costs, the shelling tests of cashew nuts cannot be carried out many times. It is difficult to obtain the optimal parameters of the adaptive cashew shelling cutter based on limited shelling test results. To get the optimal parameters of the adaptive cashew shelling cutter, the BP neural network and genetic algorithm is adopted. First, the BP neural network is used to predict the test results under different test conditions based on the obtained test results. Next, test conditions are used as the population individual of the genetic algorithm and predicted test results are used as the individual fitness values of the genetic algorithm. Finally, the genetic algorithm is used to find out the optimal test result and corresponding parameters.

Adaptive Cashew Shelling Cutter and Optimization Objective
Design of Adaptive Cashew Shelling Cutter Figure 1 illustrates a schematic of the adaptive cashew shelling cutter designed by our team. The adaptive cashew shelling cutter consists of the fixing frame, spring, tool holder, upper cutter, lower cutter and scraper. The scraper transports cashew nuts into the position between upper and lower cutters and then cashew nuts are broken by upper and lower cutters. The upper cutter can move up and down with the help of the spring to meet the size variance of cashew nuts. The lower cutter is fixed on the frame. The scraper can be driven by the chain transmission system. This adaptive cashew shelling cutter can be used in some cashew nut shelling machines with different feeding devices, so it has better generality.
The structure diagrams of upper and lower cutters are shown in Fig. 2. Figure 2 shows that both the upper cutter and lower cutter consist of the aided knife, main knife and cutter body. With the help of the main knife, cashew nut shells can generate cracks. The aided knife is V-shaped, so it can apply outward force on cashew nut shells. This force can accelerate the crack propagation of cashew nut shells, which is beneficial to the separation of shells from kernels. As these three parts are bolted together, the aided knife and main knife are detachable parts, which is convenient for maintaining, replacing and cleaning knifes.
In Fig. 1, d is the distance between upper and lower cutters in millimeters; F p is the pre-pressure of the spring in newtons; v is the velocity of the scraper in meters per second. The distance between upper and lower cutters i, the pre-pressure of the spring F p and the velocity of the scraper v are the three major factors that will have a significant influence on the shelling performance of the adaptive cashew shelling cutter. Thus, let the three factors be design variables. That is:

Determination of Optimization Objective
To determine an index for evaluating the performance of the adaptive cashew shelling cutter, the survey is carried out on cashew nut processing enterprises in China, Vietnam and Africa. The results of the survey indicate that the cashew shelling device should have high whole-kernel recovery and production efficiency. The whole-kernel rate of cashew nuts can reflect the two important indicators synthetically, which can be expressed by Equation 1: Where: R nc = The nut conveying rate (kg/min) E s = The shelling efficiency (%) R w = Is the whole-kernel recovery (%) The shelling efficiency is defined as Equation 2 and 3: But: Where: W k = the weight of obtained kernels W cn = the total weight of used cashew nuts W w = the weight of whole kernels W b = the weight of broken kernels The whole-kernel recovery is defined as Equation 4: The higher the whole-kernel rate is, the better the shelling performance of the adaptive cashew shelling cutter will be. Therefore, the optimization objective of the adaptive cashew shelling cutter is to maximize the whole-kernel rate of cashew nuts. That is:

BP Neural Network
The artificial neural network is a mathematical model used to deal with information. The establishment of artificial neural networks is on the basis of mimicking the workings of the brain. The artificial neuron is an information-processing unit that is fundamental to the operation of the neural network, as shown in Fig. 3 (Haykin, 2009). In Fig. 3, x 1 , x 2 , …, x n are the inputs signals; w q1 , w q2 , w qn are the respective synaptic weights of neuron q; u q is the linear combiner output due to input signals; b q is the bias, which is an external parameter of neuron q; ϕ(⋅) is the transfer function; and y q is the output signal of neuron q. The artificial neuron forms the basis for designing a large family of neural networks (Haykin, 2009).
The Back-Propagation (BP) neural network is a multilayer feed forward neural network (Lü et al., 2011). As the BP neural network has the advantages of the simple structure, powerful approximation capability, definite mathematical meaning and simple learning rule, it is one of the most popular neural network models at present. The architecture of the BP neural network consists of one input layer, one or more hidden layers and one output layer, as shown in Fig. 4 (Lü et al., 2011).
In Fig. 4, X 1 , X 2 , …, X n are the inputs of the BP neural network, Y 1 , Y 2 , …, Y m are the outputs of the BP neural network, H j is the output of the neuron j in the hidden layer, w ij is the synaptic weight connecting the neuron i in the input layer to the neuron j in the hidden layer, w jk is the synaptic weight connecting the neuron j in the hidden layer to the neuron k in the output layer, a j is the threshold of the neuron j in the hidden layer and b k is the threshold of the neuron k in the output layer. The BP neural network can learn and store a great mass of mapping relationships between inputs and outputs without establishing precise mathematical equations in advance. Each neuron of the BP network is able to simply reflect the substantive characteristics of nonlinearity. The basic self-organizing units make it possible for the BP network to rebuild continuous nonlinear functions (Lü et al., 2011). The learning induction process makes neural network grasp inherent laws of sequence and then predicts the change (Lü et al., 2011).
The basic steps of the BP neural network are as follows (Haykin, 2009;Ren et al., 2014;Wang et al., 2015): Step 1. Determine the number of input layer nodes n, hidden layer nodes l and output layer nodes m according to the characteristics of practical problems. Initialize synaptic weights w ij and w jk and thresholds a j and b k . Set the learning rate and transfer function of the artificial neuron.
Step 2. Calculate the output of the hidden layer H j according to the input variable X i , the synaptic weight w ij and the threshold a j Equation 5: Where: l = The number of the hidden layer nodes f(⋅) = The transfer function of the hidden layer Step 3. Calculate the predicted output O k according to the output of the hidden layer H j , the synaptic weight w jk and the threshold b k Equation 6: Step 4. Calculate the prediction error of the BP neural network e k according to the predicted output O k and desired output Y k Equation 7 to 9: Step 5. Update synaptic weights w ij and w jk according to the prediction error of the BP neural network e k : where, η is the learning rate: Step 6. Update thresholds a j and b k according to the prediction error of the BP neural network e k Equation 10 Step 7. Determine whether the iteration stopping criterion for the BP neural network is met. If not, return to Step 2.

Genetic Algorithm
The Genetic Algorithm (GA) works on the theory of Darvin's theory of evolution and the survival of the fittest (Rao and Savsani, 2012). GA can help to find out the optimal solution globally over a domain. GA guides the search through the solution space by using natural selection and genetic operator, such as crossover, mutation and selection. GA encodes the decision variables or input parameters of the problem into solution strings of a finite length. While traditional optimization techniques work directly with the decision variables or input parameters, genetic algorithms usually work with the coding. The basic steps of the genetic algorithm are as follows (Wang and Liu, 2012): Step 1. Encode the solution of the problem as chromosomes.
Step 3. Define the objective function and decide the relative fitness of the individuals. To a large extent, fitness determines the evolution.
Step 4. Produce the next generation of population according to fitness, crossover and mutation action.
Step 5. Judge the population's performance. If it does not satisfy a certain target, return to Step 4 and repeat the operations until it meets the criteria. In this way, the environmental adaptation individual is found in the end.

Neural Network and Genetic Algorithm
The neural network and genetic algorithm is divided into the neural network prediction and genetic algorithm optimization. The flowchart of neural network and genetic algorithm is shown in Fig. 5. Figure 5 shows that the prediction results of the BP neural network are used as the individual fitness values of the genetic algorithm and then the genetic algorithm is used to find out the globally optimal solution. The neural network and genetic algorithm can be used to find out the optimal test result and corresponding test conditions based on a limited number of tests, so this algorithm has high engineering value. This study adopts this algorithm to find out the optimal parameters of the adaptive cashew shelling cutter.

Cashew Shelling Test
In general, cashew nuts are divided into four classes: Classes A, B, C and D. In the cashew nut market, class B cashew nuts are in the majority, so class B cashew nuts are selected as test samples. Ensure that these samples are stored for a period not longer than one year. The physical characteristics of cashew nut samples are summarized in Table 1 and the physical dimensions of cashew nuts are shown in Fig. 6. The data in Table 1 are obtained from 1000 cashew nuts taken 100 from 10 sacks each.
The simplest and most economical pre-shelling treatment of cashew nuts in the world is the method of boiling cashew nuts in water for a certain period of time and drying them in air for a certain period of time (Thivavarnvongs et al., 1995a;1995b). Through massive tests, it is known that the best pre-shelling treatment process is the combination of the boiling time of 30 minutes and the drying time of 48 h. To eliminate the influence of the cashew nut quality on test results, abnormal and defective cashew nuts are removed from cashew nut samples. The typical cashew nuts that should be removed from samples are shown in Fig. 7. Tests prove that the cashew nuts shown in Fig. 7 have bad effects on test results. In test, the number of the cashew nuts shown in Fig. 7 is random variables, causing that test results have no universal significance.
Shelling tests are executed 60 times under different parameters of the adaptive cashew shelling cutter and each test consumes 200 cashew nuts. Particularly, cashew nuts are transported with the same posture into the position between upper and lower cutters. The obtained test data are listed in Table 2.

Parameters Selection of Neural Network and Genetic Algorithm
This optimization problem has three design variables and one optimization objective, so let the number of input layer nodes and output layer nodes be 3 and 1, respectively. The determination of the number of hidden layer nodes is very important. If there are only a few hidden layer nodes, the neural network will have a lower training accuracy and poorer generalization ability (Chen et al., 2014). On the contrary, if there are too many hidden layer nodes, the training time will be too long while the error is not always the least. The empirical formula used to determine the number of hidden layer nodes is given by (Chen et al., 2014;Liu et al., 2011;Jiang et al., 2011) Equation 12: where, c is a constant in the range of 1 to 10.
To get an accurate predictive value, let the constant c be 10. That is, the number of the hidden layer nodes is 12. The Levenberg-Marquardt algorithm, which is a compromise between the Newton's method and gradient descent method, is adopted to train neural networks (Haykin, 2009) and cross-validation is used to figure out when it is best to stop training. The transfer function of the neurons in the hidden layer is the hyperbolic tangent function and the transfer function of the neurons in the output layer is the logistic function. In addition, let training epochs, the expected error of network training and the learning rate be 100, 1×10 −5 and 0.1, respectively.
In this study, randomly select 50 groups of data as the training samples and the other 10 groups of data are selected as the testing samples. The Mean Square Error (MSE) criterion is used to measure the overall performance of the neural network model trained, tested and validated. The formula for MSE is given by (Haykin, 2009) where, ε is the statistical expectation operator Let the population size and genetic algebra of the genetic algorithm be 20 and 100, respectively. Let the probabilities of crossover and mutation be 0.4 and 0.2, respectively. As there are three input parameters in this optimization problem, let the chromosome length be 3.

Prediction Results and Analysis
The neural network and genetic algorithm is programmed and executed in MATLAB. To check the quality of the network training, the function POSTREG in MATLAB is used to perform a linear regression between the network outputs and the targets and to calculate the correlation coefficient (R value) between the network outputs and the targets (Long et al., 2009). The results generate high correlation coefficients for the training, testing and validation data of 0.99878, 0.92926 and 0.9205, respectively, showing that the network training has high quality. The optimal test result predicted by using the neural network and genetic algorithm is 0.0533 kg min −1 and its corresponding parameters are d = 8.37 mm, F p = 141.56N and v = 0.57 m sec −1 . To determine the error between the predicted value and actual value, the shelling tests under the optimal parameters are executed 5 times. The comparison curve of the predicted value and actual value is shown in Fig. 8. The error between the predicted value and actual value is in the range of 2.25 to 13.7%. Since the quality of each group of cashew nuts is different, the shelling test results will have some difference. The optimal parameters can provide some definite reference for selecting the parameters of the adaptive cashew shelling cutter.

Discussion
At present, the automatic cashew shelling is still a technical problem in the world. This paper presents a novel adaptive cashew shelling cutter designed by our studying team. However, how to select the parameters of this cutter is a main problem. This study adopts BP neural network and genetic algorithm to solve this problem. According to the prediction result, the optimal parameters of the adaptive cashew shelling cutter are the distance between upper and lower cutters of 8.37 mm, the pre-pressure of the spring of 141.56N and the velocity of the scraper of 0.57 m sec −1 , which are the reference values of current. As can be seen in Fig. 8, the predicted value agrees well with the actual value. The error between the predicted value and actual value is in the range of 2.25 to 13.7%, which is a allowable error range in the actual engineering. Therefore, the method using BP neural network and genetic algorithm to find out the optimal parameters of the adaptive cashew shelling cutter is reasonable. However, the optimal parameters obtained in this study are not the constant, because the quality of cashew nuts will affect the results greatly. The selection of the parameters should be on the basis of the actual quality of cashew nuts. This study provides a novel adaptive cashew shelling cutter and the approach selecting the optimal parameters of this cutter for the cashew nut processing enterprises. This research will help them improve the production efficiency of cashew nuts and reduce the time and research costs greatly. The novel feeding device is being designed, which can ensure that cashew nuts are transported with the same posture into the position between upper and lower cutters.

Conclusion
• The maximum whole-kernel rate predicted by using the neural network and genetic algorithm is 0.0533 kg min −1 and its corresponding parameters are the distance between upper and lower cutters of 8.37 mm, the pre-pressure of the spring of 141.56N and the velocity of the scraper of 0.57 m sec −1 • The error between the predicted value and actual value is in the range of 2.25 to 13.7%, showing the rationality of the method adopted in this study. • The results obtained in this study can provide some theoretical basis for improving the adaptive cashew shelling cutter • In future work, the adaptive cashew shelling cutter will be improved again to obtain the higher wholekernel rate