Classiﬁcation of Monoﬂoral Honeys by Measuring Electrical Impedance Based on Neural Networks

: The study of electrical impedance applied to food has become a method with great potential for use in the food industry, which allows the monitoring and control of quality processes in a safe and non-invasive way. Recent research has shown that this technique can be an alternative method to determine the ﬂoral origin of the honey bee ( Apis mellifera L.) and acquire information on chemical and physical properties such as conductivity, ash content and acidity. In this work, the electrical impedance of six monoﬂoral honey samples from diverse origins and one commercial multi-ﬂoral honey were measured using a low-cost impedance meter, obtaining 101 samples (reactance (X) versus resistance (R)), with a frequency sweep between 1 Hz and 25 MHz in all the honeys analyzed. This shows that it is possible, by using a multilayer neural network trained from these data, to classify with 100% accuracy between these honeys and, thereby, quickly and easily determine the ﬂoral origin of the honey. This is without the need to use the chemical data or equivalent electrical models.


Introduction
Electrical impedance (Z) [1] is defined as the total opposition a device, circuit, substance or living tissue offers to the flow of an alternating current (AC) to a specific frequency.It is represented as a complex number with a graphic representation on a complex plane with a real part (resistance, R) and an imaginary part (reactance, X), expressed by using the rectangular coordinates in the form of R + j•X, or in the polar form as a magnitude and phase angle: There are two alternatives for impedance measurement, the LCR meter, also known as the LCR bridge (with various configurations such as Schering [3] and the Maxwell bridge [4]), and the Impedance/Gain-Phase analyzer [5,6].The first one is only suitable for pure components: inductors (L), capacitors (C), or resistors (R).
The Impedance/Gain-Phase analyzer is a powerful device capable of obtaining diagrams separately, both in magnitude and in the phase of any network, electronic circuit, substance or living tissue which has an input and an output [7][8][9].These variables are represented according to frequency [10].A frequency sweep with a sinusoidal signal is performed on the network with a specific criterion regarding the initial, intermediate and final frequency values; the number of points; linear or logarithmic sweep, etc.The magnitude diagram at each frequency is obtained by dividing the output amplitude by the input amplitude to the network.The phase diagram for each frequency is obtained from the phase difference between the network output and input signals.
The use of electrical impedance (EI) in the agri-food industry represents multiple advantages, such as its speed, economy, easy implementation, as well as being non-destructive and respectful of the environment, and represents great potential to replace traditional methods, which saves time, costs and staff training [11].
It is a very good option compared to traditional analysis methods, since it allows field and real-time measurements, as well as being easy to move and use [12].
Most of the studies carried out with this technique focus on the evaluation of the quality of meat and fish products, as well as on the characterization of the changes generated during the thermal processes and ripening of fruits [12].
In recent literature reviews, the electrical impedance technique has been used to detect and quantify toxic adulterants in food and bioconsumables, including honey, showing a constant variation in electrical impedance with the increase in the percentage of adulterant in the solution [13].
Likewise, this method has also been used to determine different botanical origins of honey [14,15] and as an alternative method to complement the labeling according to European legislation [16], in order to avoid unfair competition through false labeling.
Honey adulteration is a prominent global problem in the modern food supply chain.The most common case is cutting honey with cheap and readily available sugar-based sweeteners, such as high-fructose corn syrup [17].Numerous studies have sought to detect the presence of sucrose as an adulterant in honey varieties selected from different floral origins using the electrical impedance spectroscopy technique with success [18].
Classically, the determination of the botanical origin of honey has been carried out by melissopalynological methods.Depending on the number of species used to obtain nectar for honey production, it can be classified into mono-floral and multifloral honey.This information allows the producer to classify the product according to the botanical origin, according to the predominant species in the area [19].
The composition of honey, in addition to being influenced by the flora visited by foraging bees [3,20], also depends on the edaphic and climatological conditions of the region, factors that influence pollen content, color, smell, flavor, texture and relative humidity [21].
The use of statistical methods on physical-chemical results has been a useful tool to characterize different types of honey.Electrical conductivity, pH and hydroxymethylfurfural (HMF) are the chemical parameters that are most used to predict the floral origin of honey samples [22].
On the other hand, the use of data mining methods and decision trees for the analysis of physical-chemical parameters can very well produce the structure of the data set [23].
Artificial neural networks are a computational model inspired by the behavior observed in its biological counterpart [24].For example, the use of remote sensing and photogrammetric tools using artificial neural networks as a tool to support the practical use and improvement of precision agriculture techniques is becoming more and more common [25].
Rodriguez et al. studied the physicochemical properties through a probabilistic neural network (PNN) system with a Bayesian classifier with attributes and physicochemical properties, obtaining statistically significant differences and classifications between 95 and 100% accuracy [26].Other physical parameters such as temperature, humidity, carbon dioxide concentration and hive weight have also been used to identify population variation through the use of artificial neural networks, allowing the future prediction of physical variables that directly affect health and hive population production [27].
Neural networks have also been successfully applied to pollen grain classification in palynology [28].
Its use is widespread in many fields.In honey analysis, comparative studies of various machine learning algorithms have been carried out for the classification of unifloral honeys [29].In this study, a classifying neural network of the patternnet type [30] is used.
A principal component analysis (PCA) has been used to reduce the number of inputs to the neural network and for an adequate visualization of the experimental results [31], either directly, to reduce the dimensionality when chemical parameters are used directly [23], or on the parameters of the equivalent electrical model [7].
Through this work, a novel approach is provided, since we show that it is possible to classify the type of honey directly from the complex impedance data with a neural network without the need to refer to the data of the melissopalynological analysis or a previously adjusted electrical model.

