Detection of Fuel Adulteration Using Wave Optical with Machine Learning Algorithms

Fuel is a very important factor and has considerable influence on the air quality in the environment, which is the heart of the world. The increase of vehicles in lived-in areas results in greater emission of carbon particles in the environment. Adulterated fuel causes more contaminated particles to mix with breathing air and becomes the main source of dangerous pollution. Adulteration is the mixing of foreign substances in fuel, which damages vehicles and causes more health problems in living beings such as humans, birds, aquatic life, and even water resources by emitting high levels of hydrocarbons, nitrogen oxides, and carbon monoxide. Most frequent blending liquids are lubricants and kerosene in the petrol, and its adulteration is a considerable problem that adds to environmental pollution. This study focuses on detecting the adulteration in petrol using sensors and machine learning algorithms. A modified evanescent wave optical fiber sensor with discrete wavelet transform is proposed for classification of adulterated data from the samples. Furthermore, support vector machine classifier is used for accurate categorization. The sensor is first tested with fuel and numerical data is classified based on machine learning algorithms. Finally, the result is evaluated with less error and high accuracy of 99.9%, which is higher than all existing techniques.


Introduction
Detection of fuel adulteration is tedious because the contaminated solvents have similar chemicals as with pure fuel. The reason for adulteration is the price variation of these fuels. Comparatively, gasoline has a higher price than petrol, which in turn is higher than kerosene. Adulterated fuels that spread in the market leads to vehicle problems and health hazards. In the last four years, among the 4380 cases on fuel adulteration, 33 retail banks have been permanently closed. Adulterated petrol with kerosene or diesel produces high dangerous levels of hydrocarbons (HC), nitrogen oxides (NOx), and carbon monoxide (CO) that create health problems in society.
detects the adulterant as fast as other methods, and is applied on the distillation curves for analysis and process speedup. Ganesan et al. (2019) proposed a thermal image processing-based fuel adulteration using Gray level co-occurrence matrix to detect the adulterated fuel of the input data sample with an accuracy of 98%.
Mabood et al. [7] proposed a fiber optic surface plasmon resonance to detect petrol adulteration using RI measurement and wavelength in SPR curve in the sensing probe. For optical fiber, mathematical simulation is performed to improve the sensor parameters using the SPR principle. The coating of the sensor fiber is moved to form the core circumference. The results obtain high accuracy and fast online detection of petrol adulteration.
Padmakarrao et al. [8] developed an optical sensor-based PIC microcontroller to detect petrol adulteration. A sensor light illuminates depending on the level of adulteration in the fuel. Vempatapu et al. [9] proposed the physic chemical, chromatographic, and spectroscopic techniques to detect gasoline adulteration. In addition, various properties of physic chemical have been measured. A clear review on gasoline adulteration and monitoring is provided.
Pathak et al. [10] used the finite element method to detect the various concentrations of the kerosene in petrol. The theoretical analysis is consistent with experimental results. The good sensor has high sensitivity, simplicity, robustness, and fast response time. Dilipkumar et al. [11] proposed a robust optical sensor for fuel adulteration using lightweight optical fiber sensor. Results show high performance, low attenuation, and environment friendly setup. Distilled curve with PCA and SVM is used as a data mining technique for detection of fuel adulteration.

Proposed Methodology (Modified Evanescent Wave Optical Sensor + DWT + SVM)
Fuel adulteration-such as petrol with kerosene, gasoline with diesel, diesel with kerosene-in the automobile industry leads to increased consequent illness on public health. Fuel adulteration is also difficult to detect because its combinations differ in structure. Mixing kerosene with petrol is also an indirect cause of air pollution. Prevention of adulteration at the distribution point itself is highly essential, and requires a consequent monitoring of fuel quality. Such monitoring equipment must be portable, efficient, fast, and robust. In this study, we develop a portable petrol adulteration detection system based on evanescent wave light weight optical fiber sensor due to its high performance with low attenuation. The distilled curve with DWT is used for feature extraction. Once the features are extracted, a standard SVM is used for classification to predict the correct adulterated petrol. Fig. 1 shows the overall architecture of the proposed system.
The input petrol sample is fed into the proposed evanescent wave optical fiber sensor to measure the solvent concentration through intensity examination. The infiltrated signals are given as input to the feature extraction algorithm then embed in the signal to reduce loss. The reduced features of the sample is then passed on to SVM, a well-known machine learning classifier algorithm for better prediction. In this proposed system, the extracted data are classified with SVM to distinguish the adulterated petrol from pure ones.

