# Detection of Adulteration in Food Using Recurrent Neural Network with Internet of Things

Authors: Vishwesh Nagamalla; B. Muthu Kumar; Neha Janu; Anusha Preetham; Syam Machinathu Parambil Gangadharan; Mejdal A. Alqahtani; Rajnish Ratna
Journal: Journal of Food Quality
 (2022)

---

## Abstract

Food is an essential need for human survival. Throughout history, food has been recognised as a crucial need for people in order to maintain good health as well as to treat illness. As with all living things, it is one of the most basic necessities that man has as well as those of all other living creatures. In a recent publication, it was said that an extremely affordable, robust, and biocompatible impedance sensor that serves as a fractional-order element has been created and may be used to distinguish milk and tainted milk. A complete study on milk adulteration includes more than 160 academic articles on the topic. A comprehensive study on milk adulteration is available online. Specifically, the goal of this research is to discover various types of milk adulterants, different approaches for detecting each kind of adulterant, as well as the health hazards associated with milk product adulteration. In the proposed project, the fractional-order element would be investigated for its potential use in the detection of milk adulteration. With this fractional-order element-based impedance sensor, you can distinguish between different types of contaminated milk and different types of faking it, which is quite useful in the detection and differentiation of fake and real milk. According to the researchers, they have created a low-cost, user-friendly instrumentation system for detecting milk adulteration. They hope to commercialise it soon. An automated sensing system for the detection of synthetic milk, based on a microcontroller, has been created in order to reduce the reliance on specialised labour and to improve efficiency. In order to model the sensor, the dipole layer capacitance at the interface of the impedance sensor immersed in milk and the contaminated milk must be taken into account throughout the modelling process. In this study, an electrical equivalent circuit is built, and the correctness of the circuit is shown by both theoretical and experimental investigation. The detection of milk adulteration is classified with the use of Recurrent Neural Networks, and the status is updated in the cloud server with the help of the Internet of Things and Recurrent Neural Networks. It is estimated that the proposed work will have an accuracy rate of 92.31 percent, a sensitivity rate of 75.23 percent, and a specificity rate of 90.12 percent, all of which are higher than the present rate.


---

## Body

## 1. Introduction

As defined by the FDA, adulteration is defined as the fraudulent addition of another substance to any substance with the intent to increase sales or profits. When various articles of food, medicines, and other items degrade as a consequence of the inclusion of low-quality and cheap substances, this is referred to as adulteration [1]. Impure substances are created by introducing any impurities into a material or by removing a critical component from a material. There has been a reduction in the quality of food components as a result of the addition of foreign compounds or the removal of foreign substances [2], and this has been attributed to both the addition and removal of foreign compounds. Adding an adulterant to a food item lowers the quality of the food item while increasing the quantity of that particular food item available for consumption. In the food industry, food adulteration is defined as the act of adding an adulterant to a food item after it has been processed. Whether the adulterant was put on purpose or by accident, it is impossible to say. However, in the majority of situations, the adulterant is intentionally included in the beverage. The majority of these adulterants are purposefully introduced with the objective of increasing profit margins at the expense of the general public’s or the customer’s health [3]. Although almost all food products sold in the market are adulterated, some major food products are heavily adulterated, including spices and milk products, edible oils and beverages, sweets and pulses, as well as processed foods such as rice and cereal products, including flour, maida, sooji, and atta [4]. Chemical analysis is required to detect the presence of mineral poisons in confectionary, pickles, and tea, among other applications. Alums or less expensive and less nutritious adulterants such as rice, potatoes, com, beans, and rye are used to make white bread in many hotels, which is often flavoured with alum or other poisons. It is possible to attain whiteness by scraping off the bran, which eliminates the most nutritionally important component of the grain, specifically, its azotised or flesh-forming part, which is then lost. Often, the baker will pick flour from which the miller has removed the most nutritious component of the grain, and the baker will grind the wheat even more to make the flour even whiter. Beyond having a direct impact on the value of the article, some of these ingredients, such as carbonate and sulphate of lime, silicate of magnesia in the form of soapstone, white clay, carbonate of magnesia, bone dust, and bone ashes, cause the bread to absorb significantly more water, causing it to weigh significantly more than it would otherwise. Used tea leaves that have been redried, willow leaves and twigs, and even iron filings are all possible ingredients in tea, and all of them are plainly visible. Sugar is sometimes mixed with inferior variations of the same product, and the most major impurities in raw sugar are often unintentional dirt and flour, with the flour being the more significant of the two contaminants. In most cases, flour or argemone seed is used to infect mustard, which amounts to half to three-quarters of the end product that is normally sold [5]. Turmeric and cayenne pepper are frequently added after the ingredients have been thoroughly blended in order to enhance the colour and heat. Spices like pepper are often tainted with flour or starch, gypsum, or soil of any type in order to boost their weight and size [6]. Following combustion, microscopists can identify the starchy material, but, after burning, earthy substances will be left as ash, and the polariscope can detect the type of the substance just by looking at it. When it comes to the pepper particles themselves, they may be differentiated by the distinct stellate cells in the outer skin and the hard angular cells in the internal portion of the seed, both of which are found in the outer skin of the pepper seed [7]. The basic foodstuffs, as well as the adulterants that are utilised in their preparation, are discussed in detail.


