You are on page 1of 4

JOURNAL OF COMPUTING, VOLUME 3, ISSUE 5, MAY 2011, ISSN 2151-9617 HTTPS://SITES.GOOGLE.

COM/SITE/JOURNALOFCOMPUTING/ WWW.JOURNALOFCOMPUTING.ORG

38

Butter Churning Process Automating Based on Acoustic Signals
Ahmad Aljaafreh
Abstract— This Paper describes a system for automating butter churning process by utilizing digital signal processing techniques based on the the sound of the churning process. Butter churning is a process to extract butter from the whole milk by mechanical motion. To the best of our knowledge we are the first who thinks of automating butter churning process based on churning acoustic signature. The argument of this paper is that sound of the churning varies according to the phase of the whole process. The churning process is divided in this paper into three phases. The first, is the churning phase, the second is the butter-begin phase, where the butter start coming, and the last phase is the butter collection phase, where the butter grains is gathered and the churning process ends. This paper characterizes the sound of each churning phase. A feature vector is extracted from each phase sound based on spectrum distribution. Artificial neural network is used in this paper as a classifier. Results show that the sound of each phase can be used to characterize the phases of the churning process. The shushing sound of the butter grains motion is recognized in this paper and can be utilized to automate the churning process. This paper also describes the design and in implementation of the system using dsPIC digital signal controller. Index Terms— Butter Churning, Acoustic Signal, Classification, Neural Network, dsPIC.

——————————  ——————————

1 INTRODUCTION

A

butter churn is a device used to make butter by shaking up the whole milk (or cream). The device agitates the cream by the mechanical motion, which disrupts the fat in the milk. Butter grains are formed by breaking down the membranes that surround the fat. Churning causes these grains to fuse with each other and form the butter. The liquid that is left out without fat is called buttermilk. Because of the technological development butter churns have varied over time. First, butter churns were made of animal materials like animal skins. Later other materials like wood, metal or glass were used as containers to churn butter. After that electrical centrifugal cream separators were used. Churning process is still a manual process, where human being makes the decision when to end the churning process, when the optimal quantity or equality of fat or butter milk is collected. Human being depends on external devices to decide when to finish the churning process, like the device that measures the fat density on the buttermilk. This research has two major objectives, the first is to automate the butter churning process, and the second one is to improve the churning process efficiency. In this research we suggest a new method to detect the end of the churning process based on the sounds that is emitted from the churning process. We assume that the sound of the churning varies according to the phase of the whole process. A shushing noise is heard when the butter comes [1] or when the cream breaks into butter particles and buttermilk. When the butter is coming, it is easily ascertained by the sound [2]. To the best of our knowledge we are the
————————————————

first who study automating butter churning process based on acoustic noise. This motivates us to analyze the sound of the butter churning. Thus, different churning sounds are recorded to be analyzed. These sounds are analyzed to extract and select the best feature vector that discriminates between the different phases of the churning process. After that the ripening time is determined by classification of the churning sounds, which affects the characteristics of the churning. Effect of physical ripening time of the cream on churning characteristics is explained in [5]. This paper proposes a new, cheap, and efficient method to automate the churning process since automating food industry improves the production efficiency.

2 FEATURE EXTRACTION
In feature extraction certain transforms or techniques are used to select and generate the features that represent the characteristics of the sound signal. This set of features is called a feature vector. Feature vectors could be generated in time, frequency, or time \ frequency domain [3]. Frequency based feature generation methods, like Fast Fourier Transform (FFT), are common approaches in acoustic signature classification. Classification in this paper is based on frequency domain analysis. The overall spectrum distribution is used to extract features, since we assume most of the information of different churning phase's sounds is represented by spectrum distribution [3]. In this paper we used the modified variation of the scheme we developed in [4] for extracting a low dimension feature vector to obtain good classification results. The feature extraction technique of acoustic signals in this paper is based on the low frequency band of the overall spectrum distribution. The low frequency band is utilized, because most of the frequency components are harmonics that are based on the angular speed of the but-

 Author is with the Department of Electrical Engineering, Tafila Technical University, Tafila 66110, Jordan.

JOURNAL OF COMPUTING, VOLUME 3, ISSUE 5, MAY 2011, ISSN 2151-9617 HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/ WWW.JOURNALOFCOMPUTING.ORG

39

ter churn, mainly less than 500 Hz. Sounds of butter churning phases are recorded at a rate of 11025 Hz. After that the sound signal is preprocessed as in the following sections.

2.1 Time Processing Stage
DC bias removing by subtracting the mean from the time series sounds

xi n  = xi n  

 x n 
i

(1)

terizes each churning phase sound. The median is used in this paper because of the noisy environments. Fig.1 displays the acoustic signals of the three phases of the churning process, while Fig. 2 Shows the spectrogram of the sounds. It also shows the peaks of the frequencies, it is quite clear that most of the information is in the low frequency band. For the Unknown utterance, the same steps are done, except one frame of FFT is considered as the feature to be classified to reduce the cost of computation, because this FFT computation is performed on-line. This can be extended to have multiple frames, but this increases the cost of computation.

