International Journal of Scientific & Engineering Research, Volume 4, Issue 12, December-2013 431

ISSN 2229-5518

Utilization of Low-Frequency Capacitance

Sensor Integrated with Artificial Neural Network for

Real Time Prediction of Biscuit Shelf-Life

Erna Rusliana Muhamad Saleh, Erliza Noor, Taufik Djatna, Irzaman

Abstract— Capacitance sensors integrated with ANN may possibly to be implemented in solving disadvantages of some shelf-life prediction methods that currently used. The aims of this research are to (1) design a circuit sensors that can measure capacitance value, (2) Design a Artificial Neural Network models to predict the shelf-life of biscuit, (3) Integrate capacitance sensor and ANN that can be applied to predict in real time. In reducing noise occurred commonly the frequency value was not set at single value, therefore the value set up in range is set at 5 kHz - 6 kHz. ANN learning algorithm used backpropagation by trial and error the activation function, learning function, the number of nodes per hidden layer, and the number of hidden layer. ANN models are integrated by using a dielectric sensor interface built with MATLAB GUI toolbox through AVR microcontroller ATMega 8535. ANN integrated with capacitance parameters was very good for predicting the shelf-life of biscuit with training performance MSE 0.0001 and R 99.86%. ANN architecture with the best training performance contain 5 hidden layers, 10 nodes per hidden layer, tansig as the hidden layer activation function, purelin as the output layer activation function, trainlm as learning function and 86 epoch. Integration of ANN and capacitance sensors have the ability to predict the shelf-life of biscuit in real time. The performance of intelligent real-time system in predict the shelf-life of biscuit is fairly accurate (≤30%). The results of this study can be used as an alternative method for measuring shelf-life biscuit. This study also showed low frequencies can be used to measure the capacitance as well. Therefore, the integration of ANN and sensor capacitance can minimize time and make cost effective.

Index Terms—Artificial neural network, biscuit, capacitance sensor, intelligent real time system, low-frequency, prediction, shelf-life

—————————— ——————————

IJSER

1 INTRODUCTION

ielectric properties of food product correlate strongly with moisture. Moisture is a shelf-life critical parameter of dried foods such as biscuit. [1] and [2] stated dielectric

properties of food product has a strong correlation with moisture. Value of the dielectric properties has strong positive correlation with moisture of foods. It is mean, at high moisture value, the value of dielectric constant and dielectric loss factor are also high, as well as at low moisture; these values are low. The properties provide an opportunity in developing alternative methods of predicted the shelf-life of biscuit.
The current method of determining for shelf-life of biscuit, such as Extended Storage Studies (ESS) and Accelerated Self- Life Testing (ASLT), need long time (at least 3-4 months), expensive, also required trained panelists, complex equipment and suitable ambience. Therefore, alternative methods require in reducing the shortages. By employing the method, determination of self-life of dried foods will be easier, cheaper and real time prediction. Dielectric properties measurement can be proposed to solve these problems. Dielectric properties

————————————————

Erna Rusliana Muhamad Saleh is currently pursuing lecture in Agricultural Technology Study Program, Agricultural Faculty in KhairunUniversity Ternate,Indonesia. E-mail: ernaunkhair@yahoo.com

Erliza Noor is currently pursuing lecture in Agro industrial Technology

Department, Agricultural Technology Faculty in Bogor Agricultural

University, Bogor, Indonesia. E-mail: erlizanoor@ipb.ac.id

Taufik Djatna is currently pursuing lecture in Agro industrial Technology

Department, Agricultural Technology Faculty in Bogor Agricultural

University, Bogor, Indonesia. E-mail: taufik.djatna@gmail.com

• Irzaman is currently pursuing lecture in PhysicsDepartment,

Mathematics and Natural Sciences Faculty in Bogor Agricultural