### 1.1. Causes of Food Adulteration

Because adulteration has been a problem in civilization from the beginning of time, it has been widely acknowledged throughout history. However, because of the tiny number of transactions and the small number of persons engaged, the issue did not seem to be particularly threatening or serious during the period in question [8]. Food adulteration is a common practice among sellers in India, and it is prohibited by law. Moreover, it poses a substantial threat to human health [9]. Modern culture is more prone to food adulteration, with practically no food item being untouched by this heinous behaviour. Most foods, including grains and vegetables, include adulterants, which may be found in almost every kind of food item, from milk to fruits and from veggies to grains. Certain adulterants make their way into the food supply as a result of agricultural practices that are not completely cleaned before use [10]. Few examples of this kind of apparent adulterant are stones, leaves, dirt, sand, and dust, just to name a few of the many possibilities. Customers have the option of cleaning them themselves to make them less hazardous to others. Some of the other adulterants that have been purposely added are either inconspicuous or may be made inconspicuous by skilfully camouflaging with the colour or texture of the meal being cooked. Generally speaking, they are harmful to one’s health, and most of them result in serious health problems such as cancer [11]. Because adulterants decrease the nutritional content of food, they also have a detrimental influence on the health of individuals who consume them, increasing the cost of healthcare as a result of their usage. It is possible that eating contaminated foods regularly may cause a range of health problems. Treatment resistant to incurable disorders and diseases may have a detrimental influence on one’s quality of life, and even one’s life may be threatened by them [12].As previously said, the quality of the meal is lowered when different adulterants are added to milk, and it is obvious from the above explanation that the reasons for the addition of adulterants are many. Aside from the fact that it has a lesser nutritional value, it also has a variety of negative health effects to consider [13]. The dairy industry employs a variety of different sorts of inspections. Classic and creative procedures are employed to detect the presence of different adulterants [14], including a range of traditional and innovative methods. Traditions technologies, although complicated and precise, are also expensive; in contrast, low-cost disposable detectors are available that are both less accurate and less expensive and are thus more widely used [15]. When it comes to detecting different types of adulterants, the newer technique employs a variety of biosensors, each of which has its own set of advantages as well as its own set of limitations. Following extensive investigation into a variety of detection approaches, it has been concluded that a single detector will not be able to detect all adulterants currently on the market [16]. In spite of the fact that a range of adulterants are available, water and whey are the most often used to increase the volume of milk, especially in locations where whey is widely available.The most common ML (also called Shallow Learning) algorithms used for IDS are Decision Tree, K-Nearest Neighbor (KNN), Artificial Neural Network (ANN), Support Vector Machine (SVM), K-Mean Clustering, Fast Learning Network, and Ensemble Methods.The main aim of the proposed work is to develop a complete instrumentation system that automatically detects adulteration in milk. Due to the fact that the phase angle must be converted into a voltage value, the construction of a phase detector circuit will be necessary in order to complete this job [17]. In order to transmit the electrical output to the reading equipment, this must first be achieved. This device might be a simple indicator of the kind of adulterant present, or it could be a microcontroller-based automated system that turns off the flow of milk whenever a sensor detects the presence of an adulterant in the milk supply [18].HPLC, GC, FTIR, ELISA, PCR, etc. are some of the common procedures which are generally used for the detection of some common milk adulterants. Biosensors used for milk adulterant detection ensure real-time specific detection.During the third phase, the objective is to create an electrical equivalent circuit that is analogous to the electrode-electrolyte interface, allowing for a more detailed evaluation of the sensor performance. With the LEVMW software, which is accessible for free download from the Internet, the complex impedance plot obtained experimentally is fitted with a restricted number of discrete components (R, C, and CPE) in the least square sense using a complex impedance plot collected experimentally. This software may be used to simulate both a lumped element impedance sensor and a distributed element impedance sensor, and it then decides which model is the best match for the intricate impedance data that are sent into it [19]. While determining the right similar circuit based on the fit factor, it is vital to take several particular considerations into account when making this decision. When a sensor has been dipped in a variety of polarising fluids, this application may be used to determine the corresponding circuit parameter of the sensor in question. In certain cases, a study of these comparable circuits may be beneficial in determining what distinguishes the sensor from other devices [20].Chicory, tamarind seeds powder and Harmful Effects is Diarrhoea. Explanation: a substance intentionally added that affects the nature and quality of food are called food material.The suggested work is divided into sections, the first of which deals with related work, the second of which deals with the methodology of the proposed work, and the third of which deals with the findings and analysis of the proposed work. This section offers a conclusion as well as recommendations for further study [21].


## 1.1. Causes of Food Adulteration

