You are on page 1of 5

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/269162549

Use of ultrasound and neural networks to detect adulteration in milk samples

Conference Paper · January 2007


DOI: 10.3728/ICUltrasonics.2007.Vienna.1398_nazario

CITATIONS READS

3 273

5 authors, including:

Sergio Luiz Sousa Nazário Claudio Kitano


Faculdade de Ciências Biomédicas de Cacoal São Paulo State University
18 PUBLICATIONS 9 CITATIONS 80 PUBLICATIONS 274 CITATIONS

SEE PROFILE SEE PROFILE

Ricardo Tokio Higuti Flávio Buiochi


São Paulo State University University of São Paulo
74 PUBLICATIONS 359 CITATIONS 105 PUBLICATIONS 734 CITATIONS

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Analise de leite por ultra som e redes neurais View project

Eficiência Energética em Rondônia View project

All content following this page was uploaded by Sergio Luiz Sousa Nazário on 18 August 2015.

The user has requested enhancement of the downloaded file.


Proceedings of the International Congress on Ultrasonics, Vienna, April 9-13, 2007, Paper ID 1398, Session R03: Acoustic sensors
doi:10.3728/ICUltrasonics.2007.Vienna.1398_nazario

Use of ultrasound and neural networks to detect adulteration in milk


samples
Sérgio L. S. Nazário, Cláudio Kitano, Ricardo Tokio Higuti, Jacira S. Isepon1, Flávio Buiochi2
Universidade Estadual Paulista- Unesp, Department of Electrical Engineering,
Avenida Brasil, 56, 15385-000, Ilha Solteira, SP, Brazil, tokio@dee.feis.unesp.br
1
Unesp, Department of Food Technology, Ilha Solteira, SP, Brazil.
2
Universidade de São Paulo, Department of Mechatronics Engineering, EPUSP, São Paulo, SP, Brazil.

Abstract: Ultrasonic propagation velocity and applied in many problems of signal classification with
attenuation coefficient are measured in calibrated success [3]-[5].
samples, prepared from homogenized milk and added
Artificial neural networks are an excellent alternative
water and serum. These results are input to a neural
for resolution of classification problems, once the
network to detect the water content, with a resolution of
processing is structurally parallel, making possible
1%.
diverse functionalities as: adaptability, tolerance to
Key words: milk, neural networks, adulteration, imperfection and abstraction, and fast response, among
water. others. Moreover, what makes neural networks an
interesting technique is the capacity of generalizing and
A. Introduction to produce a correct input-output mapping, even when
the input is a little different from the examples used in the
In the dairy industry, quality of milk is measured by training process.
some parameters such as fat, lactose, protein and water
content (or added water). Lower values of fat content can The objective of this work is the use of neural
decrease its nutritional properties, while higher values of networks techniques to classify milk samples as a
water content may be an indicative of adulteration, for function of the amount of water and serum added to milk,
example, resulting in health and economic impacts. For relating these properties to acoustic parameters (velocity
these reasons, in dairy industries, milk that is received and attenuation) as a function of temperature.
from producers must go under some tests or certifications
before its acceptance. These tests, in general, involve B. Ultrasonic measurements
manipulation of chemical products and may be time- The ultrasonic measurement cell (Fig.1) is used to
consuming. The cryoscopy method is used to measure the obtain acoustic propagation velocity (c2) and attenuation
freezing point of milk, which changes with the amount of (α2) of a liquid sample. A detailed description of the cell
added water. Milk density is also changed by added can be found in [6], [7]. The measurement cell is
water, which could be also detected by a densitometer. composed of a double-element transducer (DET), sample
Another common kind of adulteration is done by adding chamber and reflector. A composite ceramic emitter is
serum to the milk, which is more difficult to detect excited with a short pulse and from the multiple echoes
because of their similar densities and properties. In these ai(t), detected by a large aperture receiver, and some
cases, other chemical and optical techniques can be known properties of the cell materials, the acoustic
employed, with higher cost and time of measurement. parameters of the liquid can be obtained. The cell is
An alternative to be considered is the use of immersed in a temperature controlled water bath.
ultrasound to characterize liquids. By the measurement of
the acoustic propagation velocity and attenuation
coefficient one can obtain indirectly a characteristic such
as the concentration in emulsions [1], [2]. Ultrasonic
methods are relatively simple, non-destructive and can be
used online. However, there is a difficulty in relating the
acoustic parameters with a particular property of the
material under analysis. In the case of milk, season of
year, cattle breed and food, water content, added serum,
and other forms of adulteration can modify the fat
content, protein and lactose, for example. Consequently,
the acoustic properties of the material depend on several
parameters, which may be difficult to evaluate, and it is
necessary to develop and apply signal analysis techniques
to the successful ultrasonic classification of samples. Fig.1. Ultrasonic measurement cell.
Among several techniques, neural networks have been