Modified Evanescent Wave Optical Fiber Sensor
Optical sensors for fuel adulteration have developed in the past decade and are used in this study. To enhance the sensitivity, we change the optical sensor structure with compact and robust evanescent wave structure. The RI is the base to detect adulteration. RI is directionally proportional to the device concentration. The measurement of solvent contribution to the fuel is carried out through intensity examination and the result is classified through SVM.
To detect the solvent in petrol adulteration, we use the modified intensity sensor based on evanescent wave. The cladding of the optical fiber sensor is replaced with the multimode fiber with absorbing fluid. Fig. 2 shows the proposed modified evanescent wave optical sensor, which is less breakable and has rapid response time.
The light signal of the optical fibers is communicated to each other using the long thin glass organized element. Optical fiber consists of core layer, buffer coating (outer layer), and cladding. The core is the center part of the fiber, which is made up of tiny glass where the light travels. The core layer is surrounded by the cladding that replicates and transmits the light back to the core. Here, the evanescent field is applied. The outer layer is a plastic coating that protects the sensor form external damages. If p 0 is the light that is transmitted to the vacuum tube in absence of absorbing fluid, then where L = length of the unclad portion and c-Evanescent absorption coefficient. The RI is the factor of speed and wavelength of the light that is passed on the vacuum values, as where n in vacuum value is 1. If the speed of the light changes, then the wavelength also changes as The radius of the fiber core is r and RIs for both mediums are n1 and n2, then the evanescent parameters are where h1, θ2 ¼ incident and refracted angle.
The overall absorption coefficient v and sensitivity is calculated using Eqs. (5) and (6).
Sensitivityðnm=RIUÞ ¼ wavelength transmission ðλÞ=RI: In this study, we use two sensors for emitting and receiving fiber and the concentration of the absorption coefficient varies in the medium. In a refracted ray, the largest angle incidence is called critical angle. The input sample signals are entered in one end of the sensor fiber and exit from the other end. Fig. 3 shows the fuel adulteration detection using this modified evanescence wave optical fiber sensor.  The proposed setup for fuel adulteration has two multimode evanescent wave optical sensors separated by a constant spacing. One sensor acts as emitting fiber and the other is a receiving one. The RIs of the core and cladding are 1.483 and 1.412, respectively. The emitting and receiving fibers have core and cladding diameters of 120/200 µm. A laser with wavelength of 645.8 nm is used as an input light source. The output transmitted signal is based upon the optimum overlap of emitting and receiving fibers, space between two fibers, and RIs of the medium.
The proposed sensor transfers light from one mode to another that brings the interaction between the evanescent waves and core. The reflected light is captured and transmitted as voltage readings that are then passed on to further processing, such as feature extraction and classification which leads to the detection of solvent in the original solution.

Discrete Wavelet Transform (DWT)
The transmitted signal from the proposed sensor is used as input in the feature extraction stage. Extracted features minimize the loss that are embedded in the infiltrated signal. This step is needed to minimize the complexity, reduce the cost of data processing, and to compress the larger data. Various feature extraction algorithms are used for signal processing, such as time frequency distribution, eigenvector methods, Fast Fourier transform, and wavelet. In pattern recognition, prediction, and classification, Wavelet transform (WT) plays an important role to change many input data points into few parameters that represents as signal. WT also represents the signal time frequency, and can be classified as continuous and discrete [12]. DWT is an analysis tool that is mainly used in signal processing, image analysis, and classification algorithms [13]. This tool is the multi-scale feature extraction technique where every scale represents the thickness of the transmitted infiltrated signal from the sensor.
The proposed method reorders the transmitted signal with the threshold to the DWT wavelet coefficient [14]. Applying the inverse function of the transformed signal and the approximate value of the original signal is calculated. With the same approximation value, the feature selection algorithm is applied to those extracted by DWT. Wave coefficients are given priority ranking inside the window. The features with highest priority are considered for selection of that particular window. The same process is repeated for all windows in the transmitted signals. The highest priority features are stored for classification [15]. Step 1: Define the window size and decomposition level.
Decomposition (1….n) Step 2: For i = 1 to n/2, apply the wavelet transform on the selected window. The wavelet coefficients are divided into two parts as scaling and detailed coefficients.
Step 3: End for (Continued ) Fig. 5 shows the layout of the sample fuel data transmitted signal with their discrete wavelet transformation. The original signal with the two coefficients such as scaling and detailed coefficients are also represented in the figure.