Because adulteration has been a problem in civilization from the beginning of time, it has been widely acknowledged throughout history. However, because of the tiny number of transactions and the small number of persons engaged, the issue did not seem to be particularly threatening or serious during the period in question [8]. Food adulteration is a common practice among sellers in India, and it is prohibited by law. Moreover, it poses a substantial threat to human health [9]. Modern culture is more prone to food adulteration, with practically no food item being untouched by this heinous behaviour. Most foods, including grains and vegetables, include adulterants, which may be found in almost every kind of food item, from milk to fruits and from veggies to grains. Certain adulterants make their way into the food supply as a result of agricultural practices that are not completely cleaned before use [10]. Few examples of this kind of apparent adulterant are stones, leaves, dirt, sand, and dust, just to name a few of the many possibilities. Customers have the option of cleaning them themselves to make them less hazardous to others. Some of the other adulterants that have been purposely added are either inconspicuous or may be made inconspicuous by skilfully camouflaging with the colour or texture of the meal being cooked. Generally speaking, they are harmful to one’s health, and most of them result in serious health problems such as cancer [11]. Because adulterants decrease the nutritional content of food, they also have a detrimental influence on the health of individuals who consume them, increasing the cost of healthcare as a result of their usage. It is possible that eating contaminated foods regularly may cause a range of health problems. Treatment resistant to incurable disorders and diseases may have a detrimental influence on one’s quality of life, and even one’s life may be threatened by them [12].As previously said, the quality of the meal is lowered when different adulterants are added to milk, and it is obvious from the above explanation that the reasons for the addition of adulterants are many. Aside from the fact that it has a lesser nutritional value, it also has a variety of negative health effects to consider [13]. The dairy industry employs a variety of different sorts of inspections. Classic and creative procedures are employed to detect the presence of different adulterants [14], including a range of traditional and innovative methods. Traditions technologies, although complicated and precise, are also expensive; in contrast, low-cost disposable detectors are available that are both less accurate and less expensive and are thus more widely used [15]. When it comes to detecting different types of adulterants, the newer technique employs a variety of biosensors, each of which has its own set of advantages as well as its own set of limitations. Following extensive investigation into a variety of detection approaches, it has been concluded that a single detector will not be able to detect all adulterants currently on the market [16]. In spite of the fact that a range of adulterants are available, water and whey are the most often used to increase the volume of milk, especially in locations where whey is widely available.The most common ML (also called Shallow Learning) algorithms used for IDS are Decision Tree, K-Nearest Neighbor (KNN), Artificial Neural Network (ANN), Support Vector Machine (SVM), K-Mean Clustering, Fast Learning Network, and Ensemble Methods.The main aim of the proposed work is to develop a complete instrumentation system that automatically detects adulteration in milk. Due to the fact that the phase angle must be converted into a voltage value, the construction of a phase detector circuit will be necessary in order to complete this job [17]. In order to transmit the electrical output to the reading equipment, this must first be achieved. This device might be a simple indicator of the kind of adulterant present, or it could be a microcontroller-based automated system that turns off the flow of milk whenever a sensor detects the presence of an adulterant in the milk supply [18].HPLC, GC, FTIR, ELISA, PCR, etc. are some of the common procedures which are generally used for the detection of some common milk adulterants. Biosensors used for milk adulterant detection ensure real-time specific detection.During the third phase, the objective is to create an electrical equivalent circuit that is analogous to the electrode-electrolyte interface, allowing for a more detailed evaluation of the sensor performance. With the LEVMW software, which is accessible for free download from the Internet, the complex impedance plot obtained experimentally is fitted with a restricted number of discrete components (R, C, and CPE) in the least square sense using a complex impedance plot collected experimentally. This software may be used to simulate both a lumped element impedance sensor and a distributed element impedance sensor, and it then decides which model is the best match for the intricate impedance data that are sent into it [19]. While determining the right similar circuit based on the fit factor, it is vital to take several particular considerations into account when making this decision. When a sensor has been dipped in a variety of polarising fluids, this application may be used to determine the corresponding circuit parameter of the sensor in question. In certain cases, a study of these comparable circuits may be beneficial in determining what distinguishes the sensor from other devices [20].Chicory, tamarind seeds powder and Harmful Effects is Diarrhoea. Explanation: a substance intentionally added that affects the nature and quality of food are called food material.The suggested work is divided into sections, the first of which deals with related work, the second of which deals with the methodology of the proposed work, and the third of which deals with the findings and analysis of the proposed work. This section offers a conclusion as well as recommendations for further study [21].


## 2. Related Works

Several studies have indicated that castor oil, which is often used in the manufacture of groundnut oil, might cause abortions in pregnant women. When the concentration of contaminated material surpasses 0.7 micrograms per kilogramme of body weight, it is considered hazardous. Khesari Dal, which is often found in Arhar Dal, has been connected to a kind of lower limb paralysis known as Lathyrism, which affects the lower limbs. In the Lathyrus sativus species (Khesari Dal), it is thought that the presence of a dangerous amino acid known as Beta oxalyl amino alanine, which is responsible for the aforementioned condition [22], contributes to the development of the disease. This amount of a substance that may be used on a daily basis throughout an individual’s lifetime without having any substantial health repercussions has been defined as the Acceptable Daily Intake (ADI) of the drug [23]. In short-term experiments in rats, the acute dose of erythrosine was lowered from 2.5 to 0.1 mg kg bodyweight because it had an effect on thyroid function and was consequently reduced. It has also been reported that the use of a certain brand of aniseed (saunf), which included very high concentrations of the component ponceau 4R, resulted in the development of symptoms of glossitis of the tongue in newborn babies. Indian food regulations are being amended on a regular basis, based on the findings of toxicological analyses of synthetic food colours conducted by the Central Committee for Food Standards (CCFS) [24]. Following the implementation of these limits, several colours, including amaranth and Fast Red, were banned, and a reduction in the synthetic food colour limit from 200 to 100 parts per million (ppm) in all foods, with the exception of canned products, jams, and jellies, was proposed [21]. The use of synthetic food colours is subject to varying levels of regulation in various countries. Seven synthetic food colours, including Fast Red (which is prohibited in India), are permitted in the United States [25], Iran and Australia each permit thirteen, and the European Union (EU) permits sixteen synthetic food colours that are permitted [26]. European countries have been attempting to harmonise their regulations, and EU directives [27] are responsible for the vast bulk of the limits on the use of food colouring.According to the Food and Drug Administration (FDA), “food safety” refers to food that is devoid of any hazards, whether chronic or acute, that might cause the food to be damaging to the consumer’s health [6]. However, the term “safe food” might mean different things to different people depending on who you are talking to. While it is likely that incorrect cooking and cross-contamination are not viewed as important food safety problems in the Indian setting [28], research from other areas of the globe reveals that many people’s perspective on food safety issues varies based on their mood or the last item they read or saw. In addition to epidemiological surveillance reports of food-borne illnesses, evidence from consumer behaviour such as raw or undercooked food consumption and inadequate hygiene practices persuasively illustrates that outbreaks of food-borne diseases are largely driven by consumer behaviour [29]. When reviewing consumer food safety literature, it is discovered that there are a number of gaps that may have an impact on the development of food-borne diseases in the home setting [30].


