Development of a Smart Sensor Array for Adulteration Detection in Black Pepper Seeds using Machine Learning

org


I. INTRODUCTION
In India, adulteration in food products is highly uncontrollable, mainly the products sold in semi-urban, urban slum areas and rural areas. Due to these substandard or poorquality products, consumers are cheated by paying more prices [1]. Among the whole spice items, pepper is a significant herb utilized for seasoning food. It is known to be the "King of Spice." Black pepper is called piper nigrum. It consists of chemical, and nutritional components, namely vitamins (K, A and C), protein, starch, polyphenols, piperine, and essential oils. Traditionally, techniques like sensory, analytical evaluation, iodide test and microscopic determination were deployed for adulteration identification in food products.
Real-time controlling, low cost, high sensitivity, and simple operated electronic nose were employed to determine the freshness of packed food items. The model [2] proposes the determination of Total Volatile Organic Compounds (TVOCs) from packed foods to find their freshness. A sensor mote comprised of low-power metal oxide gas sensors and humidity sensors are employed for this purpose, which is self-powered from the far-field Radio Frequency Energy Harvesting (RFEH). Packed fish and pork samples are utilized for examining the TVOC, which are kept in the refrigerator at ambient temperature for eight days. The acquired sensor data are trained with the 1D Convolutional Neural Network (CNN), Multilayer perceptron, and Support Vector Machine (SVM). The Multilayer perceptron model achieves a maximum of 99% classification accuracy for packed pork and 93.3% of classification accuracy for packed fish.
Spice powders are commonly adulterated by wheat, corn and rice flour. The study [3] presents a DNA barcoding methodology for identifying adulteration in spice powder. This study employs 91 commercial spice varieties brought from retail shops to detect adulteration using DNA sequences (ITS2 and psbA-trnh-Gen bank accession number). Concluded that with the help of 78-ITS2 and 77-psbA-trnh DNA sequences(barcodes), it is possible to identify that out of 91 varieties, 39 samples are pure,43 samples adulterated, 4 were uncertain and five samples were undetected.
The following literature work discusses the determination of adulteration determination through spectral information and VOCs.