Description of the Honeys Used
Six of the seven samples, corresponding to sample numbers 1, 2, 3, 4, 5 and 7, were provided by the Association of Beekeepers of the Community of Madrid (APIS-CAM).These samples were from local beekeepers, with settlements located in different areas of the central peninsular plateau.
Sample number 6, corresponding to the "thousand flowers" honey, is a commercial multifloral honey, whose physicochemical values have been determined according to the Guide-to-mieles-monoflorales-Ibéricas-Apinevada-Pajuelo-2018, and according to the Directive 110/2001 CE, RD 1049/2003 in Spain.
The six samples provided by Apiscam were harvested in the months of June and July of the year 2020 and analyzed in the same period using methods established according to current legislation to determine the pollen content and other chemical physical parameters, such as moisture content, hydroxymethylfurfural (HMF), conductivity and pH, among others.All the samples used in this study are classified as monofloral, according to the percentage of dominant pollen present in the honey.
The value that differentiates one honey from another is mainly associated with the botanical origin, since the composition of the pollen determines both the organoleptic characteristics and the physicochemical parameters of the honeys obtained [32].
In the samples analyzed (Table 1) the values of humidity, electrical conductivity, HMF and pH are within the values established in current legislation [33].In relation to pH, there is a direct relationship between the pH of honey and its floral origin [34].In our study, no honey exceeds values of 4.5 (Table 1), although samples 3 and 4 represent higher values than the rest of the honeys, which is probably associated with their botanical origin (viborera and rapeseed).
The normal values of the pH of honey range between 3.2 and 4.5, in such a way that this natural acidity allows the inhibition of the growth of microorganisms and preserves the honey [35], while forest honeys present higher values [36].
The color is also very important to define the origin and be able to grant its commercial classification as a monofloral honey, being a primary characteristic for commercial classification.The units in which the different classes of color in honey are expressed are the Pfund scale units, and this measurement can be made by comparing the honey with a reference standard that indicates the floral origin of the honey [35].
Regarding the humidity percentage of the samples obtained, all have values below 20%, complying with the values established in Royal Decree 1049/2003.These moisture values indicate, regardless of other parameters, that these honeys have a greater tendency toward granulation and less fermentation.
On the other hand, all the samples have low contents of hydroxymethylfurfural (HMF), with rapeseed honey showing the highest value but far from the legal maximum of 40 mg/kg [37].This indicator, composed of an aldehyde and a furan resulting from the decomposition of monosaccharides, particularly fructose in an acid medium [38], is an important quality factor for honey, as it reflects the freshness of the samples and the conditions in which it was stored, as well as the treatment received and the age of the honey.
With respect to the floral origin, there is no criterion in the legislation that requires a honey to be florally named.For this reason, the criterion that is applied is related to the production and the melissopalynological analysis, in such a way that it is the beekeeper, who, taking into account the percentage of predominant pollen and the main botanical species present in the place of production, provides the monofloral denomination of honey.
Table 2 shows the percentages of pollens identified according to the analysis method indicated above: The current regulations that regulate the European honey market [37] consider, among other aspects, that honey can be labeled with indications that refer to its vegetable and geographical origin, as long as it comes from the indicated origin, and also differentiates two types of honey according to its vegetable origin, flower honeys or nectar and honeydew honeys.
The lack of specificity in the current regulations, both national and European, to delimit the botanical and geographical origin of nectar honeys through palynological criteria has led to consideration in recent decades of honey as monofloral when the percentage of the representation of a pollen type is greater than 45% [39].
Numerous authors have directly related the influence they have on the characteristics, both physicochemical and organoleptic, of the plant species and the flora visited by foraging bees [3,20], as well as the influence of the climatic and soil conditions of the place of cultivation, where they are collected [40], and the handling practices carried out by the beekeeper during their extraction and storage [41].