University, Bogor, Indonesia. E-mail: irzaman@yahoo.com
data were captured by certain censor. The censor was
integrated with the learning tool namely Artificial Neural
Network (ANN) in development of real time prediction of
shelf-life of biscuit model.
ANN is a mathematical model of the structure and function
inspired by the organization and function of the human brain
[3]. ANN able to handle data on non linear, more tolerant to
noise ratio of the system and tend to produce the prediction
error low ([4], [5], [6], [7]). The advantages of ANN expected to
solve the problems. According [8], ANN can identify complex
non-linear systems with input value for learning and training
in order to know the behavior of the system and predict
system behavior and value of output of new input given.
ANN has been successfully applied to predict the shelf-life
some food products, such as of milk chocolate cake decorated
with almonds [9], Kalakand [10], white milk with pistachio
decoration [11] cheese [12], snack of rice [13], tofu [14], soya
milk [15], and dairy product [16]. The previous Researches
used non-dielectric properties, such as organoleptic, physical,
chemical, and storage conditions of product in prediction of
shelf-life of food products, therefore dielectric properties was
proposed to predict shelf-life the product.
Research was conducted by [17] show that capacitance is
the dielectric parameter which most correlated with biscuit
shelf-life. In addition, the use of low frequency (5 kHz - 6 kHz)
show good sensitivity in differences of the different expiry
dates of biscuit. Inferred form the result, the low-frequency
capacitance sensor integrated with ANN model may possibly
to be implemented in real time predicting of the shelf-life of
biscuit.
Purposes of this study were (1) to design ANN models to
predict the shelf-life of biscuit in finding the best-performing
ANN architecture models, (2) to integrate dielectric sensor and

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 12, December-2013 432

ISSN 2229-5518




ANN in real time prediction shelf-life of biscuit, (3) Integrate capacitance sensor and ANN that can be applied to predict in real time.

2 MATERIALS AND METHODS

2.1 Capacitance Sensor

Resistor-Capacitor (RC) circuit was method which chosen in designing capacitance (Figure 1). Output voltage of the circuit was an a function of the input voltage, resistor and capacitor (equation 1 [18]). This circuit uses a capacitor reactance value changes. Reactance of the capacitor value depends on the frequency of the current passing on the capacitor. Capacitance value of the sample was measured by inserting the probe. The sensor probe is parallel cuprum plate with a size of 5 cm x 5 cm x 0.25 cm (length x width x diameter).
Actual data were taken from the shelf-life expiration date listed on the package with 10 different types of shelf-life (ranging from a still longer shelf until that has expired). Shell- life data were duration between observation dates to the expiration date listed on the packaging which entered into ANN matrix.
The input data is the frequency (f), capacitance (C), dielectric constant (k), types of biscuits and type of packaging, while the output data is the actual expiration date (Figure 4). The overall amount of data consisted of 360 datasets. Eighty percent of the data used for training and 20% for testing.

2.2.2 Preprocessing of Data

All data were normalized before input to design ANN models, because different data scales. The process of normalization with the following formula [20]:

𝑥= 0.8(𝑥−𝑎) + 0.1 (2)

𝑏−𝑎

Fig 1. RC circuit [18]

(1)

where:

a = minimum data; b = maximum data; x = raw data; x’ = Data

normalization

ER

where:

Vout=output voltage ; R=resistor; Xc= capacitive reactance; Vin =

output voltage at t = 0

2.2 ANN Design

Ko et al. (2000) and Park et al. (2002) developed a mechanism of neural network analysis to predict the shelf-life of food. Figure 2 shows a modification of the analysis mechanism based on the dielectric properties.

2.2.1 Dataset

Samples were selected by purposive sampling of the products listed expiry dates. Types of biscuits to be selected consist of four types of biscuits in accordance with SNI 01-2973-1992 (hard biscuit, cracker, cookie and wafer) with three types of packaging (plastic, aluminum foil and can). This study considers factors type of packaging, because there was close relationship between the type of packaging and shelf-life of food products [19]. The fourth type of biscuit taken from the most widely circulated in the market around Depok and Bogor, West Java, Indonesia.

