A Wavelet-Based Optimization Method for Biofuel Production

Maurizio Carlini 1 ID , Sonia Castellucci 1,* ID , Guomin Sun 2, Jinsong Leng 2, Carlo Cattani 1 ID and Alessandro Cardarelli 1 1 Engineering School, DEIM, University of Tuscia, 01100 Viterbo, Italy; maurizio.carlini@unitus.it (M.C.); cattani@unitus.it (C.C.); alessandro.cardarelli93@gmail.com (A.C.) 2 School of Mathematical Sciences, University of Electronic Science and Technology of China, Chengdu 611731, China; guominsun0120@126.com (G.S.); lengjs@uestec.edu.cn (J.L.) * Correspondence: sonia.castellucci@unitus.it; Tel.: +39-0761-357170


Introduction
In the last years, awareness about energetic and environmental problems has encouraged many researchers to investigate the possibility of using alternative fuels instead of petrol and its derivatives [1].Biofuels derived from biomass, such as bioethanol [2], biodiesel and biomethane, are a viable alternative.Biofuels are mostly derived from edible oils, nonedible oils, fats, waste cooking oil, and algae [3,4].These biofuels have environmental benefits, they are economically competitive and they are producible in large quantities without reducing food supplies because they are generated from a biological feed stocks [5,6].Among them, biodiesel seems an excellent substitute for fossil diesel without engine modification [7].Biodiesel, mostly produced from the transesterification reaction of different vegetable oils (peanut, soybean, rapeseed, sunflower), shows a substantial reduction in emissions of carbon dioxide, sulphur oxides, particulate matter and unburned hydrocarbons [7,8].Compared to fossil diesel, the greater concentration of oxygen (10-11%) [1,9] in biodiesel allows for better combustion, reducing the emissions of carbon monoxide (CO) produced by incomplete combustion (under oxygen deficiency conditions).
The main disadvantage of biodiesel production from these feedstocks is its higher price [7].The use of exhausted oil [10,11] to produce biodiesel is an effective way to reduce the raw material Energies 2018, 11, 377 2 of 17 cost [12].Indeed, the price of waste cooking oil is lower than that of the virgin oil [13].Since the quality of biodiesel is directly related to the quality of the raw oil [14], it is important to use a wasted oil with a high ratio of saturated/unsaturated fatty acids because the resistance of oil to oxidation, for example during frying, decreases as the saturated/unsaturated acids ratio decreases [15].Indeed, during heating [16] of vegetable oils for frying purposes, thermal, oxidative, or hydrolytic reactions can cause chemical changes [17].This changes induced in the frying fat are influenced by oil's fatty acid composition.The saturated/unsaturated acids ratio influences the oxidation stage.During the process of oxidation, the extraction of one or more hydrogen atoms from fatty acids produces free radicals.During the transesterification reaction, speeded up by basic catalysts (NaOH, KOH) or acid catalysts (H 2 SO 4 ) [8,18], it is necessary that the amount of free fatty acids is low as possible to avoid base-acid reactions that can cause soap formation [19], reducing the reaction yield.
The most recommended vegetable oil for frying is peanut oil.Indeed, it has a high saturated/unsaturated acids ratio [20,21].The work presented aims to identify the characteristics of the transesterification reaction of waste peanut frying oil, performed with methanol (CH 3 OH) as a reagent and sodium hydroxide (NaOH) as a catalyst, using colour analysis and wavelet analysis.Wavelet analysis is the most suitable method to emphasize singularities which are locally distributed.In particular we will use the wavelet coefficients energy (and scalogram) to characterize the transesterification reaction.In detail, the analysis of the images has allowed us to verify the presence of impurities in the biodiesel produced.The reaction of transesterification, as shown in Equation (1), is reversible, and thus is performed in excess of alcohol to force the equilibrium to the product side [15].
This reaction produces two distinct phases: a light phase at the top, composed by methyl-esters and possible excess reaction products (methanol, unreacted esters) and a heavy phase at the bottom, composed by glycerol.The biodiesel produced is subjected to a washing process with deionized water [22].This process is performed in order to remove all the water-soluble impurities, such as soap, pastes, mucilages, excess reagents and glycerol that was not completely removed from the light phase.The washes are repeated until purified biodiesel is obtained and the water, used for washing, becomes clear.Finally, the biodiesel viscosity is checked.The physical characteristics are compared with the standards values of the regulation UNI EN 14214 [23].
The optical evaluation of the products obtained, both from the transesterification reaction and from the biodiesel washing process, is the first approach used during the experimental campaigns.
Concerning the transesterification reaction, a visual analysis of the colour allows one to keep the correct progress of the reaction under control with an assigned temperature and catalyst percentage.As regards the washing phase, the colour analysis allows one to detect the presence of impurities, usually mucilages, in the final product which compromise its viscosity [24].
All the stages of the biodiesel production (the separation of methyl esters from glycerol and the light phase washing process) were photographed and all the images were analysed using colour analysis.Then, the wavelet analysis provided all the testing results.The wavelet scalogram at low and high frequency, by investigating the energy change of wavelet coefficients, provides detailed information about the transesterification reaction progress and the subsequent washing process.Indeed, the study of the scalogram allows one to identify the correct progression of the separation between biodiesel and glycerol and the presence of mucilages in the washed biodiesel.

Waste Frying Peanuts Oil
The Waste Peanut Oil (WPO), used for the transesterification reaction, was collected from households in Viterbo, Lazio, Italy, and kept at room temperature.The transesterification reactions