Equipment Used to Measure Electrical Impedance
A Digilent Analog Discovery 2™ (Digilent Inc. ® , Pullman, Washington, DC, USA; henceforth DAD2) [42] was used for the impedance measurement.DAD2 is a low-cost multi-function instrument that allows users to measure, visualize, generate, record and control mixed signal circuits of all kinds.To facilitate the impedance measurement, an adapter module specially designed for this function was used [43].
Figure 1 shows the DAD2, the adapter card for impedance measurement and the standard 2.54 mm tip used with equal spacing.For the measurement, the meter application was configured with a frequency sweep range from 1 Hz to 25 MHz with logarithmic increment and 101 samples.The range for the impedance modulus was established at 100 MΩ and a sinusoidal excitation of 1 V amplitude, which is adequate for all the analyzed myeles.Figure 2 shows the configured application.For the measurement, the meter application was configured with a frequency sweep range from 1 Hz to 25 MHz with logarithmic increment and 101 samples.The range for the impedance modulus was established at 100 MΩ and a sinusoidal excitation of 1 V amplitude, which is adequate for all the analyzed myeles.Figure 2 shows the configured application.

Module
For the measurement, the meter application was configured with a frequency sweep range from 1 Hz to 25 MHz with logarithmic increment and 101 samples.The range for the impedance modulus was established at 100 MΩ and a sinusoidal excitation of 1 V amplitude, which is adequate for all the analyzed myeles.Figure 2 shows the configured application.

Neural Networks to Sorting
One type of neural network was used from the Matlab libraries: A sorting network, "patternnet" [30], to distinguish between the 6 cases of unifloral honey and the commercial multifloral honey.This multilayer neural network model employs only 1 internal

Neural Networks to Sorting
One type of neural network was used from the Matlab libraries: A sorting network, "patternnet" [30], to distinguish between the 6 cases of unifloral honey and the commercial multifloral honey.This multilayer neural network model employs only 1 internal layer with 5 neurons using the proportion 75/15/15 of the data for the process of Training, Validation and Testing during learning in a total of 50 repetitions.The Training Function selected was the scaled conjugate gradient backpropagation ("trainscg" in Matlab language).This pattern recognition network is a type of feedforward network that can be trained to classify inputs according to target classes, and internally uses a sigmoid function as the activation function [44].The target data consist of vectors of all zero values except for a 1 in element i, where i is the class they are to represent.

Evolution of the Impedance Depending on the Varieties of Honey
Figure 3 shows the evolution of the impedance expressed as reactance versus resistance for the seven types of honey analyzed at an ambient temperature of about 25 • C. The electrical equivalent corresponds to a series R/C circuit.
Value of the high resistive component at low frequencies (red dot), between 0.35 MΩ and 2.5 MΩ for a frequency of 1 Hz.

2.
Relative maximum (blue dot) at medium frequencies (between 30 Hz and 1 kHz).In this area, the capacitive behavior is minimized with reactancy values between 6 kΩ and 70 kΩ.