Fig 2. Mechanism of neural network analysis to predict the shelf-life of biscuit (modification [14], [15])

Fig 3. ANN architecture construction

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 12, December-2013 433

ISSN 2229-5518

IFigJ4. The flow dSiagram for ANN archEitecture design R

2.2.3 ANN architecture model design

ANN architecture models were designed on computer with CPU processor AMD C60 dual-core and memory 2 GB DDR3. Software used MATLAB 2010b version 7 from Mathworks Corporation (Mathworks 2010).
The flow diagram for ANN architecture design show in Figure 4. In general, the design architecture consists of five stages: input calling the data and the target; construct a neural network; trained by trial and error the activation function, learning function, the number of nodes and hidden layer, and epoch; enter test data and testing.
Learning algorithm method was employed backpropagation. Backpropagation ANN architecture is a multi-layer perceptron network. ANN consists of input layer, hidden layer and output layer. Learning occurred in the perceptron by changing connection weights after each data element processed. The weight acquired by amount the error in output compared with the results of ANN prediction. The process was done through backpropagation, which was a generalization of the algorithm the least squares mean in a linear perceptron.
ANN performance determined by three points:
1. Patterns of relationships between neurons (network
architecture),
2. Method to determine the connecting weight (function of
training, learning, algorithm),
3. Function Activation.
The right combination of the three things above will result
in the best performance of ANN. The problem, until now there
is no definite theory related the right combinations of
parameters to each case. Each case has different parameter
combinations, depending on the problem. In order to produce
the best performance, we did to trial and error for any existing
parameters. The combination of these parameters called ANN
architecture. Table 1 show a modification of architectural
parameters. This architecture using goal 10-6, epoch 1000 and
learning rate 0.05.
Trial and error were started from the function activation,
trial and error learning function, number of nodes and hidden
layer, and the epoch. The sequence processes were done in
order to obtain the effectiveness of the training process. Trial
and error were continued, if they did not obtain expected
Minimum Square of Error (MSE). The next Trial and error use
the best parameter results from the previous process. The
combination of parameters activation function and learning
function were taken from the entire item parameters provided
in the MATLAB ANN (built-in). In programming
Backpropagation with MATLAB, there are 3 kinds of
activation functions commonly used are: tansig (bipolar
sigmoid function), logsig (unipolar sigmoid function) and
purelin (identity function).

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 12, December-2013 434

ISSN 2229-5518



Number of nodes per hidden layer started from 2 (least amount of processed nodes ANN), then sequentially increased from 5 to 20. Number of hidden layer starting from 1 to 5.

TABLE 1

ANN ARCHITECTURE MODIFICATIONS

Fig 5. Block diagram of the integration

Shelf-life prediction modeling biscuit with ANN method employed the analysis of observations of various parameters in obtaining best ANN model that could be accurately represent the specific shelf-life biscuit. Model was pronounced as precise model, if they produced the smallest mean square

3 RESULTS AND DISCUSSION

3.1 The Design of Capacitance Sensor

In assertion of accurate shelf-life result, equipment design should be matched to results of parameter selection in previous step. RC circuit was supposed as appropriate approach for design method should be considered in accordance with the results of the selection was a method this purpose. RC circuit is an electrical circuit composed of resistors and capacitors (Figure 3).
In reducing noise occurred commonly in an electrical circuit, the frequency value was not set at single value, therefore the value set up in range is set at 5 kHz - 6 kHz with

IJSER

error (MSE) and the largest R between shelf-life predictions
ANN model with actual shelf-life.

2.2.4 Measure of Performance Prediction

Prediction of performance measures used R (correlation coefficient) and MSE (mean square error).
C as the reader sensor samples tested, while current source
was set up at fix. In detail, the circuit equipment with C sensor
can be seen in Figure 6.

𝑅 = �1 − �∑𝑁 𝑄𝑒𝑥𝑝−𝑄𝑐𝑎𝑙