-1-
Proceedings of the International Congress on Ultrasonics, Vienna, April 9-13, 2007, Paper ID 1398, Session R03: Acoustic sensors
doi:10.3728/ICUltrasonics.2007.Vienna.1398_nazario

B.1. Experimental results


The experiments were realized with homogenized
milk samples, because it is a liquid with regular
distribution and size of particles. Samples were prepared
by dilution of whole milk and distilled water or serum, in
the proportion of 0 to 60%. These samples were
characterized by conventional methods to measure the fat
content (Gerber method) and water content (cryoscopy)
with the purpose of calibrating them for comparison with
the acoustic parameters. Two acoustic parameters are
measured: velocity of propagation (c) and acoustic
attenuation coefficient (α) at three frequenies, which are
related to the amount of water and serum added to the
milk. The composite transducer central frequency is
around 5 MHz. Fig.3. Ultrasonic propagation velocity as a function of
Propagation velocity and attenuation coefficient as a temperature for different samples of milk and added water.
function of added water are presented in Fig.2. It can be When serum was added to the milk, it was noticed a
observed that by adding water to whole milk, there is a small difference in the acoustic parameters measured,
reduction in the propagation velocity, because water has increasing the difficulty to detect this kind of
a lower velocity than milk. A variation in velocity of - adulteration. Figure 4 shows the propagation velocity in
0.24 (m/s)/%water was obtained. The experiments were whole milk and in serum, as a function of temperature.
realized at the temperature of 30oC. Propagation velocity in serum is smaller than in whole
Attenuation can also be used as an input to the neural milk and both have similar temperatures dependencies.
network to discriminate the amount of water added to the
milk. The results are presented as an excess attenuation
relative to the sample with smaller attenuation. Milk
dilution produces a reduction in fat particles
concentration, reducing the acoustic attenuation with
increase in the amount of added water. The curve shown
in Fig.2 corresponds to the attenation measured at 5
MHz, and it is approximately linear, with negative slope
0,22(Np/m)/%water.

Fig.4. Ultrasonic propagation velocity as a function of


temperature for whole milk and milk serum.

C. Neural networks
MLP networks (MultiLayers Perceptron) are
artificial neural networks (ANN) that have at least an
intermediate or hidden layer, and present a higher
computational power than the one presented by nets
without intermediate layers. The backpropagation
Fig.2. Ultrasonic propagation velocity (o - left axis) and algorithm was used in the training process and the
attenuation coefficient (x - right axis) as a function of % added learning paradigm is the supervised one, that is, uses
water in whole homogenized milk, at the temperature of 30oC.
pairs of input and desired outputs, adjusting the net
As temperature has a strong influence on the acoustic weights by a mechanism of error correction [8].
parameters, specially on velocity, it is important to
Figure 5 shows the architecture of an MLP neural
consider this parameter as an input data used in the neural
network with an input layer i, a hidden layer j and an
network. Figure 3 shows the results for the propagation
output layer k. Input patterns (xi) are data vectors applied
velocity as a function of temperature (from 15 to 35oC)
at the input layer and combined using the connection
for samples with different amounts of added water. A
weights wji at an intermediate hidden layer and then the
strong temperature dependence can be observed, and also
output classes (yk) are obtained from weights wkj. The
a slight different temperature response for the several
number of nodes of each layer determines the complexity
samples. This information is very important for the
and computational cost of the network. In this work there
correct sample classification.
are five input nodes, related to temperature, propagation