Transesterification Reaction
A 1000 mL glass beaker (VWRI213-1128, VWR International Srl" Milan, Italy) was used as a reactor, and a magnetic stirrer/heater (VWR ALU HOTPLT STIR 230V), equipped with a Pt100 thermocouple provided the mixing and temperature control.The digitally controlled magnetic heater allows one to regulate the temperature of the reaction solution where the Pt100 is inserted, the speed of the stirrer used for solution blending and shows the elapsed time.To increase the matter exchange and to increase the speed of transport [31], the waste peanut frying oil was stirred at 340 rpm.After the oil was heated up to the established reaction temperature, previously mixed methanol and sodium hydroxide (NaOH) in micro bead form (TECHNICAL VWR), were added.The experimental plan involved three levels of the NaOH (0.25, 0.5, 0.75% w/w WCO ), four temperature levels (70, 80, 90 and 110 • C) and the molar alcohol/oil ratio was 6:1.The time for all reactions was 60 min because after one hour the total energy supplied to the catalyst was enough to activate all its active sites [32].
After this time, the products of reaction were left to decant for two hours and then the methyl esters were manually separated from glycerol.The Raw Methyl-Esters (RME) were filtered with a 45 µm sieve.The RME quality was analysed in the laboratory, showing that its viscosity did not comply with the limits imposed by the regulations.In order to remove all the residues in the RME, it was subjected to a washing process with deionized water.
For the washing process, the RME were preheated up to 60 • C and then 200 mL of distilled water was added for 5 min.This process was repeated many times, reducing each time the water added, until the water became clear.After this process, the biodiesel obtained showed no unwanted impurities.After being weighed for product yield calculation with Equation (2), the final product was photographed and subjected to the colour and wavelet analysis:

Wavelet Coefficients Space
In order to analyse the differences between chemical reactions and their corresponding colours, a method that singles out the differences between images is proposed.One of the most powerful methods for image analysis is the wavelet approach.In particular, it will be shown that at the low (wavelet) energy level which correspond to our visual perception of the colours there are very little differences, while at the high (wavelet) energy level there are many significant differences, even when comparing quite similar colours.In particular, we will show that the pattern of the high energy distribution corresponding to the optimal chemical reaction shows some peculiar details which characterize such a reaction.For this reason, we believe that wavelet analysis can help to classify chemical reactions.Wavelet analysis deals with expanding signals into a sequence by the inner product between the signal and basic functions just like Fourier analysis [33].Unlike the trigonometric polynomials of the Fourier transform, basis functions of wavelet are generated in the form of scaling and shifting some fixed functions, which called the mother wavelet ϕ(x).The function ϕ(x) needs to be localised both in time and frequency, and satisfy the following conditions: and: where φ(ω) is the Fourier transform of ϕ(x).Equation (3) implies a finite energy of the function ϕ(x) and Equation ( 4) is the admissibility condition, to ensure the reconstruction.The scaling and shifting of ϕ(x) is defined as: where ϕ j,l (x) is the j-th scale and l-th translation of j(x), and j is the wavelet scale, l is the translation parameter, and a(∈R) is the normalization parameter.
According to the structure of the wavelet system defined in Equation ( 5), the wavelet multiresolution analysis (MRA), proposed by Mallat [34], provides an approach for a multilevel wavelet transform.To construct the MRA system, another wavelet basic function is introduced, the scaling function ϕ(x), given as: and MRA system requires that {ϕ(x − l), l ∈ R} forms a subspace of L 2 (R) where L 2 (R) is the square integrable function set defined in R. Also the set {ϕ(x − l) ∪ ϕ(2 j x − l), j ∈ Z + , l ∈ R} forms a basis function of L 2 (R) due to the definition of MRA.For a function f (x) ∈ L 2 (R), the wavelet transform Wf [35] is defined as follows: where: where the wavelet coefficients W j,l f and W l f are given by the inner product of f (x) and the wavelet system ϕ(x − l) ∪ ϕ(2 j x − l), <g> is the inner product defined in the Hilbert space, and the bar stands for complex conjugate: The inverse wavelet transform for 2-D wavelet transform, the scaling function is defined as: where ϕ(x) is the 1-D scaling function.The corresponding wavelet function is given by: Energies 2018, 11, 377 5 of 17 where: The shifting and scaling function ϕ k j,l,l (x, y) is given as: Then the 2-D multilevel wavelet family: forms an orthonormal basis of L 2 (R 2 ) [36].
For a 2-D function f (x, y), the wavelet analysis can be given by: where b k,j,l,lC/ = < f (x, y)j k j,l,lC/ (x, y) > is the 2-D wavelet coefficients.According to the definition of WS, the Parseval identity is obtained: which suggests that the energy of the function is the square sum of the wavelet coefficients in each scale.Then the energy ε of the 2-D signal f (x, y) can be given by the wavelet coefficient in the form of: Subsequently the wavelet coefficients derived from the selected reaction images were investigated.By comparing the plot of the energy, the scalogram which gives a density distribution of the energy at different scales, some important results are obtained.
According to the wavelet coefficient β k,j,l,l' , the energy percentage of the coefficient value S j in different scales j can be calculated by:

Analysis of Waste Peanut Frying Oil
Waste peanut frying oil was analysed, according to the standard test methods, to define its chemical and physical properties.Table 1 shows the results of the analysis.
The main reason why waste vegetable oils are transesterified to alkyl esters (biodiesel) is that their high kinematic viscosity, as shown in Table 1, leads to operational problems if they are used as fuel.Indeed, the use of untransesterified oils in the diesel engine, can cause poor atomization of the fuel in the engine combustion chambers and deposits can be produced on various engine parts [37].

Experimental Plan
The catalyst percentages used are 0.25%, 0.5% and 0.75%, respectively, and reaction temperatures were chosen from what is reported in [22,38].In detail, tests were carried out at: 70, 80, 90 and 110 • C, and each test was repeated three times.The yields of the reactions is given in Table 2.In Table 2, the reaction performed at a temperature of 70 • C with a catalyst percentage of 0.5% gave the higher yield value.Table 2 shows how increasing the temperature results in a gradual decrease of the reaction yield.In detail, for the tests conducted at the temperature of 110 • C the transesterification process leads to the solidification of the products, or at least very low yield values.The analysis of the physical characteristics of the RME, showed that the presence of soapy pastes, mucilage and glycerol residues, not evident through a visual analysis, cause a RME viscosity value of 9 ± 0.05 mm 2 /s.This value did not satisfy the limits imposed by the applicable regulation (UNI EN 14214).For this reason, the washing process was needed.

Experimental Analysis
The tests performed have allowed the identification of the temperature and the percentage of catalyst which guarantee the maximum reaction yield, in terms of production of biodiesel obtained from waste peanut vegetable oil.
The tests were selected in order to show the main differences that occurred during the transesterification reaction and the washing process.In detail, the choice of images has been made considering the best and worst results of the experimentation campaign.From the selected images of the tests, the colour was analysed, highlighting how the presence of various colour components leads to the characterisation of the different samples.Subsequently, with the wavelet analysis, the coefficients of all the tests were analysed, showing the variability in each phase of the biodiesel production.For both colour and wavelet analysis the images are characterised by the same size of 40 × 20 pixel, suitable for wavelet analysis.In detail, several phases have been analysed concerning the production of biodiesel consisting of the transesterification reaction and the saponification reaction, related to the biodiesel washing phase.For each phase, both successful reactions and reactions that have not occurred were investigated.
Regarding the transesterification reactions, Figures 1-5 were analysed.Figures 1-3 show successful transesterification reactions in which the raw biodiesel and glycerol were separated.Figure 1 shows a transesterification reaction with a clear biodiesel, without mucilage in suspension.Figure 2 shows a transesterification reaction in which, despite the presence of the separation between the light and heavy phase, there is an amount of mucilage.Regarding Figure 3, the separation of the two phases is present but the colour of the mixture is dark.From the analyses carried out, it was confirmed that biodiesel with a dark colour presented a high value of viscosity equal to 12.5 ± 0.01 mm 2 /s, whereas the value imposed by the UNI EN 14214 regulation is 3.5-5.5 mm 2 /s. 2 shows a transesterification reaction in which, despite the presence of the separation between the light and heavy phase, there is an amount of mucilage.Regarding Figure 3, the separation of the two phases is present but the colour of the mixture is dark.From the analyses carried out, it was confirmed that biodiesel with a dark colour presented a high value of viscosity equal to 12.5 ± 0.01 mm 2 /s, whereas the value imposed by the UNI EN 14214 regulation is 3.5-5.5 mm 2 /s.Figures 4-6 show the reactions of transesterification with a non-perfect separation of the light and heavy phase.In detail, in the reactions shown in Figures 4 and 5 there is a huge quantity of soapy pastes, indeed the mixture was characterised by a gelatinous consistence.Figure 6 is a transesterification reaction in which only glycerol was produced, as visible by its dark colour.   2 shows a transesterification reaction in which, despite the presence of the separation between the light and heavy phase, there is an amount of mucilage.Regarding Figure 3, the separation of the two phases is present but the colour of the mixture is dark.From the analyses carried out, it was confirmed that biodiesel with a dark colour presented a high value of viscosity equal to 12.5 ± 0.01 mm 2 /s, whereas the value imposed by the UNI EN 14214 regulation is 3.5-5.5 mm 2 /s.Figures 4-6 show the reactions of transesterification with a non-perfect separation of the light and heavy phase.In detail, in the reactions shown in Figures 4 and 5 there is a huge quantity of soapy pastes, indeed the mixture was characterised by a gelatinous consistence.Figure 6 is a transesterification reaction in which only glycerol was produced, as visible by its dark colour.  2 shows a transesterification reaction in which, despite the presence of the separation between the light and heavy phase, there is an amount of mucilage.Regarding Figure 3, the separation of the two phases is present but the colour of the mixture is dark.From the analyses carried out, it was confirmed that biodiesel with a dark colour presented a high value of viscosity equal to 12.5 ± 0.01 mm 2 /s, whereas the value imposed by the UNI EN 14214 regulation is 3.5-5.5 mm 2 /s.Figures 4-6 show the reactions of transesterification with a non-perfect separation of the light and heavy phase.In detail, in the reactions shown in Figures 4 and 5 there is a huge quantity of soapy pastes, indeed the mixture was characterised by a gelatinous consistence.Figure 6 is a transesterification reaction in which only glycerol was produced, as visible by its dark colour.-6 show the reactions of transesterification with a non-perfect separation of the light and heavy phase.In detail, in the reactions shown in Figures 4 and 5 there is a huge quantity of soapy pastes, indeed the mixture was characterised by a gelatinous consistence.Figure 6 is a transesterification reaction in which only glycerol was produced, as visible by its dark colour.Figures 4-6 show the reactions of transesterification with a non-perfect separation of the light and heavy phase.In detail, in the reactions shown in Figures 4 and 5 there is a huge quantity of soapy pastes, indeed the mixture was characterised by a gelatinous consistence.Figure 6 is a transesterification reaction in which only glycerol was produced, as visible by its dark colour.Figures 4-6 show the reactions of transesterification with a non-perfect separation of the light and heavy phase.In detail, in the reactions shown in Figures 4 and 5 there is a huge quantity of soapy pastes, indeed the mixture was characterised by a gelatinous consistence.Figure 6 is a transesterification reaction in which only glycerol was produced, as visible by its dark colour.The biodiesel wash steps are displayed in Figures 9-11.Each step is characterized by a different amount of water added during the process.The presence of water with impurities underneath the biodiesel indicates more washes are needed.In detail, Figure 9 and 11 indicate that the water is not clear yet, while in Figure 10 there is a huge amount of soaps in the water.The biodiesel wash steps are displayed in Figures 9-11.Each step is characterized by a different amount of water added during the process.The presence of water with impurities underneath the biodiesel indicates more washes are needed.In detail, Figure 9 and 11 indicate that the water is not clear yet, while in Figure 10 there is a huge amount of soaps in the water.Figure 12 represents a failed washing process, in which the separation between biodiesel and water was not take place but a mixture with only soap was formed.The biodiesel correctly produced, after being treated with all the washes needed, according to the reference regulation is shown in Figure 13.

Colour Histogram
In this part, the colour histogram, derived of wavelet analysis of different reactions, is analysed.Table 3 shows the colour histogram of the two successful chemical reactions ( 1) and ( 2).The reaction result (1) has a bright colour and single colour component, while (2) with the double colour components.This shows that the result (2) contains some impurities (mucilages), while the result (1) Figure 12 represents a failed washing process, in which the separation between biodiesel and water was not take place but a mixture with only soap was formed.The biodiesel correctly produced, after being treated with all the washes needed, according to the reference regulation is shown in Figure 13. Figure 12 represents a failed washing process, in which the separation between biodiesel and water was not take place but a mixture with only soap was formed.The biodiesel correctly produced, after being treated with all the washes needed, according to the reference regulation is shown in Figure 13.

Colour Histogram
In this part, the colour histogram, derived of wavelet analysis of different reactions, is analysed.Table 3 shows the colour histogram of the two successful chemical reactions ( 1) and ( 2).The reaction result (1) has a bright colour and single colour component, while (2) with the double colour components.This shows that the result (2) contains some impurities (mucilages), while the result (1) Figure 12 represents a failed washing process, in which the separation between biodiesel and water was not take place but a mixture with only soap was formed.The biodiesel correctly produced, after being treated with all the washes needed, according to the reference regulation is shown in Figure 13.

Colour Histogram
In this part, the colour histogram, derived of wavelet analysis of different reactions, is analysed.Table 3 shows the colour histogram of the two successful chemical reactions ( 1) and ( 2).The reaction result (1) has a bright colour and single colour component, while (2) with the double colour components.This shows that the result (2) contains some impurities (mucilages), while the result (1)

Colour Histogram
In this part, the colour histogram, derived of wavelet analysis of different reactions, is analysed.Table 3 shows the colour histogram of the two successful chemical reactions (1) and ( 2).The reaction result (1) has a bright colour and single colour component, while (2) with the double colour components.This shows that the result (2) contains some impurities (mucilages), while the result (1) shows a biodiesel in which there are no impurities, having a homogeneous colour.

Colour Histogram
In this part, the colour histogram, derived of wavelet analysis of different reactions, is analysed.Table 3 shows the colour histogram of the two successful chemical reactions (1) and ( 2).The reaction result (1) has a bright colour and single colour component, while (2) with the double colour components.This shows that the result (2) contains some impurities (mucilages), while the result (1) shows a biodiesel in which there are no impurities, having a homogeneous colour.
In Table 4 the colour histogram of the experimental tests (3) (4) (5) ( 6), are displayed.The test (3) shows a homogeneous colour but with a darker scale than the test (1).In terms of product viscosity this indicates a higher value than the reference standard for biodiesel.For the failed test results (4) (5) ( 6), the colour of the chemical reactions tends to be darker, and they have a single colour component.The non-separation of biodiesel from glycerol provides a final product with a

Colour Histogram
In this part, the colour histogram, derived of wavelet analysis of different reactions, is analysed.Table 3 shows the colour histogram of the two successful chemical reactions (1) and ( 2).The reaction result (1) has a bright colour and single colour component, while (2) with the double colour components.This shows that the result (2) contains some impurities (mucilages), while the result (1) shows a biodiesel in which there are no impurities, having a homogeneous colour.
In Table 4 the colour histogram of the experimental tests (3) (4) (5) ( 6), are displayed.The test (3) shows a homogeneous colour but with a darker scale than the test (1).In terms of product viscosity this indicates a higher value than the reference standard for biodiesel.For the failed test results (4) (5) ( 6), the colour of the chemical reactions tends to be darker, and they have a single colour component.The non-separation of biodiesel from glycerol provides a final product with a 13.Pure biodiesel.

Colour Histogram
In this part, the colour histogram, derived of wavelet analysis of different reactions, is analysed.Table 3 shows the colour histogram of the two successful chemical reactions (1) and ( 2).The reaction result (1) has a bright colour and single colour component, while (2) with the double colour components.This shows that the result (2) contains some impurities (mucilages), while the result (1) shows a biodiesel in which there are no impurities, having a homogeneous colour.
In Table 4 the colour histogram of the experimental tests (3) (4) (5) ( 6), are displayed.The test (3) shows a homogeneous colour but with a darker scale than the test (1).In terms of product viscosity this indicates a higher value than the reference standard for biodiesel.For the failed test results (4) (5) ( 6), the colour of the chemical reactions tends to be darker, and they have a single colour component.The non-separation of biodiesel from glycerol provides a final product with a

Colour Histogram
In this part, the colour histogram, derived of wavelet analysis of different reactions, is analysed.Table 3 shows the colour histogram of the two successful chemical reactions (1) and ( 2).The reaction result (1) has a bright colour and single colour component, while (2) with the double colour components.This shows that the result (2) contains some impurities (mucilages), while the result (1) shows a biodiesel in which there are no impurities, having a homogeneous colour.
In Table 4 the colour histogram of the experimental tests (3) (4) (5) ( 6), are displayed.The test (3) shows a homogeneous colour but with a darker scale than the test (1).In terms of product viscosity this indicates a higher value than the reference standard for biodiesel.For the failed test results (4) (5) ( 6), the colour of the chemical reactions tends to be darker, and they have a single colour component.The non-separation of biodiesel from glycerol provides a final product with a In Table 4 the colour histogram of the experimental tests (3) (4) (5) ( 6), are displayed.The test (3) shows a homogeneous colour but with a darker scale than the test (1).In terms of product viscosity this indicates a higher value than the reference standard for biodiesel.For the failed test results (4) (5) ( 6), the colour of the chemical reactions tends to be darker, and they have a single colour component.The non-separation of biodiesel from glycerol provides a final product with a homogeneous colour but with a different gradation than reaction (1).The colour analysis of the reaction products allows one to rapidly understand the correct progress of the transesterification reaction and therefore the interruption of the same when the colour of the output product does not correspond to that shown in Figure (1) in Table 3.Moreover, the in-depth study of the colour histogram can give indications about how much the reaction parameters, temperature and catalyst percentage, need to be modified.homogeneous colour but with a different gradation than reaction (1).The colour analysis of the reaction products allows one to rapidly understand the correct progress of the transesterification reaction and therefore the interruption of the same when the colour of the output product does not correspond to that shown in Figure (1) in Table 3.Moreover, the in-depth study of the colour histogram can give indications about how much the reaction parameters, temperature and catalyst percentage, need to be modified.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
(3) (4) (5) In Table 5 different phases of the biodiesel washing process are shown.In detail, the images are relative to biodiesel which is obtained after the decantation phase, that is the separation between biodiesel and water.The analysis of the colour histogram for tests from (7) to (11) shows the presence of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.homogeneous colour but with a different gradation than reaction (1).The colour analysis of the reaction products allows one to rapidly understand the correct progress of the transesterification reaction and therefore the interruption of the same when the colour of the output product does not correspond to that shown in Figure (1) in Table 3.Moreover, the in-depth study of the colour histogram can give indications about how much the reaction parameters, temperature and catalyst percentage, need to be modified.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
(3) (4) (5) In Table 5 different phases of the biodiesel washing process are shown.In detail, the images are relative to biodiesel which is obtained after the decantation phase, that is the separation between biodiesel and water.The analysis of the colour histogram for tests from (7) to (11) shows the presence of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.homogeneous colour but with a different gradation than reaction (1).The colour analysis of the reaction products allows one to rapidly understand the correct progress of the transesterification reaction and therefore the interruption of the same when the colour of the output product does not correspond to that shown in Figure (1) in Table 3.Moreover, the in-depth study of the colour histogram can give indications about how much the reaction parameters, temperature and catalyst percentage, need to be modified.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
(3) (4) (5) In Table 5 different phases of the biodiesel washing process are shown.In detail, the images are relative to biodiesel which is obtained after the decantation phase, that is the separation between biodiesel and water.The analysis of the colour histogram for tests from (7) to (11) shows the presence of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.homogeneous colour but with a different gradation than reaction (1).The colour analysis of the reaction products allows one to rapidly understand the correct progress of the transesterification reaction and therefore the interruption of the same when the colour of the output product does not correspond to that shown in Figure (1) in Table 3.Moreover, the in-depth study of the colour histogram can give indications about how much the reaction parameters, temperature and catalyst percentage, need to be modified.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
(3) (4) (5) In Table 5 different phases of the biodiesel washing process are shown.In detail, the images are relative to biodiesel which is obtained after the decantation phase, that is the separation between biodiesel and water.The analysis of the colour histogram for tests from (7) to (11) shows the presence of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.homogeneous colour but with a different gradation than reaction (1).The colour analysis of the reaction products allows one to rapidly understand the correct progress of the transesterification reaction and therefore the interruption of the same when the colour of the output product does not correspond to that shown in Figure (1) in Table 3.Moreover, the in-depth study of the colour histogram can give indications about how much the reaction parameters, temperature and catalyst percentage, need to be modified.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
(3) (4) In Table 5 different phases of the biodiesel washing process are shown.In detail, the images are relative to biodiesel which is obtained after the decantation phase, that is the separation between biodiesel and water.The analysis of the colour histogram for tests from (7) to (11) shows the presence of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.homogeneous colour but with a different gradation than reaction (1).The colour analysis of the reaction products allows one to rapidly understand the correct progress of the transesterification reaction and therefore the interruption of the same when the colour of the output product does not correspond to that shown in Figure (1) in Table 3.Moreover, the in-depth study of the colour histogram can give indications about how much the reaction parameters, temperature and catalyst percentage, need to be modified.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
(3) (4) In Table 5 different phases of the biodiesel washing process are shown.In detail, the images are relative to biodiesel which is obtained after the decantation phase, that is the separation between biodiesel and water.The analysis of the colour histogram for tests from (7) to (11) shows the presence of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.homogeneous colour but with a different gradation than reaction (1).The colour analysis of the reaction products allows one to rapidly understand the correct progress of the transesterification reaction and therefore the interruption of the same when the colour of the output product does not correspond to that shown in Figure (1) in Table 3.Moreover, the in-depth study of the colour histogram can give indications about how much the reaction parameters, temperature and catalyst percentage, need to be modified.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
(3) (4) In Table 5 different phases of the biodiesel washing process are shown.In detail, the images are relative to biodiesel which is obtained after the decantation phase, that is the separation between biodiesel and water.The analysis of the colour histogram for tests from (7) to (11) shows the presence of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.homogeneous colour but with a different gradation than reaction (1).The colour analysis of the reaction products allows one to rapidly understand the correct progress of the transesterification reaction and therefore the interruption of the same when the colour of the output product does not correspond to that shown in Figure (1) in Table 3.Moreover, the in-depth study of the colour histogram can give indications about how much the reaction parameters, temperature and catalyst percentage, need to be modified.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
(3) (4) In Table 5 different phases of the biodiesel washing process are shown.In detail, the images are relative to biodiesel which is obtained after the decantation phase, that is the separation between biodiesel and water.The analysis of the colour histogram for tests from (7) to (11) shows the presence of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
In Table 5 different phases of the biodiesel washing process are shown.In detail, the images are relative to biodiesel which is obtained after the decantation phase, that is the separation between biodiesel and water.The analysis of the colour histogram for tests from (7) to (11) shows the presence of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product. of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
(7) (8) (9) (10) of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product. of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
(7) (8) (9) (10) of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product. of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.

Chemical Reaction Colour Histogram Chemical Reaction Colour Histogram
(7) (8) (9) (10) of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product. of double colour.This indicates the presence of impurities and therefore the need to repeat the washings.The test (12) refers to a failed washing process, in which the separation between biodiesel and water did not occur.The detailed analysis of the colour allows to have precise information on how the washing phases proceeds.The wavelet analyses carried out allows one to identify also colour differences that cannot be detected by the human eye.This allows one to optimise the washing process ensuring the complete absence of impurities in the finished product.
In Table 6 colour analysis of the test ( 13) is reported.The analysis of histogram highlights the presence of a single colour and absence of impurities in the final biodiesel.The analysis of the viscosity of the product provided a value of 4.3 ± 0.02 mm 2 /s, as required by the relevant regulation.

Chemical Reaction
Colour Histogram (13) The scalograms, the percentage of energy for each wavelet coefficient, have been calculated.Tables 7 and 8 show the tests results relating to transesterification reactions.The analysis of energy distribution in the scalogram shows a vertically energy variation in the reaction results which represents the relative colour variation due to both the presence of impurities and the production of a product where the separation between biodiesel and glycerol has not occurred.
In Table 6 colour analysis of the test ( 13) is reported.The analysis of histogram highlights the presence of a single colour and absence of impurities in the final biodiesel.The analysis of the viscosity of the product provided a value of 4.3 ± 0.02 mm 2 /s, as required by the relevant regulation.

Chemical Reaction
Colour Histogram (13) The scalograms, the percentage of energy for each wavelet coefficient, have been calculated.Tables 7 and 8 show the tests results relating to transesterification reactions.The analysis of energy distribution in the scalogram shows a vertically energy variation in the reaction results which represents the relative colour variation due to both the presence of impurities and the production of a product where the separation between biodiesel and glycerol has not occurred.
In Table 6 colour analysis of the test ( 13) is reported.The analysis of histogram highlights the presence of a single colour and absence of impurities in the final biodiesel.The analysis of the viscosity of the product provided a value of 4.3 ± 0.02 mm 2 /s, as required by the relevant regulation.

Chemical Reaction
Colour Histogram (13) The scalograms, the percentage of energy for each wavelet coefficient, have been calculated.Tables 7 and 8 show the tests results relating to transesterification reactions.The analysis of energy distribution in the scalogram shows a vertically energy variation in the reaction results which represents the relative colour variation due to both the presence of impurities and the production of a product where the separation between biodiesel and glycerol has not occurred.
In Table 6 colour analysis of the test ( 13) is reported.The analysis of histogram highlights the presence of a single colour and absence of impurities in the final biodiesel.The analysis of the viscosity of the product provided a value of 4.3 ± 0.02 mm 2 /s, as required by the relevant regulation.

Chemical Reaction
Colour Histogram (13) The scalograms, the percentage of energy for each wavelet coefficient, have been calculated.Tables 7 and 8 show the tests results relating to transesterification reactions.The analysis of energy distribution in the scalogram shows a vertically energy variation in the reaction results which represents the relative colour variation due to both the presence of impurities and the production of a product where the separation between biodiesel and glycerol has not occurred.
In Table 6 colour analysis of the test ( 13) is reported.The analysis of histogram highlights the presence of a single colour and absence of impurities in the final biodiesel.The analysis of the viscosity of the product provided a value of 4.3 ± 0.02 mm 2 /s, as required by the relevant regulation.
In Table 6 colour analysis of the test ( 13) is reported.The analysis of histogram highlights the presence of a single colour and absence of impurities in the final biodiesel.The analysis of the viscosity of the product provided a value of 4.3 ± 0.02 mm 2 /s, as required by the relevant regulation.

Chemical Reaction
Colour Histogram (13) The scalograms, the percentage of energy for each wavelet coefficient, have been calculated.Tables 7 and 8 show the tests results relating to transesterification reactions.The analysis of energy distribution in the scalogram shows a vertically energy variation in the reaction results which represents the relative colour variation due to both the presence of impurities and the production of a product where the separation between biodiesel and glycerol has not occurred.
In Table 6 colour analysis of the test ( 13) is reported.The analysis of histogram highlights the presence of a single colour and absence of impurities in the final biodiesel.The analysis of the viscosity of the product provided a value of 4.3 ± 0.02 mm 2 /s, as required by the relevant regulation.

Chemical Reaction
Colour Histogram (13) The scalograms, the percentage of energy for each wavelet coefficient, have been calculated.Tables 7 and 8 show the tests results relating to transesterification reactions.The analysis of energy distribution in the scalogram shows a vertically energy variation in the reaction results which represents the relative colour variation due to both the presence of impurities and the production of a product where the separation between biodiesel and glycerol has not occurred.The scalograms, the percentage of energy for each wavelet coefficient, have been calculated.Tables 7 and 8 show the tests results relating to transesterification reactions.The analysis of energy distribution in the scalogram shows a vertically energy variation in the reaction results which represents the relative colour variation due to both the presence of impurities and the production of a product where the separation between biodiesel and glycerol has not occurred.
In Table 7, the scalogram of the Figures (1) and ( 2) represents the successful reactions.The result (1) is better than (2) which contains some mucillages, because the distribution of the wavelet coefficient energy for (1) is distributed more uniformly than in (2).
In Table 8, the low frequency wavelet coefficient scalogram of the failed reactions (3) and ( 6) are shown, where (3) and ( 6) have a similar energy distribution, and the energy is mainly distributed in the bottom, according to the reaction results.In fact, reaction (3) corresponds to a product characterised by a dark colour similar to (6) that is composed by the solid phase (glycerol) only.
While (4) and ( 5) have less energy variation than (3) and ( 6) because represent reaction in which the complete separation of the phase states has not occurred and they are full of impurities.Then the wavelet coefficient of failed tests and the best test results are compared, which are shown in Figures 14  and 15.From Figure 14, we find that the low frequency wavelet coefficients of the successful test mainly concentrated between the range of 145-150, while the failed tests results are in a lower range, Figure 15.
The scalograms of the washing process results are considered in Table 9.The tests ( 7) and (8) represent the final washing process which shows the main wavelet energy is distributed homogenously in the middle of the figure, while tests ( 9), (10), (11) are the tests which need more washings.In fact, ( 9) and ( 11) are the intermediate washings and have a similar energy distribution while (10) is the first wash, with an energy concentration on the top.( 12) is the failed washing process in which all the energy is concentrated in the low part of the figure.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
For the tests ( 7) and (8) in Table 9, the wavelet coefficients comparison are shown in Figure 16.The comparison of the tests ( 9) and ( 12) is given in Figure 17.The wavelet scalograms in high frequency of all the tests have been analysed.The results obtained did not show a significant difference between the analysed images.For this reason, the results have not been reported.wavelet coefficient of failed tests and the best test results are compared, which are shown in Figures 14 and 15.From Figure 14, we find that the low frequency wavelet coefficients of the successful test mainly concentrated between the range of 145-150, while the failed tests results are in a lower range, Figure 15.
The scalograms of the washing process results are considered in Table 9.The tests ( 7) and (8) represent the final washing process which shows the main wavelet energy is distributed homogenously in the middle of the figure, while tests ( 9), ( 10), (11) are the tests which need more washings.In fact, ( 9) and ( 11) are the intermediate washings and have a similar energy distribution while (10) is the first wash, with an energy concentration on the top.( 12) is the failed washing process in which all the energy is concentrated in the low part of the figure.6.  6 and tests in Table 7.   6.
Energies 2018, 11, x FOR PEER REVIEW 13 of 17 wavelet coefficient of failed tests and the best test results are compared, which are shown in Figures 14 and 15.From Figure 14, we find that the low frequency wavelet coefficients of the successful test mainly concentrated between the range of 145-150, while the failed tests results are in a lower range, Figure 15.
The scalograms of the washing process results are considered in Table 9.The tests ( 7) and (8) represent the final washing process which shows the main wavelet energy is distributed homogenously in the middle of the figure, while tests ( 9), ( 10), (11) are the tests which need more washings.In fact, ( 9) and ( 11) are the intermediate washings and have a similar energy distribution while (10) is the first wash, with an energy concentration on the top.( 12) is the failed washing process in which all the energy is concentrated in the low part of the figure.6.   6 and tests in Table 7.   6 and tests in Table 7.
Table 9.The wavelet coefficient scalogram of the washing process in low frequency.6 and tests in Table 7.
Table 9.The wavelet coefficient scalogram of the washing process in low frequency.6 and tests in Table 7.The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.
The best result of the washing process is shown in Table 10.It can be seen from the scalogram that the percentage of the high wavelet coefficients is small, thus the change in the reaction result is small, which reflects that the cleaning is the best.For the tests ( 7) and (8) in Table 9, the wavelet coefficients comparison are shown in Figure 16.The comparison of the tests ( 9) and ( 12) is given in Figure 17.The wavelet scalograms in high frequency of all the tests have been analysed.The results obtained did not show a significant difference between the analysed images.For this reason, the results have not been reported.7) and (8) in Table 9.  9), ( 10), (11) and (12) shown in Table 9.