A. Related Work
The appearance of papaya seeds is similar to the black pepper seeds, so adulteration is made easier, but the determination of papaya seeds becomes tedious through normal visualization. The significant flavor in black pepper is a terpene which is a VOC. Significant key odorants of black pepper are β pinene, α -pinene, myrcene, αphellandrene, limonene, methyl propanal, 2, 3 methyl butanol, butyric acid etc. The work [4] develops Molecular Imprinted Polymer (MIP) coated gold Nano Particle (Au NP) sensor for the determination of αpinene VOCs in black pepper. The molar ratio of αpinene template to monomer is investigated on the MIP film adsorption characteristics. The molar ratio of the alpha-pinene template to monomer was achieved as 1:4 on MIP absorption characteristics.
Total flavonoids, phenol, and piperine are the bioactive compounds present in the pericarp of pepper berries. Pericarp determines the color intensity and texture of the pepper. The study [5] various methods to determine the chemical components in the pericarp of pepper berries. A colorimetric assay was deployed for the identification of total flavonoids and total phenols. It is identified that the total phenol content is www.ijacsa.thesai.org 1421.95± 22.35mg/100 gram, and the total flavonoid is 983.82 ± 8.19mg/100g. High-Performance Liquid Chromatography (HPLC) was utilized for piperine compound identification and found as 2352.19 ± 68.88mg/100g. Gas chromatography/Mass spectroscopy (GC/MS) identifies the characteristic peak areas of VOCs at 510nm wavelength -total flavonoids and 750nm wavelength -total phenols.
To determine the presence of adulteration in the paprika powder, the work [6] proposed a portable NIR spectrometer. The paprika powder samples are adulterated with acacia gum, potato starch, and annatto powder samples at various concentrations ranging from 0-36%. The acquired spectral data are validated through Partial Least Squares-Discriminant Analysis (PLS-DA) and Partial Least Square Regression (PLSR) algorithms. PLS-DA outperforms better classification to differentiate the adulterated samples at an accuracy of 90%. This model can predict the adulteration of annatto powder with Root Mean Square Error Prediction (RMSEP) at the rate of 1.74 and R2P of 0.87.
Research work [7] discusses the detection of papaya powder in black pepper powder by utilizing Thin Layer Chromatography (TLC) and GC/MS technique. Experimentation made for 20g of addition of papaya seeds powder in 1000g of pepper powder. It includes the analysis of Column chromatography through Gas Chromatography/Mass Spectrometry (GC/MS), which indicates the "366nm wavelength" fluorescent spot marker at Rf = 0.943. The "366nm wavelength" also detects the mixture of 2decenal, nnonanal and trans 2undecenal aldehydes present in the papaya seeds.
Terpene gas detecting sensor array is developed to determine the concentration of terpene gas in pepper sample [8,9]. Molecular Imprinted Polymer (MIP) and combination of MIP and Conductive Polymer (MMC) sensors is developed and compared the sensitivity in detecting the Terpene, limonene, and α-terpene. Among the two sensors MOC outperforms with higher sensitivity. 500ppm terpene concentration is detected using MOC sensor at the rate of 6.5 and 100 times more sensitivity for limonene and α-pinene.
This research work developed Molecular Imprinted Polymer (MIP) coated with gold nano particle (AuNP) excited Localized Surface Plasma Resonance (LSPR) [10] for the detection of αpinene vapor. MIP powder and coating film adsorption characteristics are found by using gas chromatography and mass spectrometry. Molar ratio of αpinene to monomer is investigated on the MIP film adsorption characteristics. Molar ratio of alpha-pinene template to monomer achieved as 1:4. less than 3 sec of time is required to determine 90% of terpene vapour transmittance. Good selectivity and sensitivity of this developed MIP coated AuNP sensor is realized at 1400 r/ min at the rate of spin coating. On field responses also recorded for limonene, α-pinene, γterpene and also verified to be reversible, rapid and selective.
Sichuan pepper plays a significant role as a flavoring agent due to its unique aroma and taste. Another work [11] focused on determining adulterants in the Sichuan pepper by utilizing NIR spectroscopy. Wheat bran, rosin powder, rice bran, and corn flour mixtures are added to Sichuan pepper intentionally to gain extra profit in the market. The acquired NIR spectral samples are validated through Partial Least Squares (PLS) analysis. It predicts the adulteration level in Sichuan pepper with the coefficient of prediction of 0.994 rosin powder mixture, 0.967 corn flour mixture, 0.948 rice bran mixture, and 0.969 wheat bran mixture, respectively.
Near-infrared and Fourier Transform -Infrared spectroscopy (NIR & FT-IR) [12] were used to determine adulteration in black pepper. NIR-FTIR spectroscopic data are processed with chemometric analysis to detect adulterants in black pepper. The adulterants are defatted spent black pepper, chili, papaya seeds, black pepper husk, and pinheads. The NIR& FT-IR spectral data are combined and applied to the binary classifier using Orthogonal Projections to Latent Structures Discriminant Analysis (OPLS-DA) model, which achieves 98% classification accuracy for adulterant.
NIR-Hyper Spectral Imaging (HSI) was employed to identify papaya seeds and their powder adulteration in black pepper, berries, and powder [13]. Adulterations of papaya seeds are made at different levels of concentrations with black pepper. Hyperspectral images are obtained and classified through Soft Independent Modelling Class Analogy (SIMCA) and Partial Least Squares (PLS) analysis. SIMCA model achieves better classification accuracy of 90% with less than 8% of error rate for adulteration determination in black pepper, berries, and its powder. PLS achieves a better prediction capability of R 2 P>0.8, and the ratio of prediction deviation is higher than 2.5.
Among all the country's pepper production, Sarawak state in Malaysia produces a superior quality of pepper. It deserves a large price in the global market due to its better quality. Sarawak pepper samples are compared with the Indian ground black pepper sample for species adulteration determination. Different VOCs in the black pepper was determined by utilizing the geo-tracing module built with Metal-oxide Semiconductor (MOS) gas sensor array [14]. Totally 200 counts of black pepper samples are obtained from India and Malaysia. The sensor data are processed and analyzed with Principle Component Analysis (PCA). The PCA result produces an overall classification accuracy of 92.5% for discriminating the India and Malaysia pepper samples.
Identification of Volatile Organic Compounds (VOCs) is carried out with the E-nose model [15]. Gas chromatography Mass Spectrometry methods also carried out for the aphid attacks in the tomato plants also without infestation. Principle Component Analysis (PCA) delivers better results for the infected and healthy plants at an accuracy of 86.7%. Table I gives a brief discussion of the methodologies employed for pepper VOCs/adulterant detection. MIP-coated sensor motes, E-nose sensor system and spectroscopic methods are discussed for the adulteration determination in the whole pepper seeds and its powder sample. Among all the methods, the NIR-FTIR model achieves a maximum of 98% classification accuracy in discriminating the adulterants in the black pepper seeds. Spectroscopic, E-nose sensor array system, MIP coated sensor mote and geo-tracing techniques were employed to determine the adulteration in pepper samples. Literature works focus on determining the Volatile Organic Compounds of pepper samples and the presence of other adulterants in pepper seeds. Moreover, these experimental methods are carried out in a lab environment; samples are analyzed in whole and powdered form, and it takes time delay to produce the results. Real-time data analysis enables the system to be more effective and predict the results on the field spot. To overcome these drawbacks, this research work contributed as follows:  Design a low-cost, portable gas sensor array system for rapid data collection in the field.
 Machine Learning algorithm-based adulteration detection mechanism is developed to handle the variation factor such as placing the sensor inside a measurement chamber, aged pepper sample, sensor placement during data collection and able to achieve an accuracy of 100% adulteration determination.
 The designed sensor system is IoT enabled to visualize and update the results on the webpage, which can be accessed by an authenticated end user anywhere.