## 3. The Proposed Work’s Methodological Framework

The LEVMW is a software programme that is both powerful and easy to use. It is available in both English and Spanish. It includes a huge number of model circuits with names such as A, B, C, …, J, K, O, R, S, and T, and each circuit has a unique set of parameter values, which may be found in Table1. Depending on the kind of parameter, it may be composed of regular lumped components, distributed elements, or a combination of the two types [31]. The findings are given after a comparison of the charting of the experimental data with the model circuits and after estimating the parameters of the model circuits using the CNLS (complex nonlinear least square estimate) technique.Table 1
Fitting parameters of the FOE13 sensor dipped in urea adulterated milk.
Test samplepH valueExp.Q × 102Exp.αR2R1 (kΩ)CP (nF)RD (kΩ)Q1 × 102α1Milk (250 ml)6.621.890.530.9990.1663.840.482.010.681Milk + 0.6 mg/ml urea6.581.860.510.9980.1533.520.351.790.659Milk + 0.8 mg/ml urea6.551.820.490.9970.1503.360.311.330.626Milk + 1.0 mg/ml urea6.521.800.470.9980.1483.330.281.110.618Milk + 1.4 mg/ml urea6.441.780.440.9950.1453.210.251.080.608For the CNLS technique, some of the most relevant aspects of the LEVMW include the following:(a)
The LEVMW software includes a variety of circuits that are ready to use.There are a total of 30 different distributed circuit elements (DCEs) that may be used in the circuits.(b)
It is possible to put complicated, real-world, or imaginary pieces together in a logical manner.It is possible to accept input data in the impedanceZ, the admittance Y, and the dielectric constant of the circuit.It is permissible to utilise this material in conductive, dielectric, electrolytic, and hybrid systems. (f) It provides estimates of the uncertainty associated with each and every parameter that has been computed.The fitting of very sophisticated algorithms, such as those with 5, 10, or even more unknown (free) parameters, is made possible by this feature.The enactment of adulterating food, contaminating food substances by the addition of some substances known as adulterants, is called adulteration.


### 3.1. Modelling of the Sensor in Different Adulterated Milk