Classification Based on SVM
The main objective of the classification is to distinguish the adulterated fuel from the pure ones. A good classification algorithm provides the prediction with high accuracy. In this study, SVM is used as a classifier to detect the fuel adulteration. SVM is a high accuracy classification algorithm that is useful to solve both linear and nonlinear problems. A supervised learning algorithm, SVM uses a set of linear functions to form the support vectors that is the core of classification. SVM prediction is also based on the type of kernel function used. In this study, radial basis function is used to support SVM to achieve better performance [11]. The SVM algorithm is represented simply as where a k -LaGrange multipliers b-bias K-kernel function represented as where g i x ð Þ is the nonlinear transformation of the signal. At the end of the execution of SVM function, the support vectors are generated and lie nearer to the decision plane, which is difficult to categorize as either Algorithm 1 (continued ).
Step 4: Re-arrange the data signal based on the threshold of approximately 0.5.
Step 7: Calculate the approximation value using inverse function.
Step 8: Feature selection uses the filter method. DWT has high pass with scaling coefficients and low pass filters with detailed coefficients, which are represented in Fig. 4. Figure 4: Wavelet filters on extracted signals adulterated or unadulterated. SVM has a hyperplane that transmits the signal into high dimensional space. Fig. 6 shows two classes in the SVM that represent the adulterated fuel as class −1 and unadulterated ones as class +1.  The data signals extracted from the DWT are given as input to the SVM as training pairs. The input data signal fall in either one of the two classes (−1 or +1) based on the amount of adulterant solvent in the pure petrol, and is classified based on the linear separator in the SVM hyperplane. The margin is increased to decrease the weight vectors of the input feature. The algorithm with Lagrange multipliers creates the weight related to the support vectors to sufficiently predict the boundary level. The output of the algorithm is each feature weight vectors and their linear combination of the test data, which help to predict the sample adulteration class. SVM effetiveness is based on the parameters used, such as kernel function and margin. Proper selection of the parameter values leads to good accuracy classificaton results. Fig. 7 shows the workflow of the proposed detection for fuel adulteration. The data sample is given as input to the evanescent wave optical sensor probe. The input signal are then reflected in the core with eavenescent field. This study uses two sensors, one for transmitting and another for receiving. The proposed setup sends the light source from one mode to another that leads to the commmunication between the core and evanescent wave. The RI of the core and cladding are calculated. The transmitted voltage readings are then passed on to feature extraction using DWT. The scaling and detailed coefficient values are calculated and the high and low pass filters are applied on the coefficients to obtain the transformed signal for classification. The SVM then classifies the transformed voltage readings into either classes as adulterated or unadulterated fuel.