Conclusions
The results of the wavelet analysis for the chemical reactions and washing process suggest that the wavelet technique is a good way to reflect the energy distribution in testing.The results obtained show that the reactions examined by through the colour histogram, showed information satisfactorily relating to the progress of the biodiesel production process.Especially using low frequency wavelet coefficients, a valid characterization of the quality of the tests was provided, which is consistent with the experimental results.The scalogram and wavelet method in this work only provide a preliminary analysis of the sample in terms of colour and presence of impurities.The colour histogram and wavelet analysis of production process in the industrial field could be used to evaluate the correct trend of any   For the tests ( 7) and (8) in Table 9, the wavelet coefficients comparison are shown in Figure 16.The comparison of the tests ( 9) and ( 12) is given in Figure 17.The wavelet scalograms in high frequency of all the tests have been analysed.The results obtained did not show a significant difference between the analysed images.For this reason, the results have not been reported.9.  9), ( 10), (11) and (12) shown in Table 9.

Conclusions
The results of the wavelet analysis for the chemical reactions and washing process suggest that the wavelet technique is a good way to reflect the energy distribution in testing.The results obtained show that the reactions examined by through the colour histogram, showed information satisfactorily relating to the progress of the biodiesel production process.Especially using low frequency wavelet coefficients, a valid characterization of the quality of the tests was provided, which is consistent with the experimental results.The scalogram and wavelet method in this work only provide a preliminary analysis of the sample in terms of colour and presence of impurities.The colour histogram and wavelet analysis of production process in the industrial field could be used to evaluate the correct trend of any   For the tests and (8) in Table 9, the wavelet coefficients comparison are shown in Figure 16.The comparison of the tests ( 9) and ( 12) is given in Figure 17.The wavelet scalograms in high frequency of all the tests have been analysed.The results obtained did not show a significant difference between the analysed images.For this reason, the results have not been reported.9.  9), ( 10), (11) and (12) shown in Table 9.