1 𝑄𝑒𝑥𝑝2 � � (3)

𝑀𝑆𝐸 = �∑𝑁 𝑄𝑒𝑥𝑝−𝑄𝑐𝑎𝑙
where :

1 𝑛

(4)

Figure 6. Equipment circuit with sensor Capacitance (C)

Qexp = measurement value; Qcal = predictive value; n =

number of datasets; R= correlation coefficient; MSE = mean
square error

3 INTEGRATION OF SENSOR DEVICES AND ANN

Integration of sensor devices and ANN models was intended to measure the dielectric value (variable input) of unknown shelf-life of product which can be directly read by the computer in real time. Based on data of dielectric were read by the censor, and then ANN models would predict the shelf-life of the product.
Integration of all the components consists of several parts which shown into block diagram in Figure 5. All components were integrated to come into being a real-time intelligent system. Microcontroller AVR ATMega 8535 was used as interface between computer and censor. Computer power supply was utilized also by the sensor. MATLAB 2010b from Mathworks Corporation was used in integration of computer, microcontroller (ANN model) and dielectric sensor and designing of Graphic User Interface (GUI) (Mathworks 2010).
The circuit bounded by Circle 2, was the circuit resistors that be used for calculate the value of Vin (VOut_5). Circuit bounded circle 3 was RC circuit which R and C values was already known. The circuit used for calculate the input frequency (frequency VOut_5) which was sin wave with a frequency of about 5 kHz - 6 kHz.
In this study, the sensor is a capacitance sensor. Capacitance Sensor is sensor electronic. He works on the concept of capacitive. Capacitance Sensor uses the concept of a capacitor to store and release electrical energy as electric charges. Electric charges was influenced by surface area, the distance and the capacitor dielectric.

Capacitance values can be measured from the following equation (derived from equation 1):

(5)

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 12, December-2013 435

ISSN 2229-5518

By knowing the value of the frequency (f), Resistor (R), Input voltage (Vin or Vout_5), it can be calculated the value of C. Value of C is the capacitance value of the measured sample.
The capacitance sensor has been tested on several samples (water, biscuits and biscuit with new expiry). The experimental results showed that the sensor was able to read perfectly capacitance value of the samples.
Shelf-life sensor developed by [14] and [15] using the e-nose base (electric nose). They detect shelf-life with the sensory approach (olfactory). E-nose more appropriate for main shelf- life criterion is organoleptic and chemical changes (eg odor and rancidity). Products with shelf-life main criterion is the change moisture content, it is more appropriate expiration detection using sensors with critical moisture content approach. Capacitance has a correlation with the moisture content.

3.2 ANN Architecture Model for Prediction of biscuit shelf-life

3.2.1 Variation of The Activation Function

Variation of the activation function produced the lowest MSE and R highest activation function of hidden layer tansig and output layer purelin (Table 2). The result seemed equal with research result was conducted by [21] in prediction of shelf-life

TABLE 3

VARIATION OF LEARNING FUNCTION (TRAIN)

3.2.3. Variation in the Number of Nodes and the

Hidden Layer

The best variation in the number of nodes and hidden layer nodes was at number 10 with 5 hidden layer. This condition achieved in the 86 epoch. The more the number of layers and number of nodes makes the better R value (99.86%) and MSE (6.2040e-005) (Table 4). However, the number of layer 5

IJSER

of soft cake which showed good performance by applying the
activation function of hidden layer tansig and output layer
purelin.

TABLE 2

VARIATION OF THE ACTIVATION FUNCTION

produced MSE and R begins to decrease for the number of
nodes in the top 10. This condition suspected as the value of
the global optimum has been reached in number of nodes 10.
Performance between the training actual shelf life and ANN
predicted results are shown in Figure 7.

TABLE 4

VARIATION IN THE NUMBER OF NODES AND HIDDEN LAYER

3.2.2 Variation of Learning Function