Results and Discussion
Detecting the adulteration solvent added to pure fuel is a primary and essential task that benefits humans and society. This proposed system is a mathematical modelling and portable fuel adulteration technique using evanescent wave optical sensor to transmit the raw data sample as signals. Subsequently, DWT is used to transform the signal to high dimensional space for feature extraction and selection, then classification by SVM. This proposed mathematical model is implemented using sklearn in Python programming. A total of 50 samples that consist of both adulterated and unadulterated fuel are used for evaluation. Among the sample data, 35 are taken for training and 15 are for testing.
For experimental analysis, 100 samples that consist of both adulterated and unadulterated samples with solvents are used, where 80 are taken for training and 20 for testing.
The cladding used in this sensor have RI rather than a core and this proposed setup works as a light wave transmitter on the core with reflection. The evanescent wave also uses the core point. The output light power of the sensor is recorded using Eq. (12) [11], where P recorded -is power recorded, P transmitted -is power transmitted, and Letched-fiber is the etched length. The signal from the receiver optical sensor is based on the surrounding RI. In this experiment, petrol and diesel are considered for fuel adulteration. The RIs of adulteration are presented in Tab. 1 and in Fig. 8.
Here, the RI 1.420 is pure petrol, 1.440 is pure diesel, and 1.460 is the pure kerosene. The proposed modified evanescent wave optical sensor is suitable for fuel adulteration especially for petrol with good response time and high sensitivity of 21,270.32 nm/RIU. The high sensitivity sensor for predicting the fuel adulteration is compared with the existing sensors. With this high sensitivity, the signal is then transmitted to DWT for transformation. To prove the effectiveness of DWT, we calculate the standard error minimization technique such as R 2 and RMSE, and obtain 0.99% and 2%, respectively, which indicates a low error in the transformation.
The SVM factors are the basis to distinguish the adulterated fuel from the unadulterated one. Tab. 2 shows the SVM factors from the transformed signal by DWT for the 35 training data. As a result of the training phase, weight vector and the parameters are calculated using Eq. (13).  Figure 8: Adulterated fuel RI The final SVM classification is performed using Eq. (14).
Tab. 3 shows the testing data SVM factors.
Comparison of Tabs. 2 and 3, training and testing phases, the data sample voltage of the points (23, 7) is treated as unadulterated fuel compared with the training data that belongs to class −1. This data point lies nearer to the margin. Such misclassification can be corrected by finetuning the parameters, after which the propsoed algorithm obtains 99.9% accuracy in terms of detecting fuel adulteration.
For evaluation, 200 ml petrol is used. The adulteration varies from 50, 100, and 150 ml of diesel and kerosene. The proposed sensor box radius is 3.8 cm. The distance between the sensor is 9 cm. The proposed sensor distinguishes the fuel intensity of the light that is reflected at the boundary with variations over the original mixture. The testing evaluation is performed by changing the concentration of solvents such as of diesel and kerosene. The concentration of these contaminants varies in the combination of adulteration of petrol with diesel, petrol with kerosene, or petrol with kerosene and diesel. Each fuel has their own level of parameters. Tab. 4 shows the sample preparation with the corresponding voltage reading using the proposed sensor. Fig. 9 shows the proposed sensor for petrol adulteration and the concentration of adulterated fuels.  The proposed structure of the petrol adulteration with modified evanescent optical sensor has varying concentration of kerosene in the petrol from 0% to 75% and diesel from 0% to 25%. The same process is repeated multiple times to ensure the accuracy of the fuel concentration readings. The SVM distinguishes the adulterated petrol with kerosene and diesel from the unadulterated pure petrol with high accuracy. To prove the effectiveness of the classification algorithm, we calculate standard metrics such as Accuracy, Precision, Sensitivity, Specificity, Recall, and F measure. Fig. 10 shows the classification accuracy.
With this proposed modified evanescent wave optical fiber sensor, the detection of petrol adulteration obtains 99.9% of accuracy on classifying the correct samples as unadulterated from the adulterated. For the experiment, we use petrol adulteration with diesel and kerosene. The concentration of the adulterated solvents is predicted with high accuracy by using the receiving sensor of the proposed work. The evanescent field in the core leads to the proper transmitted signal of the input for further processing. Among the various feature extraction techniques, DWT performs better in signal processing. The correct voltage readings are extracted for classification with low error. Hence, the proposed setup is robust, secure, portable, non-flammable, and rapid in response time. This setup can be much useful in automotive and chemical industries for better prediction of fuel adulteration.

Conclusion and Future Work
The main motivation of this study is due to recent findings from the United Nations that nine out of 10 people in the world inhale polluted air. This fact results in health problems worldwide, which leads to approximately 7 million deaths due to pollution. As per the World Health Organization, 12.5% of deaths in India are due to air pollution. Among the world's 10 most polluted countries, India ranks 9th. Considering the condition of poor air and increased vehicle movement among the population, the BS VI stage fuel is introduced in 2020 to help improve the air quality. Our mission in detecting fuel adulteration is very important for the people's survival. This study detects the adulteration using Modified Evanescent Wave Optical Fiber that is highly accurate compared with other sensors in mixture detection. Then, the output is fed to machine learning algorithms for accurate classification of adulteration. Here, DWT is used with SVM classifier to distinguish the adulterated data from training data sets. The result shows a 99.9% accuracy in detecting petrol adulteration. In future, we can implement highly sensitive sensors in vehicles to detect the pollution level in smart vehicles, which in turn can help the environment through the proper detection and control of fuel adulteration.