Conclusions
The results of the wavelet analysis for the chemical reactions and washing process suggest that the wavelet technique is a good way to reflect the energy distribution in testing.The results obtained show that the reactions examined by through the colour histogram, showed information satisfactorily relating to the progress of the biodiesel production process.Especially using low frequency wavelet coefficients, a valid characterization of the quality of the tests was provided, which is consistent with the experimental results.The scalogram and wavelet method in this work only provide a preliminary analysis of the sample in terms of colour and presence of impurities.The colour histogram and wavelet analysis of production process in the industrial field could be used to evaluate the correct trend of any  For the tests ( 7) and (8) in Table 9, the wavelet coefficients comparison are shown in Figure 16.The comparison of the tests ( 9) and ( 12) is given in Figure 17.The wavelet scalograms in high frequency of all the tests have been analysed.The results obtained did not show a significant difference between the analysed images.For this reason, the results have not been reported.7) and (8) in Table 9.  9), ( 10), (11) and (12) shown in Table 9.

Conclusions
The results of the wavelet analysis for the chemical reactions and washing process suggest that the wavelet technique is a good way to reflect the energy distribution in testing.The results obtained show that the reactions examined by through the colour histogram, showed information satisfactorily relating to the progress of the biodiesel production process.Especially using low frequency wavelet coefficients, a valid characterization of the quality of the tests was provided, which is consistent with the experimental results.The scalogram and wavelet method in this work only provide a preliminary analysis of the sample in terms of colour and presence of impurities.The colour histogram and wavelet analysis of production process in the industrial field could be used to evaluate the correct trend of any  9.For the tests ( 7) and (8) in Table 9, the wavelet coefficients comparison are shown in Figure 16.The comparison of the tests ( 9) and ( 12) is given in Figure 17.The wavelet scalograms in high frequency of all the tests have been analysed.The results obtained did not show a significant difference between the analysed images.For this reason, the results have not been reported.7) and (8) in Table 9.  9), ( 10), (11) and (12) shown in Table 9.