The article is organized as follows: Section II describes the materials and methods employed for adulteration determination. Cost comparison analysis. Section III discusses the results of SVM algorithm for classification of adulteration. Section IV conclude the research work.

II. MATERIALS AND METHODS
This section discusses the working principle of the designed systems. The Artificial Intelligence (AI) enabled sensor system design, sample preparation, data collection, and processing of them using machine learning algorithms were discussed.

A. Design of Gas Sensor Array System for Pepper Adulteration Detection
The designed sensor array with an Artificial Intelligenceenabled system is shown in Fig. 1 which composes of MQ series MQ2 and MQ3 gas sensors for volatile organic compounds, gas detection from pepper samples, Arduino -UNO board, Raspberrypi module is used for data acquisition processing and classification of gas sensor data.
Finally, the output of the test results of the adulterant detected is communicated to the web server and can be accessed by the authenticated users through the Graphical User Interface (GUI) of the web page.  Fig. 1 shows the general block diagram for the pepper adulteration detection system. The samples and sensors are kept inside the zip lock bag. Arduino UNO acquires the gas sensor data and stores it in an excel sheet. The stored information is transferred to the Raspberry Pi module through a serial port for data processing. The machine learning algorithm of the Support vector machine is utilized to classify the adulterated and unadulterated black pepper samples. Message Queuing Telemetry Transport (MQTT) protocol is utilized for communicating the result of classifiers to the webpage running in the web server module. Graphical User Interface designed to display the acquired sensor data results on the web page.
The following section explains the individual blocks of the sensor system array. 2) MQ3 sensor: MQ3 detects an alcohol, terpene, methane, hexane, LPG, carbon monoxide, and benzene detector. Resistance of the sensor varies according to the 3) Arduino Uno: Arduino UNO acquires the analog signal from the sensor system and converts it into digital values through the analog-to-digital converter. Raspberry Pi processes the received data from the Arduino UNO board through the serial port.
4) Raspberry-pi (data analytic module): Raspberry-pi receives the Arduino data and analyses the data for classification of adulteration. The sensor data are preprocessed to remove the outlier data. Using the machine learning algorithm of the SVM model, the data are classified as adulterant or non-adulterant. The results are communicated to the web display through the MQTT protocol.

5) Web display:
The web page is designed to display the results of the detected adulterants with password authentication in the client browser. The user has to provide the login credentials to view the results of the tested samples. Only authenticated users can access the results of the tested samples. MQTT protocols transmit/receive the information between the web server module and raspberry-pi.

