Mastitis Detection System in Dairy Cow Milk based on Fuzzy Inference System using Electrical Conductivity and Power of Hydrogen Sensor Value

  • Muhammad Syahrial Rukmana School of Computing, Telkom University, Bandung, Indonesia
  • Andrian Rakhmatsyah School of Computing, Telkom University, Bandung, Indonesia
  • Aulia Arif Wardana Telkom University
Keywords: mastitis, cow milk, fuzzy inference system, electrical conductivity, power of hydrogen


This study build a system for screening method to detect mastitis in dairy cow milk using Electrical Conductivity (EC) and Power of Hydrogen (pH) sensor. The value of EC and pH sensor is analyze using fuzzy logic to clarify the truth value between it. Mastitis in cows can cause loss and decrease milk production and quality in the dairy farmer industry. Currently, detecting mastitis in cow’s milk still done manually by looking at the color change of the milk and analyzing the cow behavior. This paper has designed a mastitis detection system using the Mamdani type fuzzy inference system and the final result will be displayed on an Android-based smartphone. From the test result, it was found that the system has 79.2% detection accuracy value. This system is suitable for alternative screening method that used to detect mastitis in dairy cow milk.


Download data is not yet available.


H. Kim, Y. Min, and B. Cho, Real-time Temperature Monitoring for The Early Detection of Mastitis in Dairy Cattle: Methods and Case Researches, Computers and Electronics in Agriculture, Vol. 162, pp. 119-125, 2019. DOI:

S. Nirwal, R. Pant, and N. Rai, Analysis of Milk Quality, Adulteration and Mastitis in Milk Samples Collected from Different Regions of Dehradun, International Journal of PharmTech Rresearch, Vol. 5, No. 2, pp. 359–364, 2013.

R. S. Fernando, R. B. Rindsig, and S. L. Spahr, Electrical Conductivity of Milk for Detection of Mastitis, J. Dairy Sci, Vol. 65, No. 4, pp. 659–664, 1982. DOI:

F. Shagufta, H. Eram, N. Hafsa, B. Spozhmai, L. Shanza, and L. Sidra, Determination of Mastitis by Measuring Milk Electrical Conductivity, Int. J. Adv. Res. Biol. Sci, Vol. 3, No. 10, pp. 164–171, 2016. DOI:

H. Batavani, R. Asri, and Naebzadeh, The Effect of Subclinical Mastitis on Milk Composition in Dairy Cows, Iran. J. Vet. Res, Vol. 8, No. 320, pp. 205–211, 2007.

E. D. Karimuribo et al., Clinical and Subclinical Mastitis in Smallholder Dairy Farms in Tanzania: Risk, Intervention and Knowledge Transfer, Prev. Vet. Med, Vol. 74, No. 1, pp. 84–98, 2006. DOI:

S. Shekhar et al., Association Between Somatic Cell Count, Electric Conductivity and pH in Diagnosis of Subclinical Mastitis in Crossbred Cows, Indian Journal of Veterinary Sciences & Biotechnology, Vol. 13, No. 3, 2018. DOI:

B. Champak, Low Cost Management Practices to Detect and Control Sub-Clinical Mastitis in Dairy Cattle, 2019.

A. Aarif et al., Metabolic Profiling of Dairy Cows Affected With Subclinical and Clinical Mastitis, Journal of Entomology and Zoology Studies, Vol. 5, No. 6, 2017.

T. J.ROSS, Fuzzy Logic With Engineering Application. Ed. 3, 2010. DOI:

D. Cavero, K. H. Tölle, C. Buxadé, and J. Krieter, Mastitis Detection in Dairy Cows by Application of Fuzzy Logic, Livestock Science, Vol. 105, No. 1–3, pp. 207–213, 2006. DOI:

E. Kramer et al., Mastitis and Lameness Detection in Dairy Cows by Application of Fuzzy Logic, Livestock Science, Vol. 125, No. 1, 2009. DOI:

Çoşkun, Fatma Sinem, and Uğur Zülkadir, The Use of Fuzzy Logic Approach in Evaluation of Subclinic Mastitis, Selcuk Journal of Agriculture and Food Sciences, Vol. 32, No. 3, 2018. DOI:

Mikail, Nazire, and Ismail Keskin, Subclinical Mastitis Prediction in Dairy Cattle by Application of Fuzzy Logic, 2015.

Mammadova, M. Nazira, and Ismail Keskin, Application of Neural Network and Adaptive Neuro-fuzzy Inference System to Predict Subclinical Mastitis in Dairy Cattle, Indian Journal of Animal Research, Vol. 49, No. 5, 2015. DOI:

T. Fuyang et al., An Automated On-line Clinical Mastitis Detection System Using Measurement of Electrical Parameters and Milk Production Efficiency, Journal of Physics: Conference Series, Vol. 1676, No. 1, 2020. DOI:

Gelasakis, I. Athanasios et al., Prediction of sheep milk chemical composition using milk yield, pH, electrical conductivity and refractive index, The Journal of Dairy Research, Vol. 85, No. 1, 2018. DOI:

Cais-Sokolińska, Dorota et al., Analysis of Metabolic Activity of Lactic Acid Bacteria and Yeast in Model Kefirs Made from Goat’s Milk and Mixtures of Goat’s Milk with Mare’s Milk based on Changes in Electrical Conductivity and Impedance, Mljekarstvo, Vol. 67, No. 4, 2017. DOI:

Hadef, Leyla, Brahim Hamad, and Hebib Aggad, Effect of Subclinical Mastitis on Milk Yield and Milk Composition Parameters in Dairy Camels, Acta Biologica Szegediensis, Vol. 63, No. 2, 2019. DOI:

A. A. Wardana et al., Internet of Things Platform for Manage Multiple Message Queuing Telemetry Transport Broker Server, Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control, Vol. 4, No. 3, 2019. DOI:

Minarno, Agus Eko, and Aulia Arif Wardhana, Monitoring Power Meter Pada Pembangkit Listrik Tenaga Mikro Hidro Dan Pembangkit Listrik Tenaga Surya Menggunakan Arduino Ethernet Shield Dan Cloud Service, Prosiding SENTRA (Seminar Teknologi dan Rekayasa), No. 1, 2018.

Pradana, Muhammad Adna, Andrian Rakhmatsyah, and Aulia Arif Wardana, Flatbuffers Implementation on MQTT Publish/Subscribe Communication as Data Delivery Format, 6th International Conference on Electrical Engineering, Computer Science and Informatics (EECSI), 2019. DOI:

Princy. S, Dhenakaran. S. S, Comparison of Triangular and Trapeziodal Fuzzy Membership Function, J. Comput. Sci. Eng, Vol. 2, pp. 45-61, 2016.

R. K. and D. B. DK Bagri, RK Pandey, GK Bagri, Effect of Subclinical Mastitis on Milk Composition in Lactating Cows, J. Entomol. Zool. Stud, Vol. 6, No. 5, pp. 231–236, 2018.

E. Norberg et al., Electrical Conductivity of Milk: Ability to Predict Mastitis Status, Journal of Dairy Science, Vol. 87, No. 4, 2004. DOI:

S. A. Kandeel et al., Ability of Milk pH to Predict Subclinical Mastitis and Intramammary Infection in Quarters from Lactating Dairy Cattle, Journal of Dairy Science, Vol. 102, No. 2, 2019. DOI:

How to Cite
Muhammad Syahrial Rukmana, Andrian Rakhmatsyah, & Wardana, A. A. (2021). Mastitis Detection System in Dairy Cow Milk based on Fuzzy Inference System using Electrical Conductivity and Power of Hydrogen Sensor Value. EMITTER International Journal of Engineering Technology, 9(1), 154-168.