-2-
Proceedings of the International Congress on Ultrasonics, Vienna, April 9-13, 2007, Paper ID 1398, Session R03: Acoustic sensors
doi:10.3728/ICUltrasonics.2007.Vienna.1398_nazario

velocity and attenuation coefficient measured at three learning rate, and avoids that the learning process ends in
different frequencies. The number of output nodes a local minumum on the error surface [8].
determines the sample classification in percentage of
added water or serum. D. Results
For the ANN used in the classification of added
water, there are 5 input nodes (temperature, velocity,
attenuation at 4, 5 and 6 MHz), and 21 output nodes.
Eleven output nodes refer to percentages from 0 to
10%water, with 1% resolution, and ten output nodes
represent percentages from 15 to 60%water, with 5%
resolution. Several architectures were evaluated, by
varying the number of nodes in the hidden layer N (26,
32, 40 and 52) and maximum number of iterations I used
in the training process (10000, 20000, 30000, 40000 and
50000). The learning rate was 1.5x10-4 and the
momentum, 2x10-4. From these tests, six topologies were
selected, the ones which presented the smaller SSEs. In
Table 1, the subscripts in the SSE are referred to training
(train), validation (val) and test (test). The last column to
the right is the classification error (Error), that is the
Fig.5. Multilayer perceptron neural network architecture. percentage of wrong classifications from the input data
Input patterns are first normalized to values between set.
0 and 1. At the intermediate and output layers it was used The best ANN was the one with 40 nodes in the
the sigmoidal activation function, and as a classification hidden layer and 50000 iterations, resulting in a
criterion, it was used the winner-takes-all algorithm, in classification error of 7.2%.
which the larger output indicates the output classification.
To the output classes it is employed an ortogonal Table 1. Results for the evaluation of the neural networks for
codification [9]: outputs can assume values 0 or 1, but added water.
only one of them is 1, which indicates the output
N I SSEtrain SSEval SSEtest Error
classification. The input data set is partitioned in the
proportion suggested in [10], where 50% is randomly 26 50000 2336 1187 1160 12.5%
chosen for training, 25% for validation and 25% for tests.
32 50000 1728 872 830 8.4%
The neural network should be trained to realize tasks
as recognition of standards or data modeling 40 40000 1887 954 942 8.6%
(calibration). The weights (w) used for the correction of 40 50000 1553 795 863 7.2%
the errors are initially randomly chosen. Known or
calibrated input patterns are applied to the ANN and the 52 40000 1778 904 879 9.1%
weights are adjusted to produce correct outputs. A 52 50000 1570 800 774 8.8%
classification error (E) can be calculated, which can be
defined, at first, as the sum of the square of the errors For the ANNs used in the classification of samples
(SSE) among the estimated value by the network (output with added serum, there are 4 input nodes: velocity and
yk) and the real or desired value (di), as shown in (1) [8]: attenuation coefficient at the frequencies of 4, 5 and 6
MHz. Temperature was held constant, at 26.5oC. In this
k case, there are 12 output nodes: 11 nodes for 0 to
∑ ∑∑ (d
1 1
E= SSE p = p
m − y mp ) 2 , (1) 10%serum. with 1% resolution, and one node for
2 2 p m =1
p proportions greater than 10%, because for these
concentrations there is not a significant change in the
where p is the number of input patterns, k is the number
acoustic parameters.
of output nodes, dm is the desired answer and ym is the
ANN output. The value of E can be used to change some Table 2 shows the best ANNs trained for added
parameters of the ANN (number of nodes, for example), serum. As the number of input nodes is smaller, the data
and once its architecture is defined, only the weights are set is reduced when compared to the problem of added
corrected, by using the backpropagation algorithm [8]. water, and a smaller number of iterations is necessary.
The best network was obtained with learning rate of
In the backpropagation algorithm, the weights
1.5x10-4, momentum 2x10-4, 24 nodes in the hidden layer
corrections begin in the last layer and end in the first
and 20000 iterations. In this case, the classification error
layer. The weights correction can be written, at an
was 17.3%. This error could be reduced by the use of
iteraction n, for the intermediate layer, as [8]:
other parameters, such as density, temperature and a
Δw ji (n) = αΔw ji (n − 1) + ηδ j (n) y j (n) , (2) transducer with a larger bandwidth, with an increase in
the ANN complexity.
where η is the learning rate, δj is the gradient of the error
relative to the weights, and α is called the momentum (0
< α < 1). The use of the momentum increases the

