The main goal of our research is to define the freshness of milk and identify factors that influence it. From our point of view, an experiment was conducted to describe the effect of temperature variations on the freshness of milk. In the experiment we used two types of milk; pasteurized and unpasteurized, which were placed at two different temperatures; cold (in fridge) and room.
From the experiment, we observed changes in the pH value of milk both due to temperature and also taking into account physical changes in milk; taste, color, smell and texture. Meanwhile, based on the experiment we conducted, we could say that using the pH sensor alone, which is an e-tongue, is not enough to determine whether the milk has spoiled or not. On the other hand, a special thanks also goes to the members of my team, who have been with me since the first day of the project, experienced various problems together, kept me company and spent their time to complete this project.
Background of study
Problem Statement
Determining Freshness of Milk
Objectives and Scope of Study
Relevancy
Feasibility
Applications of E-tongue
Quality Changes in Milk Due to Temperature
Integrating E-tongue with E-nose
Data Analysis by using Neural Network in Matlab
If the multiplier value is greater than the bias, bn, then the output, Yn will be '1', otherwise '0'.
Work Done
- Literature Review
- Getting Familiar with Neural Network in Matlab
- Literature Determining the Boundaries
- Perceptron Learning Rule
- First Experiment
- Tools and Materials
- Procedure
- Second Experiment
- Tools and Materials
- Procedure
For this section, the boundary line is manually adjusted so that the black and white dots are classified in their own region. Noticed the color change of the white dots before and after the border line was applied. Meanwhile, the perceptron for this section is trained up to several times before the boundary line can be automatically estimated.
In the second image, we notice that the white and black dots can be classified according to their area after the boundary line is estimated. An experiment has been done during FYP1 to get some data that can be used to play with Matlab. The experiment was carried out in such a way that two types of milk are used; pasteurized and unpasteurized, where the experiment is carried out under cold (refrigerator) and room temperature.
The purpose of conducting this experiment was to see the effect of temperature variations on the freshness of milk. In our case here, we need to measure the pH value of the milk, while also taking into account the physical changes of the milk to determine the freshness of the milk in relation to the temperature. For the beakers that are placed in the refrigerator, the readings were taken at a fixed temperature (13.8 for pasteurized and 16.3 for unpasteurized), since the temperature will tend to rise to room temperature when we put it outside .. 10) The experiment was conducted for five days to get more data for classifications.
To further improve the results, the sensor was immersed in milk for about 5 to 8 minutes so that more accurate data could be measured. Another improvement made in this second experiment was to warm the milk that was in the refrigerator to room temperature after 3 to 4 days of the experiment. The intention is for the milk to spoil after almost 1 day outside before you put it back in the fridge.
The same as in the first experiment, we are going to measure the pH value of the milk while also taking into account the physical changes of the milk to determine the freshness of milk in relation to the temperature.
Project Activities
Project Flow Chart
Gantt Chart and Key Milestone
Tools and Materials Needed
First Experiment
- Results
- Observations
- Discussions on Results and Observations
- Conclusion and Recommendation
Based on the experiments and observations we have made, we have also prepared a table that discusses the physical changes of the milk for each day, where we come to a conclusion about which milk is good and spoiled after a few days. From the results and results we have obtained, we can say that after a day, the milk that was placed at room temperature was already spoiled. Besides that, we could also see that there were drastic changes in the pH value after two days at room temperature.
Thus, we can say that milk placed at room temperature spoils very quickly due to the higher rate of growth and activity of bacteria, which in turn has reduced the pH value as well as changed its properties. physical. Regarding the milk that was stored in the refrigerator, we can say that the pasteurized milk remained fresh after several days. Although they have a slight decrease in the pH value due to the activity of bacteria, but the properties of the pasteurized milk remained the same, so it can be said that the milk still remains fresh.
However, after a few days we can see that it has almost spoiled as there was a drop in pH value as well as very little sour smell and two layers of textures are formed. From the experiment we did, we believed that the pH meter that relatively represents the e-tongue cannot tell us alone whether the milk has spoiled or not. This is because the pH value we obtained does not have a concrete reason to assume that at this certain value or drop in pH, the milk is spoiled.
This has to be said as the milk we stored in the fridge also dropped in pH but remained fresh. Meanwhile, we also still depend on the physical changes in the milk such as the smell and color to decide on the freshness of the milk. This basically shows the limitation of using e-tongue with only pH as the sensor as there is only pH value to be evaluated.
Thus comes the e-nose which will in fact be used to detect the gas released by the milk.
Data Classification in Neural Network (First Experiment)
- Labeling the Data/Results
- Matlab Coding
- Plotting Results
- Explaining the Codes
- Example if net.adaptParam.passes is very small
Once the labeling is done, we need to transfer this data into Matlab coding before we can classify it.
Second Experiment
- Results
- Observations
- Discussions on Results and Observations
- Conclusion and Recommendation
From the results and observations we have obtained, we can say that after half a day, the milk kept at room temperature, whether it was pasteurized or unpasteurized, was already spoiled. Besides that, we could also see that there were drastic changes in the milk's pH value after a few days of exposure to room temperature. Regarding the milk that was stored in the refrigerator, we can say that for pasteurized milk, it remains fresh until the end of the experiment.
On the other hand, a drastic drop in pH can also be observed when milk spoils. When the milk goes bad, we put them back in the fridge, where we can see the pH drop a bit more before leveling off. The low temperature of the refrigerator may have limited the activity of bacteria that prevent the milk from spoiling badly.
This may be due to the cold temperature effect that inhibits bacterial activity, which is supposed to make the milk go bad at around pH 6.84 if placed at room temperature. Additionally, the difference between the pH threshold for pasteurized and unpasteurized may be due to the treatment the pasteurized milk receives, which helps lower the threshold and extend the life of the milk. We can only assume the threshold value for the milk to go bad, but it can vary depending on the situation, especially for the unpasteurized milk, where in this experiment we had difficulty determining.
Perhaps a more focused study could be done on the transition of milk from good to bad so that we could have a better cutoff value, especially for unpasteurized milk. We can see from the diagram that it is very difficult to tell whether the milk placed at a cold temperature is still good or bad, as some of the readings are below the supposed threshold limit. For the first attempt, we can say that despite the fact that the obtained data were not very reliable at first, we still managed to classify milk into good and bad through a neural network using a single perceptron.
In addition, we have also managed to determine the border of the transition of milk from good to bad.
Data Classification in Neural Network (Second Experiment)
Matlab Coding
Results Plotting and Discussions
- Pasteurized Milk
- Unpasteurized Milk
But when we considered the features; by the taste and color of milk stored at a low temperature, it can be said that it is still drinkable, although it smells slightly of yogurt and two layers are formed. The milk may be supposed to spoil, but the low temperature inhibits the action of the bacteria, making the milk drinkable for several days.
New Input Entry
Overall Discussions
A new thing that is being applied was that the milk placed inside the refrigerator is spoiled by keeping it at room temperature for a day and putting it back in the refrigerator. As in FYP 1, the data obtained will then be used with Neural Network in Matlab to classify this milk as good or bad. As an improvement, in FYP 2, we were using multi-layer perceptrons which can classify data much better.
In addition, we also added a new feature to the codes where a new dataset can be included in the grid for classifications. This was achieved based on the results of the neural network experiment where we found that the threshold value for pasteurized milk is lower compared to unpasteurized milk. The lower threshold value may be due to the treatment the pasteurized milk received that helps it stay fresh longer.
As a conclusion, I can say that the classification of milk using e-tongue is promising. Some recommendations are provided below which can be very helpful to improve our FYP for future development. Study focusing on the transition period when milk changes from good to bad can be done to get a better threshold value especially for the unpasteurized milk.