Training results with the above activation function (tansig; purelin) showed the learning function with the lowest MSE and R highest in learning function trainlm. Function trainlm is a network training function that updates weight and bias values according to Levenberg-Marquardt optimization. Trainlm is often the fastest backpropagation algorithm in the toolbox, and is highly recommended as a first-choice supervised algorithm, although it does require more memory than other algorithms [22].

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 12, December-2013 436

ISSN 2229-5518

Fig 7. Performance training between actual shelf-life and prediction result of ANN



Where :
Vin = input voltage; V = voltage; f=frequency; Vhigh =high pass
voltage; C= Capacitance; d=diameter; A=probe surface area

3.2.4 Shelf-life Prediction Prediction ANN

Seventy two datasets were applied as tested data into best ANN architecture which constructed from previous step. MSE value of this was of 20.68. Figure 8 show the prediction results for the test data shelf-life biscuits. By applying the model, prediction of value of shelf-life of biscuit are range from -558.482 (≈ -558 days) to 768, 6583 days (≈ 769 days). The predicted value diverge deviated with actual data in range of

590.4041 and ε + = ε-= -884.64. Actual data of shelf-life biscuit was 177 days (-177 days), therefore the deviation 517 days.

TABLE 5

Fig 9. Shelf-life biscuit software interface

RESULTS OF VERIFICATION INTELLIGENT REAL TIME SYSTEM BISCUIT SHELF-LIFE

Fig 8. Performance testing of shelf-life of actual data and ANN

prediction

3.3 Capacitance Sensor and ANN Integration

Display shelf-life prediction software can be seen in Figure 9. The 'Measure' button is used to measure the capacitance value, frequency and dielectric constant of the sample. The 'Predict' button would predict shelf-life biscuits by using best ANN architecture. Shelf-life output values were predicted from these values as measured by the sensor and type of biscuit packaging and that selected by the user.
Capacitance value, frequency, and the dielectric constant measured by following equations:
By using this software, Shelf-life prediction can be executed in real time. This software able to displays the biscuit shelf-life predictions acquired of integrating capacitance sensor with low frequency and ANN. This capability accordance with the opinion of previous researchers ([4], [6], [5], [7]) that the ANN is able to handle the non linear data, more tolerant of noise system and tend to produce a low prediction error.

4 CONCLUSION

ANN combined with dielectric parameters was very good for predict the shelf-life of biscuit with training performance MSE
0.0001 and R 99.86%. A best ANN architecture was found in this research which contained of 5 hidden layers, 10 nodes per hidden layer, activation function hidden layer tansig, the output layer activation function purelin, learning function trainlm and 86 epoch.

IJSER © 2013 http://www.ijser.org

International Journal of Scientific & Engineering Research, Volume 4, Issue 12, December-2013 437

ISSN 2229-5518


Integration of ANN and dielectric sensor has been able to predict the shelf-life of biscuit in real time. The performance of intelligent real-time system designed to predict the shelf-life of biscuit are enough accurate (≤ 30%). The results of this study can be used as an alternative method for measuring shelf-life biscuit. This study also showed low frequencies can be used to measure the capacitance as well. Therefore, the integration of ANN and sensor capacitance can minimize time and make cost effective.

REFERENCES

[1] Guo W, G Tiwari, J Tang, S Wang. 2008. Frequency, moisture and temperature-dependent dielectric properties of chickpea flour. Biosystems Engineering, 101(2008):217-224.

[2] Nelson SO, S Trablesi. 2012. Factors influencing the dielectric properties of agricultural and food products. Journal of Microwave Power and Electromagnetic Energy. 46(2):93-107

[3] Bila S, Y Harkouss, Y Ibrahim M, Rousset J, N’Goya E, Baillargeat D,

Verdeyme S, Aubourg M, Guillon P. 1999. An accurate wavelet neural-network-based model for electromagnetic optimization of microwave circuits. International Journal of RF and Microwave Computer-Aided Engineering. 93: 297–306.

