Classification of Agarwood Oil Using an Electronic Nose

Presently, the quality assurance of agarwood oil is performed by sensory panels which has significant drawbacks in terms of objectivity and repeatability. In this paper, it is shown how an electronic nose (e-nose) may be successfully utilised for the classification of agarwood oil. Hierarchical Cluster Analysis (HCA) and Principal Component Analysis (PCA), were used to classify different types of oil. The HCA produced a dendrogram showing the separation of e-nose data into three different groups of oils. The PCA scatter plot revealed a distinct separation between the three groups. An Artificial Neural Network (ANN) was used for a better prediction of unknown samples.


Introduction
Agarwood is the well-known name for a resinous heartwood from 'wounded/infected' Aquilaria trees, a tropical forest product which has a high value in international trading. There are increasing demands for agarwood-based products for use in medicine, perfume, and incense. Agarwood is traded in the form of product derivatives such as wood chips, powder, and oil. The wholesale price for high quality agarwood oils is around US$30,000-US$50,000 per liter [1], depending on the oil quality, which is based upon the fragrance strength and longevity, resin content, geographical origin, and oil purity [2].

OPEN ACCESS
Traditionally, agarwood grading has been performed by trained human graders (sensory panels). However, the method has disadvantages in terms of objectivity and repeatability [3]. In addition, a human nose cannot tolerate a high number of samples because it fatigues rapidly with increasing number of samples. In this paper, it is shown how an electronic nose (e-nose) may be used to resolve these issues. A commercial e-nose, the Cyranose 320 (Smith Detection, USA) was used to collect the smell (fragrance) data (herein termed as 'smellprint') which was then processed on a personal computer using different pattern recognition methods: Hierarchical Cluster Analysis (HCA), Principal Component Analysis (PCA) and Artificial Neural Network (ANN).

Experimental
An experiment aimed to produce a data set with robust consistency was conducted using a Cyranose 320 (see Figure 1). The important features of the Cyranose 320 are provided in Table 1 [4]. The acquired raw data was then processed and interpreted into meaningful information. The samples were obtained from three groups of agarwood oils originating from Laos, Johor (Malaysia) and Terengganu (Malaysia), which were labelled as G12, G22, and G32, respectively. Two µL samples from each locality was diluted using 500 mL glycerol as a solvent. The samples were placed in a 40 mL stoppered vial connected to a Cyranose 320 via an inert tubing and heated to 60 °C in a heater block. Each experiment was run for 30 min.   Figure 2 illustrates an airtight recycle system for continuous sniffing. This approach could avoid volatile concentration loss and also pressure loss at the glass vial, which would affect the experiment. An automatic valve as well as a small pump was provided in the Cyranose 320 to control the system flow. In addition, the use of an extra valve mechanism outside the Cyranose 320 was improvised to facilitate sensor cleansing. In Figure 2, the red arrows (solid-line) indicate a sampling cycle. An internal valve was switched to the sample inlet (X). The volatile was then sucked into the e-nose through inlet (X) and was retained for 20 s in the sensor chamber before being removed through outlet (Z). At the same time, the external valve allowed volatile from Z to fill the glass vial. At the end of 10 cycles, the internal valve allowed the nitrogen gas (N2) to purge the sensors via inlet (Y) and removed out to the atmosphere through port (Z). The purge cycle is illustrated by the blue arrows (dashed-line) in Figure 2. The experiments were controlled by the Cyranose 320 according to the set-up parameters as shown in Table 2.

Smellprint
The agarwood oil volatiles are adsorbed on the sensor's surfaces and cause a change in its resistance. The response of the sensor is defined by using fractional baseline manipulation [5]: where R s is the resistance change of sensor s, R s,n is the output resistance and R s,0 is the baseline output. The subscript index s is the sensor number used in the Cyranose (s = 1…32) and n is an index for the number of data (n = 1…N).
As an example, Figure 3 shows responses from seven sensors of the Cyranose 320. The data was taken from one sampling cycle of a G12 experiment. The figure also illustrates the base line purge time, sampling time and purge time. The average of values evaluated by Equation (1) is plotted as shown in Figure 4, and corresponds to the smellprints of the three different agarwood oils. Sensors with high responses are analyzed by comparing their peaks and profiles [6]. Sensor numbers 6, 31, 5, 23, and 28 (in the order of diminishing responses) have higher responses compared to the rest when exposed to the volatiles of the different grade of oils. However, the analysis of smellprints becomes more difficult when there is an increase in the number of samples having overlapping profiles. This issue can be solved using graphical methods based on statistical theories [7], and this was adopted and presented in the next section.