Conclusions
The results of the wavelet analysis for the chemical reactions and washing process suggest that the wavelet technique is a good way to reflect the energy distribution in testing.The results obtained show that the reactions examined by through the colour histogram, showed information satisfactorily relating to the progress of the biodiesel production process.Especially using low frequency wavelet coefficients, a valid characterization of the quality of the tests was provided, which is consistent with the experimental results.The scalogram and wavelet method in this work only provide a preliminary analysis of the sample in terms of colour and presence of impurities.The colour histogram and wavelet analysis of production process in the industrial field could be used to evaluate the correct trend of any  9), ( 10), (11) and (12) shown in Table 9.

Conclusions
The results of the wavelet analysis for the chemical reactions and washing process suggest that the wavelet technique is a good way to reflect the energy distribution in testing.The results obtained show that the reactions examined by through the colour histogram, showed information satisfactorily relating to the progress of the biodiesel production process.Especially using low frequency wavelet coefficients, a valid characterization of the quality of the tests was provided, which is consistent with the experimental results.The scalogram and wavelet method in this work only provide a preliminary analysis of the sample in terms of colour and presence of impurities.The colour histogram and wavelet analysis of production process in the industrial field could be used to evaluate the correct trend of any production process and could be useful to inspect the various steps during process, avoiding any prospect of wrong protraction.In this way it is possible to reduce additional industrial costs.The correlation between wavelet coefficients and chemical physical properties should be explored in a future investigation