[4] Coulibaly P, Bobe´e B, Anctil F. 2001. Improving extreme hydrologic events forecasting using a new criterion for artificial neural network

milk cakes decorated with almonds. International Journal of Latest

Trends in Computing. 23: 434- 438.

[10] Goyal S, GK Goyal. 2011b. Advanced computing research on cascade single and double hidden layers for detecting shelf life of kalakand: an artificial neural network approach. International Journal of Computer Science and Emerging Technologies. 2(5):292-295.

[11] Goyal S, GK Goyal. 2011c. A new scientific approach of intelligent artificial neural network engineering for predicting shelf life of milky white dessert jeweled with pistachio. International Journal of Scientific and Engineering Research. 2(9):1-4.

[12] Goyal S, GK Goyal. 2012. A novel method for shelf life detection of

processed cheese using cascade single and multi layer artificial neural network computing models. ARPN Journal of Systems and Software. 2(2):79-83.

[13] Siripatrawan U, Jantawat P. 2008. A novel method for shelf life prediction of a packaged moisture sensitive snack using multilayer perceptron neural network. Expert Systems with Applications.

34(2):1562-1567

[14] Park EY, Bong-Soo Noh, Sanghoon Ko. 2002. Prediction of self life for soynean curd by the electronic nose and artificial neural network system. Food Science and Biotechnology. 11(3):245-251

[15] Ko S-H, Eun-Young Park, Kee-Young Han, Bong-Soo Noh, Suk-Shin Kim. 2000. Development of neural network analysis program to predict shelf-life of soymilk by using electronic nose. Food

Engineering Progress. 4(3):193-198.

selection. Hydrocarbon ProcIessing. 1J5:1533–1536. SER

[5] Terra MH, Tino´s R. 2001. Fault detection and isolation in robotic manipulators via neural networks: a comparison among three architectures for residual analysis. Journal of Robotic Systems.

18:357–374.

[6] Siripatrawan U, Harte BR. 2007. Solid phase microextraction/gas chromatograph/mass spectrometer coupled with discriminant factor analysis and multilayer perceptron neural network for detection of Escherichia coli. Analytica Chimica Acta. 581:63–70

[7] Siripatrawan U, Linz J, Harte BR. 2004. Rapid method for prediction of Escherichia coli numbers using an electronic sensor array and an artificial neural network. Journal of Food Protection. 67:1604–1609

[8] Bhothmange M, Shastri P. 2011. Application of artificial neural networks to food and fermentation technology. Artificial Neural Networks - Industrial and Control Engineering Applications. Intech, April 2011.

[9] Goyal S, GK Goyal. 2011a. Radial basis artificial neural network computer engineering approach for predicting shelf life of brown

[16] Cordoba BV, GE Arteaga, S Nakai. 1995. Predicting milk shelf-life

based on artificial neural networks and headspace gas chromatographic data. Journal of Food Science. 60(5): 885–888.

[17] Rusliana. EMS. 2013. Seleksi Parameter Dielektrik Penentuan Masa Kadaluwarsa Biskuit (Wafer) Dengan Pendekatan Regresi Linier, Feature Selection (Relief), dan Artificial Neural Network. In process review to Jurnal Teknologi Industri Pertanian.

[18] Lee CY. 2007. RC Circuits. http://www.isu.edu.tw/upload/52/35/
files/dept_35_lv_2_4168.pdf

[19] Robertson GL. 2010. Food Packaging and Shelf Life: A Pratical Guide.

Boca Raton, Florida: CRC Press.

[20] Siang JJ. 2009. Jaringan syaraf tiruan dan pemrograman menggunakan matlab. Andi Offset, Yogyakarta.

[21] Goyal S, GK Goyal. 2011d. Simulated neural network intelligent computing models for predicting shelf life of soft cakes. Global Journal of Computer Science and Technology 11(14):28-33.

[22] Mathworks. 2010. MATLAB Release 2010b. http://www.mathworks.com

IJSER © 2013 http://www.ijser.org