B. Sample Preparation and Data Collection
The pepper and papaya seed samples are brought from the local market and fruit shops for testing. The papaya and pepper samples are mixed at different proportions to make adulterated samples.   Fig. 2 shows the placement of sensors on the sample inside a zip lock air-tight bag and the sensor data acquisition using the data streamer of an excel sheet through Arduino Uno. The number of sensor data acquired from the pure pepper and papaya seeds adulterated samples at various concentrations of the mixture is illustrated in Table III.  Table III shows the number of sensor data obtained for each case of adulteration. Total number of 7800 spectral sensor communicated through MQTT protocol to Raspberry Pi for machine learning algorithm classification.
In Table III, "50 Pure+ [5+5+5+5]" describes that in 50 grams of pure pepper, 10% addition of adulterant (i.e., 5 grams of papaya seeds). Followed by adding 5 grams of papaya seeds three times and sensor data acquired for each adulteration addition. Likewise, the papaya seeds are added at various concentration levels in 100 grams, 150 grams, 400 grams, 500 grams and 600 grams of pure pepper samples.

C. Cost Analysis
This section compares the cost of the proposed sensor system design with the existing sensor module for pepper adulteration determination and is presented in Table IV. Our proposed work mainly focuses on designing low-cost, portable, rapid adulteration detection. Table IV list the equipment utilized for pepper adulteration detection with its cost details. The proposed gas sensor system consists of a Raspberry -pi module of ₹ 4900/-, Gas sensors (MQ2, MQ3) cost around ₹ 500/-and Arduino UNO of ₹ 1850/-. The further jumper cable and USB cable are utilized. The designed sensor system cost is near to ₹ 7500/-.

III. RESULT AND DISCUSSION
This section delineates pepper adulteration identification using a support vector machine algorithm. The acquired gas sensor samples are collected and arranged so that 15% of the whole data set is assigned for the validation set, 70% is applied for the training set, and the remaining 15% is allotted for the testing phase. SVM-based binary classification model could classify whether an adulterant is present or not. The support vector machine algorithm is trained using various level adulterant mixed data as in Table III. Fig. 3 shows the confusion matrix for the binary class classification model. An accuracy of 100% is achieved for adulterant discrimination. was recorded for the MQ2 and MQ3 sensor datasets. In the scatter plot, data lies on the diagonal lines with a different cluster that comes with points of 130(green points) of MQ2& 465 (green points) of MQ3. From the scatter plot, the adulterant's presence can be classified successfully.  Fig. 5, the SVM algorithm shows that the data are fitted correctly according to their respective classes. The classification accuracy of the SVM model achieves 100%. The diagonal line indicated the separation of data and mapped in two regions (-1, 1) and (1,-1) successfully. It infers that the data are classified into their respective classes.

A. Web Interface
Our gas sensor model is designed with an application to give a real-time web interface for visualization of the detected adulterants. This web interface enables users to access the adulterant result anytime from anywhere. www.ijacsa.thesai.org  Table V provides some of the existing works employed for pepper adulteration identification using different methodologies and achieves maximum classification accuracy of 98%. In Table V. the research work discussed deploying laboratory evaluation methods, which are expensive, consume time for determination, and are not portable. Our proposed system is rapid, portable, and low-cost for the determination of papaya adulteration in black pepper and achieves 100% of accuracy.

IV. CONCLUSION
Nowadays, adulteration in food is one of the serious problems faced by consumers. New creative, rapid, nondestructive, portable techniques need to develop for adulteration detection. Many electronic nose sensor systems can be able to detect adulteration in pepper, but those techniques would consume time to deliver the results with moderate accuracy. A low-cost gas sensor array system was developed to detect adulterants rapidly. The proposed system detects adulterants in pepper with gas sensors of MQ2 and MQ3. The sensor readings are processed with a support vector machine algorithm for adulterant classification, which achieves 100% accuracy of detection. The proposed gas sensor array module output performance can be viewed and accessed by the authenticated user through the GUI of the web interface from anywhere. In the near future, work can be taken forward to determine the various concentration levels of adulterants mixed in pepper seed samples by utilizing other gas sensor modules.
ACKNOWLEDGMENT Sowmya Natarajan involves in collecting the pepper and papaya samples and acquired the gas sensor data by testing the samples with various levels of adulterated and unadulterated samples. The data processing and classification and the research direction contributed by Vijayakumar Ponnusamy.