Figures 4
show the reactions of transesterification with a non-perfect separation of the light and heavy phase.In detail, in the reactions shown in Figures4 and 5there is a huge quantity of soapy pastes, indeed the mixture was characterised by a gelatinous consistence.Figure6is a transesterification reaction in which only glycerol was produced, as visible by its dark colour.

Figures 7 -
Figures 7-12 correspond to the different phases of the washing process to which the biodiesel is subjected.Figures 7 and 8 are the final washing stagee of the biodiesel where the surface separation of the water from the clean biodiesel is visible.

Figures 7 - 17 Figure 6 .
Figures 7-12 correspond to the different phases of the washing process to which the biodiesel is subjected.Figures 7 and 8 are the final washing stagee of the biodiesel where the surface separation of the water from the clean biodiesel is visible.

Figures 7 -
Figures 7-12 correspond to the different phases of the washing process to which the biodiesel is subjected.Figures 7 and 8 are the final washing stagee of the biodiesel where the surface separation of the water from the clean biodiesel is visible.

Figures 7 -
Figures 7-12 correspond to the different phases of the washing process to which the biodiesel is subjected.Figures 7 and 8 are the final washing stagee of the biodiesel where the surface separation of the water from the clean biodiesel is visible.
steps are displayed in Figures 9-11.Each step is characterized by a different amount of water added during the process.The presence of water with impurities underneath the biodiesel indicates more washes are needed.In detail, Figures9 and 11indicate that the water is not clear yet, while in Figure10there is a huge amount of soaps in the water.