We discover that one specific equivalent circuit, as depicted in Figure1, provides the best match in the least square sense for all types of contaminated milk, including those that contain both FOE13 and FOE8, and that this equivalent circuit is the one that provides the best match in the greatest number of ways [31]. This circuit is based on the generalised in-built circuit of the LEVMW microcomputer system, which was further improved. It is necessary to utilise the fit quality factor (FQF) to evaluate which of the two fits is the most appropriate in a certain context. Generally speaking, the smaller the FQF, the better it is predicted to be for the fitting process. In terms of fit quality, the circuit depicted in Figure 1 has the greatest quality factor (FQF). The following are the circuit-fitting parameters to be used: CP, R1, RD, Q1, and 1 are the letters of the alphabet. Each sample is evaluated for its degree of fit, and each one exhibits the analogous circuit shown in the diagram [32]. The degree to which each sample fits the others is determined. The fact that the topology of the electrical equivalent circuit is the same for all test samples should not be overlooked; nevertheless, the values of the parameters (CP, R1, RD, Q1, and 1) differ depending on which test sample is being utilised [33]. When it comes to the software, R1 refers to the pore resistance, CP is referred to as the double-layer capacitance, and RD, Q1, and 1 are all properties of the ZARC element, which are all defined.Figure 1
Electrical equivalent circuit of the sensor dipped in test sample as obtained through LEVMW [32] software.Food adulteration is the act of intentionally debasing the quality of food offered for sale either by the admixture or substitution of inferior substances or by the removal of some valuable ingredient [34].When examining the equivalent circuit shown, it has been determined thatR1, RD, and CP are lumped elements; nevertheless, Q1 and 1 are dispersed elements within the same circuit. Because the impedance of a ZARC element is defined as the product of the Q1, 1, and RD values, it can be calculated as.Generally, if a food contains a poisonous or deleterious substance that may render it injurious to health, it is adulterated. For example, apple cider contaminated withE. coli O157: H7 and Brie cheese contaminated with Listeria monocytogenes are adulterated.It is feasible to establish an approximate equivalent circuit model for the sensor by using the observed impedances of FOE13 in the low-frequency range (5 kHz to 12 kHz) and of FOE8 in the high-frequency range (12 kHz to 20 kHz), which have been dipped in separate test samples.It has been discovered that when the content of urea in milk increases, theR1 and CP values for both sensors drop [29].(i)
Practised as a part of the business strategy(ii)
An imitation of some other food substance(iii)
Lack of knowledge of proper food consumption(iv)
To increase the quantity of food production and sales(v)
Increased food demand for a rapidly growing population.It was decided to utilise a genetic algorithm to store the patterns in Hopfield neural associative memory with a rate of mutation equal to 0.05 and a rate of crossover equal to 0.5. The following is an outline of the algorithm that has been proposed: 1(a) Compute the final weight matrix using the Hebbian learning algorithm after storing allP patterns in the manner described below:(1)wij=1N∑p=1pxipxjp,i≠j;andwij=0,where xip,i=1,2,…,N;p=1,2,…,Pandi≠j is a set of P patterns to be memorized and N is the number of neurons. 1(b) Generate the initial population of weight matrices W1,W2,…,WM by applying mutation on the computed weight matrix in step 1(a). For mutation, the following equation has been used:(2)wijn=∑p=1pxipxjpAnN.i+jwherei≠ji,j=1,…,Nandn=1,…,M,where wijn is ijth value of nth weight matrix in the population.Steps (a) and (b) should be repeated until convergence is achieved or a predetermined number of iterations have been accomplished.Visual testing, chemical tests, and physical tests are some of the methods used to identify prevalent adulterants in food.WhenQ is treated as a constant, the variation in Q is negligibly tiny, yet the variance in Q1 is substantial. The type of change is almost identical in the cases of 1 and 2, with the exception of a lateral movement. It should be noted that the nature of the change for both the sensors FOE8 and FOE13 in that specific polarising medium is the same as for the other sensors. The same data are also used to calculate the values of Q and s of the equation Z = Qs via curve fitting, with the degree of fit represented by R2. The same data are also used to determine the values of Q and s of the equation Z = Qs. The quality of the fit is indicated by the value of R2, and the closer the value of R2 is to one, the better the fit. Modelling of FOE13 and FOE8 after being dipped in milk has been contaminated with urea at various concentrations.Food is a fundamental need of existence. The food we consume is absorbed by our bodies and utilised to fuel metabolic processes and maintain our physical and mental well-being. Food is required for growth as well as for a variety of other biological functions. Vegetables, fruits, beans, pulses, grains, and other foods are included in our regular diet, as well as a variety of other foods. It is possible to eat all of them uncooked or prepare them into delicacies to be enjoyed. However, you may have seen extremely thin milk owing to the addition of water, white, yellow, or black pebbles in raw pulses; white microscopic stones mixed with rice; and other anomalies in recent years. Adulteration is defined by the mixing of materials with food products.


### 3.2. Recurrent Neural Network

The Hopfield neural network (HNN) is made up ofn completely linked units, which means that each unit is connected to every other unit except for one that is connected to itself. Moreover, the network is symmetric since the weight Wij for the connection between unit i and unit j is the same as the weight Wji for the connection between the unit j and the unit i. This might be taken as indicating that there is a single bidirectional link between the two units in the configuration. As a result of the lack of a link between each unit and itself, there is no lasting feedback on its own state value. In the system, there is a certain amount of stability; for example, if just a few connections between nodes (neurons) are disrupted, and the remembered memory is not severely distorted, the network may reply with a “best guess.”To solve the pattern storage and recall problem, a Hopfield network is used. This network is designed to store a collection of patterns, and when given a new pattern, it will return one of the stored patterns that most closely resembles the new pattern. This network is designed to be insensitive to small errors in the input pattern. The Hebb rule is the most straightforward and widely used technique of selecting the weights for an associative memory neural network, often known as an HNN. As long as the input vectors are not correlated (orthogonal), the Hebb rule will produce accurate weights, and when tested with one of the training vectors, the net will produce perfect recall; however, if the input vectors are correlated (orthogonal), the net will produce a response that includes a portion of each of the target values. This is referred to as “cross talk” in the industry.(3)skt+1=∑j≠kyjtwjk+θk.With the help of a threshold function, the new activation valueyit+l at iteration t+1 is calculated as follows:(4)yit+1=+1,ifskt+1>θk,−1,ifskt+1<θk,yktotherwise.In other words,ykt+1=sgnskt+1 while θk=0 considered only for simplicity. A particular neuron k in the network becomes in stable state at a given time t if there is no change in its state as per the two equations (4) and (5). That means(5)ykt=sgnskt−1.Any patternX is called to be memorized if, when X is given as an input, all neurons are in a stable state.The behaviour of the entire system can be described with an energy function given as follows:(6)E=−12∑j≠k∑j≠kyjykwjk−∑kθkyk.The change in energy is always negative till the system reaches its global minimum energy. It can be given as follows:(7)ΔE=−Δyk∑j≠kyjwjk+θk.The classification includes the final analysis of milk adulteration, and the results are updated to the server of the cloud network. The results can be viewed by the customers through Internet of Things (IoT) so that they can analyse the milk quality factor.Food items that have been adulterated or contaminated are one of the most significant concerns facing society today. Although different measures and punishments have been taken, the practice of adding adulterants to beverages is still widespread in poor nations. The process of adulterating natural goods may be accomplished via a variety of means.