Statistical Analysis
There are many statistical-based methods for processing e-nose data. This paper presents the implementation of the Hierarchical Cluster Analysis (HCA) and Principal Component Analysis (PCA) to distinguish the different agarwood oil grades.

Hierarchical Cluster Analysis (HCA)
The aim of performing Hierarchical cluster analysis (HCA) is to separate data into specific groups by considering similarity criterion, a distance metric such as Euclidean distance, as follows: where K is the number of variables (in this case K is equal to 32 that is the number of sensors in the Cyranose), while i and j are the indices for groups of samples. Hence, a parameter to measure the level of similarity, S ij , is defined as [8]: The computational process of S ij using MATLAB gives a dendrogram as shown in Figure 5. The figure proved the capability of HCA to differentiate between G12, G22, and G33.
where PC p,n is the notation for the p-th order principal component for the overall n number of data and is termed as scores. Coefficients transformations (α p,s ), referred as loadings, are obtained by taking elements of the eigenvectors from the covariant of the original data. The eigenvalue represents the variance associated with each principal component. By using MATLAB software, the two principal components {PC 1,n , PC 2,n } are obtained and have the two greatest variances: 88.096% and 11.202% (or total cumulative variance of 99.298%). The results of the PCA analysis are shown in Figure 6. The scores of the three groups of oils are plotted for principal component 2 (PC2) versus principal component 1 (PC1). The discrimination between the different types of oils can be clearly seen from the figure.

Result from 32 Sensors as Input
The previous two statistical approaches, HCA and PCA, successfully showed their capabilities to distinguish different types of agarwood oils. Both are typically used for exploratory data analysis to see how the multivariate data is clustered and to assess the linear separability of the odour classes. However, in cases where prediction is required (e.g., when implementing an automated classifier), the ANN is the more appropriate tool [7]. This section presents the use of ANN as an alternative choice to solve the classification problem in this work.
In this experiment, the backpropagation ANN with the Levenberg-Marquardt training algorithm was applied. The training used all the 32 sensors as inputs, 20 neurons in the single hidden layer, and three neurons at the output layer. The activation functions used are sigmoid and identity functions at the hidden and output layer, respectively. Figure 7 illustrates the structure of the ANN and how the input and output data were organised and indexed. The same experimental procedure was carried out for the training as well as the testing data. The 200 raw data points were collected by experiments for each of the oil types G12, G22, and G32. This resulted in 600 data points for use in training and validation. After performing baseline manipulation and auto-scaling, the data were organised in one matrix to be fed as input. The testing data was collected on a different day, by sniffing the odour of the oils in nine vials that were assigned for testing only. The total of 1,800 data points was used as the testing data.
As shown in Table 3, the ANN performed very well in discriminating the three types of oils with 5.713345 × 10 −8 mean square error (MSE) and 100% prediction performance. The prediction performance was defined as: (number of correct classification/number of total data) × 100%. Table 3. ANN output for 32 sensors.

Results from Selected Sensors
The use of too many sensors may increase noise, redundant information and provides no real benefit, whereas minimizing the number of sensors can result in the loss of some useful input information [10,11]. Thus, optimization for a specific application can be achieved by observing the sensors which provide high contribution to the system and eliminating the lower ones. In this work, PCA is used to reduce high dimensionality data and to improve ANN training [12]. Table 4 is the list of loadings for PC1 that was sorted in descending order. The summation of the correlation coefficient from the matrix response data for each sensor is also provided in Table 4 as a comparison with the PCA results. It is evident that the higher loading values of PC1 for all sensors correspond to the less correlated sensors.
From Table 4, the data from the five least correlated sensors (sensor number 23, 31, 1, 2, and 4) are selected as input for the ANN training. The result shows an improvement where the ANN has a lower MSE, 8.20279 × 10 −9 and 100% successful prediction of unknown data. The time spent for training and identification also decrease. For specific application, in this case to discriminate the three different types of agarwood oils G12, G22, and G32, the five selected sensors (from the 32 total sensors in the Cyranose) is an effective choice in terms of speed of detection and high accuracy. Attempts to further reduce the number of sensors was not successful. Table 5 compares the results of the ANN training for the case of using reduced number of sensors.

Conclusions
Classification of agarwood oils using an e-nose is able to provide rapid and accurate results. The data from the Cyranose 320 were processed using in-house developed software in MATLAB and was able to identify three different types of agarwood oils G12, G22, and G32. Hierarchical cluster analysis (HCA) and principal component analysis (PCA) were successful in separating the samples into different groups or clusters. ANN was also successfully applied to predict unknown agarwood samples. The optimum number of sensors for this application has been determined by PCA analysis, which subsequently minimize the number of ANN input variables. The current research in our laboratories is to verify the purity and grading of the oil based on quantitative analysis using the e-nose.