Figure 9 .
Figure 9. First-step washing process of the biodiesel, 200 mL H 2 O.

Figure 10 .
Figure 10.Second-step washing process of the biodiesel, 100 mL H2O.Figure 10.Second-step washing process of the biodiesel, 100 mL H 2 O.

Figure 12 .
Figure 12.Failed washing process of the biodiesel.

Figure 11 .
Figure 11.Third-step washing process of the biodiesel, 50 mL H 2 O.

Figure 12 .
Figure 12.Failed washing process of the biodiesel.

Figure 12 .
Figure 12.Failed washing process of the biodiesel.
Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient

Figure 14 .
Figure 14.The comparison between tests in Table6.

Figure 15 .
Figure 15.The comparison of the between the test (1) in Table6and tests in Table7.

Figure 14 .
Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient

Figure 14 .
Figure 14.The comparison between tests in Table6.

Figure 15 . 9 .
Figure 15.The comparison of the between the test (1) in Table6 and tests

Figure 15 .
Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient

Figure 15 .
Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient

Figure 15 .
Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient

Figure 15 .
Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient
Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient
Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient
Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient

Energies 2018 ,
11, x FOR PEER REVIEW 15 of 17 Figure Chemical Reaction Scalogram: Percentage of Energy for Each Wavelet Coefficient