## 3.1. Modelling of the Sensor in Different Adulterated Milk

We discover that one specific equivalent circuit, as depicted in Figure1, provides the best match in the least square sense for all types of contaminated milk, including those that contain both FOE13 and FOE8, and that this equivalent circuit is the one that provides the best match in the greatest number of ways [31]. This circuit is based on the generalised in-built circuit of the LEVMW microcomputer system, which was further improved. It is necessary to utilise the fit quality factor (FQF) to evaluate which of the two fits is the most appropriate in a certain context. Generally speaking, the smaller the FQF, the better it is predicted to be for the fitting process. In terms of fit quality, the circuit depicted in Figure 1 has the greatest quality factor (FQF). The following are the circuit-fitting parameters to be used: CP, R1, RD, Q1, and 1 are the letters of the alphabet. Each sample is evaluated for its degree of fit, and each one exhibits the analogous circuit shown in the diagram [32]. The degree to which each sample fits the others is determined. The fact that the topology of the electrical equivalent circuit is the same for all test samples should not be overlooked; nevertheless, the values of the parameters (CP, R1, RD, Q1, and 1) differ depending on which test sample is being utilised [33]. When it comes to the software, R1 refers to the pore resistance, CP is referred to as the double-layer capacitance, and RD, Q1, and 1 are all properties of the ZARC element, which are all defined.Figure 1
Electrical equivalent circuit of the sensor dipped in test sample as obtained through LEVMW [32] software.Food adulteration is the act of intentionally debasing the quality of food offered for sale either by the admixture or substitution of inferior substances or by the removal of some valuable ingredient [34].When examining the equivalent circuit shown, it has been determined thatR1, RD, and CP are lumped elements; nevertheless, Q1 and 1 are dispersed elements within the same circuit. Because the impedance of a ZARC element is defined as the product of the Q1, 1, and RD values, it can be calculated as.Generally, if a food contains a poisonous or deleterious substance that may render it injurious to health, it is adulterated. For example, apple cider contaminated withE. coli O157: H7 and Brie cheese contaminated with Listeria monocytogenes are adulterated.It is feasible to establish an approximate equivalent circuit model for the sensor by using the observed impedances of FOE13 in the low-frequency range (5 kHz to 12 kHz) and of FOE8 in the high-frequency range (12 kHz to 20 kHz), which have been dipped in separate test samples.It has been discovered that when the content of urea in milk increases, theR1 and CP values for both sensors drop [29].(i)
Practised as a part of the business strategy(ii)
An imitation of some other food substance(iii)
Lack of knowledge of proper food consumption(iv)
To increase the quantity of food production and sales(v)
Increased food demand for a rapidly growing population.It was decided to utilise a genetic algorithm to store the patterns in Hopfield neural associative memory with a rate of mutation equal to 0.05 and a rate of crossover equal to 0.5. The following is an outline of the algorithm that has been proposed: 1(a) Compute the final weight matrix using the Hebbian learning algorithm after storing allP patterns in the manner described below:(1)wij=1N∑p=1pxipxjp,i≠j;andwij=0,where xip,i=1,2,…,N;p=1,2,…,Pandi≠j is a set of P patterns to be memorized and N is the number of neurons. 1(b) Generate the initial population of weight matrices W1,W2,…,WM by applying mutation on the computed weight matrix in step 1(a). For mutation, the following equation has been used:(2)wijn=∑p=1pxipxjpAnN.i+jwherei≠ji,j=1,…,Nandn=1,…,M,where wijn is ijth value of nth weight matrix in the population.Steps (a) and (b) should be repeated until convergence is achieved or a predetermined number of iterations have been accomplished.Visual testing, chemical tests, and physical tests are some of the methods used to identify prevalent adulterants in food.WhenQ is treated as a constant, the variation in Q is negligibly tiny, yet the variance in Q1 is substantial. The type of change is almost identical in the cases of 1 and 2, with the exception of a lateral movement. It should be noted that the nature of the change for both the sensors FOE8 and FOE13 in that specific polarising medium is the same as for the other sensors. The same data are also used to calculate the values of Q and s of the equation Z = Qs via curve fitting, with the degree of fit represented by R2. The same data are also used to determine the values of Q and s of the equation Z = Qs. The quality of the fit is indicated by the value of R2, and the closer the value of R2 is to one, the better the fit. Modelling of FOE13 and FOE8 after being dipped in milk has been contaminated with urea at various concentrations.Food is a fundamental need of existence. The food we consume is absorbed by our bodies and utilised to fuel metabolic processes and maintain our physical and mental well-being. Food is required for growth as well as for a variety of other biological functions. Vegetables, fruits, beans, pulses, grains, and other foods are included in our regular diet, as well as a variety of other foods. It is possible to eat all of them uncooked or prepare them into delicacies to be enjoyed. However, you may have seen extremely thin milk owing to the addition of water, white, yellow, or black pebbles in raw pulses; white microscopic stones mixed with rice; and other anomalies in recent years. Adulteration is defined by the mixing of materials with food products.