-3-
Proceedings of the International Congress on Ultrasonics, Vienna, April 9-13, 2007, Paper ID 1398, Session R03: Acoustic sensors
doi:10.3728/ICUltrasonics.2007.Vienna.1398_nazario

Table 2. Results for the evaluation of the neural networks for [7] R. T. Higuti, J. C. Adamowski, “Ultrasonic densitometer
added serum. using a multiple reflection technique,” IEEE Trans.
Ultras., Ferroelec., and Freq. Contr., vol 29 (9), pp. 1260-
N I SSEtrain SSEval SSEtest Error 1268, 2002.
12 7000 199.7 199.7 110.2 21.3% [8] S. Haykin, “Neural Networks: A Comprehensive
Foundation,” Macmillan, Englewood Cliffs, EUA, 1994.
12 20000 156.1 89.1 91.8 20.0% [9] U. Ergün, S. Serhatlioglu, F. Hardalaç, and I. Güler,
“Classification of carotid artery stenosis of patients with
24 7000 172.7 95.1 96.6 19.6% diabetes by neural network and logistic regression,”
24 20000 138.5 78.3 81.8 17.3% Computers in Biology and Medicine, vol 46(1),pp. 389-
405, 2004.
32 7000 163.4 92.2 92.4 19.3% [10] L. Prechelt, “A set of Neural Network Benchmark
Problems and Benchmarking Rules,” Technical Report
32 20000 136.6 79.1 79.3 18.3% 21/94, Fakultät für Informatik, Universität Karlsruhe
1994, pp. 1-35.
E. Conclusion
Ultrasonic and neural networks can be used to
characterize homogenized milk as function of added
water and serum, which is a common kind of
adulteration. Acoustic parameters, such as propagation
velocity and attenuation coefficient were obtained by an
ultrasonic measurement cell in controlled temperature
conditions. The data was used to design and evaluate an
artificial neural network, which allowed the detection of
added water or serum with a resolution of 1% in the
range from 1 to 10%added water/serum. In practice, if
proportions of 1% are detected, the milk could be
rejected by the dairy industry.
Difficulties that may be found when using these
techniques are the temperature control and accurate
measurement of the acoustic parameters, the definition of
the neural network parameters and the long training time.
The advantages are that several parameters (fat content,
added water, protein, etc) can be measured
simultaneously in a non-destructive way, substituting
several conventional equipments in a laboratory. The
same techniques have been used in the determination of
fat content, with resolution of 0.1%.

F. Aknowledgements
This work was supported by FAPESP (02/04389-5)
and CAPES in Brazil.

G. Literature
[1] D. J. McClements, “Advances in the application of
ultrasound in food analysis and processing,” Trends in
Food Sci. Technol., vol. 6 (9), pp. 239-299, 1995.
[2] M. J. W. Povey, “Ultrasonic Techniques for Fluids
Characterization,” Academic Press, San Diego, 1997.
[3] A. Ochoa, A. Hernandéz, J. Ureña, M. Mazo, J. A.
Jiménez, J. J. García, A. Jiménez, “Ultrasonic pattern
recognition based on ANN and PCA techniques,” in IEEE
ISIE – International Symposium on Industrial Electronics,
Dubrovnic-Croatia, pp. 1215-1220, 2005.
[4] H. Yan,Y. Jiang, J. Zheng, C. Peng, and Q. Li, “A
multilayer perceptron-based medical decision support
system for heart disease diagnosis,” Expert Systems with
applications, vol 30(2), pp. 272-281, 2006.
[5] H. Tian, and Z. Shang, “Artificial neural network as a
classification method of mice by their calls,” Ultrasonics,
vol. 44, pp. e275-278, 2006.
[6] J. C. Adamowski and F. Buiochi and C. Simon and
E.C.N. Silva, “Ultrasonic measurement of density of
liquids,” J. Acoust. Soc. Am., vol. 97(1), pp. 354-361,
1995.

-4-

View publication stats

You might also like