Table 1 .
Analysis of waste frying peanut oil.

Table 2 .
Percentage yield of the reactions.

Table 3 .
The colour histogram of successful reactions.

Table 3 .
The colour histogram of successful reactions.

Table 3 .
The colour histogram of successful reactions.

Table 3 .
The colour histogram of successful reactions.

Table 3 .
The colour histogram of successful reactions.

Table 4 .
The colour histogram of failed reactions.

Table 4 .
The colour histogram of failed reactions.

Table 5 .
The colour histogram of washing process results.

Table 4 .
The colour histogram of failed reactions.

Table 5 .
The colour histogram of washing process results.

Table 4 .
The colour histogram of failed reactions.

Table 5 .
The colour histogram of washing process results.

Table 4 .
The colour histogram of failed reactions.

Table 5 .
The colour histogram of washing process results.

Table 4 .
The colour histogram of failed reactions.

Table 5 .
The colour histogram of washing process results.

Table 4 .
The colour histogram of failed reactions.

Table 5 .
The colour histogram of washing process results.

Table 4 .
The colour histogram of failed reactions.

Table 5 .
The colour histogram of washing process results.

Table 4 .
The colour histogram of failed reactions.

Table 5 .
The colour histogram of washing process results.

Table 5 .
The colour histogram of washing process results.

Table 5 .
The colour histogram of washing process results.

Table 5 .
The colour histogram of washing process results.

Table 5 .
The colour histogram of washing process results.

Table 5 .
The colour histogram of washing process results.

Table 5 .
The colour histogram of washing process results.

Table 5 .
The colour histogram of washing process results.

Table 5 .
The colour histogram of washing process results.

Table 5 .
The colour histogram of washing process results.

Table 6 .
The best washing process result.

Table 7 .
Comparison of the low frequency scalogram.

Table 6 .
The best washing process result.

Table 7 .
Comparison of the low frequency scalogram.

Table 6 .
The best washing process result.

Table 7 .
Comparison of the low frequency scalogram.

Table 6 .
The best washing process result.

Table 7 .
Comparison of the low frequency scalogram.

Table 6 .
The best washing process result.

Table 6 .
The best washing process result.

Table 7 .
Comparison of the low frequency scalogram.

Table 6 .
The best washing process result.

Table 7 .
Comparison of the low frequency scalogram.

Table 9 .
The wavelet coefficient scalogram of the washing process in low frequency.

Table 9 .
The wavelet coefficient scalogram of the washing process in low frequency.

Table 9 .
The wavelet coefficient scalogram of the washing process in low frequency.

Table 10 .
The best result of the washing process.

Percentage of Energy for Each Wavelet Coefficient Percentage of Energy for Each Wavelet Coefficient
Energies 2018, 11, x FOR PEER REVIEW 15 of 17

Table 10 .
The best result of the washing process.

Table 10 .
The best result of the washing process.

Table 10 .
The best result of the washing process.

Table 10 .
The best result of the washing process.

Table 10 .
The best result of the washing process.