## 3.2. Recurrent Neural Network

The Hopfield neural network (HNN) is made up ofn completely linked units, which means that each unit is connected to every other unit except for one that is connected to itself. Moreover, the network is symmetric since the weight Wij for the connection between unit i and unit j is the same as the weight Wji for the connection between the unit j and the unit i. This might be taken as indicating that there is a single bidirectional link between the two units in the configuration. As a result of the lack of a link between each unit and itself, there is no lasting feedback on its own state value. In the system, there is a certain amount of stability; for example, if just a few connections between nodes (neurons) are disrupted, and the remembered memory is not severely distorted, the network may reply with a “best guess.”To solve the pattern storage and recall problem, a Hopfield network is used. This network is designed to store a collection of patterns, and when given a new pattern, it will return one of the stored patterns that most closely resembles the new pattern. This network is designed to be insensitive to small errors in the input pattern. The Hebb rule is the most straightforward and widely used technique of selecting the weights for an associative memory neural network, often known as an HNN. As long as the input vectors are not correlated (orthogonal), the Hebb rule will produce accurate weights, and when tested with one of the training vectors, the net will produce perfect recall; however, if the input vectors are correlated (orthogonal), the net will produce a response that includes a portion of each of the target values. This is referred to as “cross talk” in the industry.(3)skt+1=∑j≠kyjtwjk+θk.With the help of a threshold function, the new activation valueyit+l at iteration t+1 is calculated as follows:(4)yit+1=+1,ifskt+1>θk,−1,ifskt+1<θk,yktotherwise.In other words,ykt+1=sgnskt+1 while θk=0 considered only for simplicity. A particular neuron k in the network becomes in stable state at a given time t if there is no change in its state as per the two equations (4) and (5). That means(5)ykt=sgnskt−1.Any patternX is called to be memorized if, when X is given as an input, all neurons are in a stable state.The behaviour of the entire system can be described with an energy function given as follows:(6)E=−12∑j≠k∑j≠kyjykwjk−∑kθkyk.The change in energy is always negative till the system reaches its global minimum energy. It can be given as follows:(7)ΔE=−Δyk∑j≠kyjwjk+θk.The classification includes the final analysis of milk adulteration, and the results are updated to the server of the cloud network. The results can be viewed by the customers through Internet of Things (IoT) so that they can analyse the milk quality factor.Food items that have been adulterated or contaminated are one of the most significant concerns facing society today. Although different measures and punishments have been taken, the practice of adding adulterants to beverages is still widespread in poor nations. The process of adulterating natural goods may be accomplished via a variety of means.


## 4. Experimental Results and Analysis