3.
Relative minimum (green point) (with a negative maximum value of the capacitive component) with frequency values between 10 kHz and 100 kHz and reactance values between 0.1 MΩ and 1 MΩ.

4.
Common point (grey dot) at high frequency (25 MHz), where all the curve-confluence and the effect of the parasitic components of the measurement system are already evident.

Evolution of the Impedance Depending on the Varieties of Honey
Figure 3 shows the evolution of the impedance expressed as reactance ve sistance for the seven types of honey analyzed at an ambient temperature of abou The electrical equivalent corresponds to a series R/C circuit.Each curve has a characteristic evolution, see Tables 3-5: 1. Value of the high resistive component at low frequencies (red dot), betwe MΩ and 2.5 MΩ for a frequency of 1 Hz. 2. Relative maximum (blue dot) at medium frequencies (between 30 Hz and 1 k this area, the capacitive behavior is minimized with reactancy values bet kΩ and 70 kΩ.3. Relative minimum (green point) (with a negative maximum value of the cap component) with frequency values between 10 kHz and 100 kHz and reactan ues between 0.1 MΩ and 1 MΩ.As can be seen in Figure 3, if the position of the points (red and blue) is analyzed, the honeys can be grouped into three clearly differentiated groups (G1, G2 and G3).On the other hand, it is clearly seen that each type of honey has its own zone in the graph, which at first glance already allows us to intuit that the neural network will behave well when classifying and require little complexity in its structure.On the other hand, this goes to show that it is not necessary to extract the parameters of equivalent electric models or use a PCA analysis to classify honey varieties, as has been previously commented.

Results of the Classified with Patternnet Neural Network
As mentioned in Section 2.3, a distribution of the data was made for the training of the neural network and a total of 15 repetitions was used for each honey sample, allocating 10 to the training process and five to the challenge process.
Tables 6-9 show the result of the sorting process (value = 1: case selected by the NN; value→0: case discarded by the NN) for 35 challenges (five for each type of honey).Similar sorting results with this type of neural network can be found in this work by other authors [1] with table olives.

Relationship of Physical-Chemical Parameters of the Samples with the Characteristic Values of Electrical Impedance of Each Variety of Unifloral Honey
In the graph (Figure 3), three groups of honeys can be seen, from lowest to highest resistive value (R); a first group (G1) that corresponds to uncatalogued honey and commercial honey (values less than 0.5 × 10 6 Ω); a second group (G2) that would include the two viperera samples and the rapeseed one (near values to 0.5 × 10 6 Ω); and a third more resistive group (G3) with sample 14/10 of viperera and lavender honey (higher values than 1.5 × 10 6 Ω).
Regarding the viperera samples, two of them are in the middle of the graph, and the third in the group with the highest resistive values.This may be due to the influence of the botanical origin and the botanical diversity of the geographical area of honey production.Numerous authors conclude that the differences observed in the samples for all the parameters analyzed are mainly associated with the botanical origin, since the composition of the pollen and the botanical diversity determine both the organoleptic characteristics and the physical-chemical parameters of the honeys [32].
On the other hand, uncatalogued honey, together with commercial honey, shows much less resistance (R) than the rest of the honeys, placing it in the first group of the graph.This may be because they are products derived from honeydew or myelates, with very different physical-chemical characteristics from nectar honeys, which could justify the lower resistance (R) compared to the monofloral honeys analyzed in the study.
On the other hand, it should be noted that the official quality standard for Spanish honey (BOE 186 of 5/8/2013) already requires defining the type of honey according to its Similar sorting results with this type of neural network can be found in this work by other authors [1] with table olives.

Relationship of Physical-Chemical Parameters of the Samples with the Characteristic Values of Electrical Impedance of Each Variety of Unifloral Honey
In the graph (Figure 3), three groups of honeys can be seen, from lowest to highest resistive value (R); a first group (G1) that corresponds to uncatalogued honey and commercial honey (values less than 0.5 × 10 6 Ω); a second group (G2) that would include the two viperera samples and the rapeseed one (near values to 0.5 × 10 6 Ω); and a third more resistive group (G3) with sample 14/10 of viperera and lavender honey (higher values than 1.5 × 10 6 Ω).
Regarding the viperera samples, two of them are in the middle of the graph, and the third in the group with the highest resistive values.This may be due to the influence of the botanical origin and the botanical diversity of the geographical area of honey production.Numerous authors conclude that the differences observed in the samples for all the parameters analyzed are mainly associated with the botanical origin, since the composition of the pollen and the botanical diversity determine both the organoleptic characteristics and the physical-chemical parameters of the honeys [32].
On the other hand, uncatalogued honey, together with commercial honey, shows much less resistance (R) than the rest of the honeys, placing it in the first group of the graph.This may be because they are products derived from honeydew or myelates, with very different physical-chemical characteristics from nectar honeys, which could justify the lower resistance (R) compared to the monofloral honeys analyzed in the study.
On the other hand, it should be noted that the official quality standard for honey (BOE 186 of 5/8/2013) already requires defining the type of honey according to its origin (flower honey or nectar and honeydew honey) and establishing the minimum characteristics of the specific composition that each honey must contain.

Humidity
In relation to this parameter, the moisture content does seem to have a direct relationship with the impedance values.
Honey samples with low moisture values, corresponding to viborera 14/10 (14.8%) and lavender sample (15.1%), have higher resistive values, whose relative maximums in the graph (Figure 3) are above 1.5 × 10 6 Ω on the R axis corresponding to the resistance.
On the other hand, the honey samples that offer less resistance are sample logued honey and commercial honey, with higher percentages of moisture, ranging between 17 and 18%.

HMF (Hidroximetilfurfural)
The HMF does not seem to influence the resistive curve of the samples.

Coloration
The color of the honey is very important to define the origin and grant its commercial classification as monofloral honeys, being a primary characteristic for the commercial classification [35].
It is a composition factor that is linked almost exclusively to its botanical origin.In turn, it is also linked to conductivity, since it depends on the content of mineral salts.Honeys with high mineral content are have high conductivities [45].
In this study, a direct relationship between honey color and electrical impedance has not been observed.
However, other studies have contrasted conductivity versus color values.According to the study carried out by Santos et al., it was determined that the darkest honeys present the highest conductivity values [45].Likewise, Blanco et al. also concluded that darker honeys such as honeydew have higher conductivity values than honeys with lighter colors (rosemary, orange blossom, lavandula stoechas...) [46].In general, honeys of floral origin have lower conductivities (and lighter colors) than honeydew honeys (darker) [47].
Table 10 shows the relationship of the color and conductivity of the monofloral honeys shown.For this parameter, it is not observed that the coloration influences the resistance values of the honey, although it should do since it is linked to conductivity.

Conductivity
As with color, it has not been observed that conductivity influences the position of the varieties in the electrical impedance evolution graph (Figure 3).However, we consider that there should have been a relationship given that, according to other authors, it depends on the salt content and serves to differentiate nectar honey from honeydew honey, which is in salts, given that the higher the electrical conductivity, the greater the amount of salts [45].
On the other hand, ash is a parameter that, despite not being included in the analysis of the samples, also expresses the content of mineral salts and is usually proportional to the tone of the honey [48].
The Honey Regulation [21] obliges a name on the label if a honey is of floral origin or has its origin in the honeydew of some trees (cork oak, holm oak, oak, fir, chestnut, etc.), and sets a conductivity limit of 800 µS/cm (=0.8 mS/cm).Honeydew honeys or their mixtures with floral honeys must have more than that limit, and floral honeys less, except heather (Ericassp); biercol (Callunavulgaris); eucalyptus (Eucaliptusssp); and strawberry tree (Arbutusunedo) honeys.

pH
No relationship is observed between the pH and the resistance of the honeys.

BRIX Degrees
As with humidity, the sugar content does seem to have a relationship with the impedance and the representation of the curves obtained with the neural network.
The two samples that present the highest values of Brix degrees (viperera14/10 and lavender) are located in the third group, with a maximum relative resistance above 1.5 × 10 6 Ω.
On the other hand, it is observed that honeys with values between 80.5 and 81.1 have lower resistive values, which could be due to the fact that the sugar composition of honey is affected by the type of nectar used by bees, as well as by the region and climatic conditions where the honey has been produced [49].

Pollen
Regarding the pollen content of the studied samples, the samples with the highest resistive values correspond to sample 1 (viperera 14/10) and sample 5 (lavender), with a dominant pollen percentage of 50% for both cases.
The samples with higher pollen percentages are framed in less resistive areas of the impedance evolution graph (Figure 3).
The other two honey samples (commercial honey and uncatalogued honey) do not have a pollen analysis.
The pollen content influences the total ash content [49], so it could have a relationship with the impedance of the honey.
The monofloral variety is determined by the highest proportion of pollen of the botanical species, but not exclusively.To avoid possible commercial fraud and preserve the interests of consumers, it is admitted that the predominant pollen may be variable depending on the botanical variety and the amount of pollen it contains.For this reason, the pollen residue of monofloral honey varies between a minimum of 12% in the case of rosemary honey, up to minimum values of 75% in chestnut honey.

Conclusions
The method applied in this study, using the DAD2 device and the analysis of the reactance vs. resistance data in the patternnet-type classifying neural network, was able to discriminate the honey samples according to their botanical origin without the need to process the data previously with other statistical techniques such as PCA, or using equivalent electric models.
The neural network used for the study uses only one internal layer with five neurons and could detect 100% of the cases.
Each honey has a characteristic profile in the X vs. R diagram, showing three groups of similar properties.
The X vs. R curves tend asymptotically to the same values at high frequencies, so they are no longer useful for classification; on the other hand, at higher frequencies there is an increase in parasitic components, which can lead to the misinterpretation of the results.In a practical way, the frequency sweep could be limited to a maximum of 10 MHz.
Around the physicochemical parameters studied, humidity and the percentage of Brix degrees do seem to have a direct relationship with electrical impedance.
The pH and the conductivity do not seem to have a relationship with the discrimination of the honeys, according to the results obtained in the graph of the evolution of electrical impedance.
It has not been observed that coloration influences the resistance values of honey, although it should since it is linked to conductivity.
The pollen content influences the total ash content and consequently the conductivity; however, in this study it has not been possible to establish a direct relationship between the evolution of the impedance and the pollen content of the sample.
In this study, it was verified that the impedance values in the viperera monofloral samples do not allow regrouping of the three samples in the same resistance range.Although there are studies that justify the discrepancy between the physicochemical parameters of the same unifloral honey depending on the geographical area, climatology or diversity of flora of the land, a future line of work is opened in order to emphasize these results and study in depth the discrepancies in the impedance values for honeys of the same floral classification.

Figure 1 .
Figure 1.Device used for impedance measurement: (a) DAD2, the adapter card for impedance measurement; (b) standard tip used of s = 2.54 mm in length and equal separation.

Figure 1 .
Figure 1.Device used for impedance measurement: (a) DAD2, the adapter card for impedance measurement; (b) standard tip used of s = 2.54 mm in length and equal separation.

Figure 2 .
Figure 2. Application configured with a frequency sweep range from 1 Hz to 25 MHz with logarithmic increment and 101 samples.

Figure 2 .
Figure 2. Application configured with a frequency sweep range from 1 Hz to 25 MHz with logarithmic increment and 101 samples.

Figure 3 .
Figure 3. Evolution of the electrical impedance in the honey samples obtained.

Figure 3 .
Figure 3. Evolution of the electrical impedance in the honey samples obtained.

Table 1 .
Physicochemical analysis of the analyzed samples.

Table 2 .
Pollen analysis of the analyzed samples.

Table 4 .
Characteristic values at minimum reactance (more negative).

Table 6 .
Results of the neural network against 35 challenges (from 1 to 10).

Table 7 .
Results of the neural network against 35 challenges (from 11 to 20).

Table 8 .
Results of the neural network against 35 challenges (from 21 to 30).

Table 9 .
Results of the neural network against 35 challenges (from 31 to 35).Figure 4 shows the confusion matrices for Training, Validation and Test.The tests with the challenges showed that the neural network is capable of detecting 100% of the cases correctly.

Table 10 .
Relationship of conductivity and coloration of the samples provided by the Association of Beekeepers of the Community of Madrid (Spain).