N
2 ARTIFICIAL NEURAL NETWORK (ANN)
Artificial neural network is a learning intelligent tool used to solve problem that hard to be modeled analytically. A key feature of neural networks is the ability to learn from examples of input/ output pairs in a supervised fashion. Artificial neural networks have been used as a technique for classification. In our case, there are three classes: class one is the churn sound, which is the sound of the motion of the cream particles, the second class is the sound of the coming of the butter, and the third class is the sound of the butter collection, which is the shushing sound. Multiple sounds are recorded for each class, and then the 32-length feature vectors are extracted from all of these sounds. These sets of feature vectors for all classes are used to train the neural network. An input of 400 samples of 32 features is used to train, validate, and test the neural network. The targets are three represent the three phases of the churning process. The 400 samples are randomly divided to 70%, 15%, and 15% for training, validation, and test respectively. So the network is trained with 280 samples, validated with 60 samples, and tested with 60 samples. A three layer network with 10 hidden neurons is trained using scaled conjugate gradient backpropagation. The performance of the neural network is shown in Tables 1. The overall correct classification rate is shown in the last column of the table, which is 98.3%. This indicates that the feature extraction method is efficient and can be used to track the churning process phases.

Fig. 1. Time domain of the three phases sounds

2.2 SPECTRUM ANALYSIS
Feature vector will be the median of the magnitude of the STFT of a signal of event. It will be computed as the following: the magnitude of the spectrum is computed by FFT for a hamming window of size 512, with 128 overlapping.

X i W  = FFT  xi n 

(2)

X i W  =

X i W   X i W 

(3)

Fig. 4. System Layout

After that, the spectrum magnitude is normalized for every frame as in equ. 3. Where K is the window size. The median of all frames is considered as the extracted feature vector. X if W = median X i W (4)

4 SYSTEM FLOWCHART
Digital signal controller is used in this system as in Fig. 4 to process the sounds to extract the feature vector and classify it to one of the three classes. Fig. 5 clarifies the principle of work of the system. The system starts working when the butter churning machine starts working.

 

  

The first 32 points of the median of the spectrum magnitude contain up to 300 Hz. This gives a 32 dimensional vector that charac-

© 2011 Journal of Computing Press, NY, USA, ISSN 2151-9617 http://sites.google.com/site/journalofcomputing/

JOURNAL OF COMPUTING, VOLUME 3, ISSUE 5, MAY 2011, ISSN 2151-9617 HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/ WWW.JOURNALOFCOMPUTING.ORG

40

Firstly it initializes and starts audio codec driver and flash memory driver in the dsPIC strater kit as in Fig. 4. After that the system starts recording the butter churning sound then extract feature for the sound by using FFT. FFT computation is implemented by calling “FFTComplexIP ( )” function from Microchip signal processing library. Then ANN is used to classify the recorded sounds to one the followings classes: 1. Butter starts class. 2. Butter churns class. 3. Butter collection class. If the sound is classified to butter start class, the record and classify process continues. If the sound is classified to butter churn class record will also continue and a LED will be set. If the sound is classified to butter collection class an alarm will sound for class 3 and stop the churning process.

TABLE 1 CORRECT CLASSIFICATION RATE Training Correct Classification Rate 99.50% Validation 98.30% Test 93.30%

of the the three phases sounds in Fig. 3.

6 CONCLUSION
This paper proposed a new method to determine the physical ripening time of the butter churning process based on the acoustic emission. Digital signal processing techniques are used to extract features from the sounds of the churning phases. The churning sounds are categorized in this paper to three categories, the first is the churn, second is the butter-begin, and the third is the butter-collection phase. Each sound is considered as a class and artificial neural network is used as a classifier. An average correct classification rate of 98% is obtained. Acoustic emissions are efficient features that can be used for butter churning automating process.

5 RESULTS AND DISCUSSION
Results in this paper are based on real life butter churning sounds that are recorded in Agricultural Research Station in Mu'tah University. A microphone is placed on an electrical butter churn and record the whole process for several times. Matlab is used to analyze the sounds. After analysis, the whole process is divided into three phase: phase 1 is the churn sound, phase 2 is the butter-coming phase, and phase three is the collection of the butter and the end of the whole process. Fast Fourier Transform (FFT) is used for feature extraction. Fig. 3 shows that each phase sound can be characterized by its own feature vector. This means that the frequency components magnitudes vary from phase to phase. This variation is due to the change of

ACKNOWLEDGMENT
All thanks to Agricultural Research Station in Mu'tah University for providing facilities to record the sounds of the butter churning process.

Fig. 1. Spectrogram of the three sound phases

Fig. 1. Feature vectors of the three phases sounds

butter grain size. Thus the sound of the phases changes with time. This changes in sound is clear in the spectrum

JOURNAL OF COMPUTING, VOLUME 3, ISSUE 5, MAY 2011, ISSN 2151-9617 HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/ WWW.JOURNALOFCOMPUTING.ORG

41

Fig. 5. System Flow Diagram

REFERENCES
[1] http://www.positron.org/food/butter/

[2] http://www.webexhibits.org/butter/
[3] Aljaafreh A, Al-Fuqaha A. Multi-Target Classification Using Acoustic Signatures in Wireless Sensor Networks: A survey. Signal Processing: An International Journal (SPIJ), Volume (4): Issue (4), 2010. Aljaafreh A, Dong L. An evaluation of feature extraction methods for vehicle classification based on acoustic signals. Proc. IEEE International Conference ON Networking, Sensing and Control (ICNSC), Apr. 2010. Funahashi H., Horiuchi J. Characteristics of the churning process in continuous butter manufacture and modelling using an artificial neutral network. International Dairy Journal, 2008.

[4]

[5]