It is necessary to do the analysis using the impedance data collected experimentally, where the probes have a constant phase angle. It is shown that the equivalent circuit of the sensor for the best fit model produced with pure milk and adulterated milk in various urea concentrations is the same for both pure milk and adulterated milk. With the experimentally determined magnitude, it is possible to derive the parametersQ and the equation Qs.For both the FOE13 and FOE8 sensors, the fitting parameters (R1, CP, RD, Q1, and 1) are included, as are all of the other fitting parameters.It is discovered from the complicated plane plots that the nature of the graph is a straight line, indicating the presence of a dispersed element, such as a CPE or a FOE.The nature ofRD, which is leakage resistance over a dispersed element (Q1, 1) is similar to that of RD. In order to better understand the behaviour of Q and Q1, as well as and 1, they are plotted on the same Figures 2(c) and 2(d) graphs. When Q is treated as a constant, the variation in Q is negligibly tiny, yet the variance in Q1 is substantial. The type of change is almost identical in the cases 1 and 2, with the exception of a lateral movement. It should be noted that the nature of the change is the same for both the sensors FOE8 and FOE13, which is significant.Figure 2
Detection of chemicals in milk. (a) FOE13 in pure milk; (b) FOE8 in pure milk; (c) FOE13 in 0.6 mg/ml urea adulteration; (d) FOE8 in 0.6 mg/ml urea adulteration.
(a)(b)(c)(d)If it is obtained from a diseased animal.(a)
If spices are sold without their essence(b)
If any ingredient is injurious to healthFigure3 represents the variation in chemical components in milk. It has been discovered in the literature that the simplest formula Z = Qs takes into account the sensor as a CPE as a whole; however, this sort of impedance behaviour will be properly represented by taking into account a few passive components as well. Because of the pore resistance, double-layer capacitance, and other passive components present at the solid-electrolyte contact when the solid has a porous structure on its surface, the passive elements are formed. The equivalent circuit model provided by LEVMW has been analysed and researched in depth in order to understand the behaviour in more detail. It has been discovered that the equivalent circuit produced by the LEVMW programme comprises CP, which is known as double-layer capacitance, R1, which is known as pore resistance, and RD, Q1, and 1, which are the parameters of the distributed or constant phase element, among other things.Figure 3
Impedance spectrum of the FOE13 and FOE8 sensors in urea adulterated milk. FOE13 sensor is for frequency range 5 kHz to 12 kHz and FOE8 sensor for frequency range 13 kHz to 20 kHz. (a) FOE13 in 1.0 mg/ml urea adulteration; (b) FOE8 in 1.0 mg/ml urea adulteration; (c) FOE13 in 1.4 mg/ml urea adulteration; (d) FOE13 in 1.4 mg/ml urea adulteration.
(a)(b)(c)(d)The presence of water can be detected by putting a drop of milk on a polished slanting surface. The drop of pure milk flows slowly leaving a white trail behind it, whereas milk adulterated with water will flow immediately without leaving a mark. Add a few drops of tincture of iodine or iodine solution.Figure4 depicts the equivalent circuit of the probe (covered with a thin layer of PMMA) dipped within several types of contaminated milk. The result demonstrates that the probe’s equivalent circuit may be represented by one and only circuit as indicated in the figure. As predicted, the parameters (CP, R1, Q1, RD, and RD) of the circuit are different for various types of adulterations, and the values of these parameters may serve as an indication of the kind of adulteration.Figure 4
Variation of (a)R1 and RD, (b) CP, (c) Q and Q1, (d) α and α1 for FOE13 and FOE8 sensors with urea adulterated milk. (a) Parameter variation of R1 and RD; (b) Parameter variation of CP; (c) Parameter variation of α and α1.
(a)(b)(c)(d)A simple method to check whether milk is adulterated with water is to place a drop of milk on a slanting surface. If the milk flows freely, it has high water content. Purer milk will flow slowly. Adding iodine to a sample of adulterated milk will make it bluish.As previously stated in prior proposed works, the phase angle decreases as the amount of urea adulteration increases. As more negative ions appear, more ions pass through the pores, resulting in a reduction in pore resistanceR1. In the case of whey adulterated milk, similar results are made, namely, that as the amount of whey adulteration increases, so does the pH value of the test sample (i.e., the phase angle of the impedance lowers), resulting in a drop in the pore resistance as indicated in Tables 4.3 and 4.4. The dipole layer capacitance in both urea and whey adulterated milk decreases with the concentration of the urea and whey, and this might be because the ions present in urea and whey adulterated milk can readily permeate through the pores and are not accessible to form the dipole layer.The pore resistanceR1 increases as the milk is diluted with tap water, indicating that the ions present in these test samples are less capable of penetrating through the pores of the electrode surface. However, the value of the dipole layer capacitor CP increases as more ions are available to form the dipole layers. It should be noted that the alterations of all of the parameters of the analogous circuits have a similar character in all of the situations studied.It is a device used to measure parameters of visible spectrum fluorescence, i.e., intensity and wavelength. The fluorometer can be used to detect biomolecules and proteins using the copper nanoparticles. The device can also be modified to detect other substances such as lead and mercury.It provides justification for the model circuit. The sequence ofQ and Q1 is the same as is the nature of the shift between them. The fluctuation in Q from pure milk to maximal adulteration is relatively modest, but the variance in Q1 is greater, despite the fact that it is likewise of the order of tens in ohm. On the other hand, the range of the adulteration lies between 0.02 to 0.07 units.An increasing population leads to more food requirements to feed everyone. Inadequate public education and lack of understanding about optimal food intake will lead to food shortages.Once the magnitude and phase values at the two terminals of the circuit have been determined, the LEVMW programme calculates the values using the fitting parameters (CP, R1, Q1, RD, and RD) that were provided by the LEVMW software. After then, the magnitude and phase of the observed data are compared to the original experimental data. It is clear from Figure 4 that the largest error between the experimental and calculated data is within 0.7 percent of the true value.Similarly, the phase errors are analysed. Specifically, the fitting error of the phase error for 10% tap water adulterated milk is a little bit higher in this case (around 12 percent). This is due to the fact that the analogous circuit’s fitting is not very excellent. A better comparable circuit must be developed in order to minimise the fitting error for 10 percent tap water tainted milk, which is currently being explored. Figure5 represents the accuracy values of the proposed work.Figure 5
Accuracy rate of training data set.Figure6 represents the loss rate of the training data set.Figure 6
Loss rate of training data set.


## 5. Conclusion

The ability to construct electrical equivalent circuits by fitting EIS data has become a valuable tool in the domains of electrochemistry, biological sciences, and biomedical engineering, among other fields. Because of this, it assists in the comprehension of the underlying physical process, which would otherwise be difficult to interpret or would need the use of very complicated chemical kinetics to explain otherwise.Specifically, the impedance characteristics of a FOE sensor that has been dipped in a range of polarizable fluids are described in this proposed study. The LEVMW software is used to model the sensor with lumped parts as well as dispersed elements, and the best fit model is selected by comparing the results of the two models. The electrical equivalent model built using the complex nonlinear least square (CNLS) technique and LEVMW software, as a result of the above information, may be deduced to comprise the resistor (R1), the capacitance (CP), and the constant phase components (Q1, RD, and Q2). In this example, the factor 1 has a substantial influence on the phase angle since it is a positive number. When different ionic media are used as electrolytes, the value of 1 changes, and as a consequence of the change in 1, the phase angle also changes. The outcomes of the study imply that if we know the amount of adulteration in the sample, we can predict the fitting parameters (i.e., R1, CP1, RD1, Q1, and 1) that would be used to fit the data. We may use these fitting parameters to replace the FOE sensor, and the same fitting parameters can be used in any signal conditioning circuit that requires signal conditioning.



---

*Source: 6163649-2022-06-02.xml*