CHEMICAL ENGINEERING TRANSACTIONS VOL. 57, 2017 A publication of The Italian Association of Chemical Engineering Online at www.aidic.it/cet Guest Editors: Sauro Pierucci, Jiří Jaromír Klemeš, Laura Piazza, Serafim Bakalis Copyright © 2017, AIDIC Servizi S.r.l. ISBN 978-88-95608- 48-8; ISSN 2283-9216 Research on Chemical Constituents of Apple Odour and Design of Its Identification System Yuchen Jiaa*, Bin Zhengb, Yan Zhanga aCollege of Information Science & Technology, Agricultural University of Hebei, Baoding 071001, China bCollege of Information Engineering, Zhengzhou 450003, China jiayuchen1981@163.com Odour is an important quality factor in the selection of the apple. How many chemical constituents are there in apple odour and how to quickly detect them is a subject in food, gardening and computer science. With the development of sensor, network communication and embedded computer technology, the electronic nose research becomes a hot topic. The chemical constituents of odours from different apple cultivars were studied in this paper. It is showed that the smell of fresh, good quality apple, the content of the chemical constituents is balanced. According to the characteristics of apple odours, it carries on exploratory research for the apple odours detection as the apple quality identification basis. It designs a portable apple odour detection system with six SnO2 gas sensors as its odour collector and TMS320VC5402 as its processor. There is other hardware such as high precision A/D converter MAX1403, a 3 * 5 keyboard, and LCD in the system. It introduces interface circuit DSP to A/D converter and keyboard with the characteristics of different varieties of apples odours. A BP neural network is applied in the pattern recognition of apple odours. It studies on the extraction method of characteristic value, the improving for BP algorithm, the BP neural network transplanting to DSP platform. This system can automatically identify apple odour and its application will provide a new method for apple quality identification. Keywords: Apple odour; Chemical constituents Gas sensor; TMS320VC5402; Electronic nose; Pattern recognition 1. Introduction Apple has always been an important fruit in the world, and it is identified as one of 11 kinds of superior agricultural products by Ministry of Agriculture in China. There are many indicators for apple division, and the basic quality requirements ,in fresh apple grading standards in China, is the full fruit, fresh and clean, no abnormal smell or taste, fully developed, with good maturity for sale or storage. It is visible that smell plays an important role in the characterization of the apple (Jiewen Zhao and Xiaobo Zou,2004). However, due to the complex composition and the sensory organs subjective effects, odor is more difficult to identify than other characters of apple, which has become focal and difficult points in research. At present, the electronic nose system, which uses odor sensor array to collect data and PC to process data, has been successfully tested and applied. This article describes a portable apple odour detection system. 2. System design scheme The system consists of the following components: odour sensor array, data acquisition module, the control module for device, information display module and the processing system with DSP core. Data processing is: odour signals that acquisition device obtained is pre-treated and then A/D conversion; after the signal feature extraction, signal is input to the processor DSP in the form of a digital matrix; the digital matrix is computed and processed by the processor according to the relevant instructions, and finally display the results on the LCD screen. Apple quality level tentatively scheduled for three levels, the good, bad and disabled. Figure 1 shows a block diagram of the system. DOI: 10.3303/CET1757340 Please cite this article as: Jia Y., Zheng B., Zhang Y., 2017, Research on chemical constituents of apple odor and design of its identification system, Chemical Engineering Transactions, 57, 2035-2040 DOI: 10.3303/CET1757340 2035 mailto:jiayuchen1981@163.com Figure 1 Block diagram of the system for apple odour research TMS320VC5402 core device is the TI Company’s mainstream products. C5000 DSP platform is particularly suitable for portable products, and VC5402 is the higher cost of fixed-point digital signal processors (Mingzhen Dai and Jian-jiang Zhou, 2015). 3. Hardware design for odor acquisition 3.1 The design of odor collection chamber Apple odour generally composes of ethylene, formic acid, acetic acid, propionic acid, butyric acid, octanoic acid and other volatile acids and esters thereof, methanol, ethanol, acetaldehyde, etc. based on food chemistry research, and therefore chooses sensors which are sensitive to these gases to make up sensor array. This design uses six thick metal tin oxide sensors (TGS800, TGS822, TGS824, TGS825, TGS2602, TGS2610) which are produced by Figaro company in Japan. Each sensor in sensor array has a different sensitivity to the smell test, TGS2602 sensitive to toluene, ethanol and TGS822 more sensitive to alcohol (China Sensor Technology Network, 2003). When the surface-sensitive layer of SnO2 gas sensor contact with air, oxygen in the air is adsorbed onto the surface of the sensitive layer by the electron affinity of the molecule and get electrons from a surface of the semiconductor to form O2-, O-, O2- and other acceptor-type surface level, in the result of surface resistance increasing; if a reducing gas such as H2, CO gas is detected as being in contact with the surface, the redox reactions is happened, and the surface resistance drops with oxidizes the trapped electrons returned to the semiconductor. It can detect the gas used of changes in surface resistance of gas sensors. The above- described process can be described in three chemical reaction formulas: (1) neOHHO n   22adsorption (2) neCOCOO  2 -n adsorption (3) Where: e ------ electron charge Figure 2 The schematic of odour capture device In addition, if there are structural dislocations in the portion those semiconductor die contacts with, it would form barrier at the point of dislocations that can hinder movement of carriers, which changes its height and the gas sensor resistance. Due to the difference of the sensitive material, the thickness of the sensitive layer, doped with rare metals, the heating and operating temperatures, ambient temperature and humidity and other Signal conversion circuit Output Valve 1 Valve 2 Temperature control Sensors DSP processing system Odor collection device Man-machine interface circuit Signal preprocessment A/D conversion circuit Device control circuit   n OneO adsorption2 2 1 2036 conditions, various sensors are sensitivity to different gas molecules.The test apparatus for odour acquisition is shown in Figure 2. Apple is placed in a semi-closed container, called resettlement room. The sensor array is placed in a reaction chamber, the volume of which is as small as possible, and temperature control equipment is installed in it. In order to save space, six sensors are arranged in line. In order not to distribute to other odour, the reaction chamber is made of stainless steel. Valve 1 and valve 2 are the intake and exhaust ports. Due to the limited space of the reaction chamber, the volume of temperature control equipment cannot be too large. By comparing the advantages and disadvantages of microcontroller-based temperature control circuit and artificial circuit for temperature control equipment, it chooses the artificial circuit. The reason is that its size is small and can set up flexible drive power, although the accuracy of artificial circuits is lower than microcontroller-based temperature control circuit. 3.2 The design of core processing circuit The resistance values of sensor are difference in the case of different gas concentrations sensor. According to this feature, the resistance value can be converted into a continuous signal by the voltage value conversion circuit, and these voltages can be approximated representation of the original odour signal. There are N sensors in the gas sensor array, so that if the sensor array is used to measure M-gas, the response of the sensor array is M random process collection according to the M gases. It can be described in the formulas: (4) As can be seen from the data output the sensor array, the data processing cannot be accomplished by simple data calculations. Before processing and analysis of the data, it must convert the artificial signal into digital signal which collects by the sensors, that is A/D conversion. Because the signals are low-frequency small- signal and the high accuracy requirements for data processing system, the precision is must be considered in the choice of A/D converter. MAX1403 produced by MAXIM Company has the features of high precision, multi-function, low power consumption, and it can provide conversion results through the serial digital interface. When the master clock frequency is 2.4576MHz or 1.024MHz, the on-chip digital filter can process line frequency and associated harmonic frequencies, and set the magnitude of these frequencies to zero, so that it can get better filtering effect without external filter. At the same time, it also helps to improve the quality of the digital signal output from the A/D converter. This design uses TMS320VC5402 DSP as the core device. TMS320C5000 DSP platform is the TI Company's mainstream products, and C5000 DSP platform, which is particularly suitable for personal and portable products, is most popular in the digital consumer markets. C54x DSP is currently the mainstream products in application, because of its high performance and low cost. VC5402 is the higher cost of fixed-point digital signal processors launched in October 1999. For ease of viewing the test results, this design makes a man-machine interface circuit in hardware. It includes a parallel interface, keyboard circuit, the liquid crystal display circuit, RS232, FLASH memory and RAM memory. It designs a 3 × 5 matrix keyboard. Due to the limited resources of TMS320VC5402 chip I/O port, it expands into the latch 74HC573 I/O port to form non-coding keyboard. Specific definitions of key codes include data acquisition and transmission control, scroll up and down and clear the screen, data storage and other functions. 3.3 Experimental procedure and Phenomenon Experimental procedure for the experimental device designed as follows: (1)Open the valve 1 for holding ventilation, and open the temperature control switch in the reaction chamber, and then wait 2 minutes. (2)Close the valve 1, open the valve 2, and apple is moved into the sample gas generation chamber, sealed to wait 5 minutes to step 3. (3)Open the collection procedures to begin collecting data. (4)Shut off the valve 2, and it is the time for response between gas sample and the sensors. (5)Stop the acquisition program, and open reaction chamber to remove the apples. The reaction chamber is sealed five minutes to restore. (6) The next test. Tt ttt ttt ttt tE NMNN M M               , )(...)()( ............ )(...)()( )(...)()( )( 21 22221 11211    2037 Tests under the following three conditions: the reaction chamber is empty, put into an apple that general maturity, and put into a rotten apple. The output voltage waveform of sensors measured is shown in Figure 3,4and5. Figure 3 Sensor array response Figure 4 Sensor array response Figure 5 Sensor array response profiles of background air profiles of an apple that general profiles of a rotten apple maturity circuit The above test results show that SnO2 gas sensors have clear response to apple odours. With the improvement of maturity, the odour concentration has a greater change, so that the response voltage from sensors for the smell concentration of rotten apples quickly reaches their peaks (Chenxing Chen, 2015). 4. Odor Recognition Based Neural Network 4.1 Pattern Recognition Model According to the data that identify an apple either good or bad is called apple odour pattern recognition. Pattern recognition are generally divided into supervised and unsupervised pattern recognition system. For this design, the data experimental samples have been identified, and therefore it belongs to supervision pattern recognition. Identification process is divided into decision-making phase and design phase, like Figure6. Figure 6 The block diagram of pattern recognition system for gas According to Figure6, the sensor devices collect apple odours to transform and convey it into the DSP; as a result, it become digitized time-series signal. Then, it is pre-treated such as normalization in order to divide it into a number frames, according to a certain time window, or actual needs and algorithms. This step can turn a continuous signal into relatively isolated elements as the basic unit of recognition. The next step is feature extraction. Each frame signal is extracted into a feature vector as pattern recognition sample after a certain signal processing, and task of the system is to identify which one in gas element library related to the samples. 4.2 BP neural network implemented on DSP platform BP algorithm’s idea is: make squared error of the sample between output as desired and actual output as a criterion function, use the gradient descent method, starting from the output layer, correct weights layer by layer so that the criterion function minimum. [7] The entire network consists an input layer, a hidden or more than one layer and output layer. There is connection between adjacent layers, but no connection between the inner layers, and the output of the previous layer is the input of the next. Characteristics of the entire network depend on the threshold between adjacent neuron connection weights and neurons. (1)Design input and output layer The input layer is equal to the number of sensors, and output layer is equal to the number of recognition results. This design has six sensors, so the input six; results are three, which is raw, ripe and rotten. Gas element library Gas Signal Gas Property Model Training Design Phase Unknown Gas Signal Gas Property Classification Decision Result Decision-making Phase 2038 (2)Select the number of hidden units If there are too few hidden units, network training requirements may not be achieved, or the trained network is not strong enough, and it has a poor fault tolerance. But if there are too many hidden units, learning time will be too long; the deviation is not necessarily the best, so there is an optimum number of a hidden unit. It can select the number of hidden layer units according to the following several formulas (Kaidi Cao, 2015). )( 1 in  (5) )( 1 in  (6) Where k is the number of samples, n1 is the number of hidden units, n is the number of input units. amnn  1 (7) nn 21 log (8) Where n the number of input units, n1 is the number of hidden units, m is the number of output units, a is a constant between 0-10. For function approximation of BP neural network, the number of hidden units is related to the functions and their precision to be approached. (3) Select the value of initial weights Due to the nonlinearity, there is a great relationship between the initial value and the learning whether the local minimum or not and whether the convergence. An important requirement is to make the initial weights of each neuron close to zero when enter cumulative, and it will ensure that does not fall on those flat areas at start. Weight generally takes a relatively small random value, so it can ensure that each neuron advances in where their conversion function greatest changing at the beginning (Guiping Wang and Jinzheng Wang, 2015). So it needs to be normalized for input samples. The network topology is 6-8-3, namely: the input is the signal of the six gas sensors, and the output is the three results. According to the characteristics of the experimental hardware platform and real-time and non- destructive testing requirements, target MSE take 0.01. (4) Recognition results and error The expected value of the three kinds of recognition results is as follow. [1 0 0]-------Ripeness apple,[0 1 0]-------Immature apple,[0 0 1]-------Rotten apple.DSP-based BP recognition results are shown in Table 1. Table 1 BP recognition results No. Actual state Test Results Recognition results No. Actual state Test Results Recognitio n results 1. Ripeness 0.99101 0.00524 0.00337 Ripeness 11. Immature 0.00108 0.99713 0.00214 Immature 2. Ripeness 0.99532 0.00106 0.00213 Ripeness 12. Immature 0.00457 0.99201 0.00102 Immature 3. Ripeness 0.99487 0.00213 0.00145 Ripeness 13. Immature 0.00723 0.99105 0.00121 Immature 4. Ripeness 0.99624 0.00009 0.00208 Ripeness 14. Immature 0.00653 0.99218 0.00054 Immature 5. Ripeness 0.99356 0.00476 0.00135 Ripeness 15. Immature 0.00576 0.99312 0.00143 Immature 6. Ripeness 0.99496 0.00457 0.00132 Ripeness 16. Rotten 0.00576 0.00004 0.99301 Rotten 7. Ripeness 0.98335 0.00876 0.00357 Ripeness 17. Rotten 0.00312 0.00045 0.99445 Rotten 8. Ripeness 0.99765 0.00008 0.00196 Ripeness 18. Rotten 0.00463 0.00132 0.99423 Rotten 9. Ripeness 0.99546 0.00358 0.00215 Ripeness 19. Rotten 0.00634 0.00057 0.99187 Rotten 10. Immature 0.00324 0.99574 0.00125 Immature 20. Rotten 0.00723 0.00034 0.99112 Rotten    n i i n Ck 0 1 )( 0)( 1  i n C 2039 According to the experimental results on DSP platform, the simulation experiment is carried out by Matlab. The pre-processed data is trained by writing BP neural network to verify the performance of the sensor array. The network topology is 6-8-3, and target MSE take 0.01. The simulation results are similar to those in Table 1, which shows that it is feasible to use TGS series sensor array under DSP platform. But the simulation results better than before when change the network structure of 8-8-3. Therefore, in order to improve the universality of the recognition object, it is better to increase the redundant information amount properly in the selection of the sensor array. 5. Conclusions This article describes an apple odour detection system based on DSP and BP neural network. The system includes sample acquisition, A/D conversion, and nonlinear pattern recognition. It uses gas sensors to gather apples odours, via the signal processing and pattern recognition to identify the state of maturity of the apples. The main contents of the thesis include: (1)Choices gas sensors and its array. It takes six SnO2 gas sensors to make up array, and sets the temperature control system of reaction chamber, and sets air switching equipment between the reaction chamber and outside, and satisfy the gas sensors’ requirements of the environmental. Experimental device is designed to capture the odours, and it sets up experimental procedures combined with other hardware circuitry and pattern recognition algorithms. (2)Design the hardware processing circuit. It uses cost-effective TMS320VC5402 chip as the processor, high precision MAX1403 as A/D converter, and introduces the interface circuit between DSP and A/D converter. Sets a 3*5 keyboard, and introduces DSP and keyboard interface with the different characteristics among varieties of apples. In order to achieve human-computer interaction better, the system design interface circuit between DSP and LCD, and the results can display on the LCD. (3)Sets pattern recognition system based on the neural network. Research on the software design of BP neural network on the DSP platform, and achieve the porting and testing work on the hardware. Acknowledgment This work is supported by Baoding Science Technology Research and Development Guidance Program (15ZG023). References China Sensor Technology Network, 2003, TGS2000 series Sensors Products accessed 20.01.2016 Chenxing Chen, 2015, Electronic Nose Combined With Computer Visions and the Researches in Food Freshness Detection, Zhejiang University. Guiping Wang, Jinzheng Wang, 2015(08), Analysis on aromatic components of Gala apple at different harvest time by electronic nose technique, Chinese horticulture abstracts. Grzegorz Poplewski, 2014, Design Method of Optimal and Flexible Water Networks with Regeneration Processes, Vol. 39, 73-78. Jacek Gębicki, Tomasz Dymerski, Jacek Namieśnik,2014, Monitoring of Odour Nuisance from Landfill Using Electronic Nose, Vol. 40, 85-90. Jiewen Zhao, Xiaobo Zou, 2004, Research on method of apples odorant recognition based on GA-neural network, Xi'an: Journal of Jiangsu University (Natural Science Edition), Vol. 25 No. 1, Jan, 67-73. Kaidi Cao, 2015 etection esearch ased of Fluorescent ensor rray, Southeast University. Kun Zhang, Shengpei Dai, Dahui Li, 2012(33), Based on the Electronic Nose Technology of Tropical Agricultural Product Quality Distinguish Detection Technology Research, SOFTWARE. Li Jing, Song Feihu, Pu Hongjie, Xu Wanxiu, Li Zhenfeng, 2015, Optimization of control strategy of microwave drying for apple based on online volatile measurement with electronic nose, Transactions of the Chinese Society of Agricultural Engineering, Vol.31 No.3 Feb, 57-62. Meng-xing Zhao, 2013, Fish freshness evaluation based on the electronic nose technology, Food Science, 34 (6), 89-94. Mingzhen Dai, Jian-jiang Zhou, 2015, TMS320C54x DSP structure, principle and application, Beijing University of Aeronautics and Astronautics Press. Xuesong Jiang,Hong-ping Zhou, 2013 , Quality of agricultural products Genetic Advances on Nondestructive Testing, Agricultural Sciences of Jiang Su. Zheng-hu Yan, 2013, Color and Odor Multi-Sensor Fusion Ripening fruit Detection System, Kunming University, 2040